From 018fba7734549070f383f97669271a4ec1d43f71 Mon Sep 17 00:00:00 2001 From: Marcello Di Costanzo Date: Wed, 1 Jul 2026 17:29:50 +0200 Subject: [PATCH 1/2] Fix reserve in D0 tree creator --- PWGHF/TableProducer/treeCreatorD0ToKPi.cxx | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/PWGHF/TableProducer/treeCreatorD0ToKPi.cxx b/PWGHF/TableProducer/treeCreatorD0ToKPi.cxx index 36316355fad..58f4d5c3d28 100644 --- a/PWGHF/TableProducer/treeCreatorD0ToKPi.cxx +++ b/PWGHF/TableProducer/treeCreatorD0ToKPi.cxx @@ -423,12 +423,14 @@ struct HfTreeCreatorD0ToKPi { // Filling candidate properties if (fillCandidateLiteTable) { - rowCandidateLite.reserve(candidates.size()); + // Account for candidates passing both D0 and D0bar + // selection, which will be stored twice in the lite table + rowCandidateLite.reserve(candidates.size() * 2); } else { - rowCandidateFull.reserve(candidates.size()); + rowCandidateFull.reserve(candidates.size() * 2); } if constexpr (ApplyMl) { - rowCandidateMl.reserve(candidates.size()); + rowCandidateMl.reserve(candidates.size() * 2); } for (const auto& candidate : candidates) { if (downSampleBkgFactor < 1.) { @@ -511,12 +513,12 @@ struct HfTreeCreatorD0ToKPi { // Filling candidate properties if (fillCandidateLiteTable) { - rowCandidateLite.reserve(candidates.size()); + rowCandidateLite.reserve(candidates.size() * 2); } else { - rowCandidateFull.reserve(candidates.size()); + rowCandidateFull.reserve(candidates.size() * 2); } if constexpr (ApplyMl) { - rowCandidateMl.reserve(candidates.size()); + rowCandidateMl.reserve(candidates.size() * 2); } for (const auto& candidate : candidates) { if constexpr (OnlyBkg) { From 2e5348554fabc78faaf63d43aada7feeace8e803 Mon Sep 17 00:00:00 2001 From: ALICE Action Bot Date: Wed, 1 Jul 2026 15:31:53 +0000 Subject: [PATCH 2/2] Please consider the following formatting changes --- PWGHF/TableProducer/treeCreatorD0ToKPi.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PWGHF/TableProducer/treeCreatorD0ToKPi.cxx b/PWGHF/TableProducer/treeCreatorD0ToKPi.cxx index 58f4d5c3d28..9b8a49abc58 100644 --- a/PWGHF/TableProducer/treeCreatorD0ToKPi.cxx +++ b/PWGHF/TableProducer/treeCreatorD0ToKPi.cxx @@ -423,7 +423,7 @@ struct HfTreeCreatorD0ToKPi { // Filling candidate properties if (fillCandidateLiteTable) { - // Account for candidates passing both D0 and D0bar + // Account for candidates passing both D0 and D0bar // selection, which will be stored twice in the lite table rowCandidateLite.reserve(candidates.size() * 2); } else {