Skip to content

Commit a532022

Browse files
author
Mattia Faggin
committed
Fix swap flagging in candidate-creator-3-prong.
1 parent b60f715 commit a532022

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

PWGHF/TableProducer/candidateCreator3Prong.cxx

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1125,6 +1125,17 @@ 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) {
1130+
if (arrayDaughters[0].has_mcParticle()) {
1131+
swapping = static_cast<int8_t>(std::abs(arrayDaughters[0].mcParticle().pdgCode()) == kPiPlus);
1132+
}
1133+
} else if (std::abs(flagChannelMain) == DecayChannelMain::LcToPKPi) {
1134+
if (arrayDaughters[0].has_mcParticle()) {
1135+
swapping = static_cast<int8_t>(std::abs(arrayDaughters[0].mcParticle().pdgCode()) == kPiPlus);
1136+
}
1137+
}
1138+
11281139
// Flag the resonant decay channel
11291140
std::vector<int> arrResoDaughIndex = {};
11301141
if (pdgMother == Pdg::kDStar) {

0 commit comments

Comments
 (0)