81 float aAir[4] = {12.0107, 14.0067, 15.9994, 39.948};
82 float zAir[4] = {6., 7., 8., 18.};
83 float wAir[4] = {0.000124, 0.755267, 0.231781, 0.012827};
84 float dAir = 1.20479E-3;
85 float dAir1 = 1.20479E-11;
87 float epsil, stmin, tmaxfd, deemax, stemax;
94 matmgr.Mixture(
"ALICE3_MAGNET", 1,
"VACUUM$ ", aAir, zAir, dAir1, 4, wAir);
95 matmgr.Material(
"ALICE3_MAGNET", 9,
"ALUMINIUM$", 26.98, 13., 2.7, 8.9, 37.2);
96 matmgr.Material(
"ALICE3_MAGNET", 19,
"COPPER$", 63.55, 29., 8.96, 1.436, 15.1);
98 matmgr.Medium(
"ALICE3_MAGNET", 1,
"VACUUM", 1, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
99 matmgr.Medium(
"ALICE3_MAGNET", 9,
"ALUMINIUM", 9, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
100 matmgr.Medium(
"ALICE3_MAGNET", 19,
"COPPER", 19, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
107 float aWP[4] = {92.90638f, 47.867f, 63.546f, 26.982f};
108 float zWP[4] = {41.f, 22.f, 29.f, 13.f};
109 float wWP[4] = {0.0405f, 0.0405f, 0.1118f, 0.8072f};
111 matmgr.Mixture(
"ALICE3_MAGNET", 29,
"WINDINGPACK", aWP, zWP, dWP, 4, wWP);
112 matmgr.Medium(
"ALICE3_MAGNET", 29,
"WINDINGPACK", 29, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
122 switch (passiveBaseParam.mMagAbsLayout) {
128 mInnerWrapInnerRadius = 125.f;
129 mInnerWrapThickness = 1.f;
130 mCoilInnerRadius = 145.f;
131 mCoilThickness = 0.3f;
132 mRestMaterialRadius = 145.3f;
133 mRestMaterialThickness = 6.8f;
134 mOuterWrapInnerRadius = 165.f;
135 mOuterWrapThickness = 3.f;
139 LOG(fatal) <<
"Unknown detector layout " << passiveBaseParam.mMagAbsLayout;
143 bool doCopperStabilizer =
false;
144 bool doWindingPack =
false;
145 switch (passiveBaseParam.mMagType) {
150 doCopperStabilizer =
true;
151 mRestMaterialThickness -= 3.3;
152 mRestMaterialThickness += 2.2;
153 LOG(
debug) <<
"Alice 3 magnet: using Copper Stabilizer with thickness " << mRestMaterialThickness <<
" cm";
156 doWindingPack =
true;
157 LOG(
debug) <<
"Alice 3 magnet: using WindingPack (NbTi+Cu+Al) coil";
161 doWindingPack =
true;
162 mInnerWrapInnerRadius = 140.f;
163 mInnerWrapThickness = 1.0f;
164 mCoilInnerRadius = 160.f;
165 mCoilThickness = 0.3f;
166 mRestMaterialRadius = 160.3f;
167 mRestMaterialThickness = 15.7f;
168 mOuterWrapInnerRadius = 197.f;
169 mOuterWrapThickness = 3.0f;
171 LOG(
debug) <<
"Alice 3 magnet: using Ian Perez Garcia design (ICN-UNAM)";
174 LOG(fatal) <<
"Unknown magnet layout " << passiveBaseParam.mMagType;
178 TGeoManager* geoManager = gGeoManager;
179 TGeoVolume* barrel = geoManager->GetVolume(
"barrel");
181 LOGP(fatal,
"Could not find barrel volume while constructing Alice 3 magnet geometry");
185 auto kMedAl = matmgr.getTGeoMedium(
"ALICE3_MAGNET_ALUMINIUM");
186 auto kMedCu = matmgr.getTGeoMedium(
"ALICE3_MAGNET_COPPER");
187 auto kMedWP = matmgr.getTGeoMedium(
"ALICE3_MAGNET_WINDINGPACK");
188 auto kMedVac = matmgr.getTGeoMedium(
"ALICE3_MAGNET_VACUUM");
191 LOGP(
debug,
"Alice 3 magnet: creating inner wrap with inner radius {} cm and thickness {} cm", mInnerWrapInnerRadius, mInnerWrapThickness);
192 TGeoTube* innerLayer =
new TGeoTube(mInnerWrapInnerRadius, mInnerWrapInnerRadius + mInnerWrapThickness, mZLength / 2);
193 TGeoTube* innerVacuum =
new TGeoTube(mInnerWrapInnerRadius + mInnerWrapThickness, mCoilInnerRadius, mZLength / 2);
195 LOGP(
debug,
"Alice 3 magnet: creating coils layer with inner radius {} cm and thickness {} cm", mCoilInnerRadius, mCoilThickness);
196 TGeoTube* coilsLayer =
new TGeoTube(mCoilInnerRadius, mCoilInnerRadius + mCoilThickness, mZLength / 2);
197 TGeoTube* restMaterial =
new TGeoTube(mRestMaterialRadius, mRestMaterialRadius + mRestMaterialThickness, mZLength / 2);
198 TGeoTube* outerVacuum =
new TGeoTube(mRestMaterialRadius + mRestMaterialThickness, mOuterWrapInnerRadius, mZLength / 2);
200 LOGP(
debug,
"Alice 3 magnet: creating outer wrap with inner radius {} cm and thickness {} cm", mOuterWrapInnerRadius, mOuterWrapThickness);
201 TGeoTube* outerLayer =
new TGeoTube(mOuterWrapInnerRadius, mOuterWrapInnerRadius + mOuterWrapThickness, mZLength / 2);
203 TGeoVolume* innerWrapVol =
new TGeoVolume(
"innerWrap", innerLayer, kMedAl);
204 TGeoVolume* innerVacuumVol =
new TGeoVolume(
"innerVacuum", innerVacuum, kMedVac);
205 TGeoVolume* coilsVol =
new TGeoVolume(
"coils", coilsLayer, doWindingPack ? kMedWP : kMedCu);
206 TGeoVolume* restMaterialVol =
new TGeoVolume(
"restMaterial", restMaterial, doCopperStabilizer ? kMedCu : kMedAl);
207 TGeoVolume* outerVacuumVol =
new TGeoVolume(
"outerVacuum", outerVacuum, kMedVac);
208 TGeoVolume* outerWrapVol =
new TGeoVolume(
"outerWrap", outerLayer, kMedAl);
210 innerWrapVol->SetLineColor(kRed + 2);
211 innerVacuumVol->SetLineColor(kRed + 2);
212 coilsVol->SetLineColor(kRed + 2);
213 restMaterialVol->SetLineColor(kRed + 2);
214 outerVacuumVol->SetLineColor(kRed + 2);
215 outerWrapVol->SetLineColor(kRed + 2);
217 new TGeoVolumeAssembly(
"magnet");
218 auto* magnet = gGeoManager->GetVolume(
"magnet");
219 magnet->AddNode(innerWrapVol, 1,
nullptr);
220 magnet->AddNode(innerVacuumVol, 1,
nullptr);
221 magnet->AddNode(coilsVol, 1,
nullptr);
222 magnet->AddNode(restMaterialVol, 1,
nullptr);
223 magnet->AddNode(outerVacuumVol, 1,
nullptr);
224 magnet->AddNode(outerWrapVol, 1,
nullptr);
226 magnet->SetVisibility(1);
228 barrel->AddNode(magnet, 1,
new TGeoTranslation(0, 30.f, 0));