Skip to content

Commit 69fa327

Browse files
committed
fixing bug in HF matching
1 parent ebab9c6 commit 69fa327

File tree

1 file changed

+27
-1
lines changed

1 file changed

+27
-1
lines changed

PWGJE/Core/JetHFUtilities.h

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -625,7 +625,33 @@ auto matchedHFParticleId(const T& candidate, const U& /*tracks*/, const V& /*par
625625
template <typename T, typename U, typename V>
626626
auto matchedHFParticle(const T& candidate, const U& /*tracks*/, const V& /*particles*/)
627627
{
628-
const auto candidateDaughterParticle = candidate.template prong1_as<U>().template mcParticle_as<V>();
628+
629+
const typename V::iterator& candidateDaughterParticle;
630+
if (std::abs(candidate.flagMcMatchRec()) == o2::hf_decay::hf_cand_2prong::DecayChannelMain::D0ToPiK) {
631+
candidateDaughterParticle = candidate.template prong1_as<U>().template mcParticle_as<V>();
632+
}
633+
if (std::abs(candidate.flagMcMatchRec()) == o2::hf_decay::hf_cand_3prong::DecayChannelMain::DplusToPiKPi) {
634+
candidateDaughterParticle = candidate.template prong1_as<U>().template mcParticle_as<V>();
635+
}
636+
if (std::abs(candidate.flagMcMatchRec()) == o2::hf_decay::hf_cand_3prong::DecayChannelMain::DsToPiKK) {
637+
candidateDaughterParticle = candidate.template prong1_as<U>().template mcParticle_as<V>();
638+
}
639+
if (std::abs(candidate.flagMcMatchRec()) == o2::hf_decay::hf_cand_dstar::DecayChannelMain::DstarToPiKPi) {
640+
candidateDaughterParticle = candidate.template prong3_as<U>().template mcParticle_as<V>();
641+
}
642+
if (std::abs(candidate.flagMcMatchRec()) == o2::hf_decay::hf_cand_3prong::DecayChannelMain::LcToPKPi) {
643+
candidateDaughterParticle = candidate.template prong1_as<U>().template mcParticle_as<V>();
644+
}
645+
if (std::abs(candidate.flagMcMatchRec()) == o2::hf_decay::hf_cand_beauty::DecayChannelMain::B0ToDminusPi) {
646+
candidateDaughterParticle = candidate.template prong4_as<U>().template mcParticle_as<V>();
647+
}
648+
if (std::abs(candidate.flagMcMatchRec()) == o2::hf_decay::hf_cand_beauty::DecayChannelMain::BplusToD0Pi) {
649+
candidateDaughterParticle = candidate.template prong3_as<U>().template mcParticle_as<V>();
650+
}
651+
if (std::abs(candidate.flagMcMatchRec()) == o2::aod::hf_cand_xic_to_xi_pi_pi::DecayType::XicToXiPiPi) {
652+
candidateDaughterParticle = candidate.template prong1_as<U>().template mcParticle_as<V>();
653+
}
654+
629655
return candidateDaughterParticle.template mothers_first_as<V>();
630656
}
631657

0 commit comments

Comments
 (0)