Skip to content

Commit d4e1a0b

Browse files
committed
Study event loss
1 parent b6980a5 commit d4e1a0b

File tree

1 file changed

+15
-9
lines changed

1 file changed

+15
-9
lines changed

PWGLF/Tasks/Strangeness/phik0shortanalysis.cxx

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -337,6 +337,7 @@ struct Phik0shortanalysis {
337337
mcEventHist.add("hGenMCVertexZ", "hGenMCVertexZ", kTH1F, {vertexZAxis});
338338
mcEventHist.add("hGenMCMultiplicityPercent", "GenMC Multiplicity Percentile", kTH1F, {binnedmultAxis});
339339
mcEventHist.add("hGenMCAssocRecoMultiplicityPercent", "GenMC AssocReco Multiplicity Percentile", kTH1F, {binnedmultAxis});
340+
mcEventHist.add("hGenMCRecoMultiplicityPercent", "GenMCReco Multiplicity Percentile", kTH1F, {binnedmultAxis});
340341

341342
// Eta distribution for dN/deta values estimation in MC
342343
mcEventHist.add("h2RecMCEtaDistribution", "Eta vs multiplicity in MCReco", kTH2F, {binnedmultAxis, etaAxis});
@@ -599,7 +600,7 @@ struct Phik0shortanalysis {
599600
mcK0SHist.add("h3K0SMCGenAssocRecoCheckNewProc", "K0S in MCGen Associated MCReco Check", kTH3F, {binnedmultAxis, pTK0SAxis, yAxis});
600601
mcPionHist.add("h3PiMCGenAssocRecoCheckNewProc", "Pion in MCGen Associated MCReco Check", kTH3F, {binnedmultAxis, pTPiAxis, yAxis});
601602

602-
// Initialize CCDB only if purity or efficiencies are requested in the task
603+
// Initialize CCDB only if purity or efficiencies are requested in the task
603604
if (useCCDB) {
604605
ccdb->setURL(ccdbUrl);
605606
ccdb->setCaching(true);
@@ -2846,20 +2847,25 @@ struct Phik0shortanalysis {
28462847
if (!pwglf::isINELgtNmc(mcParticles, 0, pdgDB))
28472848
return;
28482849

2849-
bool isAssocColl = false;
2850+
float genmultiplicity = mcCollision.centFT0M();
2851+
2852+
uint64_t numberAssocColl = 0;
28502853
for (const auto& collision : collisions) {
28512854
if (acceptEventQA<true>(collision, false)) {
2852-
isAssocColl = true;
2853-
break;
2855+
mcEventHist.fill(HIST("hGenMCRecoMultiplicityPercent"), genmultiplicity); // Event split numerator
2856+
numberAssocColl++;
28542857
}
28552858
}
28562859

2857-
float genmultiplicity = mcCollision.centFT0M();
2860+
// The inclusive number of events is the event loss denominator,
2861+
// while the number of associated events is the event loss numerator
28582862
mcEventHist.fill(HIST("hGenMCMultiplicityPercent"), genmultiplicity);
2859-
if (isAssocColl)
2863+
if (numberAssocColl > 0)
28602864
mcEventHist.fill(HIST("hGenMCAssocRecoMultiplicityPercent"), genmultiplicity);
28612865

28622866
for (const auto& mcParticle : mcParticles) {
2867+
// The inclusive number of particles is the signal loss denominator,
2868+
// while the number of associated particles is the signal loss numerator
28632869
if (std::abs(mcParticle.y()) > cfgYAcceptance)
28642870
continue;
28652871

@@ -2870,7 +2876,7 @@ struct Phik0shortanalysis {
28702876
continue;
28712877

28722878
mcPhiHist.fill(HIST("h3PhiMCGenNewProc"), genmultiplicity, mcParticle.pt(), mcParticle.y());
2873-
if (isAssocColl)
2879+
if (numberAssocColl > 0)
28742880
mcPhiHist.fill(HIST("h3PhiMCGenAssocRecoNewProc"), genmultiplicity, mcParticle.pt(), mcParticle.y());
28752881

28762882
// K0S selection
@@ -2880,7 +2886,7 @@ struct Phik0shortanalysis {
28802886
continue;
28812887

28822888
mcK0SHist.fill(HIST("h3K0SMCGenNewProc"), genmultiplicity, mcParticle.pt(), mcParticle.y());
2883-
if (isAssocColl)
2889+
if (numberAssocColl > 0)
28842890
mcK0SHist.fill(HIST("h3K0SMCGenAssocRecoNewProc"), genmultiplicity, mcParticle.pt(), mcParticle.y());
28852891

28862892
// Pion selection
@@ -2890,7 +2896,7 @@ struct Phik0shortanalysis {
28902896
continue;
28912897

28922898
mcPionHist.fill(HIST("h3PiMCGenNewProc"), genmultiplicity, mcParticle.pt(), mcParticle.y());
2893-
if (isAssocColl)
2899+
if (numberAssocColl > 0)
28942900
mcPionHist.fill(HIST("h3PiMCGenAssocRecoNewProc"), genmultiplicity, mcParticle.pt(), mcParticle.y());
28952901
}
28962902
}

0 commit comments

Comments
 (0)