Skip to content

Commit 44faef2

Browse files
committed
GeometryManager::getSensID supports up to 2^17 sensors for DetID>FOCAL
For detectors up to Focal inclusively only 1^15 chips per detector can be referred by this method (for the backward compatibility with existing geometry files).
1 parent be5a2bb commit 44faef2

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

Detectors/Base/include/DetectorsBase/GeometryManager.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ class GeometryManager : public TObject
7070
static int getSensID(o2::detectors::DetID detid, int sensid)
7171
{
7272
/// compose combined detector+sensor ID for sensitive volumes
73-
return (detid << sDetOffset) | (sensid & sSensorMask);
73+
return detid <= o2::detectors::DetID::FOC ? ((detid << sDetOffset) | (sensid & sSensorMask)) : ((detid << sDetOffsetLarge) | (sensid & sSensorMaskLarge));
7474
}
7575

7676
/// Default destructor
@@ -140,8 +140,9 @@ class GeometryManager : public TObject
140140
private:
141141
/// sensitive volume identifier composed from (det_ID<<sDetOffset)|(sensid&sSensorMask)
142142
static constexpr UInt_t sDetOffset = 15; /// detector identifier will start from this bit
143-
static constexpr UInt_t sSensorMask =
144-
(0x1 << sDetOffset) - 1; /// mask=max sensitive volumes allowed per detector (0xffff)
143+
static constexpr UInt_t sSensorMask = (0x1 << sDetOffset) - 1; /// mask=max sensitive volumes allowed per detector (32767)
144+
static constexpr UInt_t sDetOffsetLarge = 17; /// detector identifier will start from this bit for detectors after the FOC
145+
static constexpr UInt_t sSensorMaskLarge = (0x1 << sDetOffsetLarge) - 1; /// mask=max sensitive volumes allowed per detector (131071)
145146
static std::mutex sTGMutex;
146147

147148
ClassDefOverride(GeometryManager, 0); // Manager of geometry information for alignment

0 commit comments

Comments
 (0)