@@ -103,6 +103,7 @@ struct MultiharmonicCorrelations { // this name is used in lower-case format to
103103 Configurable<std::vector<float >> cfYBins{" cfYBins" , {1000 , -0.01 , 0.006 }, " nYBins, yMin, yMax" };
104104 Configurable<std::vector<float >> cfZBins{" cfZBins" , {1000 , -20 ., 20 .}, " nZBins, zMin, zMax" };
105105 Configurable<std::vector<float >> cfMultBins{" cfMultBins" , {50 , 0 , 2e4 }, " nMultBins, multMin, multMax" };
106+ Configurable<std::vector<float >> cfMselBins{" cfMselBins" , {50 , 0 , 1e3 }, " nMselBins, mselMin, mselMax" };
106107 Configurable<std::vector<float >> cfTPCnclsBins{" cfTPCnclsBins" , {100 , 0 ., 200 .}, " ntpcnclsBins, tpnclsMin, tpcnclsMax" };
107108 Configurable<std::vector<float >> cfDCAxyBins{" cfDCAxyBins" , {1000 , -0.5 , 0.5 }, " ndcaxyBins, dcaxyMin, dcaxyMax" };
108109 Configurable<std::vector<float >> cfDCAzBins{" cfDCAzBins" , {1000 , -3 ., 3 .}, " ndcazBins, dcazMin, dcazMax" };
@@ -111,6 +112,7 @@ struct MultiharmonicCorrelations { // this name is used in lower-case format to
111112 Configurable<std::string> cfCent{" cfCent" , " FT0C" , " centrality estimator" };
112113 Configurable<std::string> cfMult{" cfMult" , " TPC" , " multiplicity" };
113114 Configurable<bool > cfQA{" cfQA" , true , " quality assurance" };
115+ Configurable<bool > cfInitsim{" cfInitsim" , false , " init histograms of sim" };
114116
115117 Configurable<std::vector<float >> cfVertexZ{" cfVertexZ" , {-10 , 10 .}, " vertex z position range: {min, max}[cm], with convention: min <= Vz < max" };
116118 Configurable<std::vector<float >> cfPt{" cfPt" , {0.2 , 5.0 }, " transverse momentum range" };
@@ -143,6 +145,7 @@ struct MultiharmonicCorrelations { // this name is used in lower-case format to
143145 TList* fEventHistogramsList = NULL ;
144146 TH1F * fHistCentr [2 ] = {NULL };
145147 TH1I * fHistMult [2 ] = {NULL };
148+ TH1F * fHistMsel = NULL ;
146149 TH1F * fHistX [2 ] = {NULL };
147150 TH1F * fHistY [2 ] = {NULL };
148151 TH1F * fHistZ [2 ] = {NULL };
@@ -346,7 +349,8 @@ struct MultiharmonicCorrelations { // this name is used in lower-case format to
346349 float vertexZmin = static_cast <float >(vertexZ[0 ]);
347350 float vertexZmax = static_cast <float >(vertexZ[1 ]);
348351 float posZ = collision.posZ ();
349- if (posZ < vertexZmin || posZ > vertexZmax || (!collision.sel8 ()))
352+ float NContrcut = 2 .;
353+ if (posZ < vertexZmin || posZ > vertexZmax || (!collision.sel8 ()) || collision.numContrib () < NContrcut)
350354 return false ;
351355 return true ;
352356 }
@@ -396,7 +400,7 @@ struct MultiharmonicCorrelations { // this name is used in lower-case format to
396400 int currentRun = collision.bc ().runNumber ();
397401 auto it = phih.histMap .find (currentRun);
398402 auto histweight = pc.weightsmap .find (currentRun);
399- float centr = 0 , M = 0 .;
403+ float centr = 0 , M = 0 ., msel = 0 . ;
400404
401405 if constexpr (rs == eRec || rs == eRecAndSim) {
402406 event.fHistX [eRec]->Fill (collision.posX ());
@@ -504,30 +508,32 @@ struct MultiharmonicCorrelations { // this name is used in lower-case format to
504508 } // if constexpr (rs == eRec || rs == eRecAndSim)
505509
506510 // analysis in the loop over particle
511+ msel = msel + 1 ;
507512 for (int ih = 0 ; ih < maxHarmonic; ih++) {
508513 cor.Qvector [ih] += TComplex (weight * TMath::Cos (ih * phi), weight * TMath::Sin (ih * phi));
509514 }
510515 } // end of for (auto track: tracks)
516+ event.fHistMsel ->Fill (msel);
511517 // calculate correlations
512518 float Mmin = 4 .;
513- if (M < Mmin)
519+ if (msel < Mmin)
514520 return ;
515521 float four32 = Four (3 , 2 , -3 , -2 ).Re () / Four (0 , 0 , 0 , 0 ).Re ();
516522 float four42 = Four (4 , 2 , -4 , -2 ).Re () / Four (0 , 0 , 0 , 0 ).Re ();
517- float v22 = (Q (2 ).Rho2 () - M ) / (M * (M - 1 .));
518- float v32 = (Q (3 ).Rho2 () - M ) / (M * (M - 1 .));
519- float v42 = (Q (4 ).Rho2 () - M ) / (M * (M - 1 .));
523+ float v22 = (Q (2 ).Rho2 () - msel ) / (msel * (msel - 1 .));
524+ float v32 = (Q (3 ).Rho2 () - msel ) / (msel * (msel - 1 .));
525+ float v42 = (Q (4 ).Rho2 () - msel ) / (msel * (msel - 1 .));
520526 if (std::isnan (v22) || std::isnan (v32) || std::isnan (v42) || std::isnan (four32) || std::isnan (four42)) {
521527 LOGF (info, " \033 [1;31m%s std::isnan(v22) || std::isnan(v32) || std::isnan(v42) || std::isnan(four32) || std::isnan(four42)\033 [0m" , __FUNCTION__);
522528 LOGF (error, " v22 = %f\n v32 = %f\n v42 = %f\n four32=%f\n v42 = %f\n " , v22, v32, v42, four32, four42);
523529 return ;
524530 }
525531
526- cor.pv22_centr ->Fill (centr, v22, M * (M - 1 ));
527- cor.pv32_centr ->Fill (centr, v32, M * (M - 1 ));
528- cor.pv42_centr ->Fill (centr, v42, M * (M - 1 ));
529- cor.pfour32_centr ->Fill (centr, four32, M * (M - 1 ));
530- cor.pfour42_centr ->Fill (centr, four42, M * (M - 1 ));
532+ cor.pv22_centr ->Fill (centr, v22, msel * (msel - 1 ));
533+ cor.pv32_centr ->Fill (centr, v32, msel * (msel - 1 ));
534+ cor.pv42_centr ->Fill (centr, v42, msel * (msel - 1 ));
535+ cor.pfour32_centr ->Fill (centr, four32, msel * (msel - 1 ));
536+ cor.pfour42_centr ->Fill (centr, four42, msel * (msel - 1 ));
531537
532538 } // end of template <eRecSim rs, typename T1, typename T2> void Steer(T1 const& collision, T2 const& tracks)
533539
@@ -583,6 +589,7 @@ struct MultiharmonicCorrelations { // this name is used in lower-case format to
583589 vector<float > l_y_bins = cfYBins.value ;
584590 vector<float > l_z_bins = cfZBins.value ;
585591 vector<float > l_mult_bins = cfMultBins.value ;
592+ vector<float > l_msel_bins = cfMselBins.value ;
586593 vector<float > l_tpcncls_bins = cfTPCnclsBins.value ;
587594 vector<float > l_dcaxy_bins = cfDCAxyBins.value ;
588595 vector<float > l_dcaz_bins = cfDCAzBins.value ;
@@ -595,6 +602,7 @@ struct MultiharmonicCorrelations { // this name is used in lower-case format to
595602 int nBinsy = static_cast <int >(l_y_bins[0 ]);
596603 int nBinsz = static_cast <int >(l_z_bins[0 ]);
597604 int nBinsmult = static_cast <int >(l_mult_bins[0 ]);
605+ int nBinsmsel = static_cast <int >(l_msel_bins[0 ]);
598606 int nBinscharge = 2 ;
599607 int nBinstpcncls = static_cast <int >(l_tpcncls_bins[0 ]);
600608 int nBinsdcaxy = static_cast <int >(l_dcaxy_bins[0 ]);
@@ -615,6 +623,8 @@ struct MultiharmonicCorrelations { // this name is used in lower-case format to
615623 float maxz = l_z_bins[2 ];
616624 float minmult = l_mult_bins[1 ];
617625 float maxmult = l_mult_bins[2 ];
626+ float minmsel = l_msel_bins[1 ];
627+ float maxmsel = l_msel_bins[2 ];
618628 float mincharge = -2 .;
619629 float maxcharge = 2 .;
620630 float mintpcncls = l_tpcncls_bins[1 ];
@@ -645,24 +655,43 @@ struct MultiharmonicCorrelations { // this name is used in lower-case format to
645655 pc.fParticleHistogramsList ->Add (pc.fHistTracksdcaXY [eRec]);
646656 pc.fParticleHistogramsList ->Add (pc.fHistTracksdcaZ [eRec]);
647657
648- pc.fHistPt [eSim] = new TH1F (" fHistPt[eSim]" , " pt distribution for simulated particles" , nBins, min, max);
649- pc.fHistPhi [eSim] = new TH1F (" fHistPhi[eSim]" , " phi distribution for simulated particles" , nBinsphi, minphi, maxphi);
650- pc.fHistCharge [eSim] = new TH1F (" fHistCharge[eSim]" , " charge distribution for simulated particles" , nBinscharge, mincharge, maxcharge);
651- pc.fHistTPCncls [eSim] = new TH1F (" fHistTPCncls[eSim]" , " tpcncls distribution for simulated particles" , nBinstpcncls, minphi, maxtpcncls);
652- pc.fHistTracksdcaXY [eSim] = new TH1F (" fHistTracksdcaXY[eSim]" , " dcaxy distribution for simulated particles" , nBinsdcaxy, mindcaxy, maxdcaxy);
653- pc.fHistTracksdcaZ [eSim] = new TH1F (" fHistTracksdcaZ[eSim]" , " dcaz distribution for simulated particles" , nBinsdcaz, mindcaz, maxdcaz);
654- pc.fHistPt [eSim]->GetXaxis ()->SetTitle (" p_{T}" );
655- pc.fHistPhi [eSim]->GetXaxis ()->SetTitle (" phi" );
656- pc.fHistCharge [eSim]->GetXaxis ()->SetTitle (" charge" );
657- pc.fHistTPCncls [eSim]->GetXaxis ()->SetTitle (" TPCNClsFindable" );
658- pc.fHistTracksdcaXY [eSim]->GetXaxis ()->SetTitle (" DCA XY" );
659- pc.fHistTracksdcaZ [eSim]->GetXaxis ()->SetTitle (" DCA Z" );
660- pc.fParticleHistogramsList ->Add (pc.fHistPt [eSim]);
661- pc.fParticleHistogramsList ->Add (pc.fHistPhi [eSim]);
662- pc.fParticleHistogramsList ->Add (pc.fHistCharge [eSim]);
663- pc.fParticleHistogramsList ->Add (pc.fHistTPCncls [eSim]);
664- pc.fParticleHistogramsList ->Add (pc.fHistTracksdcaXY [eSim]);
665- pc.fParticleHistogramsList ->Add (pc.fHistTracksdcaZ [eSim]);
658+ // init of sim histograms
659+ if (cfInitsim) {
660+ pc.fHistPt [eSim] = new TH1F (" fHistPt[eSim]" , " pt distribution for simulated particles" , nBins, min, max);
661+ pc.fHistPhi [eSim] = new TH1F (" fHistPhi[eSim]" , " phi distribution for simulated particles" , nBinsphi, minphi, maxphi);
662+ pc.fHistCharge [eSim] = new TH1F (" fHistCharge[eSim]" , " charge distribution for simulated particles" , nBinscharge, mincharge, maxcharge);
663+ pc.fHistTPCncls [eSim] = new TH1F (" fHistTPCncls[eSim]" , " tpcncls distribution for simulated particles" , nBinstpcncls, minphi, maxtpcncls);
664+ pc.fHistTracksdcaXY [eSim] = new TH1F (" fHistTracksdcaXY[eSim]" , " dcaxy distribution for simulated particles" , nBinsdcaxy, mindcaxy, maxdcaxy);
665+ pc.fHistTracksdcaZ [eSim] = new TH1F (" fHistTracksdcaZ[eSim]" , " dcaz distribution for simulated particles" , nBinsdcaz, mindcaz, maxdcaz);
666+ pc.fHistPt [eSim]->GetXaxis ()->SetTitle (" p_{T}" );
667+ pc.fHistPhi [eSim]->GetXaxis ()->SetTitle (" phi" );
668+ pc.fHistCharge [eSim]->GetXaxis ()->SetTitle (" charge" );
669+ pc.fHistTPCncls [eSim]->GetXaxis ()->SetTitle (" TPCNClsFindable" );
670+ pc.fHistTracksdcaXY [eSim]->GetXaxis ()->SetTitle (" DCA XY" );
671+ pc.fHistTracksdcaZ [eSim]->GetXaxis ()->SetTitle (" DCA Z" );
672+ pc.fParticleHistogramsList ->Add (pc.fHistPt [eSim]);
673+ pc.fParticleHistogramsList ->Add (pc.fHistPhi [eSim]);
674+ pc.fParticleHistogramsList ->Add (pc.fHistCharge [eSim]);
675+ pc.fParticleHistogramsList ->Add (pc.fHistTPCncls [eSim]);
676+ pc.fParticleHistogramsList ->Add (pc.fHistTracksdcaXY [eSim]);
677+ pc.fParticleHistogramsList ->Add (pc.fHistTracksdcaZ [eSim]);
678+
679+ event.fHistCentr [eSim] = new TH1F (" fHistCentr[eSim]" , " centrality distribution for simulated particles" , nBinscentr, mincentr, maxcentr);
680+ event.fHistX [eSim] = new TH1F (" fHistX[eSim]" , " posX distribution for simulated particles" , nBinsx, minx, maxx);
681+ event.fHistY [eSim] = new TH1F (" fHistY[eSim]" , " posY distribution for simulated particles" , nBinsy, miny, maxy);
682+ event.fHistZ [eSim] = new TH1F (" fHistZ[eSim]" , " posZ distribution for simulated particles" , nBinsz, minz, maxz);
683+ event.fHistMult [eSim] = new TH1I (" fHistMult[eSim]" , " mult distribution for simulated particles" , nBinsmult, minmult, maxmult);
684+ event.fHistCentr [eSim]->GetXaxis ()->SetTitle (" centrality" );
685+ event.fHistX [eSim]->GetXaxis ()->SetTitle (" x" );
686+ event.fHistY [eSim]->GetXaxis ()->SetTitle (" y" );
687+ event.fHistZ [eSim]->GetXaxis ()->SetTitle (" z" );
688+ event.fHistMult [eSim]->GetXaxis ()->SetTitle (" multiplicity" );
689+ event.fEventHistogramsList ->Add (event.fHistCentr [eSim]);
690+ event.fEventHistogramsList ->Add (event.fHistX [eSim]);
691+ event.fEventHistogramsList ->Add (event.fHistY [eSim]);
692+ event.fEventHistogramsList ->Add (event.fHistZ [eSim]);
693+ event.fEventHistogramsList ->Add (event.fHistMult [eSim]);
694+ }
666695
667696 for (const int & run : targetRuns) {
668697 std::string runStr = std::to_string (run);
@@ -671,7 +700,6 @@ struct MultiharmonicCorrelations { // this name is used in lower-case format to
671700 LOG (fatal) << " Failed to load weights for run " << run;
672701 return ;
673702 }
674-
675703 pc.weightsmap [run] = histweights;
676704 }
677705
@@ -680,36 +708,23 @@ struct MultiharmonicCorrelations { // this name is used in lower-case format to
680708 event.fHistY [eRec] = new TH1F (" fHistY[eRec]" , " posY distribution for reconstructed particles" , nBinsy, miny, maxy);
681709 event.fHistZ [eRec] = new TH1F (" fHistZ[eRec]" , " posZ distribution for reconstructed particles" , nBinsz, minz, maxz);
682710 event.fHistMult [eRec] = new TH1I (" fHistMult[eRec]" , " mult distribution for reconstructed particles" , nBinsmult, minmult, maxmult);
711+ event.fHistMsel = new TH1F (" fHistMsel" , " selected tracks" , nBinsmsel, minmsel, maxmsel);
683712 event.fHistNContr = new TH1I (" fHistNContr" , " NContr distribution" , nBinsncontr, minncontr, maxncontr);
684713 event.fHistCentr [eRec]->GetXaxis ()->SetTitle (" centrality" );
685714 event.fHistX [eRec]->GetXaxis ()->SetTitle (" x" );
686715 event.fHistY [eRec]->GetXaxis ()->SetTitle (" y" );
687716 event.fHistZ [eRec]->GetXaxis ()->SetTitle (" z" );
688717 event.fHistMult [eRec]->GetXaxis ()->SetTitle (" multiplicity" );
718+ event.fHistMsel ->GetXaxis ()->SetTitle (" selected tracks" );
689719 event.fHistNContr ->GetXaxis ()->SetTitle (" numContrib" );
690720 event.fEventHistogramsList ->Add (event.fHistCentr [eRec]);
691721 event.fEventHistogramsList ->Add (event.fHistX [eRec]);
692722 event.fEventHistogramsList ->Add (event.fHistY [eRec]);
693723 event.fEventHistogramsList ->Add (event.fHistZ [eRec]);
694724 event.fEventHistogramsList ->Add (event.fHistMult [eRec]);
725+ event.fEventHistogramsList ->Add (event.fHistMsel );
695726 event.fEventHistogramsList ->Add (event.fHistNContr );
696727
697- event.fHistCentr [eSim] = new TH1F (" fHistCentr[eSim]" , " centrality distribution for simulated particles" , nBinscentr, mincentr, maxcentr);
698- event.fHistX [eSim] = new TH1F (" fHistX[eSim]" , " posX distribution for simulated particles" , nBinsx, minx, maxx);
699- event.fHistY [eSim] = new TH1F (" fHistY[eSim]" , " posY distribution for simulated particles" , nBinsy, miny, maxy);
700- event.fHistZ [eSim] = new TH1F (" fHistZ[eSim]" , " posZ distribution for simulated particles" , nBinsz, minz, maxz);
701- event.fHistMult [eSim] = new TH1I (" fHistMult[eSim]" , " mult distribution for simulated particles" , nBinsmult, minmult, maxmult);
702- event.fHistCentr [eSim]->GetXaxis ()->SetTitle (" centrality" );
703- event.fHistX [eSim]->GetXaxis ()->SetTitle (" x" );
704- event.fHistY [eSim]->GetXaxis ()->SetTitle (" y" );
705- event.fHistZ [eSim]->GetXaxis ()->SetTitle (" z" );
706- event.fHistMult [eSim]->GetXaxis ()->SetTitle (" multiplicity" );
707- event.fEventHistogramsList ->Add (event.fHistCentr [eSim]);
708- event.fEventHistogramsList ->Add (event.fHistX [eSim]);
709- event.fEventHistogramsList ->Add (event.fHistY [eSim]);
710- event.fEventHistogramsList ->Add (event.fHistZ [eSim]);
711- event.fEventHistogramsList ->Add (event.fHistMult [eSim]);
712-
713728 const char * cevent[] = {" vertexZ" , " Pt" };
714729 const char * cpro[] = {" rec" , " sim" };
715730 const char * ccut[] = {" before" , " after" };
@@ -732,7 +747,8 @@ struct MultiharmonicCorrelations { // this name is used in lower-case format to
732747 qa.fQAM_NC = new TH2F (" QAM_NC" , " quality assurance of mult vs. NContributors" , nBinsmult, minmult, maxmult, nBinsncontr, minncontr, maxncontr);
733748 if (cfQA) {
734749 qa.fQAList ->Add (qa.fQA );
735- qa.fQAList ->Add (qa.fQAM_NC );
750+ if (cfInitsim)
751+ qa.fQAList ->Add (qa.fQAM_NC );
736752 }
737753
738754 // float quantiles[10] = {0, 0.05, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8};
0 commit comments