3535#include " FlowContainer.h"
3636#include < TProfile.h>
3737#include < TRandom3.h>
38+ #include < TPDGCode.h>
3839
3940using namespace o2 ;
4041using namespace o2 ::framework;
@@ -119,20 +120,21 @@ struct FlowPtEfficiency {
119120 GFW* fGFWTrue = new GFW();
120121 GFW* fGFWReco = new GFW();
121122 TAxis* fPtAxis ;
122- std::vector<GFW::CorrConfig> corrconfigs;
123+ std::vector<GFW::CorrConfig> corrconfigsTruth;
124+ std::vector<GFW::CorrConfig> corrconfigsReco;
123125 TRandom3* fRndm = new TRandom3(0 );
124126
125127 bool isStable (int pdg)
126128 {
127- if (std::abs (pdg) == 211 )
129+ if (std::abs (pdg) == PDG_t:: kPiPlus )
128130 return true ;
129- if (std::abs (pdg) == 321 )
131+ if (std::abs (pdg) == PDG_t:: kKPlus )
130132 return true ;
131- if (std::abs (pdg) == 2212 )
133+ if (std::abs (pdg) == PDG_t:: kProton )
132134 return true ;
133- if (std::abs (pdg) == 11 )
135+ if (std::abs (pdg) == PDG_t:: kElectron )
134136 return true ;
135- if (std::abs (pdg) == 13 )
137+ if (std::abs (pdg) == PDG_t:: kMuonMinus )
136138 return true ;
137139 return false ;
138140 }
@@ -143,9 +145,11 @@ struct FlowPtEfficiency {
143145 // create histograms
144146 registry.add (" eventCounter" , " eventCounter" , kTH1F , {axisCounter});
145147 registry.add (" hPtMCRec" , " Monte Carlo Reco" , {HistType::kTH1D , {axisPt}});
148+ registry.add (" hPtCentMCRec" , " Reco production; pT (GeV/c); centrality (%)" , {HistType::kTH2D , {axisPt, axisCentrality}});
146149
147150 registry.add (" mcEventCounter" , " Monte Carlo Truth EventCounter" , kTH1F , {axisCounter});
148151 registry.add (" hPtMCGen" , " Monte Carlo Truth" , {HistType::kTH1D , {axisPt}});
152+ registry.add (" hPtCentMCGen" , " Truth production; pT (GeV/c); centrality (%)" , {HistType::kTH2D , {axisPt, axisCentrality}});
149153
150154 if (cfgFlowEnabled) {
151155 registry.add (" hImpactParameterReco" , " hImpactParameterReco" , {HistType::kTH1D , {axisB}});
@@ -183,10 +187,10 @@ struct FlowPtEfficiency {
183187 fGFWTrue ->AddRegion (" poifull" , -0.8 , 0.8 , 1 + fPtAxis ->GetNbins (), 2 );
184188 fGFWTrue ->AddRegion (" olN10" , -0.8 , -0.5 , 1 , 4 );
185189 fGFWTrue ->AddRegion (" olfull" , -0.8 , 0.8 , 1 + fPtAxis ->GetNbins (), 4 );
186- corrconfigs .push_back (fGFWTrue ->GetCorrelatorConfig (" full {2 -2}" , " ChFull22" , kFALSE ));
187- corrconfigs .push_back (fGFWTrue ->GetCorrelatorConfig (" poifull full | olfull {2 -2}" , " ChFull22" , kTRUE ));
188- corrconfigs .push_back (fGFWTrue ->GetCorrelatorConfig (" refN10 {2} refP10 {-2}" , " Ch10Gap22" , kFALSE ));
189- corrconfigs .push_back (fGFWTrue ->GetCorrelatorConfig (" poiN10 refN10 | olN10 {2} refP10 {-2}" , " Ch10Gap22" , kTRUE ));
190+ corrconfigsTruth .push_back (fGFWTrue ->GetCorrelatorConfig (" full {2 -2}" , " ChFull22" , kFALSE ));
191+ corrconfigsTruth .push_back (fGFWTrue ->GetCorrelatorConfig (" poifull full | olfull {2 -2}" , " ChFull22" , kTRUE ));
192+ corrconfigsTruth .push_back (fGFWTrue ->GetCorrelatorConfig (" refN10 {2} refP10 {-2}" , " Ch10Gap22" , kFALSE ));
193+ corrconfigsTruth .push_back (fGFWTrue ->GetCorrelatorConfig (" poiN10 refN10 | olN10 {2} refP10 {-2}" , " Ch10Gap22" , kTRUE ));
190194 fGFWTrue ->CreateRegions ();
191195
192196 fGFWReco ->AddRegion (" full" , -0.8 , 0.8 , 1 , 1 );
@@ -196,6 +200,10 @@ struct FlowPtEfficiency {
196200 fGFWReco ->AddRegion (" poifull" , -0.8 , 0.8 , 1 + fPtAxis ->GetNbins (), 2 );
197201 fGFWReco ->AddRegion (" olN10" , -0.8 , -0.5 , 1 , 4 );
198202 fGFWReco ->AddRegion (" olfull" , -0.8 , 0.8 , 1 + fPtAxis ->GetNbins (), 4 );
203+ corrconfigsReco.push_back (fGFWReco ->GetCorrelatorConfig (" full {2 -2}" , " ChFull22" , kFALSE ));
204+ corrconfigsReco.push_back (fGFWReco ->GetCorrelatorConfig (" poifull full | olfull {2 -2}" , " ChFull22" , kTRUE ));
205+ corrconfigsReco.push_back (fGFWReco ->GetCorrelatorConfig (" refN10 {2} refP10 {-2}" , " Ch10Gap22" , kFALSE ));
206+ corrconfigsReco.push_back (fGFWReco ->GetCorrelatorConfig (" poiN10 refN10 | olN10 {2} refP10 {-2}" , " Ch10Gap22" , kTRUE ));
199207 fGFWReco ->CreateRegions ();
200208 }
201209
@@ -385,6 +393,7 @@ struct FlowPtEfficiency {
385393 }
386394 if (isStable (mcParticle.pdgCode ())) {
387395 registry.fill (HIST (" hPtMCRec" ), track.pt ());
396+ registry.fill (HIST (" hPtCentMCRec" ), track.pt (), centrality);
388397
389398 if (cfgFlowEnabled) {
390399 bool withinPtPOI = (cfgFlowCutPtPOIMin < track.pt ()) && (track.pt () < cfgFlowCutPtPOIMax); // within POI pT range
@@ -409,8 +418,8 @@ struct FlowPtEfficiency {
409418 }
410419 if (cfgFlowEnabled) {
411420 // Filling Flow Container
412- for (uint l_ind = 0 ; l_ind < corrconfigs .size (); l_ind++) {
413- fillFC (fGFWReco , false , corrconfigs .at (l_ind), centrality, lRandom);
421+ for (uint l_ind = 0 ; l_ind < corrconfigsReco .size (); l_ind++) {
422+ fillFC (fGFWReco , false , corrconfigsReco .at (l_ind), centrality, lRandom);
414423 }
415424 }
416425 }
@@ -442,6 +451,8 @@ struct FlowPtEfficiency {
442451 for (const auto & mcParticle : mcParticles) {
443452 if (mcParticle.isPhysicalPrimary () && isStable (mcParticle.pdgCode ())) {
444453 registry.fill (HIST (" hPtMCGen" ), mcParticle.pt ());
454+ registry.fill (HIST (" hPtCentMCGen" ), mcParticle.pt (), centrality);
455+
445456 if (cfgFlowEnabled) {
446457 bool withinPtPOI = (cfgFlowCutPtPOIMin < mcParticle.pt ()) && (mcParticle.pt () < cfgFlowCutPtPOIMax); // within POI pT range
447458 bool withinPtRef = (cfgFlowCutPtRefMin < mcParticle.pt ()) && (mcParticle.pt () < cfgFlowCutPtRefMax); // within RF pT range
@@ -456,8 +467,8 @@ struct FlowPtEfficiency {
456467 }
457468 if (cfgFlowEnabled) {
458469 // Filling Flow Container
459- for (uint l_ind = 0 ; l_ind < corrconfigs .size (); l_ind++) {
460- fillFC (fGFWTrue , true , corrconfigs .at (l_ind), centrality, lRandom);
470+ for (uint l_ind = 0 ; l_ind < corrconfigsTruth .size (); l_ind++) {
471+ fillFC (fGFWTrue , true , corrconfigsTruth .at (l_ind), centrality, lRandom);
461472 }
462473 }
463474 }
0 commit comments