Skip to content

Commit 556c025

Browse files
author
Luigi Dello Stritto
committed
Add correlated bkg decay info to the D0 derived data creator
1 parent 980a3ee commit 556c025

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

PWGHF/TableProducer/derivedDataCreatorD0ToKPi.cxx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ struct HfDerivedDataCreatorD0ToKPi {
148148

149149
template <typename T>
150150
void fillTablesCandidate(const T& candidate, int candFlag, double invMass, double cosThetaStar, double topoChi2,
151-
double ct, double y, int8_t flagMc, int8_t origin, const std::vector<float>& mlScores)
151+
double ct, double y, int8_t flagMc, int8_t origin, int8_t flagDecayChanRec, const std::vector<float>& mlScores)
152152
{
153153
rowsCommon.fillTablesCandidate(candidate, invMass, y);
154154
if (fillCandidatePar) {
@@ -278,11 +278,12 @@ struct HfDerivedDataCreatorD0ToKPi {
278278
if constexpr (IsMc) {
279279
reserveTable(rowCandidateMc, fillCandidateMc, sizeTableCand);
280280
}
281-
int8_t flagMcRec = 0, origin = 0;
281+
int8_t flagMcRec = 0, origin = 0, flagDecayChanRec = 0;
282282
for (const auto& candidate : candidatesThisColl) {
283283
if constexpr (IsMc) {
284284
flagMcRec = candidate.flagMcMatchRec();
285285
origin = candidate.originMcRec();
286+
flagDecayChanRec = candidate.flagMcDecayChanRec();
286287
if constexpr (OnlyBkg) {
287288
if (std::abs(flagMcRec) == o2::hf_decay::hf_cand_2prong::DecayChannelMain::D0ToPiK) {
288289
continue;
@@ -326,10 +327,10 @@ struct HfDerivedDataCreatorD0ToKPi {
326327
std::copy(candidate.mlProbD0bar().begin(), candidate.mlProbD0bar().end(), std::back_inserter(mlScoresD0bar));
327328
}
328329
if (candidate.isSelD0()) {
329-
fillTablesCandidate(candidate, 0, massD0, HfHelper::cosThetaStarD0(candidate), topolChi2PerNdf, ct, y, flagMcRec, origin, mlScoresD0);
330+
fillTablesCandidate(candidate, 0, massD0, HfHelper::cosThetaStarD0(candidate), topolChi2PerNdf, ct, y, flagMcRec, origin, flagDecayChanRec, mlScoresD0);
330331
}
331332
if (candidate.isSelD0bar()) {
332-
fillTablesCandidate(candidate, 1, massD0bar, HfHelper::cosThetaStarD0bar(candidate), topolChi2PerNdf, ct, y, flagMcRec, origin, mlScoresD0bar);
333+
fillTablesCandidate(candidate, 1, massD0bar, HfHelper::cosThetaStarD0bar(candidate), topolChi2PerNdf, ct, y, flagMcRec, origin, flagDecayChanRec, mlScoresD0bar);
333334
}
334335
}
335336
}

0 commit comments

Comments
 (0)