Skip to content

Commit 959a422

Browse files
authored
define pdgcode variable
1 parent c76de39 commit 959a422

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

PWGLF/TableProducer/Nuspex/ebyeMaker.cxx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -839,7 +839,8 @@ struct EbyeMaker {
839839
}
840840
if (mcLab.has_mcParticle()) {
841841
auto mcTrack = mcLab.template mcParticle_as<aod::McParticles>();
842-
if ((std::abs(mcTrack.pdgCode()) != kPartPdg[iP] && kUsePID) || ((std::abs(pdgCode) == PDG_t::kPiPlus || std::abs(pdgCode) == PDG_t::kElectron || std::abs(pdgCode) == PDG_t::kMuonMinus || std::abs(pdgCode) == PDG_t::kKPlus || std::abs(pdgCode) == PDG_t::kProton) && !kUsePID))
842+
auto pdgCode = mcTrack.pdgCode();
843+
if ((std::abs(pdgCode) != kPartPdg[iP] && kUsePID) || ((std::abs(pdgCode) == PDG_t::kPiPlus || std::abs(pdgCode) == PDG_t::kElectron || std::abs(pdgCode) == PDG_t::kMuonMinus || std::abs(pdgCode) == PDG_t::kKPlus || std::abs(pdgCode) == PDG_t::kProton) && !kUsePID))
843844
continue;
844845
if ((((mcTrack.flags() & 0x8) || (mcTrack.flags() & 0x2)) && (doprocessMcRun2 || doprocessMiniMcRun2)) || ((mcTrack.flags() & 0x1) && !doprocessMiniMcRun2))
845846
continue;

0 commit comments

Comments
 (0)