You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ALICE3-TRK: detector ID used to fill Hit information correctly retrieved according to the chosen geometry (#14480)
* ALICE3-TRK: Detector.cxx modified to retrieve the correct Detector ID following the chosen indexing scheme
* ALICE3-TRK: considering half staves for the staggered geometry for ML/OT
* ALICE3-TRK: indexing scheme now working independently from the chosen geometry layout
* minor fixes
voidPrintChipID(int index, int subDetID, int petalcase, int disk, int lay, int stave, int indexRetrieved) const;
76
+
voidPrintChipID(int index, int subDetID, int petalcase, int disk, int lay, int stave, inthalfstave, intindexRetrieved) const;
75
77
76
78
intgetLayer(int index) const;
77
79
intgetStave(int index) const;
80
+
intgetHalfStave(int index) const;
78
81
intgetSubDetID(int index) const;
79
82
intgetPetalCase(int index) const;
80
83
intgetDisk(int index) const;
81
84
82
85
/// This routine computes the chip index number from the subDetID, petal, disk, layer, stave /// TODO: retrieve also from chip when chips will be available
83
-
/// in substave
84
86
/// \param int subDetID The subdetector ID, 0 for VD, 1 for MLOT
85
87
/// \param int petalcase The petal case number for VD, from 0 to 3
86
88
/// \param int disk The disk number for VD, from 0 to 5
87
89
/// \param int lay The layer number. Starting from 0 both for VD and MLOT
88
90
/// \param int stave The stave number for MLOT. Starting from 0
89
-
intgetChipIndex(int subDetID, int petalcase, int disk, int lay, int stave) const;
91
+
/// \param int halfstave The half stave number for MLOT. Can be 0 or 1
92
+
intgetChipIndex(int subDetID, int petalcase, int disk, int lay, int stave, int halfstave) const;
93
+
94
+
/// This routine computes the chip index number from the subDetID, volume, layer, stave /// TODO: retrieve also from chip when chips will be available
95
+
/// \param int subDetID The subdetector ID, 0 for VD, 1 for MLOT
96
+
/// \param int volume is needed only with the current configuration for VD where each single element is a volume. // TODO: when the geometry naming scheme will be changed, change this method
97
+
/// \param int lay The layer number for the MLOT. In the current configuration for VD this is not needed. // TODO: when the geometry naming scheme will be changed, change this method
98
+
/// \param int stave The stave number in each layer for MLOT. Starting from 0.
99
+
/// \param int halfstave The half stave number for MLOT. Can be 0 or 1
100
+
intgetChipIndex(int subDetID, int volume, int lay, int stave, int halfstave) const;
90
101
91
102
/// This routine computes subDetID, petal, disk, layer, stave given the chip index number /// TODO: copute also from chip when chips will be available
92
103
/// \param int index The chip index number, starting from 0
@@ -95,7 +106,8 @@ class GeometryTGeo : public o2::detectors::DetMatrixCache
95
106
/// \param int disk The disk number for VD, from 0 to 5
96
107
/// \param int lay The layer number. Starting from 0 both for VD and MLOT
97
108
/// \param int stave The stave number for MLOT. Starting from 0
mNumberOfChipsPerLayerMLOT[i] = extractNumberOfStavesMLOT(i); // for the moment, considering 1 stave = 1 chip. TODO: add the final segmentation in chips
104
+
mNumberOfChipsPerLayerMLOT[i] = extractNumberOfStavesMLOT(i) * extractNumberOfHalfStavesMLOT(i); // for the moment, considering 1 half stave = 1 chip. TODO: add the final segmentation in chips
index -= getFirstChipIndex(lay, petalcase, subDetID); // get the index of the sensing element in the layer
193
+
return index % 2; /// 0 = half stave left, 1 = half stave right, as geometry is filled /// TODO: generalize once chips will be in place. Can it be working also with chips?
175
194
}
176
195
return -1; /// not found
177
196
}
@@ -193,28 +212,49 @@ int GeometryTGeo::getDisk(int index) const
intGeometryTGeo::getChipIndex(int subDetID, int volume, int lay, int stave, int halfstave) const
235
+
{
236
+
if (subDetID == 0) { // VD
237
+
return volume; /// In the current configuration for VD, each volume is the sensor element = chip. // TODO: when the geometry naming scheme will be changed, change this method
238
+
239
+
} elseif (subDetID == 1) { // MLOT
240
+
if (mNumberOfHalfStaves[lay] == 2) { // staggered geometry
241
+
returngetFirstChipIndex(lay, -1, subDetID) + stave * mNumberOfHalfStaves[lay] + halfstave;
Copy file name to clipboardExpand all lines: Detectors/Upgrades/ALICE3/TRK/simulation/include/TRKSimulation/Detector.h
+15Lines changed: 15 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -31,6 +31,9 @@ namespace trk
31
31
classDetector : publico2::base::DetImpl<Detector>
32
32
{
33
33
public:
34
+
staticconstexpr Int_t mNumberOfVolumes = 44; /// hardcoded for the current geometry = 8 MLOT layers + 36 volumes in the VD. TODO: automatize or change according to the current geometry
35
+
staticconstexpr Int_t mNumberOfVolumesVD = 36; /// hardcoded for the current geometry = 36 volumes in the VD. TODO: automatize or change according to the current geometry
36
+
34
37
Detector(bool active);
35
38
Detector();
36
39
~Detector();
@@ -96,6 +99,18 @@ class Detector : public o2::base::DetImpl<Detector>
96
99
97
100
voiddefineSensitiveVolumes();
98
101
102
+
protected:
103
+
std::vector<int> mSensorID; //! layer identifiers
104
+
std::vector<TString> mSensorName; //! layer names
105
+
106
+
public:
107
+
staticconstexpr Int_t sNumberVDPetalCases = 4; //! Number of VD petals
108
+
intgetNumberOfLayers() const { returnmLayers.size(); } //! Number of TRK layers
0 commit comments