16#include <TGeoCompositeShape.h>
17#include <TGeoManager.h>
18#include <TGeoMaterial.h>
19#include <TGeoMatrix.h>
20#include <TGeoMedium.h>
22#include <TGeoVolume.h>
45 PassiveBase::operator=(rhs);
50void Compensator::createMaterials()
68 Float_t epsil, stmin, deemax, tmaxfd, stemax;
80 matmgr.Material(
"COMP", 9,
"ALUMINIUM0", 26.98, 13., 2.7, 8.9, 37.2);
81 matmgr.Medium(
"COMP", 9,
"ALU_C0", 9, 0, isxfld2, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
82 matmgr.Material(
"COMP", 29,
"ALUMINIUM1", 26.98, 13., 2.7, 8.9, 37.2);
83 matmgr.Medium(
"COMP", 29,
"ALU_C1", 29, 0, isxfld1, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
84 matmgr.Material(
"COMP", 49,
"ALUMINIUM2", 26.98, 13., 2.7, 8.9, 37.2);
85 matmgr.Medium(
"COMP", 49,
"ALU_C2", 49, 0, isxfld1, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
88 matmgr.Material(
"COMP", 10,
"IRON0", 55.85, 26., 7.87, 1.76, 17.1);
89 matmgr.Medium(
"COMP", 10,
"FE_C0", 10, 0, isxfld1, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
90 matmgr.Material(
"COMP", 30,
"IRON1", 55.85, 26., 7.87, 1.76, 17.1);
91 matmgr.Medium(
"COMP", 30,
"FE_C1", 30, 0, 1, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
92 matmgr.Material(
"COMP", 50,
"IRON2", 55.85, 26., 7.87, 1.76, 17.1);
93 matmgr.Medium(
"COMP", 50,
"FE_C2", 50, 0, isxfld1, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
96 matmgr.Material(
"COMP", 17,
"COPPER0", 63.55, 29., 8.96, 1.43, 15.1);
97 matmgr.Material(
"COMP", 37,
"COPPER1", 63.55, 29., 8.96, 1.43, 15.1);
98 matmgr.Material(
"COMP", 57,
"COPPER2", 63.55, 29., 8.96, 1.43, 15.1);
99 matmgr.Medium(
"COMP", 17,
"Cu_C0", 17, 0, isxfld1, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
105 matmgr.Medium(
"COMP", 18,
"Cu_C0_NF", 17, 0, isxfld2, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
106 matmgr.Medium(
"COMP", 37,
"Cu_C1", 37, 0, isxfld1, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
107 matmgr.Medium(
"COMP", 57,
"Cu_C2", 57, 0, isxfld1, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
116#define kDegrad TMath::DegToRad()
118void Compensator::createCompensator()
120 auto top = gGeoManager->GetVolume(
"caveRB24");
121 top->AddNode(createMagnetYoke(), 1,
new TGeoTranslation(0., 0., 1000. - 1313.347));
124TGeoVolume* Compensator::createMagnetYoke()
126 TGeoVolumeAssembly* voMagnet =
new TGeoVolumeAssembly(
"DCM0");
127 voMagnet->SetName(
"DCM0");
128 TGeoRotation* Ry180 =
new TGeoRotation(
"Ry180", 180., 180., 0.);
130 auto kMedAlu = matmgr.getTGeoMedium(
"COMP_ALU_C0");
131 auto kMedCooper = matmgr.getTGeoMedium(
"COMP_Cu_C0");
132 auto kMedCooperNF = matmgr.getTGeoMedium(
"COMP_Cu_C0_NF");
133 auto kMedIron = matmgr.getTGeoMedium(
"COMP_FE_C0");
137 auto kMedIronInner = matmgr.getTGeoMedium(
"COMP_FE_C1");
139 const double innerUpLx = 8.;
140 const double innerUpLy = 32.2;
141 const double innerDwLx = 46.;
142 const double innerDwLy = 23.;
143 const double outerLx = 116.4;
144 const double outerLy = 90.2;
145 const double Lz = 250.;
147 new TGeoBBox(
"shMagnetYokeOuter", outerLx / 2.0, outerLy / 2.0, Lz / 2.0);
148 new TGeoBBox(
"shMagnetYokeInnerUp", innerUpLx / 2.0, innerUpLy / 2.0, Lz / 1.0);
149 new TGeoBBox(
"shMagnetYokeInnerDw", innerDwLx / 2.0, innerDwLy / 2.0, Lz / 1.0);
150 (
new TGeoTranslation(
"trMagnetYokeOuter", 0.0, -29.1, 0.0))->RegisterYourself();
151 (
new TGeoTranslation(
"trMagnetYokeInnerUp", 0.0, 0.0, 0.0))->RegisterYourself();
152 (
new TGeoTranslation(
"trMagnetYokeInnerDw", 0.0, -27.5, 0.0))->RegisterYourself();
154 TGeoCompositeShape* shMagnetYoke =
155 new TGeoCompositeShape(
"shMagnetBulk",
156 "shMagnetYokeOuter:trMagnetYokeOuter-(shMagnetYokeInnerUp:trMagnetYokeInnerUp+"
157 "shMagnetYokeInnerDw:trMagnetYokeInnerDw)");
158 TGeoVolume* voMagnetYoke =
new TGeoVolume(
"voMagnetYoke", shMagnetYoke, kMedIron);
165 const double delta =
param.yokeDelta;
167 new TGeoBBox(
"shMagnetYokeOuterFast", (outerLx - delta) / 2.0, (outerLy - delta) / 2.0, (Lz - delta) / 2.0);
168 new TGeoBBox(
"shMagnetYokeInnerUpFast", (innerUpLx + delta) / 2.0, (innerUpLy + delta) / 2.0, Lz / 1.0);
169 new TGeoBBox(
"shMagnetYokeInnerDwFast", (innerDwLx + delta) / 2.0, (innerDwLy + delta) / 2.0, Lz / 1.0);
171 TGeoCompositeShape* shMagnetYokeFast =
172 new TGeoCompositeShape(
"shMagnetInner",
173 "shMagnetYokeOuterFast:trMagnetYokeOuter-(shMagnetYokeInnerUpFast:trMagnetYokeInnerUp+"
174 "shMagnetYokeInnerDwFast:trMagnetYokeInnerDw)");
176 TGeoVolume* voMagnetYokeInner =
new TGeoVolume(
"voMagnetYokeInner", shMagnetYokeFast, kMedIronInner);
178 voMagnetYoke->AddNode(voMagnetYokeInner, 1,
new TGeoTranslation(0., 0., 0.0));
182 TGeoVolume* voCoilH = gGeoManager->MakeBox(
"voCoilH", kMedCooperNF, 12.64 / 2.0, 21.46 / 2.0, 310.5 / 2.0);
183 TGeoVolume* voCoilV = gGeoManager->MakeBox(
"voCoilV", kMedCooper, 12.64 / 2.0, 35.80 / 2.0, 26.9 / 2.0);
188 const Double_t kDegToRad = TMath::Pi() / 180.;
189 const Double_t AngleInner = 4.5 * kDegToRad;
190 const Double_t AngleOuter = 56.0 * kDegToRad;
191 const Double_t ArcStart = 90. - AngleOuter / kDegToRad;
192 const Double_t ArcEnd = 90. + AngleInner / kDegToRad;
193 const Double_t
b = 13.6;
194 const Double_t Lx = 37.2;
195 const Double_t Ly = 25.7;
196 const Double_t LxV = 14.9;
197 const Double_t
R = 9.50;
198 const Double_t dz = 2.00 / 2.0;
199 const Int_t npoints = 8;
202 Double_t PointsX[npoints] = {0.};
203 Double_t PointsY[npoints] = {0.};
219 y +=
b * TMath::Tan(AngleInner);
224 x +=
R * TMath::Sin(AngleInner);
225 y -=
R * TMath::Cos(AngleInner);
228 TGeoTubeSeg* shPolygonArc =
new TGeoTubeSeg(
"shPolygonArc",
R - 2.0,
R, dz, ArcStart, ArcEnd);
229 (
new TGeoTranslation(
"trPolygonArc",
x,
y, 0.))->RegisterYourself();
231 x +=
R * TMath::Sin(AngleOuter);
232 y +=
R * TMath::Cos(AngleOuter);
237 Double_t
a = Lx -
b -
R * TMath::Sin(AngleInner) -
R * TMath::Sin(AngleOuter);
239 y -=
a * TMath::Tan(AngleOuter);
264 TGeoXtru* shPolygon =
new TGeoXtru(2);
265 shPolygon->SetNameTitle(
"shPolygon",
"shPolygon");
266 shPolygon->DefinePolygon(npoints, PointsX, PointsY);
267 shPolygon->DefineSection(0, -dz, 0., 0., 1.0);
268 shPolygon->DefineSection(1, +dz, 0., 0., 1.0);
270 TGeoCompositeShape* shCoilSupportV =
new TGeoCompositeShape(
"shCoilSupportV",
"shPolygon+shPolygonArc:trPolygonArc");
271 TGeoVolume* voCoilSupportV =
new TGeoVolume(
"voCoilSupportV", shCoilSupportV, kMedAlu);
273 const Double_t MagCoilDx = 12.64 / 2.;
274 const Double_t MagCoilDy = 21.46 / 2.;
275 const Double_t SqOuterDx = MagCoilDx + 2.8;
276 const Double_t SqInnerDx = MagCoilDx + 0.6;
277 const Double_t SqOuterDy = 29.2 / 2.;
278 const Double_t SqInnerDy = 24.8 / 2.;
279 const Double_t SqOuterDz = 15.5 / 2.;
280 const Double_t SqInnerDz = SqOuterDz * 2.;
281 TGeoBBox* shCoilSupportSqOuter =
new TGeoBBox(
"shCoilSupportSqOuter", SqOuterDx, SqOuterDy, SqOuterDz);
282 TGeoBBox* shCoilSupportSqInner =
new TGeoBBox(
"shCoilSupportSqInner", SqInnerDx, SqInnerDy, SqInnerDz);
283 TGeoCompositeShape* shCoilSupportSq =
284 new TGeoCompositeShape(
"shCoilSupportSq",
"shCoilSupportSqOuter - shCoilSupportSqInner");
285 TGeoVolume* voCoilSupportSq =
new TGeoVolume(
"voCoilSupportSq", shCoilSupportSq, kMedAlu);
287 const Double_t HSuppDx = (Lx - LxV + 0.6) / 2.0;
288 const Double_t HSuppDy = 2.2 / 2.0;
289 const Double_t HSuppDz = SqOuterDz;
291 TGeoVolume* voCoilSupportH = gGeoManager->MakeBox(
"voCoilSupportH", kMedAlu, HSuppDx, HSuppDy, HSuppDz);
293 TGeoVolumeAssembly* voCoilSupport =
new TGeoVolumeAssembly(
"voCoilSupport");
294 voCoilSupportV->SetLineColor(kViolet + 9);
295 voCoilSupportSq->SetLineColor(kBlue - 5);
296 voCoilSupportH->SetLineColor(kPink);
298 voCoilSupport->AddNode(voCoilSupportV, 1,
new TGeoTranslation(SqOuterDx - LxV, SqOuterDy, 0.));
299 voCoilSupport->AddNode(voCoilSupportSq, 1,
new TGeoTranslation(0., 0., 0.));
300 voCoilSupport->AddNode(voCoilSupportH, 1,
new TGeoTranslation(SqOuterDx + HSuppDx, SqOuterDy - Ly - HSuppDy, 0.));
303 TGeoVolume* voSupportHTop = gGeoManager->MakeBox(
"voSupportHTop", kMedAlu, 66.0 / 2.0, 2.0 / 2.0, 17.0 / 2.0);
304 TGeoVolume* voSupportHBot = gGeoManager->MakeBox(
"voSupportHBot", kMedAlu, 14.0 / 2.0, 2.0 / 2.0, 17.0 / 2.0);
305 TGeoVolume* voSupportVert = gGeoManager->MakeBox(
"voSupportVert", kMedAlu, 3.0 / 2.0, 25.0 / 2.0, 17.0 / 2.0);
307 TGeoVolumeAssembly* voSupportGeoRefPoint =
new TGeoVolumeAssembly(
"voSupportGeoRefPoint");
308 voSupportHTop->SetLineColor(kGreen);
309 voSupportHBot->SetLineColor(kGreen);
310 voSupportVert->SetLineColor(kGreen);
311 voSupportGeoRefPoint->AddNode(voSupportHTop, 1,
new TGeoTranslation(0.0, 28.0, 0.));
312 voSupportGeoRefPoint->AddNode(voSupportHBot, 1,
new TGeoTranslation(+33.0, 1.0, 0.));
313 voSupportGeoRefPoint->AddNode(voSupportHBot, 2,
new TGeoTranslation(-33.0, 1.0, 0.));
314 voSupportGeoRefPoint->AddNode(voSupportVert, 1,
new TGeoTranslation(+31.5, 14.5, 0.));
315 voSupportGeoRefPoint->AddNode(voSupportVert, 2,
new TGeoTranslation(-31.5, 14.5, 0.));
318 voMagnetYoke->SetLineColor(kAzure - 7);
319 voCoilH->SetLineColor(kOrange - 3);
320 voCoilV->SetLineColor(kOrange - 3);
323 voMagnet->AddNode(voMagnetYoke, 1,
new TGeoTranslation(0., 0., 0.0));
324 voMagnet->AddNode(voCoilH, 1,
new TGeoTranslation(+16.14, +29.83, 0.0));
325 voMagnet->AddNode(voCoilH, 2,
new TGeoTranslation(-16.14, +29.83, 0.0));
326 voMagnet->AddNode(voCoilH, 3,
new TGeoTranslation(+16.14, -27.43, 0.0));
327 voMagnet->AddNode(voCoilH, 4,
new TGeoTranslation(-16.14, -27.43, 0.0));
328 voMagnet->AddNode(voCoilV, 1,
new TGeoTranslation(+16.14, 1.20, +141.8));
329 voMagnet->AddNode(voCoilV, 2,
new TGeoTranslation(-16.14, 1.20, +141.8));
330 voMagnet->AddNode(voCoilV, 3,
new TGeoTranslation(+16.14, 1.20, -141.8));
331 voMagnet->AddNode(voCoilV, 4,
new TGeoTranslation(-16.14, 1.20, -141.8));
332 Double_t zGeoRef = 74.0 / 2. + SqOuterDz + 9.0 + 17.0 / 2.0;
333 voMagnet->AddNode(voSupportGeoRefPoint, 1,
new TGeoTranslation(0., 16.0, +zGeoRef));
334 voMagnet->AddNode(voSupportGeoRefPoint, 2,
new TGeoTranslation(0., 16.0, -zGeoRef));
335 Double_t zCoilSupp = 29.83 - MagCoilDy - 0.6 + SqInnerDy;
336 voMagnet->AddNode(voCoilSupport, 1,
new TGeoTranslation(+16.14, zCoilSupp, 74.0 * 0.5));
337 voMagnet->AddNode(voCoilSupport, 2,
new TGeoTranslation(+16.14, zCoilSupp, -74.0 * 0.5));
338 voMagnet->AddNode(voCoilSupport, 3,
new TGeoTranslation(+16.14, zCoilSupp, 74.0 * 1.5));
339 voMagnet->AddNode(voCoilSupport, 4,
new TGeoTranslation(+16.14, zCoilSupp, -74.0 * 1.5));
341 voMagnet->AddNode(voCoilSupport, 5,
new TGeoCombiTrans(-16.14, zCoilSupp, 74.0 * 0.5, Ry180));
342 voMagnet->AddNode(voCoilSupport, 6,
new TGeoCombiTrans(-16.14, zCoilSupp, -74.0 * 0.5, Ry180));
343 voMagnet->AddNode(voCoilSupport, 7,
new TGeoCombiTrans(-16.14, zCoilSupp, 74.0 * 1.5, Ry180));
344 voMagnet->AddNode(voCoilSupport, 8,
new TGeoCombiTrans(-16.14, zCoilSupp, -74.0 * 1.5, Ry180));
346 return (TGeoVolume*)voMagnet;
Definition of the Detector class.
static void initFieldTrackingParams(int &mode, float &maxfield)
static MaterialManager & Instance()
static const HallSimParam & Instance()
void ConstructGeometry() override
FairModule * CloneModule() const override
Clone this object (used in MT mode only)
a common base class for passive modules - implementing generic functions
GLdouble GLdouble GLdouble GLdouble top
GLuint const GLchar * name
GLboolean GLboolean GLboolean b
GLboolean GLboolean GLboolean GLboolean a