Skip to content

Commit 2bd60de

Browse files
authored
Refactor absorber geometry initialization logic
1 parent 83570ed commit 2bd60de

1 file changed

Lines changed: 12 additions & 10 deletions

File tree

Detectors/Upgrades/ALICE3/Passive/src/Absorber.cxx

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -131,10 +131,10 @@ void Alice3Absorber::ConstructGeometry()
131131
}
132132

133133
auto& passiveBaseParam = Alice3PassiveBaseParam::Instance();
134-
int nSections = (passiveBaseParam.mDetLayout == o2::passive::DetLayout::SteppedAbsorber) ? 6 : 18;
135-
TGeoPcon* absorings = new TGeoPcon(0., 360., nSections);
136-
switch (passiveBaseParam.mDetLayout) {
137-
case o2::passive::DetLayout::StandardRadius:
134+
TGeoPcon* absorings = nullptr;
135+
switch (passiveBaseParam.mMagAbsLayout) {
136+
case o2::passive::MagnetAbsorberLayout::StandardRadius:
137+
absorings = new TGeoPcon(0., 360., 18);
138138
absorings->DefineSection(0, 500, 236, 274);
139139
absorings->DefineSection(1, 400, 236, 274);
140140
absorings->DefineSection(2, 400, 232.5, 277.5);
@@ -154,7 +154,8 @@ void Alice3Absorber::ConstructGeometry()
154154
absorings->DefineSection(16, -400, 236, 274);
155155
absorings->DefineSection(17, -500, 236, 274);
156156
break;
157-
case o2::passive::DetLayout::ReducedRadius:
157+
case o2::passive::MagnetAbsorberLayout::ReducedRadius:
158+
absorings = new TGeoPcon(0., 360., 18);
158159
absorings->DefineSection(0, 500, 201, 239);
159160
absorings->DefineSection(1, 400, 201, 239);
160161
absorings->DefineSection(2, 400, 197.5, 242.5);
@@ -174,18 +175,19 @@ void Alice3Absorber::ConstructGeometry()
174175
absorings->DefineSection(16, -400, 201, 239);
175176
absorings->DefineSection(17, -500, 201, 239);
176177
break;
177-
case o2::passive::DetLayout::SteppedAbsorber:
178+
case o2::passive::MagnetAbsorberLayout::SteppedAbsorber:
178179
// Geometria 6 (Ian/tesis): Rext=290 constante, escalon en Rmin.
179180
// Externas 45 cm (Rmin=245), central 70 cm (Rmin=220). Ref: Ian DetectorConstruction.cc abs_thickness={45,70,45}
181+
absorings = new TGeoPcon(0., 360., 6);
180182
absorings->DefineSection(0, -500, 245, 290);
181183
absorings->DefineSection(1, -300, 245, 290);
182184
absorings->DefineSection(2, -300, 220, 290);
183-
absorings->DefineSection(3, 300, 220, 290);
184-
absorings->DefineSection(4, 300, 245, 290);
185-
absorings->DefineSection(5, 500, 245, 290);
185+
absorings->DefineSection(3, 300, 220, 290);
186+
absorings->DefineSection(4, 300, 245, 290);
187+
absorings->DefineSection(5, 500, 245, 290);
186188
break;
187189
default:
188-
LOG(fatal) << "Unknown detector layout " << passiveBaseParam.mDetLayout;
190+
LOG(fatal) << "Unknown detector layout " << passiveBaseParam.mMagAbsLayout;
189191
break;
190192
}
191193

0 commit comments

Comments
 (0)