Skip to content

Commit 76cd34b

Browse files
committed
ALICE3-TRK: fix matrix path for cylindrical ML and OT geometries
1 parent 7245d49 commit 76cd34b

File tree

3 files changed

+23
-0
lines changed

3 files changed

+23
-0
lines changed

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
#include <memory>
1616
#include <DetectorsCommonDataFormats/DetMatrixCache.h>
1717
#include "DetectorsCommonDataFormats/DetID.h"
18+
#include "TRKBase/TRKBaseParam.h"
1819

1920
namespace o2
2021
{
@@ -221,6 +222,9 @@ class GeometryTGeo : public o2::detectors::DetMatrixCache
221222
std::vector<float> mCacheRefXMLOT; /// cache for X of ML and OT
222223
std::vector<float> mCacheRefAlphaMLOT; /// cache for sensor ref alpha ML and OT
223224

225+
eLayout mLayoutML; // Type of segmentation for the middle layers
226+
eLayout mLayoutOL; // Type of segmentation for the outer layers
227+
224228
private:
225229
static std::unique_ptr<o2::trk::GeometryTGeo> sInstance;
226230
};

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,9 @@ struct TRKBaseParam : public o2::conf::ConfigurableParamHelper<TRKBaseParam> {
4141
eLayout layoutML = kCylinder; // Type of segmentation for the middle layers
4242
eLayout layoutOL = kCylinder; // Type of segmentation for the outer layers
4343

44+
eLayout getLayoutML() const { return layoutML; }
45+
eLayout getLayoutOL() const { return layoutOL; }
46+
4447
O2ParamDef(TRKBaseParam, "TRKBase");
4548
};
4649

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

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,11 @@ void GeometryTGeo::Build(int loadTrans)
7676
LOGP(fatal, "Geometry is not loaded");
7777
}
7878

79+
mLayoutML = o2::trk::TRKBaseParam::Instance().getLayoutML();
80+
mLayoutOL = o2::trk::TRKBaseParam::Instance().getLayoutOL();
81+
82+
LOG(debug) << "Layout ML: " << mLayoutML << ", Layout OL: " << mLayoutOL;
83+
7984
mNumberOfLayersMLOT = extractNumberOfLayersMLOT();
8085
mNumberOfPetalsVD = extractNumberOfPetalsVD();
8186
mNumberOfActivePartsVD = extractNumberOfActivePartsVD();
@@ -398,6 +403,17 @@ TString GeometryTGeo::getMatrixPath(int index) const
398403
// TString path = "/cave_1/barrel_1/TRKV_2/TRKLayer0_1/TRKStave0_1/TRKChip0_1/TRKSensor0_1/"; /// dummy path, to be used for tests
399404
TString path = Form("/cave_1/barrel_1/%s_2/", GeometryTGeo::getTRKVolPattern());
400405

406+
// handling cylindrical configuration for ML and/or OT
407+
// needed bercause of the different numbering scheme in the geometry for the cylindrical case wrt the staggered and turbo ones
408+
if (subDetID == 1) {
409+
if ((layer < 4 && mLayoutML == eLayout::kCylinder) || (layer > 3 && mLayoutOL == eLayout::kCylinder)) {
410+
stave = 1;
411+
mod = 1;
412+
chip = 1;
413+
}
414+
}
415+
416+
// build the path
401417
if (subDetID == 0) { // VD
402418
if (disk >= 0) {
403419
path += Form("%s_%d_%d/", getTRKPetalAssemblyPattern(), petalcase, petalcase + 1); // PETAL_n

0 commit comments

Comments
 (0)