@@ -145,11 +145,11 @@ struct MultiharmonicCorrelations { // this name is used in lower-case format to
145145 TList* fEventHistogramsList = NULL ;
146146 TH1F * fHistCentr [2 ] = {NULL };
147147 TH1I * fHistMult [2 ] = {NULL };
148- TH1F * fHistMsel = NULL ;
148+ TH1F * fHistMsel [ 2 ] = { NULL } ;
149149 TH1F * fHistX [2 ] = {NULL };
150150 TH1F * fHistY [2 ] = {NULL };
151151 TH1F * fHistZ [2 ] = {NULL };
152- TH1I * fHistNContr = NULL ;
152+ TH1I * fHistNContr [ 2 ] = { NULL } ;
153153 TH1F * fEventHistograms [eEventHistograms_N][2 ][2 ] = {{{NULL }}}; // ! [ type - see enum eEventHistograms ][reco,sim][before, after event cuts]
154154 } event;
155155
@@ -414,26 +414,13 @@ struct MultiharmonicCorrelations { // this name is used in lower-case format to
414414 float centr = 0 , M = 0 ., msel = 0 .;
415415
416416 if constexpr (rs == eRec || rs == eRecAndSim) {
417- event.fHistX [eRec]->Fill (collision.posX ());
418- event.fHistY [eRec]->Fill (collision.posY ());
419- event.fHistZ [eRec]->Fill (collision.posZ ());
420- event.fEventHistograms [eVertexZ][eRec][0 ]->Fill (collision.posZ ());
421417 if (cfCent.value == " FT0C" )
422418 centr = collision.centFT0C ();
423419 else if (cfCent.value == " FT0M" )
424420 centr = collision.centFT0M ();
425421 else if (cfCent.value == " FT0A" )
426422 centr = collision.centFT0A ();
427423
428- // *) Event cuts:
429- float centrcut = 80 .;
430- if (!EventCuts<rs>(collision) || centr > centrcut) { // Main call for event cuts
431- return ;
432- }
433- event.fEventHistograms [eVertexZ][eRec][1 ]->Fill (collision.posZ ());
434- event.fHistCentr [eRec]->Fill (centr);
435-
436- std::string multType = " TPC" ;
437424 if (cfMult.value == " TPC" )
438425 M = collision.multTPC ();
439426 else if (cfMult.value == " FV0M" )
@@ -444,8 +431,30 @@ struct MultiharmonicCorrelations { // this name is used in lower-case format to
444431 M = collision.multFT0M ();
445432 else if (cfMult.value == " NTracksPV" )
446433 M = collision.multNTracksPV ();
447- event.fHistMult [eRec]->Fill (M);
448- event.fHistNContr ->Fill (collision.numContrib ());
434+
435+ event.fHistX [eBefore]->Fill (collision.posX ());
436+ event.fHistY [eBefore]->Fill (collision.posY ());
437+ event.fHistZ [eBefore]->Fill (collision.posZ ());
438+ event.fHistCentr [eBefore]->Fill (centr);
439+ event.fHistMult [eBefore]->Fill (M);
440+ event.fHistNContr [eBefore]->Fill (collision.numContrib ());
441+
442+ event.fEventHistograms [eVertexZ][eRec][0 ]->Fill (collision.posZ ());
443+
444+ // *) Event cuts:
445+ float centrcut = 80 .;
446+ if (!EventCuts<rs>(collision) || centr > centrcut) { // Main call for event cuts
447+ return ;
448+ }
449+
450+ event.fHistX [eAfter]->Fill (collision.posX ());
451+ event.fHistY [eAfter]->Fill (collision.posY ());
452+ event.fHistZ [eAfter]->Fill (collision.posZ ());
453+ event.fHistCentr [eAfter]->Fill (centr);
454+ event.fHistMult [eAfter]->Fill (M);
455+ event.fHistNContr [eAfter]->Fill (collision.numContrib ());
456+
457+ event.fEventHistograms [eVertexZ][eRec][1 ]->Fill (collision.posZ ());
449458 qa.fQAM_NC ->Fill (M, collision.numContrib ());
450459
451460 if constexpr (rs == eRecAndSim) {
@@ -477,25 +486,34 @@ struct MultiharmonicCorrelations { // this name is used in lower-case format to
477486 float ptrec = 0 ., ptsim = 0 .;
478487 if constexpr (rs == eRec || rs == eRecAndSim) {
479488 // Fill track pt distribution:
480- pc.fHistPt [eRec]->Fill (track.pt ());
489+
490+ pc.fHistPt [eBefore]->Fill (track.pt ());
491+ pc.fHistPhi [eBefore]->Fill (track.phi ());
492+ pc.fHistCharge [eBefore]->Fill (track.sign ());
493+ pc.fHistTPCncls [eBefore]->Fill (track.tpcNClsFindable ());
494+ pc.fHistTracksdcaXY [eBefore]->Fill (track.dcaXY ());
495+ pc.fHistTracksdcaZ [eBefore]->Fill (track.dcaZ ());
496+
481497 event.fEventHistograms [ePt][eRec][0 ]->Fill (track.pt ());
482498 ptrec = track.pt ();
483499
484500 // *) Particle cuts:
485501 if (!ParticleCuts<rs>(track)) { // Main call for particle cuts.
486502 continue ; // not return!!
487503 }
504+ pc.fHistPt [eAfter]->Fill (track.pt ());
505+ pc.fHistPhi [eAfter]->Fill (track.phi ());
506+ pc.fHistCharge [eAfter]->Fill (track.sign ());
507+ pc.fHistTPCncls [eAfter]->Fill (track.tpcNClsFindable ());
508+ pc.fHistTracksdcaXY [eAfter]->Fill (track.dcaXY ());
509+ pc.fHistTracksdcaZ [eAfter]->Fill (track.dcaZ ());
510+
488511 event.fEventHistograms [ePt][eRec][1 ]->Fill (ptrec);
489512
490513 phi = track.phi ();
491514 if (it != phih.histMap .end ()) {
492515 it->second ->Fill (phi);
493516 }
494- pc.fHistPhi [eRec]->Fill (track.phi ());
495- pc.fHistCharge [eRec]->Fill (track.sign ());
496- pc.fHistTPCncls [eRec]->Fill (track.tpcNClsFindable ());
497- pc.fHistTracksdcaXY [eRec]->Fill (track.dcaXY ());
498- pc.fHistTracksdcaZ [eRec]->Fill (track.dcaZ ());
499517
500518 if (cfUseWeights && histweight != wh.weightsmap .end ())
501519 weight = histweight->second ->GetBinContent (histweight->second ->FindBin (phi));
@@ -529,7 +547,7 @@ struct MultiharmonicCorrelations { // this name is used in lower-case format to
529547 }
530548 }
531549 } // end of for (auto track: tracks)
532- event.fHistMsel ->Fill (msel);
550+ event.fHistMsel [eAfter] ->Fill (msel);
533551 // calculate correlations
534552 float Mmin = 4 .;
535553 if (msel < Mmin)
@@ -659,24 +677,67 @@ struct MultiharmonicCorrelations { // this name is used in lower-case format to
659677 float maxncontr = l_ncontr_bins[1 ];
660678 float minncontr = l_ncontr_bins[2 ];
661679
662- pc.fHistPt [eRec] = new TH1F (" fHistPt[eRec]" , " pt distribution for reconstructed particles" , nBins, min, max);
663- pc.fHistPhi [eRec] = new TH1F (" fHistPhi[eRec]" , " phi distribution for reconstructed particles" , nBinsphi, minphi, maxphi);
664- pc.fHistCharge [eRec] = new TH1F (" fHistCharge[eRec]" , " charge distribution for reconstructed particles" , nBinscharge, mincharge, maxcharge);
665- pc.fHistTPCncls [eRec] = new TH1F (" fHistTPCncls[eRec]" , " tpcncls distribution for reconstructed particles" , nBinstpcncls, mintpcncls, maxtpcncls);
666- pc.fHistTracksdcaXY [eRec] = new TH1F (" fHistTracksdcaXY[eRec]" , " dcaxy distribution for reconstructed particles" , nBinsdcaxy, mindcaxy, maxdcaxy);
667- pc.fHistTracksdcaZ [eRec] = new TH1F (" fHistTracksdcaZ[eRec]" , " dcaz distribution for reconstructed particles" , nBinsdcaz, mindcaz, maxdcaz);
668- pc.fHistPt [eRec]->GetXaxis ()->SetTitle (" p_{T}" );
669- pc.fHistPhi [eRec]->GetXaxis ()->SetTitle (" phi" );
670- pc.fHistCharge [eRec]->GetXaxis ()->SetTitle (" charge" );
671- pc.fHistTPCncls [eRec]->GetXaxis ()->SetTitle (" TPCNClsFindable" );
672- pc.fHistTracksdcaXY [eRec]->GetXaxis ()->SetTitle (" DCA XY" );
673- pc.fHistTracksdcaZ [eRec]->GetXaxis ()->SetTitle (" DCA Z" );
674- pc.fParticleHistogramsList ->Add (pc.fHistPt [eRec]);
675- pc.fParticleHistogramsList ->Add (pc.fHistPhi [eRec]);
676- pc.fParticleHistogramsList ->Add (pc.fHistCharge [eRec]);
677- pc.fParticleHistogramsList ->Add (pc.fHistTPCncls [eRec]);
678- pc.fParticleHistogramsList ->Add (pc.fHistTracksdcaXY [eRec]);
679- pc.fParticleHistogramsList ->Add (pc.fHistTracksdcaZ [eRec]);
680+ const char * cevent[] = {" vertexZ" , " Pt" };
681+ const char * cpro[] = {" rec" , " sim" };
682+ const char * ccut[] = {" before" , " after" };
683+ for (int i = 0 ; i < eEventHistograms_N; i++) {
684+ for (int j = 0 ; j < eRecAndSim; j++) {
685+ for (int k = 0 ; k < eCut_N; k++) {
686+ TString histname = Form (" fEventHistograms[%s][%s][%s]" , cevent[i], cpro[j], ccut[k]);
687+ TString histtitle = Form (" %s distribution for %s, %s cut" , cevent[i], cpro[j], ccut[k]);
688+ if (i == 0 )
689+ event.fEventHistograms [i][j][k] = new TH1F (histname, histtitle, nBinsz, minz, maxz);
690+ if (i == 1 )
691+ event.fEventHistograms [i][j][k] = new TH1F (histname, histtitle, nBins, min, max);
692+ event.fEventHistograms [i][j][k]->GetXaxis ()->SetTitle (Form (" %s" , cevent[i]));
693+ // event.fEventHistogramsList->Add(event.fEventHistograms[i][j][k]);
694+ }
695+ }
696+ }
697+
698+ for (int icut = 0 ; icut < eCut_N; icut++) {
699+ pc.fHistPt [icut] = new TH1F (Form (" fHistPt[%s]" , ccut[icut]), Form (" pt distribution %s cut for reconstructed particles" , ccut[icut]), nBins, min, max);
700+ pc.fHistPhi [icut] = new TH1F (Form (" fHistPhi[%s]" , ccut[icut]), Form (" phi distribution %s cut for reconstructed particles" , ccut[icut]), nBinsphi, minphi, maxphi);
701+ pc.fHistCharge [icut] = new TH1F (Form (" fHistCharge[%s]" , ccut[icut]), Form (" charge distribution %s cut for reconstructed particles" , ccut[icut]), nBinscharge, mincharge, maxcharge);
702+ pc.fHistTPCncls [icut] = new TH1F (Form (" fHistTPCncls[%s]" , ccut[icut]), Form (" tpcncls distribution %s cut for reconstructed particles" , ccut[icut]), nBinstpcncls, mintpcncls, maxtpcncls);
703+ pc.fHistTracksdcaXY [icut] = new TH1F (Form (" fHistTracksdcaXY[%s]" , ccut[icut]), Form (" dcaxy distribution %s cut for reconstructed particles" , ccut[icut]), nBinsdcaxy, mindcaxy, maxdcaxy);
704+ pc.fHistTracksdcaZ [icut] = new TH1F (Form (" fHistTracksdcaZ[%s]" , ccut[icut]), Form (" dcaz distribution %s cut for reconstructed particles" , ccut[icut]), nBinsdcaz, mindcaz, maxdcaz);
705+ pc.fHistPt [icut]->GetXaxis ()->SetTitle (" p_{T}" );
706+ pc.fHistPhi [icut]->GetXaxis ()->SetTitle (" phi" );
707+ pc.fHistCharge [icut]->GetXaxis ()->SetTitle (" charge" );
708+ pc.fHistTPCncls [icut]->GetXaxis ()->SetTitle (" TPCNClsFindable" );
709+ pc.fHistTracksdcaXY [icut]->GetXaxis ()->SetTitle (" DCA XY" );
710+ pc.fHistTracksdcaZ [icut]->GetXaxis ()->SetTitle (" DCA Z" );
711+ pc.fParticleHistogramsList ->Add (pc.fHistPt [icut]);
712+ pc.fParticleHistogramsList ->Add (pc.fHistPhi [icut]);
713+ pc.fParticleHistogramsList ->Add (pc.fHistCharge [icut]);
714+ pc.fParticleHistogramsList ->Add (pc.fHistTPCncls [icut]);
715+ pc.fParticleHistogramsList ->Add (pc.fHistTracksdcaXY [icut]);
716+ pc.fParticleHistogramsList ->Add (pc.fHistTracksdcaZ [icut]);
717+
718+ // init eventhist
719+ event.fHistCentr [icut] = new TH1F (Form (" fHistCentr[%s]" , ccut[icut]), Form (" centrality distribution %s cut for reconstructed particles" , ccut[icut]), nBinscentr, mincentr, maxcentr);
720+ event.fHistX [icut] = new TH1F (Form (" fHistX[%s]" , ccut[icut]), Form (" posX distribution %s cut for reconstructed particles" , ccut[icut]), nBinsx, minx, maxx);
721+ event.fHistY [icut] = new TH1F (Form (" fHistY[%s]" , ccut[icut]), Form (" posY distribution %s cut for reconstructed particles" , ccut[icut]), nBinsy, miny, maxy);
722+ event.fHistZ [icut] = new TH1F (Form (" fHistZ[%s]" , ccut[icut]), Form (" posZ distribution %s cut for reconstructed particles" , ccut[icut]), nBinsz, minz, maxz);
723+ event.fHistMult [icut] = new TH1I (Form (" fHistMult[%s]" , ccut[icut]), Form (" mult distribution %s cut for reconstructed particles" , ccut[icut]), nBinsmult, minmult, maxmult);
724+ event.fHistMsel [icut] = new TH1F (Form (" fHistMsel[%s]" , ccut[icut]), Form (" selected tracks %s cut" , ccut[icut]), nBinsmsel, minmsel, maxmsel);
725+ event.fHistNContr [icut] = new TH1I (Form (" fHistNContr[%s]" , ccut[icut]), Form (" NContr distribution %s cut" , ccut[icut]), nBinsncontr, minncontr, maxncontr);
726+ event.fHistCentr [icut]->GetXaxis ()->SetTitle (Form (" centrality, %s" , cfCent.value .c_str ()));
727+ event.fHistX [icut]->GetXaxis ()->SetTitle (" x" );
728+ event.fHistY [icut]->GetXaxis ()->SetTitle (" y" );
729+ event.fHistZ [icut]->GetXaxis ()->SetTitle (" z" );
730+ event.fHistMult [icut]->GetXaxis ()->SetTitle (Form (" multiplicity, %s" , cfMult.value .c_str ()));
731+ event.fHistMsel [icut]->GetXaxis ()->SetTitle (" selected tracks" );
732+ event.fHistNContr [icut]->GetXaxis ()->SetTitle (" numContrib" );
733+ event.fEventHistogramsList ->Add (event.fHistCentr [icut]);
734+ event.fEventHistogramsList ->Add (event.fHistX [icut]);
735+ event.fEventHistogramsList ->Add (event.fHistY [icut]);
736+ event.fEventHistogramsList ->Add (event.fHistZ [icut]);
737+ event.fEventHistogramsList ->Add (event.fHistMult [icut]);
738+ event.fEventHistogramsList ->Add (event.fHistMsel [icut]);
739+ event.fEventHistogramsList ->Add (event.fHistNContr [icut]);
740+ }
680741
681742 // init of sim histograms
682743 if (cfInitsim) {
@@ -728,46 +789,6 @@ struct MultiharmonicCorrelations { // this name is used in lower-case format to
728789 wh.weightsmap [run] = histweights;
729790 }
730791
731- event.fHistCentr [eRec] = new TH1F (" fHistCentr[eRec]" , " centrality distribution for reconstructed particles" , nBinscentr, mincentr, maxcentr);
732- event.fHistX [eRec] = new TH1F (" fHistX[eRec]" , " posX distribution for reconstructed particles" , nBinsx, minx, maxx);
733- event.fHistY [eRec] = new TH1F (" fHistY[eRec]" , " posY distribution for reconstructed particles" , nBinsy, miny, maxy);
734- event.fHistZ [eRec] = new TH1F (" fHistZ[eRec]" , " posZ distribution for reconstructed particles" , nBinsz, minz, maxz);
735- event.fHistMult [eRec] = new TH1I (" fHistMult[eRec]" , " mult distribution for reconstructed particles" , nBinsmult, minmult, maxmult);
736- event.fHistMsel = new TH1F (" fHistMsel" , " selected tracks" , nBinsmsel, minmsel, maxmsel);
737- event.fHistNContr = new TH1I (" fHistNContr" , " NContr distribution" , nBinsncontr, minncontr, maxncontr);
738- event.fHistCentr [eRec]->GetXaxis ()->SetTitle (" centrality" );
739- event.fHistX [eRec]->GetXaxis ()->SetTitle (" x" );
740- event.fHistY [eRec]->GetXaxis ()->SetTitle (" y" );
741- event.fHistZ [eRec]->GetXaxis ()->SetTitle (" z" );
742- event.fHistMult [eRec]->GetXaxis ()->SetTitle (" multiplicity" );
743- event.fHistMsel ->GetXaxis ()->SetTitle (" selected tracks" );
744- event.fHistNContr ->GetXaxis ()->SetTitle (" numContrib" );
745- event.fEventHistogramsList ->Add (event.fHistCentr [eRec]);
746- event.fEventHistogramsList ->Add (event.fHistX [eRec]);
747- event.fEventHistogramsList ->Add (event.fHistY [eRec]);
748- event.fEventHistogramsList ->Add (event.fHistZ [eRec]);
749- event.fEventHistogramsList ->Add (event.fHistMult [eRec]);
750- event.fEventHistogramsList ->Add (event.fHistMsel );
751- event.fEventHistogramsList ->Add (event.fHistNContr );
752-
753- const char * cevent[] = {" vertexZ" , " Pt" };
754- const char * cpro[] = {" rec" , " sim" };
755- const char * ccut[] = {" before" , " after" };
756- for (int i = 0 ; i < eEventHistograms_N; i++) {
757- for (int j = 0 ; j < eRecAndSim; j++) {
758- for (int k = 0 ; k < eCut_N; k++) {
759- TString histname = Form (" fEventHistograms[%s][%s][%s]" , cevent[i], cpro[j], ccut[k]);
760- TString histtitle = Form (" %s distribution for %s, %s cut" , cevent[i], cpro[j], ccut[k]);
761- if (i == 0 )
762- event.fEventHistograms [i][j][k] = new TH1F (histname, histtitle, nBinsz, minz, maxz);
763- if (i == 1 )
764- event.fEventHistograms [i][j][k] = new TH1F (histname, histtitle, nBins, min, max);
765- event.fEventHistograms [i][j][k]->GetXaxis ()->SetTitle (Form (" %s" , cevent[i]));
766- event.fEventHistogramsList ->Add (event.fEventHistograms [i][j][k]);
767- }
768- }
769- }
770-
771792 qa.fQA = new TH2F (" QA_centr" , " quality assurance of centrality" , nBinscentr, mincentr, maxcentr, nBinscentr, mincentr, maxcentr);
772793 qa.fQAM_NC = new TH2F (" QAM_NC" , " quality assurance of mult vs. NContributors" , nBinsmult, minmult, maxmult, nBinsncontr, minncontr, maxncontr);
773794 if (cfQA) {
0 commit comments