Skip to content

Commit e4108ce

Browse files
authored
A3: Add sensitive RICH layers to geometry (#14450)
1 parent cc7a23d commit e4108ce

File tree

4 files changed

+36
-27
lines changed

4 files changed

+36
-27
lines changed

Detectors/Upgrades/ALICE3/RICH/base/src/GeometryTGeo.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ std::unique_ptr<o2::rich::GeometryTGeo> GeometryTGeo::sInstance;
2121
std::string GeometryTGeo::sVolumeName = "RICHV";
2222
std::string GeometryTGeo::sRingName = "RICHRing";
2323
std::string GeometryTGeo::sChipName = "RICHChip";
24-
std::string GeometryTGeo::sSensorName = "RICHSensor";
24+
std::string GeometryTGeo::sSensorName = "RICHPhotoTile";
2525
std::string GeometryTGeo::sSensorFWDName = "FWDRICHSensor"; // only one big sensor for now
2626
std::string GeometryTGeo::sSensorBWDName = "BWDRICHSensor"; // only one big sensor for now
2727

Detectors/Upgrades/ALICE3/RICH/simulation/include/RICHSimulation/RICHRing.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@ class Ring
5454

5555
auto getDeltaPhiPos() const { return TMath::TwoPi() / mNTiles; }
5656
void createRing(TGeoVolume* motherVolume);
57+
int getPosId() const { return mPosId; }
58+
int getNTiles() const { return mNTiles; }
5759

5860
private:
5961
int mPosId; // id of the ring

Detectors/Upgrades/ALICE3/RICH/simulation/src/Detector.cxx

Lines changed: 32 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -145,29 +145,29 @@ void Detector::createGeometry()
145145
vRICH->SetTitle(vstrng);
146146
auto& richPars = RICHBaseParam::Instance();
147147

148-
prepareLayout();
148+
prepareLayout(); // Preparing the positions of the rings and tiles
149149

150150
for (int iRing{0}; iRing < richPars.nRings; ++iRing) {
151151
if (!richPars.oddGeom && iRing == (richPars.nRings / 2)) {
152152
continue;
153153
}
154-
mRings[iRing] = Ring{iRing,
155-
richPars.nTiles,
156-
richPars.rMin,
157-
richPars.rMax,
158-
richPars.radiatorThickness,
159-
(float)mVTile1[iRing],
160-
(float)mVTile2[iRing],
161-
(float)mLAerogelZ[iRing],
162-
richPars.detectorThickness,
163-
(float)mVMirror1[iRing],
164-
(float)mVMirror2[iRing],
165-
richPars.zBaseSize,
166-
(float)mR0Radiator[iRing],
167-
(float)mR0PhotoDet[iRing],
168-
(float)mTRplusG[iRing],
169-
(float)mThetaBi[iRing],
170-
GeometryTGeo::getRICHVolPattern()};
154+
mRings[iRing] = o2::rich::Ring{iRing,
155+
richPars.nTiles,
156+
richPars.rMin,
157+
richPars.rMax,
158+
richPars.radiatorThickness,
159+
(float)mVTile1[iRing],
160+
(float)mVTile2[iRing],
161+
(float)mLAerogelZ[iRing],
162+
richPars.detectorThickness,
163+
(float)mVMirror1[iRing],
164+
(float)mVMirror2[iRing],
165+
richPars.zBaseSize,
166+
(float)mR0Radiator[iRing],
167+
(float)mR0PhotoDet[iRing],
168+
(float)mTRplusG[iRing],
169+
(float)mThetaBi[iRing],
170+
GeometryTGeo::getRICHVolPattern()};
171171
}
172172

173173
if (richPars.enableFWDRich) {
@@ -182,7 +182,7 @@ void Detector::InitializeO2Detector()
182182
{
183183
LOG(info) << "Initialize RICH O2Detector";
184184
mGeometryTGeo = GeometryTGeo::Instance();
185-
// defineSensitiveVolumes();
185+
defineSensitiveVolumes();
186186
}
187187

188188
void Detector::defineSensitiveVolumes()
@@ -194,12 +194,19 @@ void Detector::defineSensitiveVolumes()
194194
LOGP(info, "Adding RICH Sensitive Volumes");
195195

196196
// The names of the RICH sensitive volumes have the format: Ring(0...mRings.size()-1)
197-
for (int j{0}; j < mRings.size(); j++) {
198-
volumeName = GeometryTGeo::getRICHSensorPattern() + TString::Itoa(j, 10);
199-
LOGP(info, "Trying {}", volumeName.Data());
200-
v = geoManager->GetVolume(volumeName.Data());
201-
LOGP(info, "Adding RICH Sensitive Volume {}", v->GetName());
202-
AddSensitiveVolume(v);
197+
for (auto ring : mRings) {
198+
for (int j = 0; j < ring.getNTiles(); j++) {
199+
volumeName = Form("%s_%d_%d", GeometryTGeo::getRICHSensorPattern(), ring.getPosId(), j);
200+
LOGP(info, "Trying {}", volumeName.Data());
201+
v = geoManager->GetVolume(volumeName.Data());
202+
if (!v) {
203+
LOG(error) << "Geometry does not contain volume " << volumeName.Data();
204+
geoManager->GetListOfVolumes()->Print();
205+
LOG(fatal) << "Could not find volume " << volumeName.Data() << " in the geometry";
206+
}
207+
LOGP(info, "Adding RICH Sensitive Volume {}", v->GetName());
208+
AddSensitiveVolume(v);
209+
}
203210
}
204211
}
205212

Detectors/Upgrades/ALICE3/RICH/simulation/src/RICHRing.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ Ring::Ring(int rPosId,
106106
photoTile->SetVertex(6, photThick / 2, photYmax / 2);
107107
photoTile->SetVertex(7, photThick / 2, -photYmax / 2);
108108

109-
TGeoVolume* photoTileVol = new TGeoVolume(Form("photoTile_%d_%d", rPosId, photTileCount), photoTile, medSi);
109+
TGeoVolume* photoTileVol = new TGeoVolume(Form("%s_%d_%d", GeometryTGeo::getRICHSensorPattern(), rPosId, photTileCount), photoTile, medSi);
110110
photoTileVol->SetLineColor(kOrange - 8);
111111
photoTileVol->SetLineWidth(1);
112112

0 commit comments

Comments
 (0)