BmnRoot 26.10.0-18-g4e3414f9
Software framework of the BM@N experiment
Loading...
Searching...
No Matches
magnet.C
Go to the documentation of this file.
1/* This file was automatically created using gGeoManager->Export("magnet.C"),
2followed by some manual adjustments: Preserve existing geometry manager, sup-
3plement top assembly volume, add file output in the end.
4The original source of this geometry had been written in GDML for GEANT and
5transferred to ROOT using VGM. */
6void magnet()
7{
8 gSystem->Load("libGeom");
9 TGeoManager* OldGeo = NULL;
10 if (gROOT->GetListOfGlobals()->FindObject("gGeoManager")) {
11 OldGeo = gGeoManager;
12 gGeoManager = NULL;
13 printf("Preserving existing gGeoManager.\n");
14 }
15 new TGeoManager("magnet geometry", "temporary geometry manager for magnet");
16
17 Double_t dx, dy, dz;
18 Double_t dx1, dx2, dy1, dy2;
19 Double_t vert[20], par[20];
20 Double_t theta, phi, h1, bl1, tl1, alpha1, h2, bl2, tl2, alpha2;
21 Double_t twist;
22 Double_t origin[3];
23 Double_t rmin, rmax, rmin1, rmax1, rmin2, rmax2;
24 Double_t r, rlo, rhi;
25 Double_t phi1, phi2;
26 Double_t a, b;
27 Double_t point[3], norm[3];
28 Double_t rin, stin, rout, stout;
29 Double_t thx, phx, thy, phy, thz, phz;
30 Double_t alpha, theta1, theta2, phi1, phi2, dphi;
31 Double_t tr[3], rot[9];
32 Double_t z, density, radl, absl, w;
33 Double_t lx, ly, lz, tx, ty, tz;
34 Double_t xvert[50], yvert[50];
35 Double_t zsect, x0, y0, scale0;
36 Int_t nel, numed, nz, nedges, nvert;
37 TGeoBoolNode* pBoolNode = 0;
38
39 // MATERIALS, MIXTURES AND TRACKING MEDIA
40 // Mixture: air
41 nel = 4;
42 density = 0.001205;
43 pMat6 = new TGeoMixture("air", nel, density);
44 a = 12.010736;
45 z = 6.000000;
46 w = 0.000124; // C
47 pMat6->DefineElement(0, a, z, w);
48 a = 14.006769;
49 z = 7.000000;
50 w = 0.755268; // N
51 pMat6->DefineElement(1, a, z, w);
52 a = 15.999390;
53 z = 8.000000;
54 w = 0.231781; // O
55 pMat6->DefineElement(2, a, z, w);
56 a = 39.947693;
57 z = 18.000000;
58 w = 0.012827; // AR
59 pMat6->DefineElement(3, a, z, w);
60 pMat6->SetIndex(5);
61 // Medium: air
62 numed = 5; // medium number
63 par[0] = 0.000000; // isvol
64 par[1] = 0.000000; // ifield
65 par[2] = 0.000000; // fieldm
66 par[3] = 0.000000; // tmaxfd
67 par[4] = 0.000000; // stemax
68 par[5] = 0.000000; // deemax
69 par[6] = 0.000000; // epsil
70 par[7] = 0.000000; // stmin
71 pMed6 = new TGeoMedium("air", numed, pMat6, par);
72 // Mixture: steel
73 nel = 5;
74 density = 8.020000;
75 pMat5 = new TGeoMixture("steel", nel, density);
76 a = 54.938000;
77 z = 25.000000;
78 w = 0.020000; // MN
79 pMat5->DefineElement(0, a, z, w);
80 a = 28.085361;
81 z = 14.000000;
82 w = 0.010000; // SI
83 pMat5->DefineElement(1, a, z, w);
84 a = 51.996130;
85 z = 24.000000;
86 w = 0.190000; // CR
87 pMat5->DefineElement(2, a, z, w);
88 a = 58.693325;
89 z = 28.000000;
90 w = 0.100000; // NI
91 pMat5->DefineElement(3, a, z, w);
92 a = 55.845111;
93 z = 26.000000;
94 w = 0.680000; // FE
95 pMat5->DefineElement(4, a, z, w);
96 pMat5->SetIndex(4);
97 // Medium: steel
98 numed = 4; // medium number
99 par[0] = 0.000000; // isvol
100 par[1] = 0.000000; // ifield
101 par[2] = 0.000000; // fieldm
102 par[3] = 0.000000; // tmaxfd
103 par[4] = 0.000000; // stemax
104 par[5] = 0.000000; // deemax
105 par[6] = 0.000000; // epsil
106 par[7] = 0.000000; // stmin
107 pMed5 = new TGeoMedium("steel", numed, pMat5, par);
108 // Material: iron
109 a = 55.845111;
110 z = 26.000000;
111 density = 7.874000;
112 radl = 1.756670;
113 absl = 16.958893;
114 pMat1 = new TGeoMaterial("iron", a, z, density, radl, absl);
115 pMat1->SetIndex(0);
116 // Medium: iron
117 numed = 0; // medium number
118 par[0] = 0.000000; // isvol
119 par[1] = 0.000000; // ifield
120 par[2] = 0.000000; // fieldm
121 par[3] = 0.000000; // tmaxfd
122 par[4] = 0.000000; // stemax
123 par[5] = 0.000000; // deemax
124 par[6] = 0.000000; // epsil
125 par[7] = 0.000000; // stmin
126 pMed1 = new TGeoMedium("iron", numed, pMat1, par);
127 // Material: copper
128 a = 63.545645;
129 z = 29.000000;
130 density = 8.960000;
131 radl = 1.435156;
132 absl = 15.514134;
133 pMat2 = new TGeoMaterial("copper", a, z, density, radl, absl);
134 pMat2->SetIndex(1);
135 // Medium: copper
136 numed = 1; // medium number
137 par[0] = 0.000000; // isvol
138 par[1] = 0.000000; // ifield
139 par[2] = 0.000000; // fieldm
140 par[3] = 0.000000; // tmaxfd
141 par[4] = 0.000000; // stemax
142 par[5] = 0.000000; // deemax
143 par[6] = 0.000000; // epsil
144 par[7] = 0.000000; // stmin
145 pMed2 = new TGeoMedium("copper", numed, pMat2, par);
146
147 // TRANSFORMATION MATRICES
148 // Combi transformation:
149 dx = 0.000000;
150 dy = 0.000000;
151 dz = 0.000000;
152 // Rotation:
153 thx = 90.000000;
154 phx = 0.000000;
155 thy = 90.000000;
156 phy = 90.000000;
157 thz = 0.000000;
158 phz = 0.000000;
159 TGeoRotation* pMatrix9 = new TGeoRotation("", thx, phx, thy, phy, thz, phz);
160 pMatrix8 = new TGeoCombiTrans("", dx, dy, dz, pMatrix9);
161 // Combi transformation:
162 dx = 0.000000;
163 dy = 85.500000;
164 dz = 0.000000;
165 // Rotation:
166 thx = 90.000000;
167 phx = 0.000000;
168 thy = 90.000000;
169 phy = 90.000000;
170 thz = 0.000000;
171 phz = 0.000000;
172 TGeoRotation* pMatrix11 = new TGeoRotation("", thx, phx, thy, phy, thz, phz);
173 pMatrix10 = new TGeoCombiTrans("", dx, dy, dz, pMatrix11);
174 // Combi transformation:
175 dx = 0.000000;
176 dy = -85.500000;
177 dz = 0.000000;
178 // Rotation:
179 thx = 90.000000;
180 phx = 0.000000;
181 thy = 90.000000;
182 phy = 90.000000;
183 thz = 0.000000;
184 phz = 0.000000;
185 TGeoRotation* pMatrix13 = new TGeoRotation("", thx, phx, thy, phy, thz, phz);
186 pMatrix12 = new TGeoCombiTrans("", dx, dy, dz, pMatrix13);
187 // Combi transformation:
188 dx = 79.600000;
189 dy = -85.000000;
190 dz = -122.100000;
191 // Rotation:
192 thx = 90.000000;
193 phx = 0.000000;
194 thy = 180.000000;
195 phy = 0.000000;
196 thz = 90.000000;
197 phz = 90.000000;
198 TGeoRotation* pMatrix15 = new TGeoRotation("", thx, phx, thy, phy, thz, phz);
199 pMatrix14 = new TGeoCombiTrans("", dx, dy, dz, pMatrix15);
200 // Combi transformation:
201 dx = 0.000000;
202 dy = 0.000000;
203 dz = 0.000000;
204 // Rotation:
205 thx = 90.000000;
206 phx = 0.000000;
207 thy = 90.000000;
208 phy = 90.000000;
209 thz = 0.000000;
210 phz = 0.000000;
211 TGeoRotation* pMatrix47 = new TGeoRotation("", thx, phx, thy, phy, thz, phz);
212 pMatrix46 = new TGeoCombiTrans("", dx, dy, dz, pMatrix47);
213 // Combi transformation:
214 dx = -79.600000;
215 dy = -85.000000;
216 dz = -122.100000;
217 // Rotation:
218 thx = 90.000000;
219 phx = 180.000000;
220 thy = 180.000000;
221 phy = 0.000000;
222 thz = 90.000000;
223 phz = 270.000000;
224 TGeoRotation* pMatrix17 = new TGeoRotation("", thx, phx, thy, phy, thz, phz);
225 pMatrix16 = new TGeoCombiTrans("", dx, dy, dz, pMatrix17);
226 // Combi transformation:
227 dx = 0.000000;
228 dy = -85.000000;
229 dz = -202.100000;
230 // Rotation:
231 thx = 90.000000;
232 phx = 0.000000;
233 thy = 90.000000;
234 phy = 90.000000;
235 thz = 0.000000;
236 phz = 0.000000;
237 TGeoRotation* pMatrix19 = new TGeoRotation("", thx, phx, thy, phy, thz, phz);
238 pMatrix18 = new TGeoCombiTrans("", dx, dy, dz, pMatrix19);
239 // Combi transformation:
240 dx = 0.000000;
241 dy = 0.000000;
242 dz = 0.000000;
243 // Rotation:
244 thx = 90.000000;
245 phx = 0.000000;
246 thy = 90.000000;
247 phy = 90.000000;
248 thz = 0.000000;
249 phz = 0.000000;
250 TGeoRotation* pMatrix49 = new TGeoRotation("", thx, phx, thy, phy, thz, phz);
251 pMatrix48 = new TGeoCombiTrans("", dx, dy, dz, pMatrix49);
252 // Combi transformation:
253 dx = -159.600000;
254 dy = -85.000000;
255 dz = 0.000000;
256 // Rotation:
257 thx = 90.000000;
258 phx = 0.000000;
259 thy = 90.000000;
260 phy = 90.000000;
261 thz = 0.000000;
262 phz = 0.000000;
263 TGeoRotation* pMatrix21 = new TGeoRotation("", thx, phx, thy, phy, thz, phz);
264 pMatrix20 = new TGeoCombiTrans("", dx, dy, dz, pMatrix21);
265 // Combi transformation:
266 dx = 0.000000;
267 dy = 0.000000;
268 dz = 0.000000;
269 // Rotation:
270 thx = 90.000000;
271 phx = 0.000000;
272 thy = 90.000000;
273 phy = 90.000000;
274 thz = 0.000000;
275 phz = 0.000000;
276 TGeoRotation* pMatrix51 = new TGeoRotation("", thx, phx, thy, phy, thz, phz);
277 pMatrix50 = new TGeoCombiTrans("", dx, dy, dz, pMatrix51);
278 // Combi transformation:
279 dx = 79.600000;
280 dy = -85.000000;
281 dz = 122.100000;
282 // Rotation:
283 thx = 90.000000;
284 phx = 0.000000;
285 thy = 0.000000;
286 phy = 0.000000;
287 thz = 90.000000;
288 phz = 270.000000;
289 TGeoRotation* pMatrix23 = new TGeoRotation("", thx, phx, thy, phy, thz, phz);
290 pMatrix22 = new TGeoCombiTrans("", dx, dy, dz, pMatrix23);
291 // Combi transformation:
292 dx = -79.600000;
293 dy = -85.000000;
294 dz = 122.100000;
295 // Rotation:
296 thx = 90.000000;
297 phx = 180.000000;
298 thy = 0.000000;
299 phy = 0.000000;
300 thz = 90.000000;
301 phz = 90.000000;
302 TGeoRotation* pMatrix25 = new TGeoRotation("", thx, phx, thy, phy, thz, phz);
303 pMatrix24 = new TGeoCombiTrans("", dx, dy, dz, pMatrix25);
304 // Combi transformation:
305 dx = 0.000000;
306 dy = -85.000000;
307 dz = 202.100000;
308 // Rotation:
309 thx = 90.000000;
310 phx = 0.000000;
311 thy = 90.000000;
312 phy = 90.000000;
313 thz = 0.000000;
314 phz = 0.000000;
315 TGeoRotation* pMatrix27 = new TGeoRotation("", thx, phx, thy, phy, thz, phz);
316 pMatrix26 = new TGeoCombiTrans("", dx, dy, dz, pMatrix27);
317 // Combi transformation:
318 dx = 159.600000;
319 dy = -85.000000;
320 dz = 0.000000;
321 // Rotation:
322 thx = 90.000000;
323 phx = 0.000000;
324 thy = 90.000000;
325 phy = 90.000000;
326 thz = 0.000000;
327 phz = 0.000000;
328 TGeoRotation* pMatrix29 = new TGeoRotation("", thx, phx, thy, phy, thz, phz);
329 pMatrix28 = new TGeoCombiTrans("", dx, dy, dz, pMatrix29);
330 // Combi transformation:
331 dx = 79.600000;
332 dy = 85.000000;
333 dz = -122.100000;
334 // Rotation:
335 thx = 90.000000;
336 phx = 0.000000;
337 thy = 180.000000;
338 phy = 0.000000;
339 thz = 90.000000;
340 phz = 90.000000;
341 TGeoRotation* pMatrix31 = new TGeoRotation("", thx, phx, thy, phy, thz, phz);
342 pMatrix30 = new TGeoCombiTrans("", dx, dy, dz, pMatrix31);
343 // Combi transformation:
344 dx = -79.600000;
345 dy = 85.000000;
346 dz = -122.100000;
347 // Rotation:
348 thx = 90.000000;
349 phx = 180.000000;
350 thy = 180.000000;
351 phy = 0.000000;
352 thz = 90.000000;
353 phz = 270.000000;
354 TGeoRotation* pMatrix33 = new TGeoRotation("", thx, phx, thy, phy, thz, phz);
355 pMatrix32 = new TGeoCombiTrans("", dx, dy, dz, pMatrix33);
356 // Combi transformation:
357 dx = 0.000000;
358 dy = 85.000000;
359 dz = -202.100000;
360 // Rotation:
361 thx = 90.000000;
362 phx = 0.000000;
363 thy = 90.000000;
364 phy = 90.000000;
365 thz = 0.000000;
366 phz = 0.000000;
367 TGeoRotation* pMatrix35 = new TGeoRotation("", thx, phx, thy, phy, thz, phz);
368 pMatrix34 = new TGeoCombiTrans("", dx, dy, dz, pMatrix35);
369 // Combi transformation:
370 dx = -159.600000;
371 dy = 85.000000;
372 dz = 0.000000;
373 // Rotation:
374 thx = 90.000000;
375 phx = 0.000000;
376 thy = 90.000000;
377 phy = 90.000000;
378 thz = 0.000000;
379 phz = 0.000000;
380 TGeoRotation* pMatrix37 = new TGeoRotation("", thx, phx, thy, phy, thz, phz);
381 pMatrix36 = new TGeoCombiTrans("", dx, dy, dz, pMatrix37);
382 // Combi transformation:
383 dx = 79.600000;
384 dy = 85.000000;
385 dz = 122.100000;
386 // Rotation:
387 thx = 90.000000;
388 phx = 0.000000;
389 thy = 0.000000;
390 phy = 0.000000;
391 thz = 90.000000;
392 phz = 270.000000;
393 TGeoRotation* pMatrix39 = new TGeoRotation("", thx, phx, thy, phy, thz, phz);
394 pMatrix38 = new TGeoCombiTrans("", dx, dy, dz, pMatrix39);
395 // Combi transformation:
396 dx = -79.600000;
397 dy = 85.000000;
398 dz = 122.100000;
399 // Rotation:
400 thx = 90.000000;
401 phx = 180.000000;
402 thy = 0.000000;
403 phy = 0.000000;
404 thz = 90.000000;
405 phz = 90.000000;
406 TGeoRotation* pMatrix41 = new TGeoRotation("", thx, phx, thy, phy, thz, phz);
407 pMatrix40 = new TGeoCombiTrans("", dx, dy, dz, pMatrix41);
408 // Combi transformation:
409 dx = 0.000000;
410 dy = 85.000000;
411 dz = 202.100000;
412 // Rotation:
413 thx = 90.000000;
414 phx = 0.000000;
415 thy = 90.000000;
416 phy = 90.000000;
417 thz = 0.000000;
418 phz = 0.000000;
419 TGeoRotation* pMatrix43 = new TGeoRotation("", thx, phx, thy, phy, thz, phz);
420 pMatrix42 = new TGeoCombiTrans("", dx, dy, dz, pMatrix43);
421 // Combi transformation:
422 dx = 159.600000;
423 dy = 85.000000;
424 dz = 0.000000;
425 // Rotation:
426 thx = 90.000000;
427 phx = 0.000000;
428 thy = 90.000000;
429 phy = 90.000000;
430 thz = 0.000000;
431 phz = 0.000000;
432 TGeoRotation* pMatrix45 = new TGeoRotation("", thx, phx, thy, phy, thz, phz);
433 pMatrix44 = new TGeoCombiTrans("", dx, dy, dz, pMatrix45);
434 // Shape: big_box type: TGeoBBox
435 dx = 350.000000;
436 dy = 224.000000;
437 dz = 257.100000;
438 TGeoTranslation* MagPos_trans = new TGeoTranslation("MagPos_trans", 0.0, 0.0, 124.5);
439
440 TGeoShape* pbig_box_1 = new TGeoBBox("big_box", dx, dy, dz);
441 TGeoBBox* EmptyHoleS = new TGeoBBox("EmptyHoleS", 225.0, 120.0, 300.0);
442 TGeoCompositeShape* ModifiedTopVolumeS = new TGeoCompositeShape("magnet_total", "big_box-EmptyHoleS");
443
444 // Volume: magnet
445 TGeoVolumeAssembly* top_assembly = new TGeoVolumeAssembly("top_magnet");
446 pmagnet_1f48cf0 = new TGeoVolume("magnet", ModifiedTopVolumeS, pMed6);
447 pmagnet_1f48cf0->SetVisLeaves(kTRUE);
448
449 // SET TOP VOLUME OF GEOMETRY
450 // gGeoManager->SetTopVolume(pmagnet_1f48cf0);
451 gGeoManager->SetTopVolume(top_assembly);
452 top_assembly->AddNode(pmagnet_1f48cf0, 0, MagPos_trans);
453
454 // SHAPES, VOLUMES AND GEOMETRICAL HIERARCHY
455 // Shape: yoke_1 type: TGeoBBox
456 dx = 350.000000;
457 dy = 224.000000;
458 dz = 130.000000;
459 TGeoShape* pyoke_1_2 = new TGeoBBox("yoke_1", dx, dy, dz);
460 // Shape: yoke_2 type: TGeoPara
461 dx = 433.138439;
462 dy = 375.108891;
463 dz = 130.050000;
464 alpha = 30.000000;
465 theta = 0.000000;
466 phi = 0.000000;
467 TGeoShape* pyoke_2_3 = new TGeoPara("yoke_2", dx, dy, dz, alpha, theta, phi);
468 // Combi transformation:
469 dx = 0.000000;
470 dy = 0.000000;
471 dz = 0.000000;
472 // Rotation:
473 thx = 90.000000;
474 phx = 60.000000;
475 thy = 90.000000;
476 phy = 150.000000;
477 thz = 0.000000;
478 phz = 0.000000;
479 TGeoRotation* pMatrix3 = new TGeoRotation("", thx, phx, thy, phy, thz, phz);
480 pMatrix2 = new TGeoCombiTrans("", dx, dy, dz, pMatrix3);
481 pBoolNode = new TGeoIntersection(pyoke_1_2, pyoke_2_3, 0, pMatrix2);
482 // Shape: yoke_12 type: TGeoCompositeShape
483 TGeoShape* pyoke_12_4 = new TGeoCompositeShape("yoke_12", pBoolNode);
484 // Shape: inner_space type: TGeoBBox
485 dx = 230.000000;
486 dy = 115.000000;
487 dz = 130.050000;
488 TGeoShape* pinner_space_5 = new TGeoBBox("inner_space", dx, dy, dz);
489 // Combi transformation:
490 dx = 0.000000;
491 dy = 0.000000;
492 dz = 0.000000;
493 // Rotation:
494 thx = 90.000000;
495 phx = 0.000000;
496 thy = 90.000000;
497 phy = 90.000000;
498 thz = 0.000000;
499 phz = 0.000000;
500 TGeoRotation* pMatrix5 = new TGeoRotation("", thx, phx, thy, phy, thz, phz);
501 pMatrix4 = new TGeoCombiTrans("", dx, dy, dz, pMatrix5);
502 pBoolNode = new TGeoSubtraction(pyoke_12_4, pinner_space_5, 0, pMatrix4);
503 // Shape: yoke_120 type: TGeoCompositeShape
504 TGeoShape* pyoke_120_6 = new TGeoCompositeShape("yoke_120", pBoolNode);
505 // Volume: iron_yoke
506 piron_yoke_1f98e60 = new TGeoVolume("iron_yoke", pyoke_120_6, pMed5);
507 piron_yoke_1f98e60->SetVisLeaves(kTRUE);
508 pmagnet_1f48cf0->AddNode(piron_yoke_1f98e60, 0, pMatrix8);
509 // Shape: pole_1 type: TGeoBBox
510 dx = 84.000000;
511 dy = 29.500000;
512 dz = 124.500000;
513 TGeoShape* ppole_1_7 = new TGeoBBox("pole_1", dx, dy, dz);
514 // Shape: pole_2 type: TGeoBBox
515 dx = 126.218560;
516 dy = 29.550000;
517 dz = 126.218560;
518 TGeoShape* ppole_2_8 = new TGeoBBox("pole_2", dx, dy, dz);
519 // Combi transformation:
520 dx = 0.000000;
521 dy = 0.000000;
522 dz = 0.000000;
523 // Rotation:
524 thx = 135.000000;
525 phx = 0.000000;
526 thy = 90.000000;
527 phy = 90.000000;
528 thz = 45.000000;
529 phz = 0.000000;
530 TGeoRotation* pMatrix7 = new TGeoRotation("", thx, phx, thy, phy, thz, phz);
531 pMatrix6 = new TGeoCombiTrans("", dx, dy, dz, pMatrix7);
532 pBoolNode = new TGeoIntersection(ppole_1_7, ppole_2_8, 0, pMatrix6);
533 // Shape: pole_12 type: TGeoCompositeShape
534 TGeoShape* ppole_12_9 = new TGeoCompositeShape("pole_12", pBoolNode);
535 // Volume: pole
536 ppole_1fa6ca0 = new TGeoVolume("pole", ppole_12_9, pMed1);
537 ppole_1fa6ca0->SetVisLeaves(kTRUE);
538 pmagnet_1f48cf0->AddNode(ppole_1fa6ca0, 0, pMatrix10);
539 pmagnet_1f48cf0->AddNode(ppole_1fa6ca0, 0, pMatrix12);
540 // Shape: coil_container_curve type: TGeoTubeSeg
541 rmin = 25.000000;
542 rmax = 135.000000;
543 dz = 25.000000;
544 phi1 = 0.000000;
545 phi2 = 90.000000;
546 TGeoShape* pcoil_container_curve_10 = new TGeoTubeSeg("coil_container_curve", rmin, rmax, dz, phi1, phi2);
547 // Volume: coil_container_corner
548 pcoil_container_corner_1fa6fb0 = new TGeoVolume("coil_container_corner", pcoil_container_curve_10, pMed5);
549 pcoil_container_corner_1fa6fb0->SetVisLeaves(kTRUE);
550 pmagnet_1f48cf0->AddNode(pcoil_container_corner_1fa6fb0, 0, pMatrix14);
551 pmagnet_1f48cf0->AddNode(pcoil_container_corner_1fa6fb0, 0, pMatrix16);
552 // Shape: coil_container_side_1 type: TGeoBBox
553 dx = 79.600000;
554 dy = 25.000000;
555 dz = 55.000000;
556 TGeoShape* pcoil_container_side_1_12 = new TGeoBBox("coil_container_side_1", dx, dy, dz);
557 // Volume: coil_container_short
558 pcoil_container_short_1fac210 = new TGeoVolume("coil_container_short", pcoil_container_side_1_12, pMed5);
559 pcoil_container_short_1fac210->SetVisLeaves(kTRUE);
560 pmagnet_1f48cf0->AddNode(pcoil_container_short_1fac210, 0, pMatrix18);
561 // Shape: coil_container_side_2 type: TGeoBBox
562 dx = 55.000000;
563 dy = 25.000000;
564 dz = 122.100000;
565 TGeoShape* pcoil_container_side_2_14 = new TGeoBBox("coil_container_side_2", dx, dy, dz);
566 // Volume: coil_container_long
567 pcoil_container_long_1fac770 = new TGeoVolume("coil_container_long", pcoil_container_side_2_14, pMed5);
568 pcoil_container_long_1fac770->SetVisLeaves(kTRUE);
569 pmagnet_1f48cf0->AddNode(pcoil_container_long_1fac770, 0, pMatrix20);
570 pmagnet_1f48cf0->AddNode(pcoil_container_corner_1fa6fb0, 0, pMatrix22);
571 pmagnet_1f48cf0->AddNode(pcoil_container_corner_1fa6fb0, 0, pMatrix24);
572 pmagnet_1f48cf0->AddNode(pcoil_container_short_1fac210, 0, pMatrix26);
573 pmagnet_1f48cf0->AddNode(pcoil_container_long_1fac770, 0, pMatrix28);
574 pmagnet_1f48cf0->AddNode(pcoil_container_corner_1fa6fb0, 0, pMatrix30);
575 pmagnet_1f48cf0->AddNode(pcoil_container_corner_1fa6fb0, 0, pMatrix32);
576 pmagnet_1f48cf0->AddNode(pcoil_container_short_1fac210, 0, pMatrix34);
577 pmagnet_1f48cf0->AddNode(pcoil_container_long_1fac770, 0, pMatrix36);
578 pmagnet_1f48cf0->AddNode(pcoil_container_corner_1fa6fb0, 0, pMatrix38);
579 pmagnet_1f48cf0->AddNode(pcoil_container_corner_1fa6fb0, 0, pMatrix40);
580 pmagnet_1f48cf0->AddNode(pcoil_container_short_1fac210, 0, pMatrix42);
581 pmagnet_1f48cf0->AddNode(pcoil_container_long_1fac770, 0, pMatrix44);
582 // Shape: coil_curve type: TGeoTubeSeg
583 rmin = 25.200000;
584 rmax = 134.800000;
585 dz = 24.800000;
586 phi1 = 0.000000;
587 phi2 = 90.000000;
588 TGeoShape* pcoil_curve_11 = new TGeoTubeSeg("coil_curve", rmin, rmax, dz, phi1, phi2);
589 // Volume: coil_corner
590 pcoil_corner_1fa71c0 = new TGeoVolume("coil_corner", pcoil_curve_11, pMed2);
591 pcoil_corner_1fa71c0->SetVisLeaves(kTRUE);
592 pcoil_container_corner_1fa6fb0->AddNode(pcoil_corner_1fa71c0, 0, pMatrix46);
593 // Shape: coil_side_1 type: TGeoBBox
594 dx = 79.600000;
595 dy = 24.800000;
596 dz = 54.800000;
597 TGeoShape* pcoil_side_1_13 = new TGeoBBox("coil_side_1", dx, dy, dz);
598 // Volume: coil_short
599 pcoil_short_1fac4a0 = new TGeoVolume("coil_short", pcoil_side_1_13, pMed2);
600 pcoil_short_1fac4a0->SetVisLeaves(kTRUE);
601 pcoil_container_short_1fac210->AddNode(pcoil_short_1fac4a0, 0, pMatrix48);
602 // Shape: coil_side_2 type: TGeoBBox
603 dx = 54.800000;
604 dy = 24.800000;
605 dz = 122.100000;
606 TGeoShape* pcoil_side_2_15 = new TGeoBBox("coil_side_2", dx, dy, dz);
607 // Volume: coil_long
608 pcoil_long_1faca00 = new TGeoVolume("coil_long", pcoil_side_2_15, pMed2);
609 pcoil_long_1faca00->SetVisLeaves(kTRUE);
610 pcoil_container_long_1fac770->AddNode(pcoil_long_1faca00, 0, pMatrix50);
611
612 // CLOSE GEOMETRY
613 gGeoManager->CloseGeometry();
614 TFile f("magnet.root", "RECREATE");
615 if (!f.IsZombie()) {
616 top_assembly->Write();
617 f.Close();
618 }
619 if (OldGeo) {
620 delete gGeoManager;
621 printf("Restoring old gGeoManager.\n");
622 gGeoManager = OldGeo;
623 }
624}
int Int_t
double Double_t
constexpr Bool_t kTRUE
R__EXTERN TGeoManager * gGeoManager
#define gROOT
R__EXTERN TSystem * gSystem
TGeoNode * AddNode(TGeoVolume *vol, Int_t copy_no, TGeoMatrix *mat=nullptr, Option_t *option="") override
virtual Int_t Write(const char *name=nullptr, Int_t option=0, Int_t bufsize=0)
void magnet()
Definition magnet.C:6