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 ///////////////////////////////////////////////////////////////////////////////
24 <img src="picts/AliMAGClass.gif">
27 <font size=+2 color=red>
28 <p>The responsible person for this module is
29 <a href="mailto:andreas.morsch@cern.ch">Andreas Morsch</a>.
35 ///////////////////////////////////////////////////////////////////////////////
37 #include <TVirtualMC.h>
45 //_____________________________________________________________________________
49 // Default constructor for L3 magnet
53 //_____________________________________________________________________________
54 AliMAG::AliMAG(const char *name, const char *title)
55 : AliModule(name,title)
58 // Standard constructor for L3 magnet
62 <img src="picts/aliMAG.gif">
71 //_____________________________________________________________________________
72 void AliMAG::CreateGeometry()
75 // Create geometry for L3 magnet
79 <img src="picts/mag.gif">
84 <img src="picts/tree_mag.gif">
88 Int_t *idtmed = fIdtmed->GetArray()-299;
94 // ANGLE POLAIRE MAXIMUM
108 gMC->Gsvolu("L3MO", "PGON", idtmed[334], par, 10);
109 gMC->Gspos("L3MO", 1, "ALIC", 0., -30., 0., 0, "ONLY");
117 gMC->Gsvolu("L3CO", "PGON", idtmed[328], par, 10);
118 gMC->Gspos("L3CO", 1, "L3MO", 0., 0., 0., 0, "ONLY");
124 gMC->Gsvolu("L3C1", "PGON", idtmed[308], par, 10);
125 gMC->Gspos("L3C1", 1, "L3MO", 0., 0., 0., 0, "ONLY");
133 gMC->Gsvolu("L3YO", "PGON", idtmed[329], par, 10);
134 gMC->Gspos("L3YO", 1, "L3MO", 0., 0., 0., 0, "ONLY");
136 // Define the return yoke of L3 (DOOR)
144 gMC->Gsvolu("L3DO", "PGON", idtmed[334], par, 10);
145 gMC->Gsvolu("L3DX", "PGON", idtmed[334], par, 10);
153 gMC->Gsvolu("L3FR", "PGON", idtmed[329], par, 10);
154 gMC->Gsvolu("L3FX", "PGON", idtmed[329], par, 10);
160 gMC->Gsvolu("L3IR", "PGON", idtmed[309], par, 10);
161 gMC->Gsvolu("L3IX", "PGON", idtmed[309], par, 10);
177 dpar[12] = dpar[6] + 50.;
178 gMC->Gsvolu("L3O1", "PGON", idtmed[314], dpar, 13);
179 gMC->Gsvolu("L3O3", "PGON", idtmed[314], dpar, 13);
186 gMC->Gsvolu("L3O2", "PGON", idtmed[314], par, 10);
187 gMC->Gsvolu("L3O4", "PGON", idtmed[314], par, 10);
189 // THE DOOR OPENING HAS TO BE PLACED WITH 'MANY' SINCE THE REGION
190 // WILL CONTAIN A MUON CHAMBER, BEAM PIPE AND BEAM SHIELD
191 // PLACED WITH 'ONLY'.
193 AliMatrix(idrotm[300], 90., 0., 90., 90., 180., 0.);
195 gMC->Gspos("L3DO", 1, "ALIC", 0., -30., 0., 0, "MANY");
196 gMC->Gspos("L3FR", 1, "L3DO", 0., 0., 0., 0, "MANY");
197 gMC->Gspos("L3IR", 1, "L3DO", 0., 0., 0., 0, "MANY");
199 gMC->Gspos("L3DX", 1, "ALIC", 0., -30., 0., idrotm[300], "MANY");
200 gMC->Gspos("L3FX", 1, "L3DX", 0., 0., 0., 0, "MANY");
201 gMC->Gspos("L3IX", 1, "L3DX", 0., 0., 0., 0, "MANY");
203 if(!strcmp(gMC->GetName(),"TGeant3")) {
205 gMC->Gspos("L3O1", 1, "L3FR", 0., 30., 0., 0, "MANY");
206 gMC->Gspos("L3O2", 1, "L3IR", 0., 30., 0., 0, "MANY");
207 gMC->Gspos("L3O3", 1, "L3FX", 0., 30., 0., 0, "MANY");
208 gMC->Gspos("L3O4", 1, "L3IX", 0., 30., 0., 0, "MANY");
212 gMC->Gspos("L3O1", 1, "ALIC", 0., 0., 0., 0, "MANY");
213 gMC->Gspos("L3O2", 1, "ALIC", 0., 0., 0., 0, "MANY");
214 gMC->Gsbool("L3O1", "L3DO");
215 gMC->Gsbool("L3O2", "L3DO");
217 gMC->Gspos("L3O3", 1, "ALIC", 0., 0., 0., idrotm[300], "MANY");
218 gMC->Gspos("L3O4", 1, "ALIC", 0., 0., 0., idrotm[300], "MANY");
219 gMC->Gsbool("L3O3", "L3DX");
220 gMC->Gsbool("L3O4", "L3DX");
224 //_____________________________________________________________________________
225 void AliMAG::CreateMaterials()
228 // Create materials for L3 magnet
231 Int_t isxfld = gAlice->Field()->Integ();
232 Float_t sxmgmx = gAlice->Field()->Max();
234 Float_t epsil, stmin, deemax, tmaxfd, stemax;
235 // --- Define the various materials for GEANT ---
238 AliMaterial(9, "Al$", 26.98, 13., 2.7, 8.9, 37.2);
239 AliMaterial(29, "Al$", 26.98, 13., 2.7, 8.9, 37.2);
242 AliMaterial(10, "Fe$", 55.85, 26., 7.87, 1.76, 17.1);
243 AliMaterial(30, "Fe$", 55.85, 26., 7.87, 1.76, 17.1);
246 AliMaterial(15, "Air$", 14.61, 7.3, .001205, 30420., 67500);
247 AliMaterial(35, "Air$", 14.61, 7.3, .001205, 30420., 67500);
250 // Defines tracking media parameters.
251 // Les valeurs sont commentees pour laisser le defaut
252 // a GEANT (version 3-21, page CONS200), f.m.
253 epsil = .001; // Tracking precision,
254 stemax = -1.; // Maximum displacement for multiple scat
255 tmaxfd = -20.; // Maximum angle due to field deflection
256 deemax = -.3; // Maximum fractional energy loss, DLS
262 AliMedium(10, "FE_C0 ", 10, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
263 AliMedium(30, "FE_C1 ", 30, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
267 AliMedium(9, "ALU_C0 ", 9, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
268 AliMedium(29, "ALU_C1 ", 29, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
272 AliMedium(15, "AIR_C0 ", 15, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
273 AliMedium(35, "AIR_C1 ", 35, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
276 //_____________________________________________________________________________
277 void AliMAG::DrawModule()
280 // Draw a shaded view of the L3 magnet
284 //_____________________________________________________________________________
288 // Initialise L3 magnet after it has been built
292 printf("\n%s: ",ClassName());
293 for(i=0;i<35;i++) printf("*");
294 printf(" MAG_INIT ");
295 for(i=0;i<35;i++) printf("*");
296 printf("\n%s: ",ClassName());
298 // Here the MAG initialisation code (if any!)
299 for(i=0;i<80;i++) printf("*");