Skip to content

Commit 0a8fed0

Browse files
authored
Refactor magnet layout handling in Magnet.cxx
1 parent 2bd60de commit 0a8fed0

1 file changed

Lines changed: 22 additions & 22 deletions

File tree

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

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -119,12 +119,12 @@ void Alice3Magnet::ConstructGeometry()
119119
// Passive Base configuration parameters
120120
auto& passiveBaseParam = Alice3PassiveBaseParam::Instance();
121121

122-
switch (passiveBaseParam.mDetLayout) {
123-
case o2::passive::DetLayout::StandardRadius:
122+
switch (passiveBaseParam.mMagAbsLayout) {
123+
case o2::passive::MagnetAbsorberLayout::StandardRadius:
124124
// Defined in the header file
125125
break;
126-
case o2::passive::DetLayout::SteppedAbsorber: // Ian absorber uses ReducedRadius magnet
127-
case o2::passive::DetLayout::ReducedRadius:
126+
case o2::passive::MagnetAbsorberLayout::SteppedAbsorber: // Ian absorber uses ReducedRadius magnet
127+
case o2::passive::MagnetAbsorberLayout::ReducedRadius:
128128
mInnerWrapInnerRadius = 125.f; // cm
129129
mInnerWrapThickness = 1.f; // cm
130130
mCoilInnerRadius = 145.f; // cm
@@ -136,42 +136,42 @@ void Alice3Magnet::ConstructGeometry()
136136
mZLength = 800.f; // cm
137137
break;
138138
default:
139-
LOG(fatal) << "Unknown detector layout " << passiveBaseParam.mDetLayout;
139+
LOG(fatal) << "Unknown detector layout " << passiveBaseParam.mMagAbsLayout;
140140
break;
141141
}
142142

143143
bool doCopperStabilizer = false;
144144
bool doWindingPack = false;
145-
switch (passiveBaseParam.mLayout) {
146-
case o2::passive::MagnetLayout::AluminiumStabilizer:
145+
switch (passiveBaseParam.mMagType) {
146+
case o2::passive::MagnetType::AluminiumStabilizer:
147147
// Handled in the header file
148148
break;
149-
case o2::passive::MagnetLayout::CopperStabilizer:
149+
case o2::passive::MagnetType::CopperStabilizer:
150150
doCopperStabilizer = true;
151151
mRestMaterialThickness -= 3.3; // cm Remove the Aluminium stabiliser
152152
mRestMaterialThickness += 2.2; // cm Add the Copper stabiliser
153153
LOG(debug) << "Alice 3 magnet: using Copper Stabilizer with thickness " << mRestMaterialThickness << " cm";
154154
break;
155-
case o2::passive::MagnetLayout::WindingPack:
155+
case o2::passive::MagnetType::WindingPack:
156156
doWindingPack = true;
157157
LOG(debug) << "Alice 3 magnet: using WindingPack (NbTi+Cu+Al) coil";
158158
break;
159-
case o2::passive::MagnetLayout::SuperconductingMagnet:
159+
case o2::passive::MagnetType::SuperconductingMagnet:
160160
// Ian Perez Garcia design (ICN-UNAM) — radios desde DetectorConstruction.cc
161-
doWindingPack = true; // usa WindingPack como material del coil
162-
mInnerWrapInnerRadius = 140.f; // cm — pared interna criostato
163-
mInnerWrapThickness = 1.0f; // cm — Al
164-
mCoilInnerRadius = 160.f; // cm — bobina (tras gap de vacío)
165-
mCoilThickness = 0.3f; // cm — NbTi/Cu
166-
mRestMaterialRadius = 160.3f;// cm — soporte bobina
167-
mRestMaterialThickness = 15.7f; // cm — Al
168-
mOuterWrapInnerRadius = 197.f; // cm — soporte restante (6 cm Al) + pared externa
169-
mOuterWrapThickness = 3.0f; // cm — pared externa Al, R=197-200
170-
mZLength = 800.f; // cm
161+
doWindingPack = true; // usa WindingPack como material del coil
162+
mInnerWrapInnerRadius = 140.f; // cm — pared interna criostato
163+
mInnerWrapThickness = 1.0f; // cm — Al
164+
mCoilInnerRadius = 160.f; // cm — bobina (tras gap de vacío)
165+
mCoilThickness = 0.3f; // cm — NbTi/Cu
166+
mRestMaterialRadius = 160.3f; // cm — soporte bobina
167+
mRestMaterialThickness = 15.7f; // cm — Al
168+
mOuterWrapInnerRadius = 197.f; // cm — soporte restante (6 cm Al) + pared externa
169+
mOuterWrapThickness = 3.0f; // cm — pared externa Al, R=197-200
170+
mZLength = 800.f; // cm
171171
LOG(debug) << "Alice 3 magnet: using Ian Perez Garcia design (ICN-UNAM)";
172172
break;
173173
default:
174-
LOG(fatal) << "Unknown magnet layout " << passiveBaseParam.mLayout;
174+
LOG(fatal) << "Unknown magnet layout " << passiveBaseParam.mMagType;
175175
break;
176176
}
177177

@@ -232,4 +232,4 @@ FairModule* Alice3Magnet::CloneModule() const
232232
{
233233
return new Alice3Magnet(*this);
234234
}
235-
ClassImp(o2::passive::Alice3Magnet)
235+
ClassImp(o2::passive::Alice3Magnet)

0 commit comments

Comments
 (0)