Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
#include <memory>
#include <DetectorsCommonDataFormats/DetMatrixCache.h>
#include "DetectorsCommonDataFormats/DetID.h"
#include "TRKBase/TRKBaseParam.h"

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

eLayout mLayoutML; // Type of segmentation for the middle layers
eLayout mLayoutOL; // Type of segmentation for the outer layers

private:
static std::unique_ptr<o2::trk::GeometryTGeo> sInstance;
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,11 @@ struct TRKBaseParam : public o2::conf::ConfigurableParamHelper<TRKBaseParam> {

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

eLayout layoutML = kCylinder; // Type of segmentation for the middle layers
eLayout layoutOL = kCylinder; // Type of segmentation for the outer layers
eLayout layoutML = kTurboStaves; // Type of segmentation for the middle layers
eLayout layoutOL = kStaggered; // Type of segmentation for the outer layers

eLayout getLayoutML() const { return layoutML; }
eLayout getLayoutOL() const { return layoutOL; }

O2ParamDef(TRKBaseParam, "TRKBase");
};
Expand Down
16 changes: 16 additions & 0 deletions Detectors/Upgrades/ALICE3/TRK/base/src/GeometryTGeo.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,11 @@ void GeometryTGeo::Build(int loadTrans)
LOGP(fatal, "Geometry is not loaded");
}

mLayoutML = o2::trk::TRKBaseParam::Instance().getLayoutML();
mLayoutOL = o2::trk::TRKBaseParam::Instance().getLayoutOL();

LOG(debug) << "Layout ML: " << mLayoutML << ", Layout OL: " << mLayoutOL;

mNumberOfLayersMLOT = extractNumberOfLayersMLOT();
mNumberOfPetalsVD = extractNumberOfPetalsVD();
mNumberOfActivePartsVD = extractNumberOfActivePartsVD();
Expand Down Expand Up @@ -398,6 +403,17 @@ TString GeometryTGeo::getMatrixPath(int index) const
// TString path = "/cave_1/barrel_1/TRKV_2/TRKLayer0_1/TRKStave0_1/TRKChip0_1/TRKSensor0_1/"; /// dummy path, to be used for tests
TString path = Form("/cave_1/barrel_1/%s_2/", GeometryTGeo::getTRKVolPattern());

// handling cylindrical configuration for ML and/or OT
// needed bercause of the different numbering scheme in the geometry for the cylindrical case wrt the staggered and turbo ones
if (subDetID == 1) {
if ((layer < 4 && mLayoutML == eLayout::kCylinder) || (layer > 3 && mLayoutOL == eLayout::kCylinder)) {
stave = 1;
mod = 1;
chip = 1;
}
}

// build the path
if (subDetID == 0) { // VD
if (disk >= 0) {
path += Form("%s_%d_%d/", getTRKPetalAssemblyPattern(), petalcase, petalcase + 1); // PETAL_n
Expand Down