Skip to content

Commit 4d2335d

Browse files
author
Luigi Dello Stritto
committed
add Dp correlated bkg flag in derived data tables
1 parent 01fc023 commit 4d2335d

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

PWGHF/DataModel/DerivedTables.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -728,6 +728,7 @@ DECLARE_SOA_TABLE_STAGED(HfDplusMcs, "HFDPMC", //! Table with MC candidate info
728728
hf_cand_mc::FlagMcMatchRec,
729729
hf_cand_mc::OriginMcRec,
730730
hf_cand_mc::IsCandidateSwapped, // useless
731+
hf_cand_mc::FlagMcDecayChanRec,
731732
o2::soa::Marker<MarkerDplus>);
732733

733734
} // namespace o2::aod

PWGHF/TableProducer/derivedDataCreatorDplusToPiKPi.cxx

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ struct HfDerivedDataCreatorDplusToPiKPi {
117117

118118
template <typename T, typename U>
119119
void fillTablesCandidate(const T& candidate, const U& prong0, const U& prong1, const U& prong2, int candFlag, double invMass,
120-
double ct, double y, int8_t flagMc, int8_t origin, int8_t swapping, const std::vector<float>& mlScores)
120+
double ct, double y, int8_t flagMc, int8_t origin, int8_t swapping, int8_t flagDecayChan, const std::vector<float>& mlScores)
121121
{
122122
rowsCommon.fillTablesCandidate(candidate, invMass, y);
123123
if (fillCandidatePar) {
@@ -193,7 +193,8 @@ struct HfDerivedDataCreatorDplusToPiKPi {
193193
rowCandidateMc(
194194
flagMc,
195195
origin,
196-
swapping);
196+
swapping,
197+
flagDecayChan);
197198
}
198199
}
199200

@@ -239,7 +240,7 @@ struct HfDerivedDataCreatorDplusToPiKPi {
239240
if constexpr (isMc) {
240241
reserveTable(rowCandidateMc, fillCandidateMc, sizeTableCand);
241242
}
242-
int8_t flagMcRec = 0, origin = 0, swapping = 0;
243+
int8_t flagMcRec = 0, origin = 0, swapping = 0, flagDecayChanRec = 0;
243244
for (const auto& candidate : candidatesThisColl) {
244245
if constexpr (isMl) {
245246
if (!TESTBIT(candidate.isSelDplusToPiKPi(), aod::SelectionStep::RecoMl)) {
@@ -250,6 +251,7 @@ struct HfDerivedDataCreatorDplusToPiKPi {
250251
flagMcRec = candidate.flagMcMatchRec();
251252
origin = candidate.originMcRec();
252253
swapping = candidate.isCandidateSwapped();
254+
flagDecayChanRec = candidate.flagMcDecayChanRec();
253255
if constexpr (onlyBkg) {
254256
if (TESTBIT(std::abs(flagMcRec), aod::hf_cand_3prong::DecayType::DplusToPiKPi)) {
255257
continue;
@@ -277,7 +279,7 @@ struct HfDerivedDataCreatorDplusToPiKPi {
277279
if constexpr (isMl) {
278280
std::copy(candidate.mlProbDplusToPiKPi().begin(), candidate.mlProbDplusToPiKPi().end(), std::back_inserter(mlScoresDplusToPiKPi));
279281
}
280-
fillTablesCandidate(candidate, prong0, prong1, prong2, 0, massDplusToPiKPi, ct, y, flagMcRec, origin, swapping, mlScoresDplusToPiKPi);
282+
fillTablesCandidate(candidate, prong0, prong1, prong2, 0, massDplusToPiKPi, ct, y, flagMcRec, origin, swapping, flagDecayChanRec, mlScoresDplusToPiKPi);
281283
}
282284
}
283285
}

PWGJE/Core/JetHFUtilities.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -714,7 +714,7 @@ void fillDplusCandidateTable(T const& candidate, U& DplusParTable, V& DplusParET
714714
DplusMlTable(mlScoresVector);
715715

716716
if constexpr (isMc) {
717-
DplusMCDTable(candidate.flagMcMatchRec(), candidate.originMcRec(), candidate.isCandidateSwapped());
717+
DplusMCDTable(candidate.flagMcMatchRec(), candidate.originMcRec(), candidate.isCandidateSwapped(), candidate.flagMcDecayChanRec());
718718
}
719719
}
720720

0 commit comments

Comments
 (0)