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 **************************************************************************/
20 ///////////////////////////////////////////////////////////////////////////////
22 // Magnetic Dipole version 1 //
26 <img src="picts/AliDIPOv2Class.gif">
29 <font size=+2 color=red>
30 <p>The responsible person for this module is
31 <a href="mailto:andreas.morsch@cern.ch">Andreas Morsch</a>.
38 ///////////////////////////////////////////////////////////////////////////////
40 #include "AliDIPOv2.h"
46 //_____________________________________________________________________________
47 AliDIPOv2::AliDIPOv2()
50 // Default constructor for magnetic dipole version 2
54 //_____________________________________________________________________________
55 AliDIPOv2::AliDIPOv2(const char *name, const char *title)
59 // Standard constructor for the magnetic dipole version 2
65 //_____________________________________________________________________________
66 void AliDIPOv2::CreateGeometry()
69 // Creation of the geometry of the magnetic DIPOLE version 2
73 <img src="picts/AliDIPOv2Tree.gif">
78 <img src="picts/AliDIPOv2.gif">
82 Float_t cpar[5], tpar[3], ypar[4];
85 Float_t acc_max, the1, phi1, the2, phi2, the3, phi3;
87 Int_t *idtmed = fIdtmed->GetArray()-1799;
89 //abs_d = 90.; // DEFINES DRIFT LENGTH
92 //theta1 = 24.; // 1. angle defining the front absorber
93 //theta2 = 5.; // 2. angle defining the front absorbe
94 acc_max = 9.; // ANGLE POLAIRE MAXIMUM
95 //acc_min = 2.; // ANGLE POLAIRE MINIMUM DE DETECTION
97 //d_steel = 1.; // THICKNESS OF STEEL SUPPORT
100 //abs_cc = 315.; // DEFINES LENGTH OF CARBON
102 //abs_s = 150.; // DEFINES W-SHIELD LENGTH
103 //abs_n = 80.; // START OF NOSE
118 //zcone_e = 859.0875;
139 gMC->Gsvolu("DDIP", "BOX ", idtmed[1814], tpar, 3);
149 gMC->Gsvolu("DC1 ", "TUBS", idtmed[1813], cpar, 5);
152 gMC->Gsvolu("DC2 ", "TUBS", idtmed[1813], cpar, 5);
153 // ... define regions for higher cuts
159 gMC->Gsvolu("DC3 ", "TUBS", idtmed[1833], cpar, 5);
160 gMC->Gspos("DC3 ", 1, "DC1 ", 0., 0., 0., 0, "ONLY");
163 gMC->Gsvolu("DC4 ", "TUBS", idtmed[1833], cpar, 5);
164 gMC->Gspos("DC4 ", 1, "DC2 ", 0., 0., 0., 0, "ONLY");
167 gMC->Gspos("DC1 ", 1, "DDIP", 0., 0., dz, 0, "ONLY");
168 gMC->Gspos("DC1 ", 2, "DDIP", 0., 0., -dz, 0, "ONLY");
169 gMC->Gspos("DC2 ", 1, "DDIP", 0., 0., dz, 0, "ONLY");
170 gMC->Gspos("DC2 ", 2, "DDIP", 0., 0., -dz, 0, "ONLY");
177 AliMatrix(idrotm[1800], the1, phi1, the2, phi2, the3, phi3);
181 AliMatrix(idrotm[1801], the1, phi1, the2, phi2, the3, phi3);
188 AliMatrix(idrotm[1802], the1, phi1, the2, phi2, the3, phi3);
192 AliMatrix(idrotm[1803], the1, phi1, the2, phi2, the3, phi3);
198 gMC->Gsvolu("DC11", "TUBS", idtmed[1813], cpar, 5);
203 gMC->Gsvolu("DC21", "TUBS", idtmed[1833], cpar, 5);
204 gMC->Gspos("DC21", 1, "DC11", 0., 0., 0., 0, "ONLY");
206 dx = TMath::Sin(30*kDegrad) * -236.5;
207 dy = TMath::Cos(30*kDegrad) * -236.5;
208 dz = cpar[1] + 10. - 250.;
209 gMC->Gspos("DC11", 1, "DDIP", dx, dy, dz, idrotm[1800], "ONLY");
210 gMC->Gspos("DC11", 2, "DDIP", dx, dy, -dz, idrotm[1802], "ONLY");
211 gMC->Gspos("DC11", 3, "DDIP", -dx, dy, dz, idrotm[1801], "ONLY");
212 gMC->Gspos("DC11", 4, "DDIP", -dx, dy, -dz, idrotm[1803], "ONLY");
218 gMC->Gsvolu("DC12", "TUBS", idtmed[1813], cpar, 5);
223 gMC->Gsvolu("DC22", "TUBS", idtmed[1833], cpar, 5);
224 gMC->Gspos("DC22", 1, "DC12", 0., 0., 0., 0, "ONLY");
226 dx = TMath::Sin(30*kDegrad) * -236.5;
227 dy = TMath::Cos(30*kDegrad) * 236.5;
228 dz = cpar[1] + 10. - 250.;
229 gMC->Gspos("DC12", 1, "DDIP", dx, dy, dz, idrotm[1801], "ONLY");
230 gMC->Gspos("DC12", 2, "DDIP", dx, dy, -dz, idrotm[1803], "ONLY");
231 gMC->Gspos("DC12", 3, "DDIP", -dx, dy, dz, idrotm[1800], "ONLY");
232 gMC->Gspos("DC12", 4, "DDIP", -dx, dy, -dz, idrotm[1802], "ONLY");
239 AliMatrix(idrotm[1804], the1, phi1, the2, phi2, the3, phi3);
246 AliMatrix(idrotm[1805], the1, phi1, the2, phi2, the3, phi3);
250 gMC->Gsvolu("DL1 ", "BOX ", idtmed[1813], tpar, 3);
254 gMC->Gsvolu("DL2 ", "BOX ", idtmed[1833], tpar, 3);
255 gMC->Gspos("DL2 ", 1, "DL1 ", 0., 0., 0., 0, "ONLY");
260 gMC->Gspos("DL1 ", 1, "DDIP", dx, dy, dz, idrotm[1804], "ONLY");
261 gMC->Gspos("DL1 ", 2, "DDIP", dx, -dy, dz, idrotm[1805], "ONLY");
262 gMC->Gspos("DL1 ", 3, "DDIP",-dx, dy, dz, idrotm[1805], "ONLY");
263 gMC->Gspos("DL1 ", 4, "DDIP",-dx, -dy, dz, idrotm[1804], "ONLY");
270 ypar[0] = ypar[1] - ypar[3] * 2. * TMath::Tan(acc_max * kDegrad);
271 gMC->Gsvolu("DY1 ", "TRD1", idtmed[1809], ypar, 4);
274 gMC->Gspos("DY1 ", 1, "DDIP", 0., dy, 0., 0, "ONLY");
275 gMC->Gspos("DY1 ", 2, "DDIP", 0., -dy, 0., 0, "ONLY");
277 gMC->Gsvolu("DY2 ", "TRD1", idtmed[1829], ypar, 4);
280 gMC->Gspos("DY2 ", 1, "DDIP", 0., dy, 0., 0, "ONLY");
281 gMC->Gspos("DY2 ", 2, "DDIP", 0., -dy, 0., 0, "ONLY");
288 AliMatrix(idrotm[1806], the1, phi1, the2, phi2, the3, phi3);
292 AliMatrix(idrotm[1807], the1, phi1, the2, phi2, the3, phi3);
296 gMC->Gsvolu("DYL ", "BOX ", idtmed[1814], tpar, 3);
299 gMC->Gsvolu("DY3 ", "BOX ", idtmed[1809], tpar, 3);
302 gMC->Gspos("DY3 ", 1, "DYL ", dx, dy, 0., 0, "ONLY");
303 gMC->Gspos("DY3 ", 2, "DYL ", dx, -dy, 0., 0, "ONLY");
305 gMC->Gsvolu("DY4 ", "BOX ", idtmed[1829], tpar, 3);
306 dx = dx + 5. + tpar[0];
307 gMC->Gspos("DY4 ", 1, "DYL ", dx, dy, 0., 0, "ONLY");
308 gMC->Gspos("DY4 ", 2, "DYL ", dx, -dy, 0., 0, "ONLY");
311 gMC->Gsvolu("DY5 ", "BOX ", idtmed[1829], tpar, 3);
313 gMC->Gspos("DY5 ", 1, "DYL ", dx, 0., 0., 0, "ONLY");
315 gMC->Gsvolu("DY6 ", "BOX ", idtmed[1809], tpar, 3);
316 dx = dx - 37.7 - tpar[0];
317 gMC->Gspos("DY6 ", 1, "DYL ", dx, 0., 0., 0, "ONLY");
320 gMC->Gsvolu("DY7 ", "BOX ", idtmed[1809], tpar, 3);
323 gMC->Gspos("DY7 ", 1, "DYL ", dx, dy, 0., 0, "ONLY");
324 gMC->Gspos("DY7 ", 2, "DYL ", dx, -dy, 0., 0, "ONLY");
326 dx = ypar[0] + ypar[3] * TMath::Tan(acc_max * kDegrad) - 60.;
327 gMC->Gspos("DYL ", 1, "DDIP", dx, 0., 0., idrotm[1806], "ONLY");
328 gMC->Gspos("DYL ", 2, "DDIP",-dx, 0., 0., idrotm[1807], "ONLY");
329 gMC->Gspos("DDIP", 1, "ALIC", 0., 0., 725.+250., 0, "MANY");
330 gMC->Gsatt("DDIP", "SEEN", 0);
331 gMC->Gsatt("DC21", "SEEN", 0);
332 gMC->Gsatt("DC22", "SEEN", 0);
333 gMC->Gsatt("DC3 ", "SEEN", 0);
334 gMC->Gsatt("DC4 ", "SEEN", 0);
337 //_____________________________________________________________________________
338 void AliDIPOv2::DrawModule()
341 // Draw a shaded view of the muon absorber
344 // Set everything unseen
345 gMC->Gsatt("*", "seen", -1);
347 // Set ALIC mother transparent
348 gMC->Gsatt("ALIC","SEEN",0);
350 // Set the volumes visible
351 gMC->Gsatt("DDIP","seen",0);
352 gMC->Gsatt("DC1 ","seen",1);
353 gMC->Gsatt("DC2 ","seen",1);
354 gMC->Gsatt("DC3 ","seen",1);
355 gMC->Gsatt("DC4 ","seen",1);
356 gMC->Gsatt("DC11","seen",1);
357 gMC->Gsatt("DC21","seen",1);
358 gMC->Gsatt("DC12","seen",1);
359 gMC->Gsatt("DC22","seen",1);
360 gMC->Gsatt("DL1 ","seen",1);
361 gMC->Gsatt("DL2 ","seen",1);
362 gMC->Gsatt("DY1 ","seen",1);
363 gMC->Gsatt("DY2 ","seen",1);
364 gMC->Gsatt("DYL ","seen",1);
365 gMC->Gsatt("DY3 ","seen",1);
366 gMC->Gsatt("DY4 ","seen",1);
367 gMC->Gsatt("DY5 ","seen",1);
368 gMC->Gsatt("DY6 ","seen",1);
369 gMC->Gsatt("DY7 ","seen",1);
371 gMC->Gdopt("hide", "on");
372 gMC->Gdopt("shad", "on");
373 gMC->Gsatt("*", "fill", 7);
374 gMC->SetClipBox(".");
375 gMC->SetClipBox(".");
377 gMC->Gdraw("alic", 30, 30, 0, 17, 13.5, .019, .019);
378 gMC->Gdhead(1111, "Magnetic Dipole Version 2");
379 gMC->Gdman(16, 4, "MAN");
382 //_____________________________________________________________________________
383 void AliDIPOv2::CreateMaterials()
386 // Create Materials for Magnetic Dipole version 2
389 Int_t ISXFLD = gAlice->Field()->Integ();
390 Float_t SXMGMX = gAlice->Field()->Max();
392 Float_t asteel[4] = { 55.847,51.9961,58.6934,28.0855 };
393 Float_t zsteel[4] = { 26.,24.,28.,14. };
394 Float_t wsteel[4] = { .715,.18,.1,.005 };
395 Float_t acoil[3] = { 26.98,1.01,16. };
396 Float_t zcoil[3] = { 13.,1.,8. };
397 Float_t wcoil[3] = { .66,.226,.114 };
399 Float_t epsil, stmin, deemax, tmaxfd, stemax;
401 // --- Define the various materials for GEANT ---
403 AliMaterial(9, "ALUMINIUM$", 26.98, 13., 2.7, 8.9, 37.2);
404 AliMaterial(29, "ALUMINIUM$", 26.98, 13., 2.7, 8.9, 37.2);
405 AliMaterial(49, "ALUMINIUM$", 26.98, 13., 2.7, 8.9, 37.2);
408 AliMaterial(10, "IRON$ ", 55.85, 26., 7.87, 1.76, 17.1);
409 AliMaterial(30, "IRON$ ", 55.85, 26., 7.87, 1.76, 17.1);
410 AliMaterial(50, "IRON$ ", 55.85, 26., 7.87, 1.76, 17.1);
413 AliMaterial(15, "AIR$ ", 14.61, 7.3, .001205, 30423.24, 67500);
414 AliMaterial(35, "AIR$ ", 14.61, 7.3, .001205, 30423.24, 67500);
415 AliMaterial(55, "AIR$ ", 14.61, 7.3, .001205, 30423.24, 67500);
418 AliMaterial(16, "VACUUM$ ", 1e-16, 1e-16, 1e-16, 1e16, 1e16);
419 AliMaterial(36, "VACUUM$ ", 1e-16, 1e-16, 1e-16, 1e16, 1e16);
420 AliMaterial(56, "VACUUM$ ", 1e-16, 1e-16, 1e-16, 1e16, 1e16);
423 AliMixture(19, "STAINLESS STEEL$", asteel, zsteel, 7.88, 4, wsteel);
424 AliMixture(39, "STAINLESS STEEL$", asteel, zsteel, 7.88, 4, wsteel);
425 AliMixture(59, "STAINLESS STEEL$", asteel, zsteel, 7.88, 4, wsteel);
428 AliMixture(14, "Al$", acoil, zcoil, 2.122, 3, wcoil);
429 AliMixture(34, "Al$", acoil, zcoil, 2.122, 3, wcoil);
430 AliMixture(54, "Al$", acoil, zcoil, 2.122, 3, wcoil);
433 // Defines tracking media parameters.
434 // Les valeurs sont commentees pour laisser le defaut
435 // a GEANT (version 3-21, page CONS200), f.m.
436 epsil = .001; // Tracking precision,
437 stemax = -1.; // Maximum displacement for multiple scat
438 tmaxfd = -20.; // Maximum angle due to field deflection
439 deemax = -.3; // Maximum fractional energy loss, DLS
444 AliMedium(9, "ALU_C0 ", 9, 0, ISXFLD, SXMGMX, tmaxfd, stemax, deemax, epsil, stmin);
445 AliMedium(29, "ALU_C1 ", 29, 0, ISXFLD, SXMGMX, tmaxfd, stemax, deemax, epsil, stmin);
446 AliMedium(49, "ALU_C2 ", 49, 0, ISXFLD, SXMGMX, tmaxfd, stemax, deemax, epsil, stmin);
449 AliMedium(10, "FE_C0 ", 10, 0, ISXFLD, SXMGMX, tmaxfd, stemax, deemax, epsil, stmin);
450 AliMedium(30, "FE_C1 ", 30, 0, ISXFLD, SXMGMX, tmaxfd, stemax, deemax, epsil, stmin);
451 AliMedium(50, "FE_C2 ", 50, 0, ISXFLD, SXMGMX, tmaxfd, stemax, deemax, epsil, stmin);
454 AliMedium(15, "AIR_C0 ", 15, 0, ISXFLD, SXMGMX, tmaxfd, stemax, deemax, epsil, stmin);
455 AliMedium(35, "AIR_C1 ", 35, 0, ISXFLD, SXMGMX, tmaxfd, stemax, deemax, epsil, stmin);
456 AliMedium(55, "AIR_C2 ", 55, 0, ISXFLD, SXMGMX, tmaxfd, stemax, deemax, epsil, stmin);
459 AliMedium(16, "VA_C0 ", 16, 0, ISXFLD, SXMGMX, tmaxfd, stemax, deemax, epsil, stmin);
460 AliMedium(36, "VA_C1 ", 36, 0, ISXFLD, SXMGMX, tmaxfd, stemax, deemax, epsil, stmin);
461 AliMedium(56, "VA_C2 ", 56, 0, ISXFLD, SXMGMX, tmaxfd, stemax, deemax, epsil, stmin);
464 AliMedium(19, "ST_C0 ", 19, 0, ISXFLD, SXMGMX, tmaxfd, stemax, deemax, epsil, stmin);
465 AliMedium(39, "ST_C1 ", 39, 0, ISXFLD, SXMGMX, tmaxfd, stemax, deemax, epsil, stmin);
466 AliMedium(59, "ST_C3 ", 59, 0, ISXFLD, SXMGMX, tmaxfd, stemax, deemax, epsil, stmin);
469 AliMedium(14, "Coil_C1 ", 14, 0, ISXFLD, SXMGMX, tmaxfd, stemax, deemax, epsil, stmin);
470 AliMedium(34, "Coil_C2 ", 34, 0, ISXFLD, SXMGMX, tmaxfd, stemax, deemax, epsil, stmin);
471 AliMedium(54, "Coil_C3 ", 54, 0, ISXFLD, SXMGMX, tmaxfd, stemax, deemax, epsil, stmin);