1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
7 * Permission to use, copy, modify and distribute this software and its *
8 * documentation strictly for non-commercial purposes is hereby granted *
9 * without fee, provided that the above copyright notice appears in all *
10 * copies and that both the copyright notice and this permission notice *
11 * appear in the supporting documentation. The authors make no claims *
12 * about the suitability of this software for any purpose. It is *
13 * provided "as is" without express or implied warranty. *
14 **************************************************************************/
18 Revision 1.7.2.2 2000/04/26 11:30:34 morsch
19 Revised version with detailed geometry from G. Chabratova
21 Revision 1.6 1999/09/29 09:24:30 fca
22 Introduction of the Copyright and cvs Log
26 ///////////////////////////////////////////////////////////////////////////////
28 // Magnetic Dipole version 1 //
32 <img src="gif/AliDIPOv2Class.gif">
35 <font size=+2 color=red>
36 <p>The responsible person for this module is
37 <a href="mailto:andreas.morsch@cern.ch">Andreas Morsch</a>.
44 ///////////////////////////////////////////////////////////////////////////////
46 #include "AliDIPOv2.h"
52 //_____________________________________________________________________________
53 AliDIPOv2::AliDIPOv2()
56 // Last design of magnetic dipole version 2
60 //_____________________________________________________________________________
61 AliDIPOv2::AliDIPOv2(const char *name, const char *title)
65 // Standard constructor for the magnetic dipole version 2
71 //_____________________________________________________________________________
72 void AliDIPOv2::CreateGeometry()
75 // Creation of the geometry of the magnetic DIPOLE version 2
80 AliMC* gMC = AliMC::GetMC();
82 Float_t cpar[5], tpar[3], ypar[12];
85 Float_t acc_max, the1, phi1, the2, phi2, the3, phi3;
87 Int_t *idtmed = fIdtmed->GetArray()-1799;
89 acc_max = 9.; // ANGLE POLAIRE MAXIMUM
93 tpar[0] = 243.55; // 248.5
95 tpar[2] = 527.34; //440.;
97 tpar[4] = 527.34; // 440.;
99 gMC->Gsvolu("DDIP", "CONE", idtmed[1815], tpar, 5);
108 gMC->Gsvolu("DC1 ", "TUBS", idtmed[1854], cpar, 5);
111 gMC->Gsvolu("DC2 ", "TUBS", idtmed[1854], cpar, 5);
113 // coil - low cuts cuts
115 // cpar[1] = cpar[0] + 10.;
120 gMC->Gsvolu("DC3 ", "TUBS", idtmed[1814], cpar, 5);
125 gMC->Gsvolu("DC4 ", "TUBS", idtmed[1814], cpar, 5);
127 gMC->Gspos("DC3 ", 1, "DC1 ", 0., 0., 0., 0, "ONLY");
128 gMC->Gspos("DC4 ", 1, "DC2 ", 0., 0., 0., 0, "ONLY");
130 // dz = 37.65 - 243.55
133 gMC->Gspos("DC1 ", 1, "DDIP", dx, 0., dz, 0, "ONLY");
134 gMC->Gspos("DC1 ", 2, "DDIP", dx, 0., -dz, 0, "ONLY");
135 gMC->Gspos("DC2 ", 1, "DDIP", -dx, 0., dz, 0, "ONLY");
136 gMC->Gspos("DC2 ", 2, "DDIP", -dx, 0., -dz, 0, "ONLY");
143 AliMatrix(idrotm[1800], the1, phi1, the2, phi2, the3, phi3);
147 AliMatrix(idrotm[1801], the1, phi1, the2, phi2, the3, phi3);
154 AliMatrix(idrotm[1802], the1, phi1, the2, phi2, the3, phi3);
158 AliMatrix(idrotm[1803], the1, phi1, the2, phi2, the3, phi3);
161 cpar[1] = 100.3; //25+75.3
166 gMC->Gsvolu("DC11", "TUBS", idtmed[1854], cpar, 5);
168 dx = TMath::Sin(30.5*kDegrad) * -(207.+33.5)+5./TMath::Sin(30.5*kDegrad) ;
169 dy = TMath::Cos(30.5*kDegrad) * -(207.+33.5);
170 dz = cpar[1] - 243.55-2.45;
171 gMC->Gspos("DC11", 1, "DDIP", dx, dy, dz, idrotm[1800], "ONLY");
172 gMC->Gspos("DC11", 2, "DDIP", dx, dy, -dz, idrotm[1802], "ONLY");
173 gMC->Gspos("DC11", 3, "DDIP", -dx, dy, dz, idrotm[1801], "ONLY");
174 gMC->Gspos("DC11", 4, "DDIP", -dx, dy, -dz, idrotm[1803], "ONLY");
180 cpar[1] = 100.3; //25+75.3
185 gMC->Gsvolu("DC12", "TUBS", idtmed[1854], cpar, 5);
187 dx = TMath::Sin(30.5*kDegrad) * -(207.+33.5)+5./TMath::Sin(30.5*kDegrad) ;
188 dy = TMath::Cos(30.5*kDegrad) *(207.+33.5);
189 dz = cpar[1] - 243.55-2.45;
190 gMC->Gspos("DC12", 1, "DDIP", dx, dy, dz, idrotm[1801], "ONLY");
191 gMC->Gspos("DC12", 2, "DDIP", dx, dy, -dz, idrotm[1803], "ONLY");
192 gMC->Gspos("DC12", 3, "DDIP", -dx, dy, dz, idrotm[1800], "ONLY");
193 gMC->Gspos("DC12", 4, "DDIP", -dx, dy, -dz, idrotm[1802], "ONLY");
201 AliMatrix(idrotm[1804], the1, phi1, the2, phi2, the3, phi3);
206 AliMatrix(idrotm[1805], the1, phi1, the2, phi2, the3, phi3);
208 phi1 = 119.; //180 -61
210 phi2 = 209.; //270-61
211 AliMatrix(idrotm[1806], the1, phi1, the2, phi2, the3, phi3);
216 AliMatrix(idrotm[1807], the1, phi1, the2, phi2, the3, phi3);
223 gMC->Gsvolu("DL1 ", "BOX ", idtmed[1854], tpar, 3);
229 gMC->Gsvolu("DL2 ", "BOX ", idtmed[1814], tpar, 3);
230 gMC->Gspos("DL2 ", 1, "DL1 ", dx, 0., 0., 0, "ONLY");
235 gMC->Gspos("DL1 ", 1, "DDIP", dx, dy, dz, idrotm[1804], "ONLY");
236 gMC->Gspos("DL1 ", 2, "DDIP", dx, -dy, dz, idrotm[1805], "ONLY");
237 gMC->Gspos("DL1 ", 3, "DDIP",-dx, dy, dz, idrotm[1806], "ONLY");
238 gMC->Gspos("DL1 ", 4, "DDIP",-dx, -dy, dz, idrotm[1807], "ONLY");
244 //Steel outer face planes
252 gMC->Gsvolu("DCO1", "TUBS", idtmed[1819], cpar, 5);
255 gMC->Gspos("DCO1", 1, "DDIP", dx, 0, dz, 0, "ONLY");
256 dz = 243.55+4.5+1.5+1.;
257 gMC->Gspos("DCO1", 2, "DDIP", dx, 0, dz, 0, "ONLY");
267 gMC->Gsvolu("DCO2", "TUBS", idtmed[1813], cpar, 5);
270 gMC->Gspos("DCO2", 1, "DDIP", dx, 0, dz, 0, "ONLY");
271 dz = 243.55+4.5+0.75;
272 gMC->Gspos("DCO2", 2, "DDIP", dx, 0, dz, 0, "ONLY");
282 gMC->Gsvolu("DCO3", "TUBS", idtmed[1811], cpar, 5);
286 gMC->Gspos("DCO3", 1, "DDIP", dx, 0, dz, 0, "ONLY");
288 //Steel supported planes
290 cpar[0] = 274.+1.5+2.;
296 gMC->Gsvolu("DCO4", "TUBS", idtmed[1819], cpar, 5);
300 gMC->Gspos("DCO4", 1, "DDIP", dx, 0, dz, 0, "ONLY");
302 cpar[0] = 207.- 18.6;
303 cpar[1] = 207.- 2.- 1.5;
308 gMC->Gsvolu("DCO5", "TUBS", idtmed[1819], cpar, 5);
312 gMC->Gspos("DCO5", 1, "DDIP", dx, 0, dz, 0, "ONLY");
314 // Sides steel planes
316 cpar[0] = 207. - 1.5 -2.;
317 cpar[1] = 207. - 1.5 ;
318 cpar[2] = ((243.55+4.5+1.5)-168.25)/2;
322 gMC->Gsvolu("DCO6", "TUBS", idtmed[1819], cpar, 5);
324 cpar[0] = 274. + 1.5;
325 cpar[1] = 274. + 1.5 +2.;
327 gMC->Gsvolu("DCO7", "TUBS", idtmed[1819], cpar, 5);
330 dz = ((243.55+4.5+1.5)+168.25)/2;
331 gMC->Gspos("DCO6", 1, "DDIP", dx, 0, dz, 0, "ONLY");
332 gMC->Gspos("DCO7", 1, "DDIP", dx, 0, dz, 0, "ONLY");
334 // Top and bottom resin planes
336 cpar[0] = 207. - 1.5 ;
338 cpar[2] = ((243.55+4.5+1.5)-168.25)/2;
342 gMC->Gsvolu("DCO8", "TUBS", idtmed[1813], cpar, 5);
345 cpar[1] = 274. + 1.5;
347 gMC->Gsvolu("DCO9", "TUBS", idtmed[1813], cpar, 5);
351 dz = ((243.55+4.5+1.5)+168.25)/2;
352 gMC->Gspos("DCO8", 1, "DDIP", dx, 0, dz, 0, "ONLY");
353 gMC->Gspos("DCO9", 1, "DDIP", dx, 0, dz, 0, "ONLY");
357 cpar[0] = 274. + 1.5 +2.;
358 cpar[1] = 274. + 1.5 +2. + 80.;
363 gMC->Gsvolu("DCOA", "TUBS", idtmed[1812], cpar, 5);
365 // dx = 274. + 1.5 +2. +40.;
366 // dx = 5. + 1.5 +2. +40.;
367 // dx = 5. + 1.5 +2.;
369 dz = 168.25 + 5.05 + 5.05/2;
370 gMC->Gspos("DCOA", 1, "DDIP", dx, 0, dz, 0, "ONLY");
372 dz = 243.55 - 5.05/2;
373 gMC->Gspos("DCOA", 2, "DDIP", dx, 0, dz, 0, "ONLY");
377 // Top and bottom blocks
383 gMC->Gsvolu("DY1 ", "BOX ", idtmed[1859], ypar, 3);
390 gMC->Gsvolu("DY11", "TRD1", idtmed[1819], ypar, 4);
391 gMC->Gspos("DY11", 1, "DY1 ", 0., dy, 0., 0, "ONLY");
395 gMC->Gspos("DY1 ", 1, "DDIP", 0., dy, -dz, 0, "ONLY");
403 AliMatrix(idrotm[1808], the1, phi1, the2, phi2, the3, phi3);
404 gMC->Gspos("DY1 ", 2, "DDIP", 0., -dy, -dz, idrotm[1808] , "ONLY");
407 // ypar[0] = 579./2. ;
414 ypar[6] = 4.3058039629 ;
419 ypar[10] = 4.3058039629 ;
423 gMC->Gsvolu("DY2 ", "TRAP", idtmed[1859], ypar,11);
434 gMC->Gsvolu("DY22", "TRAP", idtmed[1819], ypar,11);
439 gMC->Gspos("DY22", 1, "DY2 ", dx, dy, 0., 0, "ONLY");
447 AliMatrix(idrotm[1809], the1, phi1, the2, phi2, the3, phi3);
455 AliMatrix(idrotm[1810], the1, phi1, the2, phi2, the3, phi3);
459 gMC->Gspos("DY2 ", 1, "DDIP", dx, 0.0, dz, idrotm[1809], "ONLY");
460 gMC->Gspos("DY2 ", 2, "DDIP", -dx, 0.0, dz, idrotm[1810], "ONLY");
463 gMC->Gspos("DDIP", 1, "ALIC", 0., 0., dz, 0, "ONLY");
465 gMC->Gsatt("DDIP", "SEEN", 0);
466 // gMC->Gsatt("DC21", "SEEN", 0);
467 // gMC->Gsatt("DC22", "SEEN", 0);
468 // gMC->Gsatt("DC3 ", "SEEN", 0);
469 // gMC->Gsatt("DC4 ", "SEEN", 0);
472 //_____________________________________________________________________________
473 void AliDIPOv2::DrawModule()
476 // Draw a shaded view of the muon absorber
479 AliMC* gMC = AliMC::GetMC();
481 // Set everything unseen
482 gMC->Gsatt("*", "seen", -1);
484 // Set ALIC mother transparent
485 gMC->Gsatt("ALIC","SEEN",0);
487 // Set the volumes visible
488 gMC->Gsatt("DDIP","seen",0);
489 gMC->Gsatt("DC1 ","seen",1);
490 gMC->Gsatt("DC2 ","seen",1);
491 gMC->Gsatt("DC3 ","seen",1);
492 gMC->Gsatt("DC4 ","seen",1);
493 gMC->Gsatt("DC11","seen",1);
494 gMC->Gsatt("DC21","seen",1);
495 gMC->Gsatt("DC12","seen",1);
496 gMC->Gsatt("DC22","seen",1);
497 gMC->Gsatt("DL1 ","seen",1);
498 gMC->Gsatt("DL2 ","seen",1);
499 gMC->Gsatt("DY1 ","seen",1);
500 gMC->Gsatt("DY2 ","seen",1);
501 gMC->Gsatt("DYL ","seen",1);
502 gMC->Gsatt("DY3 ","seen",1);
503 // gMC->Gsatt("DY4 ","seen",1);
504 // gMC->Gsatt("DY5 ","seen",1);
505 // gMC->Gsatt("DY6 ","seen",1);
506 // gMC->Gsatt("DY7 ","seen",1);
508 gMC->Gdopt("hide", "on");
509 gMC->Gdopt("shad", "on");
510 gMC->Gsatt("*", "fill", 7);
511 gMC->SetClipBox(".");
512 gMC->SetClipBox(".");
514 gMC->Gdraw("alic", 30, 30, 0, 17, 13.5, .019, .019);
515 gMC->Gdhead(1111, "Magnetic Dipole Version 2");
516 gMC->Gdman(16, 4, "MAN");
519 //_____________________________________________________________________________
520 void AliDIPOv2::CreateMaterials()
523 // Create Materials for Magnetic Dipole version 2
526 Int_t ISXFLD = gAlice->Field()->Integ();
527 Float_t SXMGMX = gAlice->Field()->Max();
529 Float_t asteel[4] = { 55.847,51.9961,58.6934,28.0855 };
530 Float_t zsteel[4] = { 26.,24.,28.,14. };
531 Float_t wsteel[4] = { .715,.18,.1,.005 };
533 Float_t acoil[3] = { 26.98,1.01,16. };
534 Float_t zcoil[3] = { 13.,1.,8. };
535 Float_t wcoil[3] = { .66,.226,.114 };
537 Float_t aresi[3] = { 1.01,12.011,16.};
538 Float_t zresi[3] = { 1.,6.,8. };
539 Float_t wresi[3] = { .0644,.7655,.1701 };
541 Float_t aG10[5] = { 1.01,12.011,16.,28.085 ,79.904 };
542 Float_t zG10[5] = { 1.,6.,8.,14.,35. };
543 Float_t wG10[5] = { .02089,.22338,.28493,.41342,.05738 };
545 Float_t aAlCon[2] = { 14.61, 26.98};
546 Float_t zAlCon[2] = { 7.3, 13.};
547 Float_t wAlCon[2] = { .0004,.9996};
550 Float_t epsil, stmin, deemax, tmaxfd, stemax;
552 // --- Define the various materials for GEANT ---
554 AliMaterial(9, "ALUMINIUM$", 26.98, 13., 2.7, 8.9, 37.2);
555 AliMaterial(29, "ALUMINIUM$", 26.98, 13., 2.7, 8.9, 37.2);
556 AliMaterial(49, "ALUMINIUM$", 26.98, 13., 2.7, 8.9, 37.2);
559 AliMaterial(10, "IRON$ ", 55.85, 26., 7.87, 1.76, 17.1);
560 AliMaterial(30, "IRON$ ", 55.85, 26., 7.87, 1.76, 17.1);
561 AliMaterial(50, "IRON$ ", 55.85, 26., 7.87, 1.76, 17.1);
564 AliMaterial(15, "AIR$ ", 14.61, 7.3, .001205, 30423.24, 67500);
565 AliMaterial(35, "AIR$ ", 14.61, 7.3, .001205, 30423.24, 67500);
566 AliMaterial(55, "AIR$ ", 14.61, 7.3, .001205, 30423.24, 67500);
569 AliMaterial(16, "VACUUM$ ", 1e-16, 1e-16, 1e-16, 1e16, 1e16);
570 AliMaterial(36, "VACUUM$ ", 1e-16, 1e-16, 1e-16, 1e16, 1e16);
571 AliMaterial(56, "VACUUM$ ", 1e-16, 1e-16, 1e-16, 1e16, 1e16);
574 AliMixture(19, "STAINLESS STEEL$", asteel, zsteel, 7.88, 4, wsteel);
575 AliMixture(39, "STAINLESS STEEL$", asteel, zsteel, 7.88, 4, wsteel);
576 AliMixture(59, "STAINLESS STEEL$", asteel, zsteel, 7.88, 4, wsteel);
579 AliMixture(14, "Al$", acoil, zcoil, 2.122, 3, wcoil);
580 AliMixture(34, "Al$", acoil, zcoil, 2.122, 3, wcoil);
581 AliMixture(54, "Al$", acoil, zcoil, 2.122, 3, wcoil);
584 AliMixture(13, "RESIN$", aresi, zresi, 1.05, 3, wresi);
585 AliMixture(33, "RESIN$", aresi, zresi, 1.05, 3, wresi);
586 AliMixture(53, "RESIN$", aresi, zresi, 1.05, 3, wresi);
589 AliMixture(11, "G10$", aG10, zG10, 1.7, 5, wG10);
590 AliMixture(31, "G10$", aG10, zG10, 1.7, 5, wG10);
591 AliMixture(51, "G10$", aG10, zG10, 1.7, 5, wG10);
593 //Aluminium Conductor
594 AliMixture(12, "AlCond$", aAlCon, zAlCon, 1.3506, 2, wAlCon);
595 AliMixture(32, "AlCond$", aAlCon, zAlCon, 1.3506, 2, wAlCon);
596 AliMixture(52, "AlCond$", aAlCon, zAlCon, 1.3506, 2, wAlCon);
599 // Defines tracking media parameters.
600 // Les valeurs sont commentees pour laisser le defaut
601 // a GEANT (version 3-21, page CONS200), f.m.
602 epsil = .001; // Tracking precision,
603 stemax = -1.; // Maximum displacement for multiple scat
604 tmaxfd = -20.; // Maximum angle due to field deflection
605 deemax = -.3; // Maximum fractional energy loss, DLS
610 AliMedium(1809, "ALU_C0 ", 9, 0, ISXFLD, SXMGMX, tmaxfd, stemax, deemax, epsil, stmin);
611 AliMedium(1829, "ALU_C1 ", 29, 0, ISXFLD, SXMGMX, tmaxfd, stemax, deemax, epsil, stmin);
612 AliMedium(1849, "ALU_C2 ", 49, 0, ISXFLD, SXMGMX, tmaxfd, stemax, deemax, epsil, stmin);
615 AliMedium(1810, "FE_C0 ", 10, 0, ISXFLD, SXMGMX, tmaxfd, stemax, deemax, epsil, stmin);
616 AliMedium(1830, "FE_C1 ", 30, 0, ISXFLD, SXMGMX, tmaxfd, stemax, deemax, epsil, stmin);
617 AliMedium(1850, "FE_C2 ", 50, 0, ISXFLD, SXMGMX, tmaxfd, stemax, deemax, epsil, stmin);
620 AliMedium(1815, "AIR_C0 ", 15, 0, ISXFLD, SXMGMX, tmaxfd, stemax, deemax, epsil, stmin);
621 AliMedium(1835, "AIR_C1 ", 35, 0, ISXFLD, SXMGMX, tmaxfd, stemax, deemax, epsil, stmin);
622 AliMedium(1855, "AIR_C2 ", 55, 0, ISXFLD, SXMGMX, tmaxfd, stemax, deemax, epsil, stmin);
625 AliMedium(1816, "VA_C0 ", 16, 0, ISXFLD, SXMGMX, tmaxfd, stemax, deemax, epsil, stmin);
626 AliMedium(1836, "VA_C1 ", 36, 0, ISXFLD, SXMGMX, tmaxfd, stemax, deemax, epsil, stmin);
627 AliMedium(1856, "VA_C2 ", 56, 0, ISXFLD, SXMGMX, tmaxfd, stemax, deemax, epsil, stmin);
630 AliMedium(1819, "ST_C0 ", 19, 0, ISXFLD, SXMGMX, tmaxfd, stemax, deemax, epsil, stmin);
631 AliMedium(1839, "ST_C1 ", 39, 0, ISXFLD, SXMGMX, tmaxfd, stemax, deemax, epsil, stmin);
632 AliMedium(1859, "ST_C3 ", 59, 0, ISXFLD, SXMGMX, tmaxfd, stemax, deemax, epsil, stmin);
635 AliMedium(1814, "Coil_C1 ", 14, 0, ISXFLD, SXMGMX, tmaxfd, stemax, deemax, epsil, stmin);
636 AliMedium(1834, "Coil_C2 ", 34, 0, ISXFLD, SXMGMX, tmaxfd, stemax, deemax, epsil, stmin);
637 AliMedium(1854, "Coil_C3 ", 54, 0, ISXFLD, SXMGMX, tmaxfd, stemax, deemax, epsil, stmin);
640 AliMedium(1813, "RESIN_C0 ", 13, 0, ISXFLD, SXMGMX, tmaxfd, stemax, deemax, epsil, stmin);
641 AliMedium(1833, "RESIN_C1 ", 33, 0, ISXFLD, SXMGMX, tmaxfd, stemax, deemax, epsil, stmin);
642 AliMedium(1853, "RESIN_C2 ", 53, 0, ISXFLD, SXMGMX, tmaxfd, stemax, deemax, epsil, stmin);
645 AliMedium(1811, "G10_C0 ", 11, 0, ISXFLD, SXMGMX, tmaxfd, stemax, deemax, epsil, stmin);
646 AliMedium(1831, "G10_C1 ", 31, 0, ISXFLD, SXMGMX, tmaxfd, stemax, deemax, epsil, stmin);
647 AliMedium(1851, "G10_C2 ", 51, 0, ISXFLD, SXMGMX, tmaxfd, stemax, deemax, epsil, stmin);
649 //Aluminium Conductor
650 AliMedium(1812, "AlCond_C0 ", 12, 0, ISXFLD, SXMGMX, tmaxfd, stemax, deemax, epsil, stmin);
651 AliMedium(1832, "AlCond_C1 ", 32, 0, ISXFLD, SXMGMX, tmaxfd, stemax, deemax, epsil, stmin);
652 AliMedium(1852, "AlCond_C2 ", 52, 0, ISXFLD, SXMGMX, tmaxfd, stemax, deemax, epsil, stmin);