diff --git a/Detectors/Upgrades/ALICE3/TRK/base/include/TRKBase/GeometryTGeo.h b/Detectors/Upgrades/ALICE3/TRK/base/include/TRKBase/GeometryTGeo.h index bb1597f2967e4..d4402d66cff7e 100644 --- a/Detectors/Upgrades/ALICE3/TRK/base/include/TRKBase/GeometryTGeo.h +++ b/Detectors/Upgrades/ALICE3/TRK/base/include/TRKBase/GeometryTGeo.h @@ -104,8 +104,21 @@ class GeometryTGeo : public o2::detectors::DetMatrixCache bool isTrackingFrameCachedMLOT() const { return !mCacheRefXMLOT.empty(); } void fillTrackingFramesCacheMLOT(); - float getSensorRefAlphaMLOT(int index) const { return mCacheRefAlphaMLOT[index]; } - float getSensorXMLOT(int index) const { return mCacheRefXMLOT[index]; } + float getSensorRefAlphaMLOT(int chipId) const + { + assert(getSubDetID(chipId) != 0 && "Called MLOT getter with VD chipId"); + const int local = chipId - getNumberOfActivePartsVD(); + assert(local >= 0 && local < (int)mCacheRefAlphaMLOT.size()); + return mCacheRefAlphaMLOT[local]; + } + + float getSensorXMLOT(int chipId) const + { + assert(getSubDetID(chipId) != 0 && "Called MLOT getter with VD chipId"); + const int local = chipId - getNumberOfActivePartsVD(); + assert(local >= 0 && local < (int)mCacheRefXMLOT.size()); + return mCacheRefXMLOT[local]; + } // create matrix for tracking to local frame for MLOT TGeoHMatrix& createT2LMatrixMLOT(int); diff --git a/Detectors/Upgrades/ALICE3/TRK/base/src/GeometryTGeo.cxx b/Detectors/Upgrades/ALICE3/TRK/base/src/GeometryTGeo.cxx index b5535af781910..7b3d33ca1a75c 100644 --- a/Detectors/Upgrades/ALICE3/TRK/base/src/GeometryTGeo.cxx +++ b/Detectors/Upgrades/ALICE3/TRK/base/src/GeometryTGeo.cxx @@ -127,9 +127,9 @@ void GeometryTGeo::Build(int loadTrans) } setSize(numberOfChipsTotal); - fillMatrixCache(loadTrans); defineMLOTSensors(); fillTrackingFramesCacheMLOT(); + fillMatrixCache(loadTrans); } //__________________________________________________________________________