From 733829eb2ba64fb6e32a018463087abaaf07bf99 Mon Sep 17 00:00:00 2001 From: shahoian Date: Mon, 24 Mar 2025 18:26:21 +0100 Subject: [PATCH] Fix method MCTrackInfo::getNITSClusCont --- .../GlobalTrackingWorkflow/study/src/TrackMCStudyTypes.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Detectors/GlobalTrackingWorkflow/study/src/TrackMCStudyTypes.cxx b/Detectors/GlobalTrackingWorkflow/study/src/TrackMCStudyTypes.cxx index 92107d90b48ed..204e0c741a675 100644 --- a/Detectors/GlobalTrackingWorkflow/study/src/TrackMCStudyTypes.cxx +++ b/Detectors/GlobalTrackingWorkflow/study/src/TrackMCStudyTypes.cxx @@ -25,7 +25,9 @@ int MCTrackInfo::getNITSClusCont() const int longest = 0, current = 0; for (int i = 0; i < 7; i++) { if (pattITSCl & (0x1 << i)) { - longest = ++current; + if (++current > longest) { + longest = current; + } } else { current = 0; }