Skip to content

Commit 003c299

Browse files
Update derivedDataCreatorDplusToPiKPi.cxx based on Vit's comment
1 parent d07ded1 commit 003c299

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

PWGHF/TableProducer/derivedDataCreatorDplusToPiKPi.cxx

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ struct HfDerivedDataCreatorDplusToPiKPi {
129129
}
130130

131131
template <typename T>
132-
void fillTablesCandidate(const T& candidate, uint8_t candFlag, double invMass,
132+
void fillTablesCandidate(const T& candidate, int candFlag, double invMass,
133133
double ct, double y, int8_t flagMc, int8_t origin, int8_t swapping, int8_t flagDecayChan, const std::vector<float>& mlScores)
134134
{
135135
rowsCommon.fillTablesCandidate(candidate, invMass, y);
@@ -189,7 +189,7 @@ struct HfDerivedDataCreatorDplusToPiKPi {
189189
}
190190
if (fillCandidateSel) {
191191
rowCandidateSel(
192-
candFlag);
192+
BIT(candFlag));
193193
}
194194
if (fillCandidateMl) {
195195
rowCandidateMl(
@@ -290,13 +290,7 @@ struct HfDerivedDataCreatorDplusToPiKPi {
290290
std::copy(candidate.mlProbDplusToPiKPi().begin(), candidate.mlProbDplusToPiKPi().end(), std::back_inserter(mlScoresDplusToPiKPi));
291291
}
292292
auto trackprong0 = candidate.template prong0_as<TracksWPid>();
293-
int const sign = trackprong0.sign();
294-
uint8_t candFlag = 0;
295-
if (sign > 0) {
296-
candFlag |= BIT(0); // D+
297-
} else if (sign < 0) {
298-
candFlag |= BIT(1); // D-
299-
}
293+
int const candFlag = (trackprong0.sign() > 0) ? 0 : 1; // 0: D+, 1: D-
300294
fillTablesCandidate(candidate, sign, massDplusToPiKPi, ct, y, flagMcRec, origin, swapping, flagDecayChanRec, mlScoresDplusToPiKPi);
301295
}
302296
}

0 commit comments

Comments
 (0)