2626
2727#include < TCollection.h>
2828#include < TComplex.h>
29+ #include < TF1.h>
2930#include < TFile.h>
3031#include < TGrid.h>
3132#include < TH1.h>
@@ -114,6 +115,7 @@ struct MultiharmonicCorrelations { // this name is used in lower-case format to
114115 Configurable<bool > cfQA{" cfQA" , true , " quality assurance" };
115116 Configurable<bool > cfInitsim{" cfInitsim" , false , " init histograms of sim" };
116117 Configurable<bool > cfUseWeights{" cfUseWeights" , true , " use weights" };
118+ Configurable<bool > cfToyModel{" cfToyModel" , true , " phi-distribution from toy model" };
117119
118120 Configurable<std::vector<float >> cfVertexZ{" cfVertexZ" , {-10 , 10 .}, " vertex z position range: {min, max}[cm], with convention: min <= Vz < max" };
119121 Configurable<std::vector<float >> cfPt{" cfPt" , {0.2 , 5.0 }, " transverse momentum range" };
@@ -399,6 +401,15 @@ struct MultiharmonicCorrelations { // this name is used in lower-case format to
399401 return four;
400402 } // TComplex Four(Int_t n1, Int_t n2, Int_t n3, Int_t n4)
401403
404+ static double pdf (double * x, double * par)
405+ {
406+ double y = 1 ;
407+ for (int i = 0 ; i < 6 ; i = i + 1 ) {
408+ y = y + 2 * (0.04 + (i + 1 .) * 0.01 ) * TMath::Cos ((i + 1 ) * (x[0 ] - par[0 ]));
409+ }
410+ return y;
411+ }
412+
402413 template <eRecSim rs, typename T1 , typename T2 >
403414 void Steer (T1 const & collision, T2 const & tracks)
404415 {
@@ -412,6 +423,8 @@ struct MultiharmonicCorrelations { // this name is used in lower-case format to
412423 auto it = phih.histMap .find (currentRun);
413424 auto histweight = wh.weightsmap .find (currentRun);
414425 float centr = 0 , M = 0 ., msel = 0 .;
426+ TF1 * f = new TF1 (" f" , pdf, 0 , TMath::TwoPi (), 1 );
427+ f->SetParameters (0 .);
415428
416429 if constexpr (rs == eRec || rs == eRecAndSim) {
417430 if (cfCent.value == " FT0C" )
@@ -511,6 +524,9 @@ struct MultiharmonicCorrelations { // this name is used in lower-case format to
511524 event.fEventHistograms [ePt][eRec][1 ]->Fill (ptrec);
512525
513526 phi = track.phi ();
527+ if (cfToyModel) {
528+ phi = f->GetRandom ();
529+ }
514530 if (it != phih.histMap .end ()) {
515531 it->second ->Fill (phi);
516532 }
@@ -674,8 +690,8 @@ struct MultiharmonicCorrelations { // this name is used in lower-case format to
674690 float maxdcaxy = l_dcaxy_bins[2 ];
675691 float mindcaz = l_dcaz_bins[1 ];
676692 float maxdcaz = l_dcaz_bins[2 ];
677- float maxncontr = l_ncontr_bins[1 ];
678- float minncontr = l_ncontr_bins[2 ];
693+ float minncontr = l_ncontr_bins[1 ];
694+ float maxncontr = l_ncontr_bins[2 ];
679695
680696 const char * cevent[] = {" vertexZ" , " Pt" };
681697 const char * cpro[] = {" rec" , " sim" };
0 commit comments