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
2 changes: 1 addition & 1 deletion Detectors/Upgrades/ALICE3/RICH/base/src/GeometryTGeo.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ std::unique_ptr<o2::rich::GeometryTGeo> GeometryTGeo::sInstance;
std::string GeometryTGeo::sVolumeName = "RICHV";
std::string GeometryTGeo::sRingName = "RICHRing";
std::string GeometryTGeo::sChipName = "RICHChip";
std::string GeometryTGeo::sSensorName = "RICHSensor";
std::string GeometryTGeo::sSensorName = "RICHPhotoTile";
std::string GeometryTGeo::sSensorFWDName = "FWDRICHSensor"; // only one big sensor for now
std::string GeometryTGeo::sSensorBWDName = "BWDRICHSensor"; // only one big sensor for now

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ class Ring

auto getDeltaPhiPos() const { return TMath::TwoPi() / mNTiles; }
void createRing(TGeoVolume* motherVolume);
int getPosId() const { return mPosId; }
int getNTiles() const { return mNTiles; }

private:
int mPosId; // id of the ring
Expand Down
57 changes: 32 additions & 25 deletions Detectors/Upgrades/ALICE3/RICH/simulation/src/Detector.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -145,29 +145,29 @@ void Detector::createGeometry()
vRICH->SetTitle(vstrng);
auto& richPars = RICHBaseParam::Instance();

prepareLayout();
prepareLayout(); // Preparing the positions of the rings and tiles

for (int iRing{0}; iRing < richPars.nRings; ++iRing) {
if (!richPars.oddGeom && iRing == (richPars.nRings / 2)) {
continue;
}
mRings[iRing] = Ring{iRing,
richPars.nTiles,
richPars.rMin,
richPars.rMax,
richPars.radiatorThickness,
(float)mVTile1[iRing],
(float)mVTile2[iRing],
(float)mLAerogelZ[iRing],
richPars.detectorThickness,
(float)mVMirror1[iRing],
(float)mVMirror2[iRing],
richPars.zBaseSize,
(float)mR0Radiator[iRing],
(float)mR0PhotoDet[iRing],
(float)mTRplusG[iRing],
(float)mThetaBi[iRing],
GeometryTGeo::getRICHVolPattern()};
mRings[iRing] = o2::rich::Ring{iRing,
richPars.nTiles,
richPars.rMin,
richPars.rMax,
richPars.radiatorThickness,
(float)mVTile1[iRing],
(float)mVTile2[iRing],
(float)mLAerogelZ[iRing],
richPars.detectorThickness,
(float)mVMirror1[iRing],
(float)mVMirror2[iRing],
richPars.zBaseSize,
(float)mR0Radiator[iRing],
(float)mR0PhotoDet[iRing],
(float)mTRplusG[iRing],
(float)mThetaBi[iRing],
GeometryTGeo::getRICHVolPattern()};
}

if (richPars.enableFWDRich) {
Expand All @@ -182,7 +182,7 @@ void Detector::InitializeO2Detector()
{
LOG(info) << "Initialize RICH O2Detector";
mGeometryTGeo = GeometryTGeo::Instance();
// defineSensitiveVolumes();
defineSensitiveVolumes();
}

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

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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ Ring::Ring(int rPosId,
photoTile->SetVertex(6, photThick / 2, photYmax / 2);
photoTile->SetVertex(7, photThick / 2, -photYmax / 2);

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

Expand Down