Skip to content
Draft
Show file tree
Hide file tree
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
11 changes: 8 additions & 3 deletions PWGHF/Core/DecayChannels.h
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,10 @@ enum DecayChannelMain : HfDecayChannel {
XicToPKPi = 21, // p K− π+
XicToPKK = 22, // p K− K+
XicToSPiPi = 23, // Σ+ π− π+
// cd+
CDeuteronToDeKPi = 24, // de K− π+
//
NChannelsMain = XicToSPiPi // last channel
NChannelsMain = CDeuteronToDeKPi // last channel
};
/// @brief 3-prong candidates: resonant channels
enum DecayChannelResonant : HfDecayChannel {
Expand Down Expand Up @@ -131,8 +133,11 @@ enum DecayChannelResonant : HfDecayChannel {
// Ξc+
XicToPKstar0 = 27, // p anti-K*0(892)
XicToPPhi = 28, // p φ
//
NChannelsResonant = XicToPPhi // last channel
// cd+
CDeuteronToDeKstar0 = 30,
CDeuteronToNeDeltaplusK = 31,
CDeuteronToNeL1520Pi = 32,
NChannelsResonant = CDeuteronToNeL1520Pi // last channel
};
} // namespace hf_cand_3prong

Expand Down
19 changes: 19 additions & 0 deletions PWGHF/TableProducer/candidateCreator3Prong.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -1327,6 +1327,25 @@ struct HfCandidateCreator3ProngExpressions {
}
}
}

// cd± → de± K∓ π±
if (flagChannelMain == 0) {
auto arrPdgDaughtersCDeuteronToDeKPi{std::array{+Pdg::kDeuteron, -kKPlus, +kPiPlus}};
if (matchKinkedDecayTopology && matchInteractionsWithMaterial) {
indexRec = RecoDecay::getMatchedMCRec<false, false, false, true, true>(mcParticles, arrayDaughters, Pdg::kCDeuteron, arrPdgDaughtersCDeuteronToDeKPi, true, &sign, 1, &nKinkedTracks, &nInteractionsWithMaterial);
} else if (matchKinkedDecayTopology && !matchInteractionsWithMaterial) {
indexRec = RecoDecay::getMatchedMCRec<false, false, false, true, false>(mcParticles, arrayDaughters, Pdg::kCDeuteron, arrPdgDaughtersCDeuteronToDeKPi, true, &sign, 1, &nKinkedTracks);
} else if (!matchKinkedDecayTopology && matchInteractionsWithMaterial) {
indexRec = RecoDecay::getMatchedMCRec<false, false, false, false, true>(mcParticles, arrayDaughters, Pdg::kCDeuteron, arrPdgDaughtersCDeuteronToDeKPi, true, &sign, 1, nullptr, &nInteractionsWithMaterial);
} else {
indexRec = RecoDecay::getMatchedMCRec(mcParticles, arrayDaughters, Pdg::kCDeuteron, arrPdgDaughtersCDeuteronToDeKPi, true, &sign, 1);
}
if (indexRec > -1) {
flagChannelMain = static_cast<int8_t>(sign * DecayChannelMain::CDeuteronToDeKPi);
auto particle = mcParticles.rawIteratorAt(indexRec);
flagChannelResonant = hf_decay::getResonantDecayCDeuteron(particle);
}
}
}

