35
35
#include " FlowContainer.h"
36
36
#include < TProfile.h>
37
37
#include < TRandom3.h>
38
+ #include < TPDGCode.h>
38
39
39
40
using namespace o2 ;
40
41
using namespace o2 ::framework;
@@ -119,20 +120,21 @@ struct FlowPtEfficiency {
119
120
GFW* fGFWTrue = new GFW();
120
121
GFW* fGFWReco = new GFW();
121
122
TAxis* fPtAxis ;
122
- std::vector<GFW::CorrConfig> corrconfigs;
123
+ std::vector<GFW::CorrConfig> corrconfigsTruth;
124
+ std::vector<GFW::CorrConfig> corrconfigsReco;
123
125
TRandom3* fRndm = new TRandom3(0 );
124
126
125
127
bool isStable (int pdg)
126
128
{
127
- if (std::abs (pdg) == 211 )
129
+ if (std::abs (pdg) == PDG_t:: kPiPlus )
128
130
return true ;
129
- if (std::abs (pdg) == 321 )
131
+ if (std::abs (pdg) == PDG_t:: kKPlus )
130
132
return true ;
131
- if (std::abs (pdg) == 2212 )
133
+ if (std::abs (pdg) == PDG_t:: kProton )
132
134
return true ;
133
- if (std::abs (pdg) == 11 )
135
+ if (std::abs (pdg) == PDG_t:: kElectron )
134
136
return true ;
135
- if (std::abs (pdg) == 13 )
137
+ if (std::abs (pdg) == PDG_t:: kMuonMinus )
136
138
return true ;
137
139
return false ;
138
140
}
@@ -143,9 +145,11 @@ struct FlowPtEfficiency {
143
145
// create histograms
144
146
registry.add (" eventCounter" , " eventCounter" , kTH1F , {axisCounter});
145
147
registry.add (" hPtMCRec" , " Monte Carlo Reco" , {HistType::kTH1D , {axisPt}});
148
+ registry.add (" hPtCentMCRec" , " Reco production; pT (GeV/c); centrality (%)" , {HistType::kTH2D , {axisPt, axisCentrality}});
146
149
147
150
registry.add (" mcEventCounter" , " Monte Carlo Truth EventCounter" , kTH1F , {axisCounter});
148
151
registry.add (" hPtMCGen" , " Monte Carlo Truth" , {HistType::kTH1D , {axisPt}});
152
+ registry.add (" hPtCentMCGen" , " Truth production; pT (GeV/c); centrality (%)" , {HistType::kTH2D , {axisPt, axisCentrality}});
149
153
150
154
if (cfgFlowEnabled) {
151
155
registry.add (" hImpactParameterReco" , " hImpactParameterReco" , {HistType::kTH1D , {axisB}});
@@ -183,10 +187,10 @@ struct FlowPtEfficiency {
183
187
fGFWTrue ->AddRegion (" poifull" , -0.8 , 0.8 , 1 + fPtAxis ->GetNbins (), 2 );
184
188
fGFWTrue ->AddRegion (" olN10" , -0.8 , -0.5 , 1 , 4 );
185
189
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 ));
190
194
fGFWTrue ->CreateRegions ();
191
195
192
196
fGFWReco ->AddRegion (" full" , -0.8 , 0.8 , 1 , 1 );
@@ -196,6 +200,10 @@ struct FlowPtEfficiency {
196
200
fGFWReco ->AddRegion (" poifull" , -0.8 , 0.8 , 1 + fPtAxis ->GetNbins (), 2 );
197
201
fGFWReco ->AddRegion (" olN10" , -0.8 , -0.5 , 1 , 4 );
198
202
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 ));
199
207
fGFWReco ->CreateRegions ();
200
208
}
201
209
@@ -385,6 +393,7 @@ struct FlowPtEfficiency {
385
393
}
386
394
if (isStable (mcParticle.pdgCode ())) {
387
395
registry.fill (HIST (" hPtMCRec" ), track.pt ());
396
+ registry.fill (HIST (" hPtCentMCRec" ), track.pt (), centrality);
388
397
389
398
if (cfgFlowEnabled) {
390
399
bool withinPtPOI = (cfgFlowCutPtPOIMin < track.pt ()) && (track.pt () < cfgFlowCutPtPOIMax); // within POI pT range
@@ -409,8 +418,8 @@ struct FlowPtEfficiency {
409
418
}
410
419
if (cfgFlowEnabled) {
411
420
// 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);
414
423
}
415
424
}
416
425
}
@@ -442,6 +451,8 @@ struct FlowPtEfficiency {
442
451
for (const auto & mcParticle : mcParticles) {
443
452
if (mcParticle.isPhysicalPrimary () && isStable (mcParticle.pdgCode ())) {
444
453
registry.fill (HIST (" hPtMCGen" ), mcParticle.pt ());
454
+ registry.fill (HIST (" hPtCentMCGen" ), mcParticle.pt (), centrality);
455
+
445
456
if (cfgFlowEnabled) {
446
457
bool withinPtPOI = (cfgFlowCutPtPOIMin < mcParticle.pt ()) && (mcParticle.pt () < cfgFlowCutPtPOIMax); // within POI pT range
447
458
bool withinPtRef = (cfgFlowCutPtRefMin < mcParticle.pt ()) && (mcParticle.pt () < cfgFlowCutPtRefMax); // within RF pT range
@@ -456,8 +467,8 @@ struct FlowPtEfficiency {
456
467
}
457
468
if (cfgFlowEnabled) {
458
469
// 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);
461
472
}
462
473
}
463
474
}
0 commit comments