@@ -63,7 +63,8 @@ struct Estimators {
6363 static constexpr estID V0A = 16 ; // (Run2)
6464 static constexpr estID V0C = 17 ; // (Run2)
6565 static constexpr estID V0AC = 18 ; // (Run2 V0M)
66- static constexpr estID nEstimators = 19 ;
66+ static constexpr estID ImpactParameter = 19 ; // (Run2 V0M)
67+ static constexpr estID nEstimators = 20 ;
6768
6869 static constexpr const char * estimatorNames[nEstimators] = {" FT0A" ,
6970 " FT0C" ,
@@ -83,7 +84,8 @@ struct Estimators {
8384 " ETA08" ,
8485 " V0A" ,
8586 " V0C" ,
86- " V0AC" };
87+ " V0AC" ,
88+ " ImpactParameter" };
8789 static std::vector<std::string> arrayNames ()
8890 {
8991 static std::vector<std::string> names;
@@ -115,13 +117,15 @@ static const int defaultEstimators[Estimators::nEstimators][nParameters]{{0}, /
115117 {0 }, // ETA08
116118 {0 }, // V0A (Run2)
117119 {0 }, // V0C (Run2)
118- {0 }}; // V0AC (Run2 V0M)
120+ {0 }, // V0AC (Run2 V0M)
121+ {0 }}; // ImpactParamter
119122
120123// Histograms
121124std::array<std::shared_ptr<TH1>, Estimators::nEstimators> hestimators;
122125std::array<std::shared_ptr<TH2>, Estimators::nEstimators> hestimatorsVsITS;
123126std::array<std::shared_ptr<TH2>, Estimators::nEstimators> hestimatorsVsETA05;
124127std::array<std::shared_ptr<TH2>, Estimators::nEstimators> hestimatorsVsETA08;
128+ std::array<std::shared_ptr<TH2>, Estimators::nEstimators> hestimatorsVsImpactParameter;
125129std::array<std::shared_ptr<TH2>, Estimators::nEstimators> hestimatorsRecoEvGenVsReco;
126130std::array<std::shared_ptr<TH2>, Estimators::nEstimators> hestimatorsRecoEvGenVsReco_BCMC;
127131std::array<std::shared_ptr<TH2>, Estimators::nEstimators> hestimatorsRecoEvGenVsRecoITS;
@@ -146,6 +150,7 @@ struct mcParticlePrediction {
146150 ConfigurableAxis binsVxy{" binsVxy" , {100 , -10 , 10 }, " Binning of the production vertex (x and y) axis" };
147151 ConfigurableAxis binsVz{" binsVz" , {100 , -10 , 10 }, " Binning of the production vertex (z) axis" };
148152 ConfigurableAxis binsPt{" binsPt" , {100 , 0 , 10 }, " Binning of the Pt axis" };
153+ ConfigurableAxis binsImpactParameter{" binsImpactParameter" , {400 , 0.0 , 20.0 }, " Binning of the impact parameter axis" };
149154 ConfigurableAxis binsMultiplicity{" binsMultiplicity" , {300 , -0.5 , 299.5 }, " Binning of the Multiplicity axis" };
150155 ConfigurableAxis binsMultiplicityReco{" binsMultiplicityReco" , {1000 , -0.5 , -0.5 + 10000 }, " Binning of the Multiplicity axis" };
151156 Configurable<LabeledArray<int >> enabledSpecies{" enabledSpecies" ,
@@ -169,6 +174,7 @@ struct mcParticlePrediction {
169174 Configurable<bool > enableVsITSHistograms{" enableVsITSHistograms" , true , " Enables the correlation between ITS and other estimators" };
170175 Configurable<bool > enableVsEta05Histograms{" enableVsEta05Histograms" , true , " Enables the correlation between ETA05 and other estimators" };
171176 Configurable<bool > enableVsEta08Histograms{" enableVsEta08Histograms" , true , " Enables the correlation between ETA08 and other estimators" };
177+ Configurable<bool > enableVsImpactParameterHistograms{" enableVsImpactParameterHistograms" , true , " Enables the correlation between impact parameter and other estimators" };
172178
173179 Service<o2::framework::O2DatabasePDG> pdgDB;
174180 o2::pwglf::ParticleCounter<o2::framework::O2DatabasePDG> mCounter ;
@@ -182,6 +188,7 @@ struct mcParticlePrediction {
182188 const AxisSpec axisVy{binsVxy, " Vy" };
183189 const AxisSpec axisVz{binsVz, " Vz" };
184190 const AxisSpec axisPt{binsPt, " #it{p}_{T} (GeV/#it{c})" };
191+ const AxisSpec axisImpactParameter{binsImpactParameter, " Impact parameter (fm)" };
185192 const AxisSpec axisMultiplicity{binsMultiplicity, " Multiplicity (undefined)" };
186193 const AxisSpec axisMultiplicityReco{binsMultiplicityReco, " Multiplicity Reco. (undefined)" };
187194 const AxisSpec axisMultiplicityRecoITS{100 , 0 , 100 , " Multiplicity Reco. ITSIB" };
@@ -258,30 +265,38 @@ struct mcParticlePrediction {
258265 if (!enabledEstimatorsArray[i]) {
259266 continue ;
260267 }
268+ AxisSpec axisThisEstimator = axisMultiplicity;
269+ if (i == Estimators::ImpactParameter) {
270+ axisThisEstimator = axisImpactParameter;
271+ }
261272 const char * name = Estimators::estimatorNames[i];
262- hestimators[i] = histos.add <TH1>(Form (" multiplicity/%s" , name), name, kTH1D , {axisMultiplicity });
273+ hestimators[i] = histos.add <TH1>(Form (" multiplicity/%s" , name), name, kTH1D , {axisThisEstimator });
263274 hestimators[i]->GetXaxis ()->SetTitle (Form (" Multiplicity %s" , name));
264275
265- auto make2DH = [&](const std::string& h, const char * ytitle) {
276+ auto make2DH = [&](const std::string& h, const char * ytitle, bool isImpactParameterX = false , bool isImpactParameterY = false ) {
266277 auto hist = histos.add <TH2>(Form (" %s%s" , h.c_str (), name),
267278 name,
268279 kTH2D ,
269- {axisMultiplicity, axisMultiplicity});
280+ {isImpactParameterX ? axisImpactParameter : axisMultiplicity,
281+ isImpactParameterY ? axisImpactParameter : axisMultiplicity});
270282 hist->GetXaxis ()->SetTitle (Form (" Multiplicity %s" , name));
271- hist->GetXaxis ()->SetTitle (Form (" Multiplicity %s" , ytitle));
283+ hist->GetYaxis ()->SetTitle (Form (" Multiplicity %s" , ytitle));
272284 return hist;
273285 };
274286 if (enableVsITSHistograms) {
275- hestimatorsVsITS[i] = make2DH (" multiplicity/vsITS/" , Estimators::estimatorNames[Estimators::ITSIB]);
287+ hestimatorsVsITS[i] = make2DH (" multiplicity/vsITS/" , Estimators::estimatorNames[Estimators::ITSIB], (i == Estimators::ImpactParameter) );
276288 }
277289 if (enableVsEta05Histograms) {
278- hestimatorsVsETA05[i] = make2DH (" multiplicity/vsETA05/" , Estimators::estimatorNames[Estimators::ETA05]);
290+ hestimatorsVsETA05[i] = make2DH (" multiplicity/vsETA05/" , Estimators::estimatorNames[Estimators::ETA05], (i == Estimators::ImpactParameter) );
279291 }
280292 if (enableVsEta08Histograms) {
281- hestimatorsVsETA08[i] = make2DH (" multiplicity/vsETA08/" , Estimators::estimatorNames[Estimators::ETA08]);
293+ hestimatorsVsETA08[i] = make2DH (" multiplicity/vsETA08/" , Estimators::estimatorNames[Estimators::ETA08], (i == Estimators::ImpactParameter));
294+ }
295+ if (enableVsImpactParameterHistograms) {
296+ hestimatorsVsImpactParameter[i] = make2DH (" multiplicity/vsImpactParameter/" , Estimators::estimatorNames[Estimators::ImpactParameter], (i == Estimators::ImpactParameter), true );
282297 }
283298
284- hvertexPosZ[i] = histos.add <TH2>(Form (" multiplicity/posZ/%s" , name), name, kTH2D , {{200 , -20 , 20 , " pos Z" }, axisMultiplicity });
299+ hvertexPosZ[i] = histos.add <TH2>(Form (" multiplicity/posZ/%s" , name), name, kTH2D , {{200 , -20 , 20 , " pos Z" }, axisThisEstimator });
285300 hvertexPosZ[i]->GetYaxis ()->SetTitle (Form (" Multiplicity %s" , name));
286301
287302 if (!doprocessReco) { // Reco events
@@ -331,11 +346,15 @@ struct mcParticlePrediction {
331346 if (!enabledEstimatorsArray[j]) {
332347 continue ;
333348 }
349+ AxisSpec axisThisEstimator = axisMultiplicity;
350+ if (j == Estimators::ImpactParameter) {
351+ axisThisEstimator = axisImpactParameter;
352+ }
334353 const char * name = Estimators::estimatorNames[j];
335- hpt[j][i] = histosPt.add <TH2>(Form (" prediction/pt/%s/%s" , name, PIDExtended::getName (i)), PIDExtended::getName (i), kTH2D , {axisPt, axisMultiplicity });
354+ hpt[j][i] = histosPt.add <TH2>(Form (" prediction/pt/%s/%s" , name, PIDExtended::getName (i)), PIDExtended::getName (i), kTH2D , {axisPt, axisThisEstimator });
336355 hpt[j][i]->GetYaxis ()->SetTitle (Form (" Multiplicity %s" , name));
337356
338- hyield[j][i] = histosYield.add <TH1>(Form (" prediction/yield/%s/%s" , name, PIDExtended::getName (i)), PIDExtended::getName (i), kTH1D , {axisMultiplicity });
357+ hyield[j][i] = histosYield.add <TH1>(Form (" prediction/yield/%s/%s" , name, PIDExtended::getName (i)), PIDExtended::getName (i), kTH1D , {axisThisEstimator });
339358 hyield[j][i]->GetYaxis ()->SetTitle (Form (" Multiplicity %s" , name));
340359 }
341360 }
@@ -345,7 +364,7 @@ struct mcParticlePrediction {
345364 histosYield.print ();
346365 }
347366
348- std::array<float , Estimators::nEstimators> genMult (const auto & mcParticles)
367+ std::array<float , Estimators::nEstimators> genMult (const auto & mcCollision, const auto & mcParticles)
349368 {
350369 std::array<float , Estimators::nEstimators> nMult;
351370 if (enabledEstimatorsArray[Estimators::FT0A] || enabledEstimatorsArray[Estimators::FT0AC]) {
@@ -402,6 +421,9 @@ struct mcParticlePrediction {
402421 nMult[Estimators::V0AC] = 0 ;
403422 }
404423 }
424+ if (enabledEstimatorsArray[Estimators::ImpactParameter]) {
425+ nMult[Estimators::ImpactParameter] = mcCollision.impactParameter ();
426+ }
405427 return nMult;
406428 }
407429
@@ -419,7 +441,7 @@ struct mcParticlePrediction {
419441 }
420442 histos.fill (HIST (" collisions/generated" ), 2 );
421443
422- const std::array<float , Estimators::nEstimators>& nMult = genMult (mcParticles);
444+ const std::array<float , Estimators::nEstimators>& nMult = genMult (mcCollision, mcParticles);
423445
424446 for (int i = 0 ; i < Estimators::nEstimators; i++) {
425447 if (!enabledEstimatorsArray[i]) {
@@ -436,6 +458,9 @@ struct mcParticlePrediction {
436458 if (enableVsEta08Histograms) {
437459 hestimatorsVsETA08[i]->Fill (nMult[i], nMult[Estimators::ETA08]);
438460 }
461+ if (enableVsImpactParameterHistograms) {
462+ hestimatorsVsImpactParameter[i]->Fill (nMult[i], nMult[Estimators::ImpactParameter]);
463+ }
439464 hvertexPosZ[i]->Fill (mcCollision.posZ (), nMult[i]);
440465 }
441466
@@ -611,7 +636,7 @@ struct mcParticlePrediction {
611636 histos.fill (HIST (" particles/FromCollVsFromCollBad" ), particlesFromColl, particlesFromCollWrongBC);
612637 histos.fill (HIST (" particles/FromCollBadOverFromCollVsVsFromMCColl" ), 1 .f * particlesFromCollWrongBC / particlesFromColl, particlesInCollision.size ());
613638
614- const std::array<float , Estimators::nEstimators>& nMult = genMult (particlesInCollision);
639+ const std::array<float , Estimators::nEstimators>& nMult = genMult (mcCollision, particlesInCollision);
615640
616641 float nMultReco[Estimators::nEstimators];
617642 nMultReco[Estimators::FT0A] = collision.multFT0A ();
0 commit comments