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 @@ -235,8 +235,7 @@ 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 mLayoutOT; // Type of segmentation for the outer layers
eMLOTLayout mLayoutMLOT; // ML and OT detector layout design

private:
static std::unique_ptr<o2::trk::GeometryTGeo> sInstance;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,6 @@ namespace o2
{
namespace trk
{

enum eOverallGeom {
kDefaultRadii = 0, // After Upgrade Days March 2024
kModRadii,
};

enum eLayout {
kCylinder = 0,
kTurboStaves,
kStaggered,
};

enum eVDLayout {
kIRIS4 = 0,
kIRISFullCyl,
Expand All @@ -39,6 +27,11 @@ enum eVDLayout {
kIRIS4a,
};

enum eMLOTLayout {
kCylindrical = 0,
kSegmented,
};

enum eSrvLayout {
kPeacockv1 = 0,
kLOISymm,
Expand All @@ -49,16 +42,12 @@ struct TRKBaseParam : public o2::conf::ConfigurableParamHelper<TRKBaseParam> {
float serviceTubeX0 = 0.02f; // X0 Al2O3
Bool_t irisOpen = false;

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

eLayout layoutML = kTurboStaves; // Type of segmentation for the middle layers
eLayout layoutOT = kStaggered; // Type of segmentation for the outer layers
eVDLayout layoutVD = kIRIS4; // VD detector layout design
eSrvLayout layoutSRV = kPeacockv1; // Layout of services
eVDLayout layoutVD = kIRIS4; // VD detector layout design
eMLOTLayout layoutMLOT = kSegmented; // ML and OT detector layout design
eSrvLayout layoutSRV = kPeacockv1; // Layout of services

eLayout getLayoutML() const { return layoutML; }
eLayout getLayoutOT() const { return layoutOT; }
eVDLayout getLayoutVD() const { return layoutVD; }
eMLOTLayout getLayoutMLOT() const { return layoutMLOT; }
eSrvLayout getLayoutSRV() const { return layoutSRV; }

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

mLayoutML = o2::trk::TRKBaseParam::Instance().getLayoutML();
mLayoutOT = o2::trk::TRKBaseParam::Instance().getLayoutOT();
mLayoutMLOT = o2::trk::TRKBaseParam::Instance().getLayoutMLOT();

LOG(debug) << "Layout ML: " << mLayoutML << ", Layout OL: " << mLayoutOT;
LOG(debug) << "Overall layout ML and OT: " << mLayoutMLOT;

mNumberOfLayersMLOT = extractNumberOfLayersMLOT();
mNumberOfPetalsVD = extractNumberOfPetalsVD();
Expand Down Expand Up @@ -403,9 +402,9 @@ TString GeometryTGeo::getMatrixPath(int index) const
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
// needed because 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 && mLayoutOT == eLayout::kCylinder)) {
if ((layer < 4 && mLayoutMLOT == eMLOTLayout::kCylindrical) || (layer > 3 && mLayoutMLOT == eMLOTLayout::kCylindrical)) {
stave = 1;
mod = 1;
chip = 1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ class Detector : public o2::base::DetImpl<Detector>
public:
Detector(bool active);
Detector();
Detector(const Detector& other);
~Detector();

// Factory method
Expand Down Expand Up @@ -66,8 +67,7 @@ class Detector : public o2::base::DetImpl<Detector>
return nullptr;
}

void configDefault();
void buildTRKMiddleOuterLayers();
void configMLOT();
void configFromFile(std::string fileName = "alice3_TRK_layout.txt");
void configToFile(std::string fileName = "alice3_TRK_layout.txt");

Expand All @@ -88,8 +88,8 @@ class Detector : public o2::base::DetImpl<Detector>
double mEnergyLoss; // energy loss
} mTrackData; //! transient data
GeometryTGeo* mGeometryTGeo; //!
std::vector<o2::trk::Hit>* mHits; // ITSMFT ones for the moment
std::vector<TRKLayer> mLayers;
std::vector<o2::trk::Hit>* mHits; // Derived from ITSMFT
std::vector<std::unique_ptr<TRKCylindricalLayer>> mLayers;
TRKServices mServices; // Houses the services of the TRK, but not the Iris tracker

std::vector<std::string> mFirstOrLastLayers; // Names of the first or last layers
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,57 +22,113 @@ namespace o2
{
namespace trk
{
class TRKLayer
enum class MatBudgetParamMode {
Thickness,
X2X0
};

class TRKCylindricalLayer
{
public:
TRKLayer() = default;
TRKLayer(int layerNumber, std::string layerName, float rInn, float rOut, int numberOfModules, float layerX2X0);
TRKLayer(int layerNumber, std::string layerName, float rInn, int numberOfModules, float thick);
~TRKLayer() = default;

void setLayout(eLayout layout) { mLayout = layout; };
TRKCylindricalLayer() = default;
TRKCylindricalLayer(int layerNumber, std::string layerName, float rInn, float length, float thickOrX2X0, MatBudgetParamMode mode);
virtual ~TRKCylindricalLayer() = default;

auto getInnerRadius() const { return mInnerRadius; }
auto getOuterRadius() const { return mOuterRadius; }
auto getZ() const { return constants::moduleMLOT::length * mNumberOfModules; }
auto getZ() const { return mLength; }
auto getx2X0() const { return mX2X0; }
auto getChipThickness() const { return mChipThickness; }
auto getNumber() const { return mLayerNumber; }
auto getName() const { return mLayerName; }

TGeoVolume* createSensor(std::string type);
TGeoVolume* createDeadzone(std::string type);
TGeoVolume* createMetalStack(std::string type);
TGeoVolume* createChip(std::string type);
TGeoVolume* createModule(std::string type);
TGeoVolume* createStave(std::string type);
TGeoVolume* createHalfStave(std::string type);
void createLayer(TGeoVolume* motherVolume);

private:
// TGeo objects outside logical volumes can cause errors. Only used in case of kStaggered and kTurboStaves layouts
static constexpr float mLogicalVolumeThickness = 1.3;
virtual TGeoVolume* createSensor();
virtual TGeoVolume* createMetalStack();
virtual void createLayer(TGeoVolume* motherVolume);

protected:
// User defined parameters for the layer, to be set in the constructor
int mLayerNumber;
std::string mLayerName;
float mInnerRadius;
float mOuterRadius;
int mNumberOfModules;
float mLength;
float mX2X0;
float mChipThickness;

// Fixed parameters for the layer, to be set based on the specifications of the chip and module
eLayout mLayout = kCylinder;
float mChipWidth = constants::moduleMLOT::chip::width;
float mChipLength = constants::moduleMLOT::chip::length;
float mDeadzoneWidth = constants::moduleMLOT::chip::passiveEdgeReadOut;
float mSensorThickness = constants::moduleMLOT::silicon::thickness;
int mHalfNumberOfChips = 4;
static constexpr double sSensorThickness = constants::moduleMLOT::silicon::thickness;

static constexpr float Si_X0 = 9.5f;

ClassDef(TRKLayer, 2);
ClassDef(TRKCylindricalLayer, 0);
};

class TRKSegmentedLayer : public TRKCylindricalLayer
{
public:
TRKSegmentedLayer() = default;
TRKSegmentedLayer(int layerNumber, std::string layerName, float rInn, int numberOfModules, float thickOrX2X0, MatBudgetParamMode mode);
~TRKSegmentedLayer() override = default;

TGeoVolume* createSensor() override;
TGeoVolume* createDeadzone();
TGeoVolume* createMetalStack() override;
TGeoVolume* createChip();
TGeoVolume* createModule();
virtual TGeoVolume* createStave() = 0;
void createLayer(TGeoVolume* motherVolume) override = 0;

protected:
int mNumberOfModules;

// Fixed parameters for the layer, to be set based on the specifications of the chip and module
static constexpr double sChipWidth = constants::moduleMLOT::chip::width;
static constexpr double sChipLength = constants::moduleMLOT::chip::length;
static constexpr double sDeadzoneWidth = constants::moduleMLOT::chip::passiveEdgeReadOut;
static constexpr double sModuleLength = constants::moduleMLOT::length;
static constexpr double sModuleWidth = constants::moduleMLOT::width;
static constexpr int sHalfNumberOfChips = 4;

// TGeo objects outside logical volumes can cause errors
static constexpr float sLogicalVolumeThickness = 1.3;

ClassDefOverride(TRKSegmentedLayer, 0);
};

class TRKMLLayer : public TRKSegmentedLayer
{
public:
TRKMLLayer() = default;
TRKMLLayer(int layerNumber, std::string layerName, float rInn, int numberOfModules, float thickOrX2X0, MatBudgetParamMode mode);
~TRKMLLayer() override = default;

TGeoVolume* createStave() override;
void createLayer(TGeoVolume* motherVolume) override;

private:
static constexpr double sStaveWidth = constants::ML::width;

ClassDefOverride(TRKMLLayer, 0);
};

class TRKOTLayer : public TRKSegmentedLayer
{
public:
TRKOTLayer() = default;
TRKOTLayer(int layerNumber, std::string layerName, float rInn, int numberOfModules, float thickOrX2X0, MatBudgetParamMode mode);
~TRKOTLayer() override = default;

TGeoVolume* createStave() override;
TGeoVolume* createHalfStave();
void createLayer(TGeoVolume* motherVolume) override;

private:
static constexpr double sHalfStaveWidth = constants::OT::halfstave::width;
static constexpr double sInStaveOverlap = constants::moduleMLOT::gaps::outerEdgeLongSide + constants::moduleMLOT::chip::passiveEdgeReadOut + 0.1; // 1.5mm outer-edge + 1mm deadzone + 1mm (true) overlap
static constexpr double sStaveWidth = constants::OT::width - sInStaveOverlap;

ClassDefOverride(TRKOTLayer, 0)
};

} // namespace trk
Expand Down
Loading
Loading