diff --git a/PWGHF/TableProducer/candidateCreator3Prong.cxx b/PWGHF/TableProducer/candidateCreator3Prong.cxx index e9ad967d846..e83396da8ab 100644 --- a/PWGHF/TableProducer/candidateCreator3Prong.cxx +++ b/PWGHF/TableProducer/candidateCreator3Prong.cxx @@ -1358,6 +1358,9 @@ struct HfCandidateCreator3ProngExpressions { auto bHadMother = mcParticles.rawIteratorAt(idxBhadMothers[0]); rowMcMatchRec(flagChannelMain, origin, swapping, flagChannelResonant, bHadMother.pt(), bHadMother.pdgCode(), nKinkedTracks, nInteractionsWithMaterial); } else { + if (std::abs(flagChannelMain) == DecayChannelMain::CDeuteronToDeKPi) { + origin = RecoDecay::OriginType::Prompt; + } rowMcMatchRec(flagChannelMain, origin, swapping, flagChannelResonant, -1.f, 0, nKinkedTracks, nInteractionsWithMaterial); } } diff --git a/PWGHF/Utils/utilsMcMatching.h b/PWGHF/Utils/utilsMcMatching.h index a5de35c6200..d4989053dd7 100644 --- a/PWGHF/Utils/utilsMcMatching.h +++ b/PWGHF/Utils/utilsMcMatching.h @@ -160,9 +160,9 @@ static const std::unordered_map> daught {DecayChannelMain::CDeuteronToDeKPi, {+o2::constants::physics::Pdg::kDeuteron, +PDG_t::kKMinus, +PDG_t::kPiPlus}}}; /// resonances in c-deuteron decay are not stored in the particle stack for c-deuteron, but tagged with specific status codes -static const std::array StatusCodeCDeuteronToDeKstar0{-85, -95}; -static const std::array StatusCodeCDeuteronToNeDeltaplusK{-86, -96}; -static const std::array StatusCodeCDeuteronToNeL1520Pi{-87, -97}; +static constexpr std::array statusCodeCDeuteronToDeKstar0{-85, -95}; +static constexpr std::array statusCodeCDeuteronToNeDeltaplusK{-86, -96}; +static constexpr std::array statusCodeCDeuteronToNeL1520Pi{-87, -97}; /// Returns a map of the possible final states for a specific 3-prong particle specie /// \param pdgMother PDG code of the mother particle @@ -338,14 +338,14 @@ inline void flipPdgSign(const int pdgMother, const int pdgToFlip, std::array inline int getResonantDecayCDeuteron(Part const& particle) { - auto statusCode = std::abs(particle.getGenStatusCode()); - if (statusCode == o2::hf_decay::hf_cand_3prong::StatusCodeCDeuteronToDeKstar0[0] || statusCode == o2::hf_decay::hf_cand_3prong::StatusCodeCDeuteronToDeKstar0[1]) { + auto statusCode = particle.getGenStatusCode(); + if (statusCode == o2::hf_decay::hf_cand_3prong::statusCodeCDeuteronToDeKstar0[0] || statusCode == o2::hf_decay::hf_cand_3prong::statusCodeCDeuteronToDeKstar0[1]) { return o2::hf_decay::hf_cand_3prong::DecayChannelResonant::CDeuteronToDeKstar0; } - if (statusCode == o2::hf_decay::hf_cand_3prong::StatusCodeCDeuteronToNeDeltaplusK[0] || statusCode == o2::hf_decay::hf_cand_3prong::StatusCodeCDeuteronToNeDeltaplusK[1]) { + if (statusCode == o2::hf_decay::hf_cand_3prong::statusCodeCDeuteronToNeDeltaplusK[0] || statusCode == o2::hf_decay::hf_cand_3prong::statusCodeCDeuteronToNeDeltaplusK[1]) { return o2::hf_decay::hf_cand_3prong::DecayChannelResonant::CDeuteronToNeDeltaplusK; } - if (statusCode == o2::hf_decay::hf_cand_3prong::StatusCodeCDeuteronToNeL1520Pi[0] || statusCode == o2::hf_decay::hf_cand_3prong::StatusCodeCDeuteronToNeL1520Pi[1]) { + if (statusCode == o2::hf_decay::hf_cand_3prong::statusCodeCDeuteronToNeL1520Pi[0] || statusCode == o2::hf_decay::hf_cand_3prong::statusCodeCDeuteronToNeL1520Pi[1]) { return o2::hf_decay::hf_cand_3prong::DecayChannelResonant::CDeuteronToNeL1520Pi; } return 0;