Skip to content

Commit c4232b1

Browse files
committed
static_cast int to int8_t with a proper argument
1 parent 9e4e386 commit c4232b1

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

PWGHF/TableProducer/candidateCreator3Prong.cxx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1132,7 +1132,7 @@ struct HfCandidateCreator3ProngExpressions {
11321132
return;
11331133
}
11341134
if (indexRec > -1) {
1135-
flagChannelMain = sign * static_cast<int8_t>(channelMain);
1135+
flagChannelMain = static_cast<int8_t>(sign * channelMain);
11361136

11371137
/// swapping for D+, Ds->Kpipi; Lc, Xic->pKpi
11381138
if (std::abs(flagChannelMain) == DecayChannelMain::DplusToPiKK || std::abs(flagChannelMain) == DecayChannelMain::DsToPiKK || std::abs(flagChannelMain) == DecayChannelMain::LcToPKPi || std::abs(flagChannelMain) == DecayChannelMain::XicToPKPi) {
@@ -1185,7 +1185,7 @@ struct HfCandidateCreator3ProngExpressions {
11851185
indexRec = RecoDecay::getMatchedMCRec(mcParticles, arrayDaughters, Pdg::kDPlus, arrPdgDaughtersDplusToPiKPi, true, &sign, 2);
11861186
}
11871187
if (indexRec > -1) {
1188-
flagChannelMain = sign * static_cast<int8_t>(DecayChannelMain::DplusToPiKPi);
1188+
flagChannelMain = static_cast<int8_t>(sign * DecayChannelMain::DplusToPiKPi);
11891189
}
11901190
}
11911191

@@ -1243,7 +1243,7 @@ struct HfCandidateCreator3ProngExpressions {
12431243
indexRec = RecoDecay::getMatchedMCRec(mcParticles, arrayDaughters, Pdg::kDStar, arrPdgDaughtersDstarToPiKPi, true, &sign, 2);
12441244
}
12451245
if (indexRec > -1) {
1246-
flagChannelMain = sign * static_cast<int8_t>(DecayChannelMain::DstarToPiKPi);
1246+
flagChannelMain = static_cast<int8_t>(sign * DecayChannelMain::DstarToPiKPi);
12471247
flagChannelResonant = 0;
12481248
}
12491249
}
@@ -1261,7 +1261,7 @@ struct HfCandidateCreator3ProngExpressions {
12611261
indexRec = RecoDecay::getMatchedMCRec(mcParticles, arrayDaughters, Pdg::kLambdaCPlus, arrPdgDaughtersLcToPKPi, true, &sign, 2);
12621262
}
12631263
if (indexRec > -1) {
1264-
flagChannelMain = sign * static_cast<int8_t>(DecayChannelMain::LcToPKPi);
1264+
flagChannelMain = static_cast<int8_t>(sign * DecayChannelMain::LcToPKPi);
12651265

12661266
// Flagging the different Λc± → p± K∓ π± decay channels
12671267
if (arrayDaughters[0].has_mcParticle()) {
@@ -1297,7 +1297,7 @@ struct HfCandidateCreator3ProngExpressions {
12971297
indexRec = RecoDecay::getMatchedMCRec(mcParticles, arrayDaughters, Pdg::kXiCPlus, arrPdgDaughtersXicToPKPi, true, &sign, 2);
12981298
}
12991299
if (indexRec > -1) {
1300-
flagChannelMain = sign * static_cast<int8_t>(DecayChannelMain::XicToPKPi);
1300+
flagChannelMain = static_cast<int8_t>(sign * DecayChannelMain::XicToPKPi);
13011301
flagChannelResonant = 0; // TODO
13021302
if (arrayDaughters[0].has_mcParticle()) {
13031303
swapping = static_cast<int8_t>(std::abs(arrayDaughters[0].mcParticle().pdgCode()) == kPiPlus);

0 commit comments

Comments
 (0)