diff --git a/PWGHF/Tasks/taskPidStudies.cxx b/PWGHF/Tasks/taskPidStudies.cxx index 75878f4f9a6..00ec4140f63 100644 --- a/PWGHF/Tasks/taskPidStudies.cxx +++ b/PWGHF/Tasks/taskPidStudies.cxx @@ -204,8 +204,8 @@ struct HfTaskPidStudies { aod::pidTOFFullPi, aod::pidTOFFullKa, aod::pidTOFFullPr>; using CollSels = soa::Join; using CollisionsMc = soa::Join; - using V0sMcRec = soa::Join; - using CascsMcRec = soa::Join; + using V0sMcRec = soa::Join; + using CascsMcRec = soa::Join; ctpRateFetcher rateFetcher; HfEventSelection hfEvSel; @@ -308,37 +308,29 @@ struct HfTaskPidStudies { int isMatched(const T1& cand) { if constexpr (std::is_same::value) { - if (!cand.has_v0MCCore()) { - return Particle::NotMatched; - } - auto v0MC = cand.template v0MCCore_as(); - if (v0MC.pdgCode() == kK0Short && v0MC.pdgCodeNegative() == -kPiPlus && v0MC.pdgCodePositive() == kPiPlus) { + if (cand.pdgCode() == kK0Short && cand.pdgCodeNegative() == -kPiPlus && cand.pdgCodePositive() == kPiPlus) { return Particle::K0s; } - if (v0MC.pdgCode() == kLambda0 && v0MC.pdgCodeNegative() == -kPiPlus && v0MC.pdgCodePositive() == kProton) { + if (cand.pdgCode() == kLambda0 && cand.pdgCodeNegative() == -kPiPlus && cand.pdgCodePositive() == kProton) { return Particle::Lambda; } - if (v0MC.pdgCode() == -kLambda0 && v0MC.pdgCodeNegative() == -kProton && v0MC.pdgCodePositive() == kPiPlus) { + if (cand.pdgCode() == -kLambda0 && cand.pdgCodeNegative() == -kProton && cand.pdgCodePositive() == kPiPlus) { return -Particle::Lambda; } } if constexpr (std::is_same::value) { - if (!cand.has_cascMCCore()) { - return Particle::NotMatched; - } - auto cascMC = cand.template cascMCCore_as(); - if (cascMC.pdgCode() == kOmegaMinus && - cascMC.pdgCodeBachelor() == -kKPlus && - cascMC.pdgCodeV0() == kLambda0 && - cascMC.pdgCodePositive() == kProton && - cascMC.pdgCodeNegative() == -kPiPlus) { + if (cand.pdgCode() == kOmegaMinus && + cand.pdgCodeBachelor() == -kKPlus && + cand.pdgCodeV0() == kLambda0 && + cand.pdgCodePositive() == kProton && + cand.pdgCodeNegative() == -kPiPlus) { return Particle::Omega; } - if (cascMC.pdgCode() == -kOmegaMinus && - cascMC.pdgCodeBachelor() == kKPlus && - cascMC.pdgCodeV0() == -kLambda0 && - cascMC.pdgCodePositive() == kPiPlus && - cascMC.pdgCodeNegative() == -kProton) { + if (cand.pdgCode() == -kOmegaMinus && + cand.pdgCodeBachelor() == kKPlus && + cand.pdgCodeV0() == -kLambda0 && + cand.pdgCodePositive() == kPiPlus && + cand.pdgCodeNegative() == -kProton) { return -Particle::Omega; } }