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();