// Check whether the particle is non-prompt (from a b quark).
Expand Down
10 changes: 9 additions & 1 deletion PWGHF/Utils/utilsMcGen.h
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ void fillMcMatchGen3Prong(TMcParticles const& mcParticles,
if (std::abs(pdgMother) == Pdg::kDStar) {
std::vector<int> arrResoDaughIndexDStar = {};
RecoDecay::getDaughters(particle, &arrResoDaughIndexDStar, std::array{0}, DepthResoMax);
for (const int iDaug : arrResoDaughIndexDStar) {
for (const int iDaug : arrResoDaughIndexDStar) { // o2-linter: disable=const-ref-in-for-loop (not necessary for int type)
auto daughDstar = mcParticles.rawIteratorAt(iDaug);
if (std::abs(daughDstar.pdgCode()) == Pdg::kD0 || std::abs(daughDstar.pdgCode()) == Pdg::kDPlus) {
RecoDecay::getDaughters(daughDstar, &arrResoDaughIndex, std::array{0}, DepthResoMax);
Expand Down Expand Up @@ -301,6 +301,14 @@ void fillMcMatchGen3Prong(TMcParticles const& mcParticles,
flagChannelMain = sign * DecayChannelMain::XicToPKPi;
}
}

// cd± → de± K∓ π±
if (flagChannelMain == 0) {
if (RecoDecay::isMatchedMCGen(mcParticles, particle, Pdg::kCDeuteron, std::array{+Pdg::kDeuteron, -kKPlus, +kPiPlus}, true, &sign, 1)) {
flagChannelMain = sign * DecayChannelMain::CDeuteronToDeKPi;
flagChannelResonant = o2::hf_decay::getResonantDecayCDeuteron(particle);
}
}
}

// Check whether the particle is non-prompt (from a b quark).
Expand Down
33 changes: 33 additions & 0 deletions PWGHF/Utils/utilsMcMatching.h
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,16 @@ static const std::unordered_map<DecayChannelResonant, const std::array<int, 2>>
{DecayChannelResonant::XicToPPhi, {+PDG_t::kProton, +o2::constants::physics::Pdg::kPhi}},
};

// cd+

static const std::unordered_map<DecayChannelMain, const std::vector<int>> daughtersCDeuteronMain{
{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 constexpr int StatusCodeCDeuteronToDeKstar0{95};
static constexpr int StatusCodeCDeuteronToNeDeltaplusK{96};
static constexpr int StatusCodeCDeuteronToNeL1520Pi{97};

/// Returns a map of the possible final states for a specific 3-prong particle specie
/// \param pdgMother PDG code of the mother particle
/// \return a map of final states with their corresponding PDG codes
Expand All @@ -170,6 +180,8 @@ inline std::unordered_map<DecayChannelMain, const std::vector<int>> getDecayChan
return daughtersLcMain;
case o2::constants::physics::Pdg::kXiCPlus:
return daughtersXicMain;
case o2::constants::physics::Pdg::kCDeuteron:
return daughtersCDeuteronMain;
default:
LOG(fatal) << "Unknown PDG code for 3-prong final states: " << pdgMother;
return {};
Expand Down Expand Up @@ -317,6 +329,27 @@ inline void flipPdgSign(const int pdgMother, const int pdgToFlip, std::array<int
}
}
}
/// Get resonant channel for c-deuteron
/// resonances are not stored in the particle stack for c-deuteron, but tagged with specific status codes
/// \tparam particle is the c-deuteron
/// \param pdgMother PDG code of the mother particle
/// \param pdgToFlip PDG code to be flipped
/// \param arrPdg array of PDG codes to be modified
template <typename Part>
inline int getResonantDecayCDeuteron(Part const& particle)
{
auto statusCode = std::abs(particle.getGenStatusCode());
if (statusCode == o2::hf_decay::hf_cand_3prong::StatusCodeCDeuteronToDeKstar0) {
return o2::hf_decay::hf_cand_3prong::DecayChannelResonant::CDeuteronToDeKstar0;
}
if (statusCode == o2::hf_decay::hf_cand_3prong::StatusCodeCDeuteronToNeDeltaplusK) {
return o2::hf_decay::hf_cand_3prong::DecayChannelResonant::CDeuteronToNeDeltaplusK;
}
if (statusCode == o2::hf_decay::hf_cand_3prong::StatusCodeCDeuteronToNeL1520Pi) {
return o2::hf_decay::hf_cand_3prong::DecayChannelResonant::CDeuteronToNeL1520Pi;
}
return 0;
}
} // namespace o2::hf_decay

#endif // PWGHF_UTILS_UTILSMCMATCHING_H_
Loading