Project
Loading...
Searching...
No Matches
Dipole.cxx
Go to the documentation of this file.
1// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
2// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
3// All rights not expressly granted are reserved.
4//
5// This software is distributed under the terms of the GNU General Public
6// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
7//
8// In applying this license CERN does not waive the privileges and immunities
9// granted to it by virtue of its status as an Intergovernmental Organization
10// or submit itself to any jurisdiction.
11
15#include <TGeoArb8.h>
16#include <TGeoCompositeShape.h>
17#include <TGeoCone.h>
18#include <TGeoManager.h>
19#include <TGeoMaterial.h>
20#include <TGeoMatrix.h>
21#include <TGeoMedium.h>
22#include <TGeoPcon.h>
23#include <TGeoTube.h>
24#include <TGeoVolume.h>
25#ifdef NDEBUG
26#undef NDEBUG
27#endif
28#include <cassert>
29
30using namespace o2::passive;
31
32Dipole::~Dipole() = default;
33
34Dipole::Dipole() : PassiveBase("DIPO", "") {}
35Dipole::Dipole(const char* name, const char* Title) : PassiveBase(name, Title) {}
36Dipole::Dipole(const Dipole& rhs) = default;
37
38Dipole& Dipole::operator=(const Dipole& rhs)
39{
40 // self assignment
41 if (this == &rhs) {
42 return *this;
43 }
44
45 // base class assignment
46 PassiveBase::operator=(rhs);
47
48 return *this;
49}
50
51void Dipole::createMaterials()
52{
54
55 //
56 // Create Materials for Magnetic Dipole
57 //
58 Int_t isxfld1 = 2.;
59 Float_t sxmgmx = 10.;
61
62 Int_t isxfld2 = 2; // TODO: set this properly ((AliMagF*)TGeoGlobalMagField::Instance()->GetField())->PrecInteg();
63
64 Float_t asteel[4] = {55.847, 51.9961, 58.6934, 28.0855};
65 Float_t zsteel[4] = {26., 24., 28., 14.};
66 Float_t wsteel[4] = {.715, .18, .1, .005};
67
68 Float_t acoil[3] = {26.98, 1.01, 16.};
69 Float_t zcoil[3] = {13., 1., 8.};
70 Float_t wcoil[3] = {.66, .226, .114};
71
72 // AIR
73 Float_t aAir[4] = {12.0107, 14.0067, 15.9994, 39.948};
74 Float_t zAir[4] = {6., 7., 8., 18.};
75 Float_t wAir[4] = {0.000124, 0.755267, 0.231781, 0.012827};
76 Float_t dAir = 1.20479E-3;
77 Float_t dAir1 = 1.20479E-10;
78
79 // ****************
80 // Defines tracking media parameters.
81 // Les valeurs sont commentees pour laisser le defaut
82 // a GEANT (version 3-21, page CONS200), f.m.
83 Float_t epsil, stmin, deemax, tmaxfd, stemax;
84 epsil = .001; // Tracking precision,
85 stemax = -1.; // Maximum displacement for multiple scat
86 tmaxfd = -20.; // Maximum angle due to field deflection
87 deemax = -.3; // Maximum fractional energy loss, DLS
88 stmin = -.8;
89 // ***************
90
91 // --- Define the various materials + tracking media for GEANT ---
92 // Aluminum
93 matmgr.Material("DIPO", 9, "ALUMINIUM0", 26.98, 13., 2.7, 8.9, 37.2);
94 matmgr.Medium("DIPO", 9, "ALU_C0", 9, 0, isxfld1, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
95 matmgr.Material("DIPO", 29, "ALUMINIUM1", 26.98, 13., 2.7, 8.9, 37.2);
96 matmgr.Medium("DIPO", 29, "ALU_C1", 29, 0, isxfld1, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
97 matmgr.Material("DIPO", 49, "ALUMINIUM2", 26.98, 13., 2.7, 8.9, 37.2);
98 matmgr.Medium("DIPO", 49, "ALU_C2", 49, 0, isxfld1, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
99
100 // Air
101 matmgr.Mixture("DIPO", 15, "AIR0", aAir, zAir, dAir, 4, wAir);
102 matmgr.Mixture("DIPO", 35, "AIR1", aAir, zAir, dAir, 4, wAir);
103 matmgr.Mixture("DIPO", 55, "AIR2", aAir, zAir, dAir, 4, wAir);
104 matmgr.Mixture("DIPO", 75, "AIR_MUON", aAir, zAir, dAir, 4, wAir);
105 matmgr.Medium("DIPO", 15, "AIR_C0", 15, 0, isxfld1, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
106 matmgr.Medium("DIPO", 35, "AIR_C1", 35, 0, isxfld1, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
107 matmgr.Medium("DIPO", 55, "AIR_C2", 55, 0, isxfld1, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
108 matmgr.Medium("DIPO", 75, "AIR_MUON", 75, 0, isxfld2, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
109
110 // Vacuum
111 matmgr.Mixture("DIPO", 16, "VACUUM0", aAir, zAir, dAir1, 4, wAir);
112 matmgr.Mixture("DIPO", 36, "VACUUM1", aAir, zAir, dAir1, 4, wAir);
113 matmgr.Mixture("DIPO", 56, "VACUUM2", aAir, zAir, dAir1, 4, wAir);
114 matmgr.Medium("DIPO", 16, "VA_C0", 16, 0, isxfld1, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
115 matmgr.Medium("DIPO", 36, "VA_C1", 36, 0, isxfld1, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
116 matmgr.Medium("DIPO", 56, "VA_C2", 56, 0, isxfld1, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
117
118 // stainless Steel
119 matmgr.Mixture("DIPO", 19, "STAINLESS STEEL0$", asteel, zsteel, 7.88, 4, wsteel);
120 matmgr.Mixture("DIPO", 39, "STAINLESS STEEL1$", asteel, zsteel, 7.88, 4, wsteel);
121 matmgr.Mixture("DIPO", 59, "STAINLESS STEEL2$", asteel, zsteel, 7.88, 4, wsteel);
122 matmgr.Medium("DIPO", 19, "ST_C0", 19, 0, isxfld1, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
123 matmgr.Medium("DIPO", 39, "ST_C1", 39, 0, isxfld1, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
124 matmgr.Medium("DIPO", 59, "ST_C3", 59, 0, isxfld1, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
125
126 // Coil
127 matmgr.Mixture("DIPO", 14, "Al0", acoil, zcoil, 2.122, 3, wcoil);
128 matmgr.Mixture("DIPO", 34, "Al1", acoil, zcoil, 2.122, 3, wcoil);
129 matmgr.Mixture("DIPO", 54, "Al2", acoil, zcoil, 2.122, 3, wcoil);
130 matmgr.Medium("DIPO", 14, "Coil_C1", 14, 0, isxfld1, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
131 matmgr.Medium("DIPO", 34, "Coil_C2", 34, 0, isxfld1, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
132 matmgr.Medium("DIPO", 54, "Coil_C3", 54, 0, isxfld1, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
133}
134
136{
137 createMaterials();
138 createSpectrometerDipole();
139}
140
141#define kDegrad TMath::DegToRad()
142
143void Dipole::createSpectrometerDipole()
144{
145 // Detailed dipole geometry as built
146 //
147 // Drawing: ALIP2A__0026
148 // Geometer measurements: EDMS 596079
149 // EDMS 584963
150
151 //
152 // The top volume
153 //
154 TGeoVolume* top = gGeoManager->GetVolume("cave");
155
156 //
157 // Media
158 //
160 auto kMedSteel = matmgr.getTGeoMedium("DIPO_ST_C3");
161 auto kMedCoil = matmgr.getTGeoMedium("DIPO_Coil_C1");
162 auto kMedCoilSh = matmgr.getTGeoMedium("DIPO_Coil_C3");
163 auto kMedCable = matmgr.getTGeoMedium("DIPO_ALU_C2");
164 auto kMedAlu = matmgr.getTGeoMedium("DIPO_ALU_C2");
165 auto kMedAir = matmgr.getTGeoMedium("DIPO_AIR_MUON");
166 //
167 // Rotations
168 //
169 Float_t alhc = 0.794;
170
171 TGeoRotation* rotxz = new TGeoRotation("rotxz", 270., 0., 90., 90., 180., 0.);
172 TGeoRotation* rotiz = new TGeoRotation("rotiz", 90., 0., 90., 90., 180., 0.);
173 TGeoRotation* rotxzlhc = new TGeoRotation("rotxzlhc", 180., 180. + alhc, 0.);
174
175 TGeoRotation* rotxz108 = new TGeoRotation("rotxz108", 90., 108., 90., 198., 180., 0.);
176 TGeoRotation* rotxz180 = new TGeoRotation("rotxz180", 90., 180., 90., 270., 180., 0.);
177 TGeoRotation* rotxz288 = new TGeoRotation("rotxz288", 90., 288., 90., 18., 180., 0.);
178
179 TGeoRotation* rotxy180 = new TGeoRotation("rotxy180", 90., 180., 90., 270., 0., 0.);
180 TGeoRotation* rotxy108 = new TGeoRotation("rotxy108", 90., 108., 90., 198., 0., 0.);
181 TGeoRotation* rotxy288 = new TGeoRotation("rotxy288", 90., 288., 90., 18., 0., 0.);
182
183 TGeoRotation* rot00 = new TGeoRotation("rot00", 180., 0., 90., 151., 90., 61.);
184 TGeoRotation* rot01 = new TGeoRotation("rot01", 180., 0., 90., 29., -90., -61.);
185 TGeoRotation* rot02 = new TGeoRotation("rot02", 0., 0., 90., 151., 90., 61.);
186 TGeoRotation* rot03 = new TGeoRotation("rot03", 0., 0., 90., 29., -90., -61.);
187 TGeoRotation* rot04 = new TGeoRotation("rot04", 90., 61., 90., 151., 0., 0.);
188 TGeoRotation* rot05 = new TGeoRotation("rot05", 90., -61., 90., -151., 0., 0.);
189 TGeoRotation* rot06 = new TGeoRotation("rot06", 90., 119., 90., 209., 0., 0.);
190 TGeoRotation* rot07 = new TGeoRotation("rot07", 90., -119., 90., -209., 0., 0.);
191
192 const Float_t dipoleL = 498.;
193 const Float_t kZDipoleR = 1244.;
194 const Float_t kZDipole = kZDipoleR - dipoleL / 2.;
195 const Float_t kZDipoleF = kZDipoleR - dipoleL;
196 const Float_t yokeLength = 309.4;
197 const Float_t blockLength = yokeLength / 7.;
198 const Float_t gapWidthFront = 297.6;
199 const Float_t gapWidthRear = 395.4;
200 const Float_t dGap = (gapWidthRear - gapWidthFront) / 12.;
201 const Float_t gapHeight = 609.1;
202 const Float_t blockHeight = 145.45;
203 const Float_t dzCoil = 4.45;
204
205 Float_t dx, dy, dz;
206
207 //
208 // Mother volume for muon spectrometer tracking station 3
209
210 Float_t z30 = 825.;
211 Float_t zst = 1052.;
212
213 Float_t rcD0 = (kZDipoleF - 5.) * TMath::Tan(9. * kDegrad);
214 Float_t rcD1 = kZDipole * TMath::Tan(9. * kDegrad);
215 Float_t rcD2 = rcD1 + dipoleL / 2. * TMath::Tan(10.1 * kDegrad);
216 Float_t rc30 = z30 * TMath::Tan(9. * kDegrad);
217 Float_t rcst = rcD1 + (zst - kZDipole) * TMath::Tan(10.1 * kDegrad);
218
219 Float_t riD0 = (kZDipoleF - 5.) * TMath::Tan(2. * kDegrad) + 0.2;
220 Float_t riD1 = 28.9;
221 Float_t riD2 = 35.8;
222 Float_t riD3 = riD2 + (kZDipoleR - zst) * TMath::Tan(2. * kDegrad);
223 Float_t riD4 = riD2 + (kZDipoleR - zst + 5.) * TMath::Tan(2. * kDegrad);
224
225 TGeoPcon* shDDIP1 = new TGeoPcon("shDDIP1", 0., 360., 7);
226
227 shDDIP1->DefineSection(0, (kZDipoleF - 5.), riD0, rcD0);
228 shDDIP1->DefineSection(1, z30, riD1, rc30);
229 shDDIP1->DefineSection(2, kZDipole, riD1, rcD1);
230 shDDIP1->DefineSection(3, zst, riD1, rcst);
231 shDDIP1->DefineSection(4, zst, riD2, rcst);
232 shDDIP1->DefineSection(5, kZDipoleR, riD3, rcD2);
233 shDDIP1->DefineSection(6, (kZDipoleR + 5.), riD4, rcD2);
234
235 // JC Ch6 is 2x5cm longer than Ch5
236 // TGeoBBox* shDDIP2 = new TGeoBBox(164., 182., 36.);
237 Double_t xD0 = 162.;
238 Double_t xD1 = 171.;
239 Double_t yD0 = 182.;
240 Double_t zD0 = 36.;
241
242 Double_t xy[16] = {0};
243 xy[0] = -xD0;
244 xy[1] = -yD0;
245 xy[2] = -xD0;
246 xy[3] = yD0;
247 xy[4] = xD0;
248 xy[5] = yD0;
249 xy[6] = xD0;
250 xy[7] = -yD0;
251 xy[8] = -xD1;
252 xy[9] = -yD0;
253 xy[10] = -xD1;
254 xy[11] = yD0;
255 xy[12] = xD1;
256 xy[13] = yD0;
257 xy[14] = xD1;
258 xy[15] = -yD0;
259 TGeoArb8* shDDIP2 = new TGeoArb8(zD0, xy);
260 shDDIP2->SetName("shDDIP2");
261 TGeoTranslation* trDDIP2 = new TGeoTranslation("trDDIP2", 0., 0., kZDipole - 12.);
262 trDDIP2->RegisterYourself();
263
264 TGeoTube* shDDIP3 = new TGeoTube(0., 30., 40.);
265 shDDIP3->SetName("shDDIP3");
266
267 TGeoCompositeShape* shDDIP = new TGeoCompositeShape("shDDIP", "shDDIP1+(shDDIP2:trDDIP2-shDDIP3:trDDIP2)");
268 TGeoVolume* voDDIP = new TGeoVolume("DDIP", shDDIP, kMedAir);
269 //
270 // Yoke
271 //
272
273 TGeoVolumeAssembly* asYoke = new TGeoVolumeAssembly("DYoke");
274 // Base
275 char name[16];
276 Float_t lx0 = gapWidthFront + 2. * blockHeight;
277 Float_t lx = lx0;
278
279 TGeoVolumeAssembly* asYokeBase = new TGeoVolumeAssembly("DYokeBase");
280 for (Int_t i = 0; i < 7; i++) {
281 snprintf(name, 16, "DYokeBaseBlock%1d", i);
282 TGeoVolume* voBaseBlock =
283 new TGeoVolume(name, new TGeoBBox(lx / 2., blockHeight / 2., blockLength / 2.), kMedSteel);
284 asYokeBase->AddNode(voBaseBlock, 1, new TGeoTranslation(0., 0., Float_t(i - 3) * blockLength));
285 lx += 2. * dGap;
286 }
287
288 asYoke->AddNode(asYokeBase, 1, new TGeoTranslation(0., -(gapHeight + blockHeight) / 2., 0.));
289 asYoke->AddNode(asYokeBase, 2, new TGeoTranslation(0., +(gapHeight + blockHeight) / 2., 0.));
290
291 // Side Wall
292 TGeoVolumeAssembly* asYokeSide = new TGeoVolumeAssembly("DYokeSide");
293 TGeoVolume* voSideBlock =
294 new TGeoVolume("DSideBlock", new TGeoBBox(blockHeight / 2., gapHeight / 2., blockLength / 2.), kMedSteel);
295
296 for (Int_t i = 0; i < 7; i++) {
297 asYokeSide->AddNode(voSideBlock, i, new TGeoTranslation(Float_t(i - 3) * dGap, 0., Float_t(i - 3) * blockLength));
298 }
299
300 asYoke->AddNode(asYokeSide, 1, new TGeoTranslation(+lx0 / 2. + 3. * dGap - blockHeight / 2., 0., 0.));
301 asYoke->AddNode(asYokeSide, 2, new TGeoCombiTrans(-lx0 / 2. - 3. * dGap + blockHeight / 2., 0., 0., rotiz));
302
303 //
304 // Coils
305 //
306 Float_t coilRi = 206.;
307 Float_t coilD = 70.;
308 Float_t coilRo = coilRi + coilD;
309 Float_t coilH = 77.;
310 Float_t phiMin = -61.;
311 Float_t phiMax = 61.;
312 Float_t lengthSt = 240. + 33.9;
313 Float_t phiKnee = phiMax * kDegrad;
314 Float_t rKnee = 31.5;
315
316 // Circular sections
317 TGeoVolumeAssembly* asCoil = new TGeoVolumeAssembly("DCoil");
318
319 TGeoVolume* voDC1 = new TGeoVolume("DC1", new TGeoTubeSeg(coilRi, coilRo, coilH / 2., phiMin, phiMax), kMedCoil);
320 TGeoVolume* voDC2 =
321 new TGeoVolume("DC2", new TGeoTubeSeg(coilRi + 5., coilRo - 5., coilH / 2., phiMin, phiMax), kMedCoilSh);
322
323 voDC1->AddNode(voDC2, 1, gGeoIdentity);
324 voDC2->SetVisibility(0);
325
326 dz = lengthSt / 2. + coilH / 2. + rKnee;
327 dx = 0.;
328
329 asCoil->AddNode(voDC1, 1, new TGeoTranslation(-dx, 0., -dz));
330 asCoil->AddNode(voDC1, 2, new TGeoCombiTrans(dx, 0., -dz, rotxy180));
331 asCoil->AddNode(voDC1, 3, new TGeoTranslation(-dx, 0., dz));
332 asCoil->AddNode(voDC1, 4, new TGeoCombiTrans(dx, 0., dz, rotxz180));
333
334 // 90deg Knees
335
336 TGeoVolume* voDC11 = new TGeoVolume("DC11", new TGeoTubeSeg(rKnee, rKnee + coilH, coilD / 2., 270., 360.), kMedCoil);
337
338 dx = -TMath::Cos(phiKnee) * (coilRi + coilD / 2.);
339 dy = -TMath::Sin(phiKnee) * (coilRi + coilD / 2.);
340 dz = lengthSt / 2.;
341
342 asCoil->AddNode(voDC11, 1, new TGeoCombiTrans(dx, dy, -dz, rot00));
343 asCoil->AddNode(voDC11, 2, new TGeoCombiTrans(dx, dy, dz, rot02));
344 asCoil->AddNode(voDC11, 3, new TGeoCombiTrans(-dx, dy, -dz, rot01));
345 asCoil->AddNode(voDC11, 4, new TGeoCombiTrans(-dx, dy, dz, rot03));
346
347 TGeoVolume* voDC12 = new TGeoVolume("DC12", new TGeoTubeSeg(rKnee, rKnee + coilH, coilD / 2., 0., 90.), kMedCoil);
348
349 asCoil->AddNode(voDC12, 1, new TGeoCombiTrans(dx, -dy, -dz, rot01));
350 asCoil->AddNode(voDC12, 2, new TGeoCombiTrans(dx, -dy, dz, rot03));
351 asCoil->AddNode(voDC12, 3, new TGeoCombiTrans(-dx, -dy, -dz, rot00));
352 asCoil->AddNode(voDC12, 4, new TGeoCombiTrans(-dx, -dy, dz, rot02));
353
354 // Straight sections
355
356 TGeoVolume* voDL0 = new TGeoVolume("DL0", new TGeoBBox(coilD / 2. + 2., coilH / 2. + 2., lengthSt / 2.), kMedCoil);
357
358 TGeoVolume* voDL1 = new TGeoVolume("DL1", new TGeoBBox(coilD / 2., coilH / 2., lengthSt / 2.), kMedCoil);
359
360 TGeoVolume* voDL2 =
361 new TGeoVolume("DL2", new TGeoBBox(coilD / 2. - 5., coilH / 2. - 5., lengthSt / 2. - 5.), kMedCoilSh);
362 // Sleeves
363 TGeoVolume* voDL3 = new TGeoVolume("DL3", new TGeoBBox(1., coilH / 2., 120.), kMedAlu);
364
365 TGeoVolume* voDL4 = new TGeoVolume("DL4", new TGeoBBox(coilD / 2., 1., 120.), kMedAlu);
366
367 voDL0->SetVisibility(0);
368 voDL1->AddNode(voDL2, 1, gGeoIdentity);
369 voDL0->AddNode(voDL1, 1, gGeoIdentity);
370 voDL0->AddNode(voDL3, 1, new TGeoTranslation(-coilD / 2. - 1., 0., 0.));
371 voDL0->AddNode(voDL3, 2, new TGeoTranslation(+coilD / 2. + 1., 0., 0.));
372 voDL0->AddNode(voDL4, 1, new TGeoTranslation(0., -coilH / 2. - 1., 0.));
373 voDL0->AddNode(voDL4, 2, new TGeoTranslation(0., +coilH / 2. + 1., 0.));
374
375 dx += (rKnee + coilH / 2.) * TMath::Sin(phiKnee);
376 dy -= (rKnee + coilH / 2.) * TMath::Cos(phiKnee);
377 dz = 0.;
378
379 asCoil->AddNode(voDL0, 1, new TGeoCombiTrans(dx, dy, dz, rot04));
380 asCoil->AddNode(voDL0, 2, new TGeoCombiTrans(dx, -dy, dz, rot05));
381 asCoil->AddNode(voDL0, 3, new TGeoCombiTrans(-dx, dy, dz, rot06));
382 asCoil->AddNode(voDL0, 4, new TGeoCombiTrans(-dx, -dy, dz, rot07));
383
384 // Contactor
385 // Outer face planes
386
387 TGeoVolumeAssembly* asContactor = new TGeoVolumeAssembly("DContactor");
388 dx = -5.;
389 TGeoVolume* voDC10 = new TGeoVolume("DC10", new TGeoTubeSeg(coilRo + 5.1, coilRo + 73.5, 1., -20., 20.), kMedCable);
390 asContactor->AddNode(voDC10, 1, new TGeoTranslation(dx, 0, -32.325));
391 asContactor->AddNode(voDC10, 2, new TGeoTranslation(dx, 0, +32.325));
392
393 // Coil Support
394 //
395 Float_t sW = 83.;
396
397 TGeoVolumeAssembly* asDCoilSupport = new TGeoVolumeAssembly("DCoilSupport");
398
399 // Steel fixed to the yoke
400 TGeoVolume* voDCS01 = new TGeoVolume("DCS01", new TGeoTubeSeg(coilRo, 325., 1., 21., 51.), kMedAlu);
401
402 // Steel on the coil
403 TGeoVolume* voDCS02 = new TGeoVolume("DCS02", new TGeoTubeSeg(coilRo, coilRo + 3.125, sW / 2., 21., 51.), kMedAlu);
404 TGeoVolume* voDCS021 = new TGeoVolume(
405 "DCS021", new TGeoConeSeg(sW / 2., coilRo + 3.124, 320., coilRo + 3.125, coilRo + 5.125, 21., 21.4), kMedAlu);
406
407 // Sleeves
408 TGeoVolume* voDCS03 =
409 new TGeoVolume("DCS03", new TGeoTubeSeg(coilRi - 3.125, coilRo + 3.125, 3.125 / 2., 21., 51.), kMedAlu);
410
411 TGeoVolume* voDCS04 = new TGeoVolume("DCS04", new TGeoTubeSeg(coilRi - 3.125, coilRi, coilH / 2., 21., 51.), kMedAlu);
412
413 TGeoVolume* voDCS05 = new TGeoVolume("DCS05", new TGeoTubeSeg(coilRi - 3.125, coilRo, 3.125 / 2., 21., 51.), kMedAlu);
414 //
415 asDCoilSupport->AddNode(voDCS02, 1, new TGeoTranslation(0., 0., -(sW - coilH) / 2.));
416 asDCoilSupport->AddNode(voDCS04, 1, gGeoIdentity);
417 for (Int_t i = 0; i < 9; i++) {
418 char nameR[16];
419 snprintf(nameR, 16, "rotdcs%1d", i);
420 Float_t phi = Float_t(i) * 3.75;
421 TGeoRotation* rot = new TGeoRotation(nameR, 90., phi, 90., 90. + phi, 0., 0.);
422 asDCoilSupport->AddNode(voDCS021, i, new TGeoCombiTrans(0., 0.004, -(sW - coilH) / 2., rot));
423 }
424
425 asDCoilSupport->AddNode(voDCS01, 1, new TGeoTranslation(0., 0., -sW / 2. - (sW - coilH) / 2. - 3.125 / 2.));
426 asDCoilSupport->AddNode(voDCS03, 1, new TGeoTranslation(0., 0., +coilH / 2. + 3.125 / 2.));
427 asDCoilSupport->AddNode(voDCS05, 1, new TGeoTranslation(0., 0., -coilH / 2. - 3.125 / 2.));
428
429 //
430 // SAA1 Support: Hanger 1
431 //
432 TGeoTranslation* trHanger = new TGeoTranslation("trHanger", 0., 250., 0.);
433 trHanger->RegisterYourself();
434
435 Float_t rmin1, rmin2, rmax1, rmax2;
436
437 Float_t zHanger1 = 811.9;
438 TGeoBBox* shHanger11 = new TGeoBBox(2.5 / 2., 250., 25. / 2.);
439 shHanger11->SetName("shHanger11");
440
441 rmin1 = (zHanger1 - 13.) * TMath::Tan(2. * kDegrad);
442 rmin2 = rmin1 + 26. * TMath::Tan(2.0 * kDegrad);
443
444 rmax1 = (zHanger1 - 13.) * TMath::Tan(9. * kDegrad);
445 rmax2 = rmax1 + 26. * TMath::Tan(9. * kDegrad);
446
447 TGeoCone* shHanger12 = new TGeoCone(13., rmin1, rmax1, rmin2, rmax2);
448 shHanger12->SetName("shHanger12");
449 TGeoCompositeShape* shHanger1 = new TGeoCompositeShape("shHanger1", "shHanger12*shHanger11:trHanger");
450 TGeoVolume* voHanger1 = new TGeoVolume("DHanger1", shHanger1, kMedSteel);
451 //
452 // SAA1 Support: Hanger 2
453 //
454 Float_t zHanger2 = 1171.9;
455 TGeoBBox* shHanger21 = new TGeoBBox(3.5 / 2., 250., 25. / 2.);
456 shHanger21->SetName("shHanger21");
457
458 rmin1 = 35.8 + (zHanger2 - 13. - zst) * TMath::Tan(2. * kDegrad);
459 rmin2 = rmin1 + 26. * TMath::Tan(2.0 * kDegrad);
460
461 rmax1 = rcD1 + (zHanger2 - 13. - kZDipole) * TMath::Tan(10.1 * kDegrad);
462 rmax2 = rmax1 + 26. * TMath::Tan(10.1 * kDegrad);
463 TGeoCone* shHanger22 = new TGeoCone(13., rmin1, rmax1, rmin2, rmax2);
464 shHanger22->SetName("shHanger22");
465
466 TGeoCompositeShape* shHanger2 = new TGeoCompositeShape("shHanger2", "shHanger22*shHanger21:trHanger");
467
468 TGeoVolume* voHanger2 = new TGeoVolume("DHanger2", shHanger2, kMedSteel);
469 //
470 // Hanger support
471 Float_t hsLength = yokeLength + (zHanger2 - kZDipole - yokeLength / 2.) + 25. / 2.;
472
473 TGeoVolume* voHS1 = new TGeoVolume("DHS1", new TGeoBBox(1.5, 12.5, hsLength / 2.), kMedSteel);
474 TGeoVolume* voHS2 = new TGeoVolume("DHS2", new TGeoBBox(12.5, 1.5, hsLength / 2.), kMedSteel);
475 Float_t hsH = gapHeight / 2. + blockHeight - (rmax1 + rmax2) / 2. - 2.;
476
477 TGeoVolume* voHS3 = new TGeoVolume("DHS3", new TGeoBBox(3.5 / 2., hsH / 2., 25. / 2.), kMedSteel);
478
479 TGeoVolumeAssembly* asHS = new TGeoVolumeAssembly("asHS");
480 asHS->AddNode(voHS1, 1, gGeoIdentity);
481 asHS->AddNode(voHS2, 1, new TGeoTranslation(0., +14., 0.));
482 asHS->AddNode(voHS2, 2, new TGeoTranslation(0., -14., 0.));
483 asHS->AddNode(voHS3, 1, new TGeoTranslation(0., -hsH / 2. - 14. - 1.5, hsLength / 2. - 25. / 2.));
484
485 dz = zHanger1;
486 voDDIP->AddNode(voHanger1, 1, new TGeoTranslation(0., 0., dz));
487
488 dz = zHanger2;
489 voDDIP->AddNode(voHanger2, 1, new TGeoTranslation(0., 0., dz));
490
491 // Assembly everything
492
493 TGeoVolumeAssembly* asDipole = new TGeoVolumeAssembly("Dipole");
494 // Yoke
495 asDipole->AddNode(asYoke, 1, new TGeoTranslation(0., 0., -dzCoil));
496 asDipole->AddNode(asCoil, 1, gGeoIdentity);
497 // Contactor
498 dz = lengthSt / 2. + coilH / 2. + rKnee;
499 asDipole->AddNode(asContactor, 1, new TGeoTranslation(0., 0., dz + dzCoil));
500 asDipole->AddNode(asContactor, 2, new TGeoCombiTrans(0., 0., dz - dzCoil, rotxy180));
501 // Coil support
502 asDipole->AddNode(asDCoilSupport, 1, new TGeoTranslation(0., 0., dz));
503 asDipole->AddNode(asDCoilSupport, 2, new TGeoCombiTrans(0., 0., dz, rotxy180));
504 asDipole->AddNode(asDCoilSupport, 3, new TGeoCombiTrans(0., 0., dz, rotxy108));
505 asDipole->AddNode(asDCoilSupport, 4, new TGeoCombiTrans(0., 0., dz, rotxy288));
506
507 asDipole->AddNode(asDCoilSupport, 5, new TGeoCombiTrans(0., 0., -dz, rotiz));
508 asDipole->AddNode(asDCoilSupport, 6, new TGeoCombiTrans(0., 0., -dz, rotxz108));
509 asDipole->AddNode(asDCoilSupport, 7, new TGeoCombiTrans(0., 0., -dz, rotxz180));
510 asDipole->AddNode(asDCoilSupport, 8, new TGeoCombiTrans(0., 0., -dz, rotxz288));
511
512 // Hanger (Support)
513 dy = gapHeight / 2. + blockHeight + 14.;
514
515 asDipole->AddNode(asHS, 1,
516 new TGeoTranslation(0., dy + 1.5, ((zHanger2 - kZDipole - yokeLength / 2.) + 25. / 2.) / 2.));
517
518 asDipole->SetVisContainers(1);
519 voDDIP->SetVisibility(0);
520
521 top->AddNode(asDipole, 1, new TGeoCombiTrans(0., dipoleL / 2. * TMath::Tan(alhc * kDegrad), -kZDipole, rotxzlhc));
522 top->AddNode(voDDIP, 1, new TGeoCombiTrans(0., 0., 0., rotxz));
523}
524
525FairModule* Dipole::CloneModule() const { return new Dipole(*this); }
Definition of the Detector class.
#define kDegrad
int32_t i
ClassImp(IdPath)
static void initFieldTrackingParams(int &mode, float &maxfield)
Definition Detector.cxx:143
static MaterialManager & Instance()
FairModule * CloneModule() const override
Clone this object (used in MT mode only)
Definition Dipole.cxx:525
void ConstructGeometry() override
Definition Dipole.cxx:135
a common base class for passive modules - implementing generic functions
Definition PassiveBase.h:24
GLdouble GLdouble GLdouble GLdouble top
Definition glcorearb.h:4077
GLuint const GLchar * name
Definition glcorearb.h:781