From f2c19ec0c130777e834eeff6e05f5be893b35532 Mon Sep 17 00:00:00 2001 From: Pengchong Hu Date: Fri, 26 Jun 2026 16:10:17 +0200 Subject: [PATCH 1/2] add toy model to phi --- .../Tasks/multiharmonicCorrelations.cxx | 20 +++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/PWGCF/MultiparticleCorrelations/Tasks/multiharmonicCorrelations.cxx b/PWGCF/MultiparticleCorrelations/Tasks/multiharmonicCorrelations.cxx index dc23a0ccd64..46f550d4ba1 100644 --- a/PWGCF/MultiparticleCorrelations/Tasks/multiharmonicCorrelations.cxx +++ b/PWGCF/MultiparticleCorrelations/Tasks/multiharmonicCorrelations.cxx @@ -26,6 +26,7 @@ #include #include +#include #include #include #include @@ -114,6 +115,7 @@ struct MultiharmonicCorrelations { // this name is used in lower-case format to Configurable cfQA{"cfQA", true, "quality assurance"}; Configurable cfInitsim{"cfInitsim", false, "init histograms of sim"}; Configurable cfUseWeights{"cfUseWeights", true, "use weights"}; + Configurable cfToyModel{"cfToyModel", true, "phi-distribution from toy model"}; Configurable> cfVertexZ{"cfVertexZ", {-10, 10.}, "vertex z position range: {min, max}[cm], with convention: min <= Vz < max"}; Configurable> cfPt{"cfPt", {0.2, 5.0}, "transverse momentum range"}; @@ -399,6 +401,15 @@ struct MultiharmonicCorrelations { // this name is used in lower-case format to return four; } // TComplex Four(Int_t n1, Int_t n2, Int_t n3, Int_t n4) + static double pdf(double* x, double* par) + { + double y = 1; + for (int i = 0; i < 6; i = i + 1) { + y = y + 2 * (0.04 + (i + 1.) * 0.01) * TMath::Cos((i + 1) * (x[0] - par[0])); + } + return y; + } + template void Steer(T1 const& collision, T2 const& tracks) { @@ -412,6 +423,8 @@ struct MultiharmonicCorrelations { // this name is used in lower-case format to auto it = phih.histMap.find(currentRun); auto histweight = wh.weightsmap.find(currentRun); float centr = 0, M = 0., msel = 0.; + TF1* f = new TF1("f", pdf, 0, TMath::TwoPi(), 1); + f->SetParameters(0.); if constexpr (rs == eRec || rs == eRecAndSim) { if (cfCent.value == "FT0C") @@ -511,6 +524,9 @@ struct MultiharmonicCorrelations { // this name is used in lower-case format to event.fEventHistograms[ePt][eRec][1]->Fill(ptrec); phi = track.phi(); + if (cfToyModel) { + phi = f->GetRandom(); + } if (it != phih.histMap.end()) { it->second->Fill(phi); } @@ -674,8 +690,8 @@ struct MultiharmonicCorrelations { // this name is used in lower-case format to float maxdcaxy = l_dcaxy_bins[2]; float mindcaz = l_dcaz_bins[1]; float maxdcaz = l_dcaz_bins[2]; - float maxncontr = l_ncontr_bins[1]; - float minncontr = l_ncontr_bins[2]; + float minncontr = l_ncontr_bins[1]; + float maxncontr = l_ncontr_bins[2]; const char* cevent[] = {"vertexZ", "Pt"}; const char* cpro[] = {"rec", "sim"}; From ca873ec2b4e63196c830060b05075ca03f3a86e7 Mon Sep 17 00:00:00 2001 From: Pengchong Hu Date: Fri, 26 Jun 2026 16:33:25 +0200 Subject: [PATCH 2/2] fix for linter --- .../Tasks/multiharmonicCorrelations.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/PWGCF/MultiparticleCorrelations/Tasks/multiharmonicCorrelations.cxx b/PWGCF/MultiparticleCorrelations/Tasks/multiharmonicCorrelations.cxx index 46f550d4ba1..163d2ba19d6 100644 --- a/PWGCF/MultiparticleCorrelations/Tasks/multiharmonicCorrelations.cxx +++ b/PWGCF/MultiparticleCorrelations/Tasks/multiharmonicCorrelations.cxx @@ -404,7 +404,8 @@ struct MultiharmonicCorrelations { // this name is used in lower-case format to static double pdf(double* x, double* par) { double y = 1; - for (int i = 0; i < 6; i = i + 1) { + int harm = 6; + for (int i = 0; i < harm; i = i + 1) { y = y + 2 * (0.04 + (i + 1.) * 0.01) * TMath::Cos((i + 1) * (x[0] - par[0])); } return y;