Skip to content

Commit 9cce6ac

Browse files
nstrangmNicolas Strangmann
andauthored
[PWGEM/PhotonMeson] Bug fixes for BC wise pi0 task (#11030)
Co-authored-by: Nicolas Strangmann <nicolas.strangmann@.cern.ch>
1 parent e7020e3 commit 9cce6ac

File tree

3 files changed

+61
-48
lines changed

3 files changed

+61
-48
lines changed

PWGEM/PhotonMeson/DataModel/bcWiseTables.h

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -79,29 +79,29 @@ DECLARE_SOA_COLUMN(StoredCentrality, storedCentrality, uint8_t); //! FT0M centra
7979
DECLARE_SOA_COLUMN(StoredZVtx, storedZVtx, int16_t); //! Z-vertex position (x1000)
8080

8181
DECLARE_SOA_DYNAMIC_COLUMN(Centrality, centrality, [](uint8_t storedcentrality) -> float { return storedcentrality / emdownscaling::downscalingFactors[emdownscaling::kFT0MCent]; }); //! Centrality (0-100)
82-
DECLARE_SOA_DYNAMIC_COLUMN(ZVtx, zVtx, [](uint8_t storedzvtx) -> float { return storedzvtx / emdownscaling::downscalingFactors[emdownscaling::kZVtx]; }); //! Centrality (0-100)
82+
DECLARE_SOA_DYNAMIC_COLUMN(ZVtx, zVtx, [](int16_t storedzvtx) -> float { return storedzvtx / emdownscaling::downscalingFactors[emdownscaling::kZVtx]; }); //! Centrality (0-100)
8383
} // namespace bcwisecollision
8484
DECLARE_SOA_TABLE(BCWiseCollisions, "AOD", "BCWISECOLL", //! table of skimmed EMCal clusters
8585
o2::soa::Index<>, BCWiseBCId, bcwisecollision::StoredCentrality, bcwisecollision::StoredZVtx,
8686
bcwisecollision::Centrality<bcwisecollision::StoredCentrality>, bcwisecollision::ZVtx<bcwisecollision::StoredZVtx>);
8787

