Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions PWGEM/PhotonMeson/TableProducer/associateMCinfoPhoton.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ struct AssociateMCInfoPhoton {
Configurable<float> max_rxy_gen{"max_rxy_gen", 100, "max rxy to store generated information"};
Configurable<bool> requireGammaGammaDecay{"requireGammaGammaDecay", false, "require gamma gamma decay for generated pi0 and eta meson"};
Configurable<float> cfg_max_eta_photon{"cfg_max_eta_gamma", 0.8, "max eta for photons at PV"};

HistogramRegistry registry{"EMMCEvent"};

void init(o2::framework::InitContext&)
Expand Down Expand Up @@ -172,19 +172,19 @@ struct AssociateMCInfoPhoton {
for (const auto& mcParticle : groupedMcParticles) { // store necessary information for denominator of efficiency
if ((mcParticle.isPhysicalPrimary() || mcParticle.producedByGenerator()) && std::fabs(mcParticle.y()) < 0.9f && mcParticle.pt() < 20.f) {
auto binNumber = hBinFinder->FindBin(mcParticle.pt(), std::fabs(mcParticle.y())); // caution: pack
size_t lNDaughters = 0;
size_t lNDaughters = 0;
size_t mesonAccepted = 0;
if (mcParticle.has_daughters()) {
auto lDaughters = mcParticle.daughters_as<aod::McParticles>();
lNDaughters = lDaughters.size();
auto lDaughter0 = lDaughters.begin();
if (lNDaughters == 2) {
auto lDaughter1 = lDaughters.iteratorAt(1);
if ( std::fabs(lDaughter0.eta())< cfg_max_eta_photon && std::fabs(lDaughter1.eta()) < cfg_max_eta_photon){
if (std::fabs(lDaughter0.eta()) < cfg_max_eta_photon && std::fabs(lDaughter1.eta()) < cfg_max_eta_photon) {
mesonAccepted = 1;
}
}
}
}
}
switch (std::abs(mcParticle.pdgCode())) {
case PDG_t::kGamma:
registry.fill(HIST("Generated/h2PtY_Gamma"), mcParticle.pt(), std::fabs(mcParticle.y()));
Expand All @@ -195,7 +195,7 @@ struct AssociateMCInfoPhoton {
continue;
registry.fill(HIST("Generated/h2PtY_Pi0"), mcParticle.pt(), std::fabs(mcParticle.y()));
genPi0[binNumber]++;
if (mesonAccepted == 1){
if (mesonAccepted == 1) {
registry.fill(HIST("Generated/h2PtY_Accepted_Pi0"), mcParticle.pt(), std::fabs(mcParticle.y()));
}
break;
Expand All @@ -204,7 +204,7 @@ struct AssociateMCInfoPhoton {
continue;
registry.fill(HIST("Generated/h2PtY_Eta"), mcParticle.pt(), std::fabs(mcParticle.y()));
genEta[binNumber]++;
if (mesonAccepted == 1){
if (mesonAccepted == 1) {
registry.fill(HIST("Generated/h2PtY_Accepted_Eta"), mcParticle.pt(), std::fabs(mcParticle.y()));
}
break;
Expand Down
Loading