Skip to content

Commit 3626eea

Browse files
[ALICE3] TRK/Geometry: small bug fix (#15112)
1 parent a1d999e commit 3626eea

File tree

2 files changed

+16
-3
lines changed

2 files changed

+16
-3
lines changed

Detectors/Upgrades/ALICE3/TRK/base/include/TRKBase/GeometryTGeo.h

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,21 @@ class GeometryTGeo : public o2::detectors::DetMatrixCache
104104
bool isTrackingFrameCachedMLOT() const { return !mCacheRefXMLOT.empty(); }
105105
void fillTrackingFramesCacheMLOT();
106106

107-
float getSensorRefAlphaMLOT(int index) const { return mCacheRefAlphaMLOT[index]; }
108-
float getSensorXMLOT(int index) const { return mCacheRefXMLOT[index]; }
107+
float getSensorRefAlphaMLOT(int chipId) const
108+
{
109+
assert(getSubDetID(chipId) != 0 && "Called MLOT getter with VD chipId");
110+
const int local = chipId - getNumberOfActivePartsVD();
111+
assert(local >= 0 && local < (int)mCacheRefAlphaMLOT.size());
112+
return mCacheRefAlphaMLOT[local];
113+
}
114+
115+
float getSensorXMLOT(int chipId) const
116+
{
117+
assert(getSubDetID(chipId) != 0 && "Called MLOT getter with VD chipId");
118+
const int local = chipId - getNumberOfActivePartsVD();
119+
assert(local >= 0 && local < (int)mCacheRefXMLOT.size());
120+
return mCacheRefXMLOT[local];
121+
}
109122

110123
// create matrix for tracking to local frame for MLOT
111124
TGeoHMatrix& createT2LMatrixMLOT(int);

Detectors/Upgrades/ALICE3/TRK/base/src/GeometryTGeo.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,9 +127,9 @@ void GeometryTGeo::Build(int loadTrans)
127127
}
128128

129129
setSize(numberOfChipsTotal);
130-
fillMatrixCache(loadTrans);
131130
defineMLOTSensors();
132131
fillTrackingFramesCacheMLOT();
132+
fillMatrixCache(loadTrans);
133133
}
134134

135135
//__________________________________________________________________________

0 commit comments

Comments
 (0)