From 3babce8b17910edf129c67d090fc41b8a940036e Mon Sep 17 00:00:00 2001
From: Florian Uhlig <f.uhlig@gsi.de>
Date: Thu, 30 Mar 2023 16:14:34 +0200
Subject: [PATCH] Correctly extract sensor number

---
 core/data/mvd/CbmMvdCluster.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/core/data/mvd/CbmMvdCluster.h b/core/data/mvd/CbmMvdCluster.h
index 1498fce913..b76c734eb6 100644
--- a/core/data/mvd/CbmMvdCluster.h
+++ b/core/data/mvd/CbmMvdCluster.h
@@ -50,7 +50,7 @@ public:
   int32_t GetStationNr() { return (int32_t) GetAddress() / 1000; };
   int32_t GetRefId() { return fRefId; };
   int32_t GetDetectorId() { return DetectorId(GetStationNr()); };
-  int32_t GetSensorNr() { return GetAddress() - (((int32_t) GetAddress() / 1000) * 1000); };
+  int32_t GetSensorNr() { return (GetAddress() % 1000); };
 
   float GetClusterCharge() { return fClusterCharge; };
 
-- 
GitLab