Skip to content

Commit c5c3282

Browse files
authored
ALICE3-TRK: partial fix to issue #14959 (#14965)
* ALICE3-TRK: fix matrix path for cylindrical ML and OT geometries * ALICE3-TRK: setting turboStaves and staggered layouts as default for ML and OT, respectively
1 parent 0a8627d commit c5c3282

File tree

3 files changed

+25
-2
lines changed

3 files changed

+25
-2
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: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,11 @@ struct TRKBaseParam : public o2::conf::ConfigurableParamHelper<TRKBaseParam> {
3838

3939
eOverallGeom overallGeom = kDefaultRadii; // Overall geometry option, to be used in Detector::buildTRKMiddleOuterLayers
4040

41-
eLayout layoutML = kCylinder; // Type of segmentation for the middle layers
42-
eLayout layoutOL = kCylinder; // Type of segmentation for the outer layers
41+
eLayout layoutML = kTurboStaves; // Type of segmentation for the middle layers
42+
eLayout layoutOL = kStaggered; // Type of segmentation for the outer layers
43+
44+
eLayout getLayoutML() const { return layoutML; }
45+
eLayout getLayoutOL() const { return layoutOL; }
4346

4447
O2ParamDef(TRKBaseParam, "TRKBase");
4548
};

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)