From 3a2b980d46613ef8edc162aba76fb864c32fac5f Mon Sep 17 00:00:00 2001 From: cholm Date: Thu, 13 Nov 2014 14:51:49 +0100 Subject: [PATCH] Protect against double counting of MC track references --- PWGLF/FORWARD/analysis2/AliFMDHistCollector.cxx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/PWGLF/FORWARD/analysis2/AliFMDHistCollector.cxx b/PWGLF/FORWARD/analysis2/AliFMDHistCollector.cxx index 87ca3f6354c..683acbfc0f4 100644 --- a/PWGLF/FORWARD/analysis2/AliFMDHistCollector.cxx +++ b/PWGLF/FORWARD/analysis2/AliFMDHistCollector.cxx @@ -823,8 +823,10 @@ AliFMDHistCollector::VtxBin::Collect(const AliForwardUtil::Histos& hists, // Add to our per-ring sum o->Add(t); - // If we store hit maps, update here - if (fHitMap) fHitMap->Get(d, r)->Add(t); + // If we store hit maps, update here If "eta2phi" is true, + // then we are here for MC, and so we do not update the hit + // maps - ever! + if (fHitMap && !eta2phi) fHitMap->Get(d, r)->Add(t); if (byCent) { -- 2.39.3