Skip to content

Commit f60e954

Browse files
committed
ALICE3-TRK: implementing GeometryTGeo methods to get volumes from the geometry
1 parent 6d089f9 commit f60e954

File tree

4 files changed

+537
-102
lines changed

4 files changed

+537
-102
lines changed

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

Lines changed: 35 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ class GeometryTGeo : public o2::detectors::DetMatrixCache
4343
static const char* getTRKVolPattern() { return sVolumeName.c_str(); }
4444
static const char* getTRKLayerPattern() { return sLayerName.c_str(); }
4545
static const char* getTRKPetalPattern() { return sPetalName.c_str(); }
46+
static const char* getTRKPetalDiskPattern() { return sPetalDiskName.c_str(); }
47+
static const char* getTRKPetalLayerPattern() { return sPetalLayerName.c_str(); }
4648
static const char* getTRKStavePattern() { return sStaveName.c_str(); }
4749
static const char* getTRKChipPattern() { return sChipName.c_str(); }
4850
static const char* getTRKSensorPattern() { return sSensorName.c_str(); }
@@ -51,20 +53,36 @@ class GeometryTGeo : public o2::detectors::DetMatrixCache
5153
int getNumberOfChips() const { return mSize; }
5254

5355
/// Determines the number of active parts in the Geometry
54-
int extractNumberOfLayersMLOL();
55-
int extractNumberOfActivePartsVD();
56+
int extractNumberOfLayersMLOT();
57+
int extractNumberOfLayersVD() const;
58+
int extractNumberOfPetalsVD() const;
59+
int extractNumberOfActivePartsVD() const;
60+
int extractNumberOfDisksVD() const;
61+
int extractNumberOfChipsPerPetalVD() const;
62+
int extractNumberOfStavesMLOT(int lay) const;
5663

5764
/// Extract number following the prefix in the name string
5865
int extractVolumeCopy(const char* name, const char* prefix) const;
5966

60-
int getNumberOfLayersMLOL() const { return mNumberOfLayersMLOL; }
67+
int getNumberOfLayersMLOT() const { return mNumberOfLayersMLOT; }
6168
int getNumberOffActivePartsVD() const { return mNumberOfActivePartsVD; }
6269

6370
bool isOwner() const { return mOwner; }
6471
void setOwner(bool v) { mOwner = v; }
6572

6673
void Print(Option_t* opt = "") const;
6774

75+
int getLayer(int index) const;
76+
int getSubDetID(int index) const;
77+
int getPetalCase(int index) const;
78+
int getDisk(int index) const;
79+
80+
/// Get the transformation matrix of the SENSOR (not necessary the same as the chip)
81+
/// for a given chip 'index' by quering the TGeoManager
82+
TGeoHMatrix* extractMatrixSensor(int index) const;
83+
84+
TString getMatrixPath(int index) const;
85+
6886
static const char* composeSymNameTRK(int d)
6987
{
7088
return Form("%s_%d", o2::detectors::DetID(o2::detectors::DetID::TRK).getName(), d);
@@ -80,13 +98,26 @@ class GeometryTGeo : public o2::detectors::DetMatrixCache
8098
static std::string sVolumeName;
8199
static std::string sLayerName;
82100
static std::string sPetalName;
101+
static std::string sPetalDiskName;
102+
static std::string sPetalLayerName;
83103
static std::string sStaveName;
84104
static std::string sChipName;
85105
static std::string sSensorName;
86106
static std::string sWrapperVolumeName; ///< Wrapper volume name
87107

88-
Int_t mNumberOfLayersMLOL; ///< number of layers
108+
Int_t mNumberOfLayersMLOT; ///< number of layers
89109
Int_t mNumberOfActivePartsVD; ///< number of layers
110+
Int_t mNumberOfLayersVD; ///< number of layers
111+
Int_t mNumberOfPetalsVD; ///< number of Petals = chip in each VD layer
112+
Int_t mNumberOfDisksVD; ///< number of Disks = 6
113+
std::vector<int> mLastChipIndex; ///< max ID of the detctor in the petal(VD) or layer(MLOT)
114+
std::vector<int> mLastChipIndexVD; ///< max ID of the detctor in the layer for the VD
115+
std::vector<int> mLastChipIndexMLOT; ///< max ID of the detctor in the layer for the MLOT
116+
std::vector<int> mNumberOfChipsPerLayerVD; ///< number of chips per layer VD ( = number of petals)
117+
std::vector<int> mNumberOfChipsPerLayerMLOT; ///< number of chips per layer MLOT ( = 1 for the moment)
118+
std::vector<int> mNumbersOfChipPerDiskVD; ///< numbersOfChipPerDiskVD
119+
std::vector<int> mNumberOfChipsPerPetalVD; ///< numbersOfChipPerPetalVD
120+
std::vector<int> mNumberOfStaves; ///< Number Of Staves per layer in ML/OT
90121
std::array<char, MAXLAYERS> mLayerToWrapper; ///< Layer to wrapper correspondence
91122

92123
bool mOwner = true; //! is it owned by the singleton?

0 commit comments

Comments
 (0)