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
Copy file name to clipboardExpand all lines: Detectors/Upgrades/ALICE3/TRK/base/include/TRKBase/GeometryTGeo.h
+7-1Lines changed: 7 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -80,14 +80,20 @@ class GeometryTGeo : public o2::detectors::DetMatrixCache
80
80
intgetDisk(int index) const;
81
81
82
82
/// 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
83
/// \param int subDetID The subdetector ID, 0 for VD, 1 for MLOT
85
84
/// \param int petalcase The petal case number for VD, from 0 to 3
86
85
/// \param int disk The disk number for VD, from 0 to 5
87
86
/// \param int lay The layer number. Starting from 0 both for VD and MLOT
88
87
/// \param int stave The stave number for MLOT. Starting from 0
89
88
intgetChipIndex(int subDetID, int petalcase, int disk, int lay, int stave) const;
90
89
90
+
/// This routine computes the chip index number from the subDetID, volume, layer, stave /// TODO: retrieve also from chip when chips will be available
91
+
/// \param int subDetID The subdetector ID, 0 for VD, 1 for MLOT
92
+
/// \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
93
+
/// \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
94
+
/// \param int stave The stave number in each layer for MLOT. Starting from 0.
95
+
intgetChipIndex(int subDetID, int volume, int lay, int stave) const;
96
+
91
97
/// This routine computes subDetID, petal, disk, layer, stave given the chip index number /// TODO: copute also from chip when chips will be available
92
98
/// \param int index The chip index number, starting from 0
93
99
/// \param int subDetID The subdetector ID, 0 for VD, 1 for MLOT
intGeometryTGeo::getChipIndex(int subDetID, int volume, int lay, int stave) const
212
+
{
213
+
if (subDetID == 0) { // VD
214
+
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
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
mSensorName.resize(mNumberOfVolumes); // hardcoded. TODO: change size when a different naming scheme for VD is in place. Ideally could be 4 petals + 8 layers = 12
57
+
int VDvolume = 0;
58
+
for (int i = 0; i < 4; i++) { /// VD
59
+
for (int j = 0; j < 3; j++) {
60
+
mSensorName[VDvolume].Form("%s%d_%s%d_%s%d", GeometryTGeo::getTRKPetalPattern(), i, GeometryTGeo::getTRKPetalLayerPattern(), j, GeometryTGeo::getTRKSensorPattern(), j);
61
+
VDvolume++;
62
+
}
63
+
for (int j = 0; j < 6; j++) {
64
+
mSensorName[VDvolume].Form("%s%d_%s%d_%s%d", GeometryTGeo::getTRKPetalPattern(), i, GeometryTGeo::getTRKPetalDiskPattern(), j, GeometryTGeo::getTRKSensorPattern(), j);
mSensorID.resize(mNumberOfVolumes); // hardcoded. TODO: change size when a different namingh scheme for VD is in place. Ideally could be 4 petals + 8 layers = 12
280
+
for (int i = 0; i < mNumberOfVolumes; i++) {
281
+
mSensorID[i] = gMC ? TVirtualMC::GetMC()->VolId(mSensorName[i]) : 0; // Volume ID from the Geant geometry
0 commit comments