From 8a813c1c791c8b2d6ffdbcd907783282f95ceda8 Mon Sep 17 00:00:00 2001 From: Pascal Raisig <praisig@ikf.uni-frankfurt.de> Date: Thu, 22 Apr 2021 11:57:42 +0200 Subject: [PATCH] Fix Trd hitCounter counting The hit counter was resetted for each event, while the number of clusters correponds to the full timeslice. Now the printed hitCounterTs counts all hits in a TS without a reset. No explicit hit counting per event is currently implemented. --- reco/detectors/trd/CbmTrdHitProducer.cxx | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/reco/detectors/trd/CbmTrdHitProducer.cxx b/reco/detectors/trd/CbmTrdHitProducer.cxx index 5d4fc302f6..bb2fd35051 100644 --- a/reco/detectors/trd/CbmTrdHitProducer.cxx +++ b/reco/detectors/trd/CbmTrdHitProducer.cxx @@ -273,17 +273,16 @@ void CbmTrdHitProducer::Exec(Option_t*) TStopwatch timerTs; timerTs.Start(); - Long64_t nClusters = fClusters->GetEntriesFast(); - UInt_t hitCounter = 0; - UInt_t nEvents = 0; + Long64_t nClusters = fClusters->GetEntriesFast(); + UInt_t hitCounterTs = 0; + UInt_t nEvents = 0; if (CbmTrdClusterFinder::UseOnlyEventDigis()) { for (auto eventobj : *fEvents) { timer.Start(); - hitCounter = 0; auto event = static_cast<CbmEvent*>(eventobj); if (!event) continue; - hitCounter += processClusters(event); + hitCounterTs += processClusters(event); fNrEvents++; nEvents++; timer.Stop(); @@ -298,7 +297,7 @@ void CbmTrdHitProducer::Exec(Option_t*) if (!CbmTrdClusterFinder::UseOnlyEventDigis()) { timer.Start(); - hitCounter = processClusters(); + hitCounterTs = processClusters(); fNrEvents++; timer.Stop(); if (CbmTrdClusterFinder::DoDebugPrintouts()) { @@ -321,7 +320,7 @@ void CbmTrdHitProducer::Exec(Option_t*) logOut << fixed << setw(8) << setprecision(1) << right << timerTs.RealTime() * 1000. << " ms] "; logOut << "TS " << fNrTs; if (CbmTrdClusterFinder::UseOnlyEventDigis()) logOut << ", events " << nEvents; - logOut << ", clusters " << nClusters << ", hits " << hitCounter; + logOut << ", clusters " << nClusters << ", hits " << hitCounterTs; LOG(info) << logOut.str(); fNrTs++; } -- GitLab