Skip to content

Commit 25963ec

Browse files
mfagginMattia Faggin
andauthored
[PWGHF] Fix swap flagging in candidate-creator-3-prong. (#11962)
Co-authored-by: Mattia Faggin <mfaggin@cern.ch>
1 parent bb027af commit 25963ec

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

PWGHF/TableProducer/candidateCreator3Prong.cxx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1125,6 +1125,13 @@ struct HfCandidateCreator3ProngExpressions {
11251125
if (indexRec > -1) {
11261126
flagChannelMain = sign * channelMain;
11271127

1128+
/// swapping for D+, Ds->Kpipi and Lc->pKpi
1129+
if (std::abs(flagChannelMain) == DecayChannelMain::DplusToPiKK || std::abs(flagChannelMain) == DecayChannelMain::DsToPiKK || std::abs(flagChannelMain) == DecayChannelMain::LcToPKPi) {
1130+
if (arrayDaughters[0].has_mcParticle()) {
1131+
swapping = static_cast<int8_t>(std::abs(arrayDaughters[0].mcParticle().pdgCode()) == kPiPlus);
1132+
}
1133+
}
1134+
11281135
// Flag the resonant decay channel
11291136
std::vector<int> arrResoDaughIndex = {};
11301137
if (pdgMother == Pdg::kDStar) {

0 commit comments

Comments
 (0)