8888
namespace bcwisecluster
8989
{
90-
DECLARE_SOA_COLUMN(StoredDefinition, storedDefinition, uint8_t); //! cluster definition, see EMCALClusterDefinition.h
91-
DECLARE_SOA_COLUMN(StoredE, storedE, uint16_t); //! cluster energy (1 MeV -> Maximum cluster energy of ~65 GeV)
92-
DECLARE_SOA_COLUMN(StoredEta, storedEta, int16_t); //! cluster pseudorapidity (x10,000)
93-
DECLARE_SOA_COLUMN(StoredPhi, storedPhi, uint16_t); //! cluster azimuthal angle (x10 000) from 0 to 2pi
94-
DECLARE_SOA_COLUMN(StoredNCells, storedNCells, uint8_t); //! number of cells in cluster
95-
DECLARE_SOA_COLUMN(StoredM02, storedM02, uint16_t); //! shower shape long axis (x10 000)
96-
DECLARE_SOA_COLUMN(StoredTime, storedTime, int16_t); //! cluster time (10 ps resolution)
97-
DECLARE_SOA_COLUMN(StoredIsExotic, storedIsExotic, bool); //! flag to mark cluster as exotic
98-
99-
DECLARE_SOA_DYNAMIC_COLUMN(Definition, definition, [](uint8_t storedDefinition) -> uint8_t { return storedDefinition; }); //! cluster definition, see EMCALClusterDefinition.h
100-
DECLARE_SOA_DYNAMIC_COLUMN(E, e, [](uint16_t storedE) -> float { return storedE / emdownscaling::downscalingFactors[emdownscaling::kEnergy]; }); //! cluster energy (GeV)
90+
DECLARE_SOA_COLUMN(StoredDefinition, storedDefinition, int8_t); //! cluster definition, see EMCALClusterDefinition.h
91+
DECLARE_SOA_COLUMN(StoredE, storedE, int16_t); //! cluster energy (1 MeV -> Maximum cluster energy of ~32 GeV)
92+
DECLARE_SOA_COLUMN(StoredEta, storedEta, int16_t); //! cluster pseudorapidity (x10,000)
93+
DECLARE_SOA_COLUMN(StoredPhi, storedPhi, uint16_t); //! cluster azimuthal angle (x10 000) from 0 to 2pi
94+
DECLARE_SOA_COLUMN(StoredNCells, storedNCells, int8_t); //! number of cells in cluster
95+
DECLARE_SOA_COLUMN(StoredM02, storedM02, int16_t); //! shower shape long axis (x10 000)
96+
DECLARE_SOA_COLUMN(StoredTime, storedTime, int16_t); //! cluster time (10 ps resolution)
97+
DECLARE_SOA_COLUMN(StoredIsExotic, storedIsExotic, bool); //! flag to mark cluster as exotic
98+
99+
DECLARE_SOA_DYNAMIC_COLUMN(Definition, definition, [](int8_t storedDefinition) -> int8_t { return storedDefinition; }); //! cluster definition, see EMCALClusterDefinition.h
100+
DECLARE_SOA_DYNAMIC_COLUMN(E, e, [](int16_t storedE) -> float { return storedE / emdownscaling::downscalingFactors[emdownscaling::kEnergy]; }); //! cluster energy (GeV)
101101
DECLARE_SOA_DYNAMIC_COLUMN(Eta, eta, [](int16_t storedEta) -> float { return storedEta / emdownscaling::downscalingFactors[emdownscaling::kEta]; }); //! cluster pseudorapidity
102102
DECLARE_SOA_DYNAMIC_COLUMN(Phi, phi, [](uint16_t storedPhi) -> float { return storedPhi / emdownscaling::downscalingFactors[emdownscaling::kPhi]; }); //! cluster azimuthal angle (0 to 2pi)
103-
DECLARE_SOA_DYNAMIC_COLUMN(NCells, nCells, [](uint16_t storedNCells) -> uint16_t { return storedNCells; }); //! number of cells in cluster
104-
DECLARE_SOA_DYNAMIC_COLUMN(M02, m02, [](uint16_t storedM02) -> float { return storedM02 / emdownscaling::downscalingFactors[emdownscaling::kM02]; }); //! shower shape long axis
103+
DECLARE_SOA_DYNAMIC_COLUMN(NCells, nCells, [](int16_t storedNCells) -> int16_t { return storedNCells; }); //! number of cells in cluster
104+
DECLARE_SOA_DYNAMIC_COLUMN(M02, m02, [](int16_t storedM02) -> float { return storedM02 / emdownscaling::downscalingFactors[emdownscaling::kM02]; }); //! shower shape long axis
105105
DECLARE_SOA_DYNAMIC_COLUMN(Time, time, [](int16_t storedTime) -> float { return storedTime / emdownscaling::downscalingFactors[emdownscaling::kTime]; }); //! cluster time (ns)
106106
DECLARE_SOA_DYNAMIC_COLUMN(IsExotic, isExotic, [](bool storedIsExotic) -> bool { return storedIsExotic; }); //! flag to mark cluster as exotic
107107

PWGEM/PhotonMeson/TableProducer/bcWiseClusterSkimmer.cxx

Lines changed: 28 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
using namespace o2;
3636
using namespace o2::aod::emdownscaling;
3737
using namespace o2::framework;
38+
using namespace o2::framework::expressions;
3839

3940
using MyCollisions = soa::Join<aod::Collisions, aod::EvSels, aod::CentFT0Ms>;
4041
using MyMCCollisions = soa::Join<aod::Collisions, aod::EvSels, aod::CentFT0Ms, aod::McCollisionLabels>;
@@ -59,22 +60,23 @@ struct bcWiseClusterSkimmer {
5960
Preslice<SelectedCells> cellsPerBC = aod::calo::bcId;
6061

6162
Configurable<float> cfgMinClusterEnergy{"cfgMinClusterEnergy", 0.5, "Minimum energy of selected clusters (GeV)"};
63+
Configurable<float> cfgMaxClusterEnergy{"cfgMaxClusterEnergy", 30., "Maximum energy of selected clusters (GeV)"};
6264
Configurable<float> cfgMinM02{"cfgMinM02", -1., "Minimum M02 of selected clusters"};
6365
Configurable<float> cfgMaxM02{"cfgMaxM02", 5., "Maximum M02 of selected clusters"};
6466
Configurable<float> cfgMinTime{"cfgMinTime", -25, "Minimum time of selected clusters (ns)"};
6567
Configurable<float> cfgMaxTime{"cfgMaxTime", 25, "Maximum time of selected clusters (ns)"};
6668
Configurable<float> cfgRapidityCut{"cfgRapidityCut", 0.8f, "Maximum absolute rapidity of counted generated particles"};
67-
// Configurable<float> cfgMinPtGenPi0{"cfgMinPtGenPi0", 0., "Minimum pT for stored generated pi0s (reduce disk space of derived data)"};
69+
Configurable<float> cfgMinPtGenPi0{"cfgMinPtGenPi0", 0., "Minimum pT for stored generated pi0s (reduce disk space of derived data)"};
6870

6971
Configurable<bool> cfgRequirekTVXinEMC{"cfgRequirekTVXinEMC", false, "Only store kTVXinEMC triggered BCs"};
7072
Configurable<bool> cfgRequireGoodRCTQuality{"cfgRequireGoodRCTQuality", false, "Only store BCs with good quality of T0 and EMC in RCT"};
7173

7274
aod::rctsel::RCTFlagsChecker isFT0EMCGoodRCTChecker{aod::rctsel::kFT0Bad, aod::rctsel::kEMCBad};
7375

74-
expressions::Filter energyFilter = aod::emcalcluster::energy > cfgMinClusterEnergy;
75-
expressions::Filter m02Filter = (aod::emcalcluster::nCells == 1 || (aod::emcalcluster::m02 > cfgMinM02 && aod::emcalcluster::m02 < cfgMaxM02));
76-
expressions::Filter timeFilter = (aod::emcalcluster::time > cfgMinTime && aod::emcalcluster::time < cfgMaxTime);
77-
expressions::Filter emccellfilter = aod::calo::caloType == 1;
76+
Filter energyFilter = (aod::emcalcluster::energy > cfgMinClusterEnergy && aod::emcalcluster::energy < cfgMaxClusterEnergy);
77+
Filter m02Filter = (aod::emcalcluster::nCells == 1 || (aod::emcalcluster::m02 > cfgMinM02 && aod::emcalcluster::m02 < cfgMaxM02));
78+
Filter timeFilter = (aod::emcalcluster::time > cfgMinTime && aod::emcalcluster::time < cfgMaxTime);
79+
Filter emccellFilter = aod::calo::caloType == 1;
7880

7981
HistogramRegistry mHistManager{"output", {}, OutputObjHandlingPolicy::AnalysisObject, false, false};
8082

@@ -88,9 +90,13 @@ struct bcWiseClusterSkimmer {
8890
for (int iBin = 0; iBin < nEventBins; iBin++)
8991
mHistManager.get<TH1>(HIST("nBCs"))->GetXaxis()->SetBinLabel(iBin + 1, binLabels[iBin]);
9092

93+
LOG(info) << "BC wise cluster skimmer cuts:";
94+
LOG(info) << "------------------------------------";
9195
LOG(info) << "| Timing cut: " << cfgMinTime << " < t < " << cfgMaxTime;
92-
LOG(info) << "| M02 cut: " << cfgMinM02 << " < M02 < " << cfgMaxM02;
93-
LOG(info) << "| E cut: E > " << cfgMinClusterEnergy;
96+
LOG(info) << "| Shape cut: " << cfgMinM02 << " < M02 < " << cfgMaxM02;
97+
LOG(info) << "| Energy cut: " << cfgMinClusterEnergy << " < E < " << cfgMaxClusterEnergy;
98+
LOG(info) << "| Rapidity cut: |y| < " << cfgRapidityCut;
99+
LOG(info) << "| Min gen pi0 pt: pT > " << cfgMinPtGenPi0;
94100

95101
o2::emcal::Geometry::GetInstanceFromRunNumber(300000);
96102
if (cfgRequireGoodRCTQuality)
@@ -120,12 +126,12 @@ struct bcWiseClusterSkimmer {
120126
{
121127
for (const auto& cluster : clusters) {
122128
clusterTable(bcID,
123-
convertForStorage<uint8_t>(cluster.definition(), kDefinition),
124-
convertForStorage<uint16_t>(cluster.energy(), kEnergy),
129+
convertForStorage<int8_t>(cluster.definition(), kDefinition),
130+
convertForStorage<int16_t>(cluster.energy(), kEnergy),
125131
convertForStorage<int16_t>(cluster.eta(), kEta),
126132
convertForStorage<uint16_t>(cluster.phi(), kPhi),
127-
convertForStorage<uint8_t>(cluster.nCells(), kNCells),
128-
convertForStorage<uint16_t>(cluster.m02(), kM02),
133+
convertForStorage<int8_t>(cluster.nCells(), kNCells),
134+
convertForStorage<int16_t>(cluster.m02(), kM02),
129135
convertForStorage<int16_t>(cluster.time(), kTime),
130136
cluster.isExotic());
131137
}
@@ -142,11 +148,18 @@ struct bcWiseClusterSkimmer {
142148
auto clusterInducer = mcParticles.iteratorAt(clusterInducerId);
143149
clusterInducerEnergy = clusterInducer.e();
144150
int daughterId = aod::pwgem::photonmeson::utils::mcutil::FindMotherInChain(clusterInducer, mcParticles, std::vector<int>{111});
145-
if (daughterId > 0)
151+
if (daughterId > 0) {
146152
pi0MCIndex = mcParticles.iteratorAt(daughterId).mothersIds()[0];
153+
if (mcParticles.iteratorAt(pi0MCIndex).pt() < cfgMinPtGenPi0)
154+
pi0MCIndex = -1;
155+
}
156+
}
157+
if (pi0MCIndex >= 0) {
158+
if (fMapPi0Index.find(pi0MCIndex) != fMapPi0Index.end()) // Some pi0s might not be found (not gg decay or too large y)
159+
pi0MCIndex = fMapPi0Index[pi0MCIndex]; // If pi0 was stored in table, change index from the MC index to the pi0 index from this task
160+
else // If pi0 was not stored, treat photon as if not from pi0
161+
pi0MCIndex = -1;
147162
}
148-
if (pi0MCIndex > 0)
149-
pi0MCIndex = fMapPi0Index[pi0MCIndex];
150163
mcclusterTable(bcID, pi0MCIndex, convertForStorage<uint16_t>(clusterInducerEnergy, kEnergy));
151164
}
152165
}
@@ -260,7 +273,7 @@ struct bcWiseClusterSkimmer {
260273
for (const auto& mcCollision : mcCollisionsBC) {
261274
auto mcParticlesInColl = mcParticles.sliceBy(perMcCollision, mcCollision.globalIndex());
262275
for (const auto& mcParticle : mcParticlesInColl) {
263-
if (mcParticle.pdgCode() != 111 || std::abs(mcParticle.y()) > cfgRapidityCut || !isGammaGammaDecay(mcParticle, mcParticles))
276+
if (mcParticle.pdgCode() != 111 || std::abs(mcParticle.y()) > cfgRapidityCut || !isGammaGammaDecay(mcParticle, mcParticles) || mcParticle.pt() < cfgMinPtGenPi0)
264277
continue;
265278
bool isPrimary = mcParticle.isPhysicalPrimary() || mcParticle.producedByGenerator();
266279
bool isFromWD = (aod::pwgem::photonmeson::utils::mcutil::IsFromWD(mcCollision, mcParticle, mcParticles)) > 0;

PWGEM/PhotonMeson/Tasks/emcalBcWisePi0.cxx

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,12 @@ struct EmcalBcWisePi0 {
4545
Configurable<bool> cfgRequirekTVXinEMC{"cfgRequirekTVXinEMC", true, "Reconstruct pi0s only in kTVXinEMC triggered BCs"};
4646
Configurable<int> cfgSelectOnlyUniqueAmbiguous{"cfgSelectOnlyUniqueAmbiguous", 0, "0: all clusters, 1: only unique clusters, 2: only ambiguous clusters"};
4747

48-
Configurable<int> cfgClusterDefinition{"cfgClusterDefinition", 10, "Clusterizer to be selected, e.g. 13 for kV3MostSplitLowSeed"};
49-
Configurable<float> cfgMinClusterEnergy{"cfgMinClusterEnergy", 0.7, "Minimum energy of selected clusters (GeV)"};
50-
Configurable<float> cfgMinM02{"cfgMinM02", 0.1, "Minimum M02 of selected clusters"};
51-
Configurable<float> cfgMaxM02{"cfgMaxM02", 0.7, "Maximum M02 of selected clusters"};
52-
Configurable<float> cfgMinTime{"cfgMinTime", -15, "Minimum time of selected clusters (ns)"};
53-
Configurable<float> cfgMaxTime{"cfgMaxTime", 15, "Maximum time of selected clusters (ns)"};
48+
Configurable<int> cfgClusterDefinition{"cfgClusterDefinition", 13, "Clusterizer to be selected, e.g. 13 for kV3MostSplitLowSeed"};
49+
Configurable<int16_t> cfgMinClusterEnergy{"cfgMinClusterEnergy", 700, "Minimum energy of selected clusters (MeV)"};
50+
Configurable<int16_t> cfgMinM02{"cfgMinM02", 1000, "Minimum M02 of selected clusters (x1000)"};
51+
Configurable<int16_t> cfgMaxM02{"cfgMaxM02", 7000, "Maximum M02 of selected clusters (x1000)"};
52+
Configurable<int16_t> cfgMinTime{"cfgMinTime", -1500, "Minimum time of selected clusters (10 ps)"};
53+
Configurable<int16_t> cfgMaxTime{"cfgMaxTime", 1500, "Maximum time of selected clusters (10 ps)"};
5454
Configurable<float> cfgRapidityCut{"cfgRapidityCut", 0.8f, "Maximum absolute rapidity of counted particles"};
5555
Configurable<float> cfgMinOpenAngle{"cfgMinOpenAngle", 0.0202, "Minimum opening angle between photons"};
5656
Configurable<int> cfgDistanceToEdge{"cfgDistanceToEdge", 1, "Distance to edge in cells required for rotated cluster to be accepted"};
@@ -61,10 +61,10 @@ struct EmcalBcWisePi0 {
6161

6262
Configurable<bool> cfgIsMC{"cfgIsMC", false, "Flag to indicate if the task is running on MC data and should fill MC histograms"};
6363

64-
Filter clusterDefinitionFilter = aod::bcwisecluster::storedDefinition == static_cast<uint8_t>(cfgClusterDefinition);
65-
Filter energyFilter = aod::bcwisecluster::storedE > static_cast<uint16_t>(cfgMinClusterEnergy* aod::emdownscaling::downscalingFactors[aod::emdownscaling::kEnergy]);
66-
Filter m02Filter = (aod::bcwisecluster::storedNCells == static_cast<uint8_t>(1) || (aod::bcwisecluster::storedM02 > static_cast<uint16_t>(cfgMinM02 * aod::emdownscaling::downscalingFactors[aod::emdownscaling::kM02]) && aod::bcwisecluster::storedM02 < static_cast<uint16_t>(cfgMaxM02 * aod::emdownscaling::downscalingFactors[aod::emdownscaling::kM02])));
67-
Filter timeFilter = (aod::bcwisecluster::storedTime > static_cast<int16_t>(cfgMinTime * aod::emdownscaling::downscalingFactors[aod::emdownscaling::kTime]) && aod::bcwisecluster::storedTime < static_cast<int16_t>(cfgMaxTime * aod::emdownscaling::downscalingFactors[aod::emdownscaling::kTime]));
64+
Filter clusterDefinitionFilter = aod::bcwisecluster::storedDefinition == cfgClusterDefinition;
65+
Filter energyFilter = aod::bcwisecluster::storedE > cfgMinClusterEnergy;
66+
Filter m02Filter = (aod::bcwisecluster::storedNCells == 1 || (aod::bcwisecluster::storedM02 > cfgMinM02 && aod::bcwisecluster::storedM02 < cfgMaxM02));
67+
Filter timeFilter = (aod::bcwisecluster::storedTime > cfgMinTime && aod::bcwisecluster::storedTime < cfgMaxTime);
6868

6969
emcal::Geometry* emcalGeom;
7070

@@ -91,8 +91,8 @@ struct EmcalBcWisePi0 {
9191
mHistManager.add("Cluster/Exotic", "Is cluster exotic?;#bf{Exotic?};#bf{#it{N}_{clusters}}", HistType::kTH1F, {{2, -0.5, 1.5}});
9292
mHistManager.add("Cluster/EtaPhi", "Eta/Phi distribution of clusters;#eta;#phi", HistType::kTH2F, {{400, -0.8, 0.8}, {400, 0, constants::math::TwoPI}});
9393

94-
mHistManager.add("invMassVsPt", "Invariant mass and pT of meson candidates", HistType::kTH2F, {{200, 0., 0.4}, {200, 0., 20.}});
95-
mHistManager.add("invMassVsPtBackground", "Invariant mass and pT of background meson candidates", HistType::kTH2F, {{200, 0., 0.4}, {200, 0., 20.}});
94+
mHistManager.add("GG/invMassVsPt", "Invariant mass and pT of meson candidates;#bf{#it{M}^{#gamma#gamma} (GeV/#it{c}^{2})};#bf{#it{p}_{T}^{#gamma#gamma} (GeV/#it{c})}", HistType::kTH2F, {{200, 0., 0.4}, {200, 0., 20.}});
95+
mHistManager.add("GG/invMassVsPtBackground", "Invariant mass and pT of background meson candidates;#bf{#it{M}^{#gamma#gamma} (GeV/#it{c}^{2})};#bf{#it{p}_{T}^{#gamma#gamma} (GeV/#it{c})}", HistType::kTH2F, {{200, 0., 0.4}, {200, 0., 20.}});
9696

9797
if (cfgIsMC) {
9898
mHistManager.add("True/clusterERecVsETrue", "True vs reconstructed energy of cluster inducing particle;#bf{#it{E}_{rec} (GeV)};#bf{#it{E}_{true}^{cls inducing part} (GeV)}", HistType::kTH2F, {{200, 0, 20}, {200, 0, 20}});
@@ -151,7 +151,7 @@ struct EmcalBcWisePi0 {
151151
mHistManager.fill(HIST("Event/nCollPerBC"), collisions.size());
152152
if (collisions.size() == 2) {
153153
mHistManager.fill(HIST("Event/Z1VsZ2"), collisions.iteratorAt(0).zVtx(), collisions.iteratorAt(1).zVtx());
154-
mHistManager.fill(HIST("Event/dZ"), std::abs(collisions.iteratorAt(0).zVtx() - collisions.iteratorAt(1).zVtx()));
154+
mHistManager.fill(HIST("Event/dZ"), collisions.iteratorAt(0).zVtx() - collisions.iteratorAt(1).zVtx());
155155
}
156156
}
157157

@@ -180,7 +180,7 @@ struct EmcalBcWisePi0 {
180180
if (openingAngle12 < cfgMinOpenAngle)
181181
continue;
182182

183-
mHistManager.fill(HIST("invMassVsPt"), v12.M(), v12.Pt());
183+
mHistManager.fill(HIST("GG/invMassVsPt"), v12.M(), v12.Pt());
184184

185185
if (clusters.size() < 3)
186186
continue;
@@ -216,7 +216,7 @@ struct EmcalBcWisePi0 {
216216

217217
ROOT::Math::PtEtaPhiMVector vBG = v3 + vi;
218218

219-
mHistManager.fill(HIST("invMassVsPtBackground"), vBG.M(), vBG.Pt());
219+
mHistManager.fill(HIST("GG/invMassVsPtBackground"), vBG.M(), vBG.Pt());
220220
}
221221
}
222222
}
@@ -237,8 +237,7 @@ struct EmcalBcWisePi0 {
237237
if (openingAngle12 < cfgMinOpenAngle)
238238
continue;
239239

240-
int g1Pi0ID = g1.pi0ID() - mcPi0s.iteratorAt(0).globalIndex();
241-
const auto& mcPi0 = mcPi0s.iteratorAt(g1Pi0ID);
240+
const auto& mcPi0 = mcPi0s.iteratorAt(g1.pi0ID() - mcPi0s.offset());
242241

243242
mHistManager.fill(HIST("True/PtRecVsPtTrue"), v12.Pt(), mcPi0.pt());
244243

@@ -300,15 +299,16 @@ struct EmcalBcWisePi0 {
300299
LOG(fatal) << "MC processing is not enabled, but the task is running on MC data. Please set cfgIsMC to true.";
301300
return;
302301
}
302+
303+
fillGeneratedPi0Hists(mcPi0s, bc); // Fill before BC selection to also store pi0s in BCs that were not triggered
304+
303305
if (!isBCSelected(bc, collisions))
304306
return;
305307

306308
for (const auto& cluster : clusters)
307309
mHistManager.fill(HIST("True/clusterERecVsETrue"), cluster.e(), cluster.trueE());
308310

309311
reconstructTrueMesons(clusters, mcPi0s);
310-
311-
fillGeneratedPi0Hists(mcPi0s, bc);
312312
}
313313
PROCESS_SWITCH(EmcalBcWisePi0, processMCInfo, "Run true and gen", false);
314314
};

0 commit comments

Comments
 (0)