From 8646f4eccdbbc1904581174a5fa774ea8946d254 Mon Sep 17 00:00:00 2001 From: Jonathan Witte Date: Fri, 30 Oct 2026 13:00:35 +0100 Subject: [PATCH] Reset and fill the event properties in the runMCGen --- PWGDQ/Tasks/dqEfficiency_withAssoc.cxx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/PWGDQ/Tasks/dqEfficiency_withAssoc.cxx b/PWGDQ/Tasks/dqEfficiency_withAssoc.cxx index 176d7ce64b2..e306675dc4a 100644 --- a/PWGDQ/Tasks/dqEfficiency_withAssoc.cxx +++ b/PWGDQ/Tasks/dqEfficiency_withAssoc.cxx @@ -2638,6 +2638,11 @@ struct AnalysisSameEventPairing { if (!event.has_reducedMCevent()) { continue; } + // Fill the event-wise variables (e.g. centrality) of this reconstructed event, otherwise the generated particles and pairs + // get the values left over from the last event processed in runSameEventPairing + VarManager::ResetValues(0, VarManager::kNVars); + VarManager::FillEvent(event, dqefficiency_helpers::varValues()); + VarManager::FillEvent(event.reducedMCevent(), dqefficiency_helpers::varValues()); FinalStateMcParticleIndices.clear();