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;
78 matmgr.Material(
"COMP", 9,
"ALUMINIUM0", 26.98, 13., 2.7, 8.9, 37.2);
79 matmgr.Medium(
"COMP", 9,
"ALU_C0", 9, 0, isxfld1, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
80 matmgr.Material(
"COMP", 29,
"ALUMINIUM1", 26.98, 13., 2.7, 8.9, 37.2);
81 matmgr.Medium(
"COMP", 29,
"ALU_C1", 29, 0, isxfld1, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
82 matmgr.Material(
"COMP", 49,
"ALUMINIUM2", 26.98, 13., 2.7, 8.9, 37.2);
83 matmgr.Medium(
"COMP", 49,
"ALU_C2", 49, 0, isxfld1, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
86 matmgr.Material(
"COMP", 10,
"IRON0", 55.85, 26., 7.87, 1.76, 17.1);
87 matmgr.Medium(
"COMP", 10,
"FE_C0", 10, 0, isxfld1, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
88 matmgr.Material(
"COMP", 30,
"IRON1", 55.85, 26., 7.87, 1.76, 17.1);
89 matmgr.Medium(
"COMP", 30,
"FE_C1", 30, 0, 1, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
90 matmgr.Material(
"COMP", 50,
"IRON2", 55.85, 26., 7.87, 1.76, 17.1);
91 matmgr.Medium(
"COMP", 50,
"FE_C2", 50, 0, isxfld1, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
94 matmgr.Material(
"COMP", 17,
"COPPER0", 63.55, 29., 8.96, 1.43, 15.1);
95 matmgr.Material(
"COMP", 37,
"COPPER1", 63.55, 29., 8.96, 1.43, 15.1);
96 matmgr.Material(
"COMP", 57,
"COPPER2", 63.55, 29., 8.96, 1.43, 15.1);
97 matmgr.Medium(
"COMP", 17,
"Cu_C0", 17, 0, isxfld1, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
98 matmgr.Medium(
"COMP", 37,
"Cu_C1", 37, 0, isxfld1, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
99 matmgr.Medium(
"COMP", 57,
"Cu_C2", 57, 0, isxfld1, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
108#define kDegrad TMath::DegToRad()
110void Compensator::createCompensator()
112 auto top = gGeoManager->GetVolume(
"caveRB24");
113 top->AddNode(createMagnetYoke(), 1,
new TGeoTranslation(0., 0., 1075. - 1313.347));
116TGeoVolume* Compensator::createMagnetYoke()
118 TGeoVolumeAssembly* voMagnet =
new TGeoVolumeAssembly(
"DCM0");
119 voMagnet->SetName(
"DCM0");
120 TGeoRotation* Ry180 =
new TGeoRotation(
"Ry180", 180., 180., 0.);
122 auto kMedAlu = matmgr.getTGeoMedium(
"COMP_ALU_C0");
123 auto kMedCooper = matmgr.getTGeoMedium(
"COMP_Cu_C0");
124 auto kMedIron = matmgr.getTGeoMedium(
"COMP_FE_C0");
128 auto kMedIronInner = matmgr.getTGeoMedium(
"COMP_FE_C1");
130 const double innerUpLx = 8.;
131 const double innerUpLy = 32.2;
132 const double innerDwLx = 46.;
133 const double innerDwLy = 23.;
134 const double outerLx = 116.4;
135 const double outerLy = 90.2;
136 const double Lz = 250.;
138 new TGeoBBox(
"shMagnetYokeOuter", outerLx / 2.0, outerLy / 2.0, Lz / 2.0);
139 new TGeoBBox(
"shMagnetYokeInnerUp", innerUpLx / 2.0, innerUpLy / 2.0, Lz / 1.0);
140 new TGeoBBox(
"shMagnetYokeInnerDw", innerDwLx / 2.0, innerDwLy / 2.0, Lz / 1.0);
141 (
new TGeoTranslation(
"trMagnetYokeOuter", 0.0, -29.1, 0.0))->RegisterYourself();
142 (
new TGeoTranslation(
"trMagnetYokeInnerUp", 0.0, 0.0, 0.0))->RegisterYourself();
143 (
new TGeoTranslation(
"trMagnetYokeInnerDw", 0.0, -27.5, 0.0))->RegisterYourself();
145 TGeoCompositeShape* shMagnetYoke =
146 new TGeoCompositeShape(
"shMagnetBulk",
147 "shMagnetYokeOuter:trMagnetYokeOuter-(shMagnetYokeInnerUp:trMagnetYokeInnerUp+"
148 "shMagnetYokeInnerDw:trMagnetYokeInnerDw)");
149 TGeoVolume* voMagnetYoke =
new TGeoVolume(
"voMagnetYoke", shMagnetYoke, kMedIron);
156 const double delta =
param.yokeDelta;
158 new TGeoBBox(
"shMagnetYokeOuterFast", (outerLx - delta) / 2.0, (outerLy - delta) / 2.0, (Lz - delta) / 2.0);
159 new TGeoBBox(
"shMagnetYokeInnerUpFast", (innerUpLx + delta) / 2.0, (innerUpLy + delta) / 2.0, Lz / 1.0);
160 new TGeoBBox(
"shMagnetYokeInnerDwFast", (innerDwLx + delta) / 2.0, (innerDwLy + delta) / 2.0, Lz / 1.0);
162 TGeoCompositeShape* shMagnetYokeFast =
163 new TGeoCompositeShape(
"shMagnetInner",
164 "shMagnetYokeOuterFast:trMagnetYokeOuter-(shMagnetYokeInnerUpFast:trMagnetYokeInnerUp+"
165 "shMagnetYokeInnerDwFast:trMagnetYokeInnerDw)");
167 TGeoVolume* voMagnetYokeInner =
new TGeoVolume(
"voMagnetYokeInner", shMagnetYokeFast, kMedIronInner);
169 voMagnetYoke->AddNode(voMagnetYokeInner, 1,
new TGeoTranslation(0., 0., 0.0));
173 TGeoVolume* voCoilH = gGeoManager->MakeBox(
"voCoilH", kMedCooper, 12.64 / 2.0, 21.46 / 2.0, 310.5 / 2.0);
174 TGeoVolume* voCoilV = gGeoManager->MakeBox(
"voCoilV", kMedCooper, 12.64 / 2.0, 35.80 / 2.0, 26.9 / 2.0);
179 const Double_t kDegToRad = TMath::Pi() / 180.;
180 const Double_t AngleInner = 4.5 * kDegToRad;
181 const Double_t AngleOuter = 56.0 * kDegToRad;
182 const Double_t ArcStart = 90. - AngleOuter / kDegToRad;
183 const Double_t ArcEnd = 90. + AngleInner / kDegToRad;
184 const Double_t
b = 13.6;
185 const Double_t Lx = 37.2;
186 const Double_t Ly = 25.7;
187 const Double_t LxV = 14.9;
188 const Double_t
R = 9.50;
189 const Double_t dz = 2.00 / 2.0;
190 const Int_t npoints = 8;
193 Double_t PointsX[npoints] = {0.};
194 Double_t PointsY[npoints] = {0.};
210 y +=
b * TMath::Tan(AngleInner);
215 x +=
R * TMath::Sin(AngleInner);
216 y -=
R * TMath::Cos(AngleInner);
219 TGeoTubeSeg* shPolygonArc =
new TGeoTubeSeg(
"shPolygonArc",
R - 2.0,
R, dz, ArcStart, ArcEnd);
220 (
new TGeoTranslation(
"trPolygonArc",
x,
y, 0.))->RegisterYourself();
222 x +=
R * TMath::Sin(AngleOuter);
223 y +=
R * TMath::Cos(AngleOuter);
228 Double_t
a = Lx -
b -
R * TMath::Sin(AngleInner) -
R * TMath::Sin(AngleOuter);
230 y -=
a * TMath::Tan(AngleOuter);
255 TGeoXtru* shPolygon =
new TGeoXtru(2);
256 shPolygon->SetNameTitle(
"shPolygon",
"shPolygon");
257 shPolygon->DefinePolygon(npoints, PointsX, PointsY);
258 shPolygon->DefineSection(0, -dz, 0., 0., 1.0);
259 shPolygon->DefineSection(1, +dz, 0., 0., 1.0);
261 TGeoCompositeShape* shCoilSupportV =
new TGeoCompositeShape(
"shCoilSupportV",
"shPolygon+shPolygonArc:trPolygonArc");
262 TGeoVolume* voCoilSupportV =
new TGeoVolume(
"voCoilSupportV", shCoilSupportV, kMedAlu);
264 const Double_t MagCoilDx = 12.64 / 2.;
265 const Double_t MagCoilDy = 21.46 / 2.;
266 const Double_t SqOuterDx = MagCoilDx + 2.8;
267 const Double_t SqInnerDx = MagCoilDx + 0.6;
268 const Double_t SqOuterDy = 29.2 / 2.;
269 const Double_t SqInnerDy = 24.8 / 2.;
270 const Double_t SqOuterDz = 15.5 / 2.;
271 const Double_t SqInnerDz = SqOuterDz * 2.;
272 TGeoBBox* shCoilSupportSqOuter =
new TGeoBBox(
"shCoilSupportSqOuter", SqOuterDx, SqOuterDy, SqOuterDz);
273 TGeoBBox* shCoilSupportSqInner =
new TGeoBBox(
"shCoilSupportSqInner", SqInnerDx, SqInnerDy, SqInnerDz);
274 TGeoCompositeShape* shCoilSupportSq =
275 new TGeoCompositeShape(
"shCoilSupportSq",
"shCoilSupportSqOuter - shCoilSupportSqInner");
276 TGeoVolume* voCoilSupportSq =
new TGeoVolume(
"voCoilSupportSq", shCoilSupportSq, kMedAlu);
278 const Double_t HSuppDx = (Lx - LxV + 0.6) / 2.0;
279 const Double_t HSuppDy = 2.2 / 2.0;
280 const Double_t HSuppDz = SqOuterDz;
282 TGeoVolume* voCoilSupportH = gGeoManager->MakeBox(
"voCoilSupportH", kMedAlu, HSuppDx, HSuppDy, HSuppDz);
284 TGeoVolumeAssembly* voCoilSupport =
new TGeoVolumeAssembly(
"voCoilSupport");
285 voCoilSupportV->SetLineColor(kViolet + 9);
286 voCoilSupportSq->SetLineColor(kBlue - 5);
287 voCoilSupportH->SetLineColor(kPink);
289 voCoilSupport->AddNode(voCoilSupportV, 1,
new TGeoTranslation(SqOuterDx - LxV, SqOuterDy, 0.));
290 voCoilSupport->AddNode(voCoilSupportSq, 1,
new TGeoTranslation(0., 0., 0.));
291 voCoilSupport->AddNode(voCoilSupportH, 1,
new TGeoTranslation(SqOuterDx + HSuppDx, SqOuterDy - Ly - HSuppDy, 0.));
294 TGeoVolume* voSupportHTop = gGeoManager->MakeBox(
"voSupportHTop", kMedAlu, 66.0 / 2.0, 2.0 / 2.0, 17.0 / 2.0);
295 TGeoVolume* voSupportHBot = gGeoManager->MakeBox(
"voSupportHBot", kMedAlu, 14.0 / 2.0, 2.0 / 2.0, 17.0 / 2.0);
296 TGeoVolume* voSupportVert = gGeoManager->MakeBox(
"voSupportVert", kMedAlu, 3.0 / 2.0, 25.0 / 2.0, 17.0 / 2.0);
298 TGeoVolumeAssembly* voSupportGeoRefPoint =
new TGeoVolumeAssembly(
"voSupportGeoRefPoint");
299 voSupportHTop->SetLineColor(kGreen);
300 voSupportHBot->SetLineColor(kGreen);
301 voSupportVert->SetLineColor(kGreen);
302 voSupportGeoRefPoint->AddNode(voSupportHTop, 1,
new TGeoTranslation(0.0, 28.0, 0.));
303 voSupportGeoRefPoint->AddNode(voSupportHBot, 1,
new TGeoTranslation(+33.0, 1.0, 0.));
304 voSupportGeoRefPoint->AddNode(voSupportHBot, 2,
new TGeoTranslation(-33.0, 1.0, 0.));
305 voSupportGeoRefPoint->AddNode(voSupportVert, 1,
new TGeoTranslation(+31.5, 14.5, 0.));
306 voSupportGeoRefPoint->AddNode(voSupportVert, 2,
new TGeoTranslation(-31.5, 14.5, 0.));
309 voMagnetYoke->SetLineColor(kAzure - 7);
310 voCoilH->SetLineColor(kOrange - 3);
311 voCoilV->SetLineColor(kOrange - 3);
314 voMagnet->AddNode(voMagnetYoke, 1,
new TGeoTranslation(0., 0., 0.0));
315 voMagnet->AddNode(voCoilH, 1,
new TGeoTranslation(+16.14, +29.83, 0.0));
316 voMagnet->AddNode(voCoilH, 2,
new TGeoTranslation(-16.14, +29.83, 0.0));
317 voMagnet->AddNode(voCoilH, 3,
new TGeoTranslation(+16.14, -27.43, 0.0));
318 voMagnet->AddNode(voCoilH, 4,
new TGeoTranslation(-16.14, -27.43, 0.0));
319 voMagnet->AddNode(voCoilV, 1,
new TGeoTranslation(+16.14, 1.20, +141.8));
320 voMagnet->AddNode(voCoilV, 2,
new TGeoTranslation(-16.14, 1.20, +141.8));
321 voMagnet->AddNode(voCoilV, 3,
new TGeoTranslation(+16.14, 1.20, -141.8));
322 voMagnet->AddNode(voCoilV, 4,
new TGeoTranslation(-16.14, 1.20, -141.8));
323 Double_t zGeoRef = 74.0 / 2. + SqOuterDz + 9.0 + 17.0 / 2.0;
324 voMagnet->AddNode(voSupportGeoRefPoint, 1,
new TGeoTranslation(0., 16.0, +zGeoRef));
325 voMagnet->AddNode(voSupportGeoRefPoint, 2,
new TGeoTranslation(0., 16.0, -zGeoRef));
326 Double_t zCoilSupp = 29.83 - MagCoilDy - 0.6 + SqInnerDy;
327 voMagnet->AddNode(voCoilSupport, 1,
new TGeoTranslation(+16.14, zCoilSupp, 74.0 * 0.5));
328 voMagnet->AddNode(voCoilSupport, 2,
new TGeoTranslation(+16.14, zCoilSupp, -74.0 * 0.5));
329 voMagnet->AddNode(voCoilSupport, 3,
new TGeoTranslation(+16.14, zCoilSupp, 74.0 * 1.5));
330 voMagnet->AddNode(voCoilSupport, 4,
new TGeoTranslation(+16.14, zCoilSupp, -74.0 * 1.5));
332 voMagnet->AddNode(voCoilSupport, 5,
new TGeoCombiTrans(-16.14, zCoilSupp, 74.0 * 0.5, Ry180));
333 voMagnet->AddNode(voCoilSupport, 6,
new TGeoCombiTrans(-16.14, zCoilSupp, -74.0 * 0.5, Ry180));
334 voMagnet->AddNode(voCoilSupport, 7,
new TGeoCombiTrans(-16.14, zCoilSupp, 74.0 * 1.5, Ry180));
335 voMagnet->AddNode(voCoilSupport, 8,
new TGeoCombiTrans(-16.14, zCoilSupp, -74.0 * 1.5, Ry180));
337 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