Skip to content

Commit 8a2278c

Browse files
authored
Refactor iTOF and oTOF layer initialization logic
1 parent 706ddd0 commit 8a2278c

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -96,12 +96,12 @@ void Detector::configLayers(bool itof, bool otof, bool ftof, bool btof, std::str
9696
}
9797
if (itof) { // iTOF
9898
const std::string name = GeometryTGeo::getITOFLayerPattern();
99-
const int nStaves = itofSegmented ? 24 : 0; // number of staves in segmented case
100-
const double staveWidth = itofSegmented ? 5.42 : 0.0; // cm
99+
const int nStaves = itofSegmented ? 24 : 0; // number of staves in segmented case
100+
const double staveWidth = itofSegmented ? 5.42 : 0.0; // cm
101101
const double staveTiltAngle = itofSegmented ? 10.0 : 0.0; // degrees
102-
const int modulesPerStave = itofSegmented ? 10 : 0; // number of modules per stave in segmented case
102+
const int modulesPerStave = itofSegmented ? 10 : 0; // number of modules per stave in segmented case
103103
mITOFLayer = ITOFLayer(name,
104-
dInnerTof.first, 0.f, dInnerTof.second, 0.f, x2x0, ITOFLayer::kBarrelSegmented,
104+
dInnerTof.first, 0.f, dInnerTof.second, 0.f, x2x0, itofSegmented ? ITOFLayer::kBarrelSegmented : ITOFLayer::kBarrel,
105105
nStaves, staveWidth, staveTiltAngle, modulesPerStave);
106106
}
107107
if (otof) { // oTOF
@@ -111,7 +111,7 @@ void Detector::configLayers(bool itof, bool otof, bool ftof, bool btof, std::str
111111
const double staveTiltAngle = otofSegmented ? 5.0 : 0.0; // degrees
112112
const int modulesPerStave = otofSegmented ? 54 : 0; // number of modules per stave in segmented case
113113
mOTOFLayer = OTOFLayer(name,
114-
dOuterTof.first, 0.f, dOuterTof.second, 0.f, x2x0, OTOFLayer::kBarrelSegmented,
114+
dOuterTof.first, 0.f, dOuterTof.second, 0.f, x2x0, otofSegmented ? OTOFLayer::kBarrelSegmented : OTOFLayer::kBarrel,
115115
nStaves, staveWidth, staveTiltAngle, modulesPerStave);
116116
}
117117
if (ftof) {

0 commit comments

Comments
 (0)