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);
110 switch (passiveBaseParam.mDetLayout) {
115 mInnerWrapInnerRadius = 125.f;
116 mInnerWrapThickness = 1.f;
117 mCoilInnerRadius = 145.f;
118 mCoilThickness = 0.3f;
119 mRestMaterialRadius = 145.3f;
120 mRestMaterialThickness = 6.8f;
121 mOuterWrapInnerRadius = 165.f;
122 mOuterWrapThickness = 3.f;
126 LOG(fatal) <<
"Unknown detector layout " << passiveBaseParam.mDetLayout;
130 bool doCopperStabilizer =
false;
131 switch (passiveBaseParam.mLayout) {
136 doCopperStabilizer =
true;
137 mRestMaterialThickness -= 3.3;
138 mRestMaterialThickness += 2.2;
139 LOG(
debug) <<
"Alice 3 magnet: using Copper Stabilizer with thickness " << mRestMaterialThickness <<
" cm";
142 LOG(fatal) <<
"Unknown magnet layout " << passiveBaseParam.mLayout;
146 TGeoManager* geoManager = gGeoManager;
147 TGeoVolume* barrel = geoManager->GetVolume(
"barrel");
149 LOGP(fatal,
"Could not find barrel volume while constructing Alice 3 magnet geometry");
153 auto kMedAl = matmgr.getTGeoMedium(
"ALICE3_MAGNET_ALUMINIUM");
154 auto kMedCu = matmgr.getTGeoMedium(
"ALICE3_MAGNET_COPPER");
155 auto kMedVac = matmgr.getTGeoMedium(
"ALICE3_MAGNET_VACUUM");
158 LOGP(
debug,
"Alice 3 magnet: creating inner wrap with inner radius {} cm and thickness {} cm", mInnerWrapInnerRadius, mInnerWrapThickness);
159 TGeoTube* innerLayer =
new TGeoTube(mInnerWrapInnerRadius, mInnerWrapInnerRadius + mInnerWrapThickness, mZLength / 2);
160 TGeoTube* innerVacuum =
new TGeoTube(mInnerWrapInnerRadius + mInnerWrapThickness, mCoilInnerRadius, mZLength / 2);
162 LOGP(
debug,
"Alice 3 magnet: creating coils layer with inner radius {} cm and thickness {} cm", mCoilInnerRadius, mCoilThickness);
163 TGeoTube* coilsLayer =
new TGeoTube(mCoilInnerRadius, mCoilInnerRadius + mCoilThickness, mZLength / 2);
164 TGeoTube* restMaterial =
new TGeoTube(mRestMaterialRadius, mRestMaterialRadius + mRestMaterialThickness, mZLength / 2);
165 TGeoTube* outerVacuum =
new TGeoTube(mRestMaterialRadius + mRestMaterialThickness, mOuterWrapInnerRadius, mZLength / 2);
167 LOGP(
debug,
"Alice 3 magnet: creating outer wrap with inner radius {} cm and thickness {} cm", mOuterWrapInnerRadius, mOuterWrapThickness);
168 TGeoTube* outerLayer =
new TGeoTube(mOuterWrapInnerRadius, mOuterWrapInnerRadius + mOuterWrapThickness, mZLength / 2);
170 TGeoVolume* innerWrapVol =
new TGeoVolume(
"innerWrap", innerLayer, kMedAl);
171 TGeoVolume* innerVacuumVol =
new TGeoVolume(
"innerVacuum", innerVacuum, kMedVac);
172 TGeoVolume* coilsVol =
new TGeoVolume(
"coils", coilsLayer, kMedCu);
173 TGeoVolume* restMaterialVol =
new TGeoVolume(
"restMaterial", restMaterial, doCopperStabilizer ? kMedCu : kMedAl);
174 TGeoVolume* outerVacuumVol =
new TGeoVolume(
"outerVacuum", outerVacuum, kMedVac);
175 TGeoVolume* outerWrapVol =
new TGeoVolume(
"outerWrap", outerLayer, kMedAl);
177 innerWrapVol->SetLineColor(kRed + 2);
178 innerVacuumVol->SetLineColor(kRed + 2);
179 coilsVol->SetLineColor(kRed + 2);
180 restMaterialVol->SetLineColor(kRed + 2);
181 outerVacuumVol->SetLineColor(kRed + 2);
182 outerWrapVol->SetLineColor(kRed + 2);
184 new TGeoVolumeAssembly(
"magnet");
185 auto* magnet = gGeoManager->GetVolume(
"magnet");
186 magnet->AddNode(innerWrapVol, 1,
nullptr);
187 magnet->AddNode(innerVacuumVol, 1,
nullptr);
188 magnet->AddNode(coilsVol, 1,
nullptr);
189 magnet->AddNode(restMaterialVol, 1,
nullptr);
190 magnet->AddNode(outerVacuumVol, 1,
nullptr);
191 magnet->AddNode(outerWrapVol, 1,
nullptr);
193 magnet->SetVisibility(1);
195 barrel->AddNode(magnet, 1,
new TGeoTranslation(0, 30.f, 0));