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,16 @@ 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+ int harm = 6 ;
408+ for (int i = 0 ; i < harm; i = i + 1 ) {
409+ y = y + 2 * (0.04 + (i + 1 .) * 0.01 ) * TMath::Cos ((i + 1 ) * (x[0 ] - par[0 ]));
410+ }
411+ return y;
412+ }
413+
402414 template <eRecSim rs, typename T1 , typename T2 >
403415 void Steer (T1 const & collision, T2 const & tracks)
404416 {
@@ -412,6 +424,8 @@ struct MultiharmonicCorrelations { // this name is used in lower-case format to
412424 auto it = phih.histMap .find (currentRun);
413425 auto histweight = wh.weightsmap .find (currentRun);
414426 float centr = 0 , M = 0 ., msel = 0 .;
427+ TF1 * f = new TF1 (" f" , pdf, 0 , TMath::TwoPi (), 1 );
428+ f->SetParameters (0 .);
415429
416430 if constexpr (rs == eRec || rs == eRecAndSim) {
417431 if (cfCent.value == " FT0C" )
@@ -511,6 +525,9 @@ struct MultiharmonicCorrelations { // this name is used in lower-case format to
511525 event.fEventHistograms [ePt][eRec][1 ]->Fill (ptrec);
512526
513527 phi = track.phi ();
528+ if (cfToyModel) {
529+ phi = f->GetRandom ();
530+ }
514531 if (it != phih.histMap .end ()) {
515532 it->second ->Fill (phi);
516533 }
@@ -674,8 +691,8 @@ struct MultiharmonicCorrelations { // this name is used in lower-case format to
674691 float maxdcaxy = l_dcaxy_bins[2 ];
675692 float mindcaz = l_dcaz_bins[1 ];
676693 float maxdcaz = l_dcaz_bins[2 ];
677- float maxncontr = l_ncontr_bins[1 ];
678- float minncontr = l_ncontr_bins[2 ];
694+ float minncontr = l_ncontr_bins[1 ];
695+ float maxncontr = l_ncontr_bins[2 ];
679696
680697 const char * cevent[] = {" vertexZ" , " Pt" };
681698 const char * cpro[] = {" rec" , " sim" };
0 commit comments