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")
204 || !strcmp(gMC->GetName(),"TFluka")
205 || !strcmp(gMC->GetName(),"TGeant3TGeo")) {
207 gMC->Gspos("L3O1", 1, "L3FR", 0., 30., 0., 0, "MANY");
208 gMC->Gspos("L3O2", 1, "L3IR", 0., 30., 0., 0, "MANY");
209 gMC->Gspos("L3O3", 1, "L3FX", 0., 30., 0., 0, "MANY");
210 gMC->Gspos("L3O4", 1, "L3IX", 0., 30., 0., 0, "MANY");
214 gMC->Gspos("L3O1", 1, "ALIC", 0., 0., 0., 0, "MANY");
215 gMC->Gspos("L3O2", 1, "ALIC", 0., 0., 0., 0, "MANY");
216 gMC->Gsbool("L3O1", "L3DO");
217 gMC->Gsbool("L3O2", "L3DO");
219 gMC->Gspos("L3O3", 1, "ALIC", 0., 0., 0., idrotm[300], "MANY");
220 gMC->Gspos("L3O4", 1, "ALIC", 0., 0., 0., idrotm[300], "MANY");
221 gMC->Gsbool("L3O3", "L3DX");
222 gMC->Gsbool("L3O4", "L3DX");
226 //_____________________________________________________________________________
227 void AliMAG::CreateMaterials()
230 // Create materials for L3 magnet
233 Int_t isxfld = gAlice->Field()->Integ();
234 Float_t sxmgmx = gAlice->Field()->Max();
235 Float_t epsil, stmin, deemax, tmaxfd, stemax;
238 // --- Define the various materials for GEANT ---
240 Float_t aAir[4]={12.0107,14.0067,15.9994,39.948};
241 Float_t zAir[4]={6.,7.,8.,18.};
242 Float_t wAir[4]={0.000124,0.755267,0.231781,0.012827};
243 Float_t dAir = 1.20479E-3;
247 AliMaterial(9, "Al0$", 26.98, 13., 2.7, 8.9, 37.2);
248 AliMaterial(29, "Al1$", 26.98, 13., 2.7, 8.9, 37.2);
251 AliMaterial(10, "Fe0$", 55.85, 26., 7.87, 1.76, 17.1);
252 AliMaterial(30, "Fe1$", 55.85, 26., 7.87, 1.76, 17.1);
255 AliMixture(15, "AIR0$ ", aAir, zAir, dAir, 4, wAir);
256 AliMixture(35, "AIR1$ ", aAir, zAir, dAir, 4, wAir);
259 // Defines tracking media parameters.
260 // Les valeurs sont commentees pour laisser le defaut
261 // a GEANT (version 3-21, page CONS200), f.m.
262 epsil = .001; // Tracking precision,
263 stemax = -1.; // Maximum displacement for multiple scat
264 tmaxfd = -20.; // Maximum angle due to field deflection
265 deemax = -.3; // Maximum fractional energy loss, DLS
271 AliMedium(10, "FE_C0 ", 10, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
272 AliMedium(30, "FE_C1 ", 30, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
276 AliMedium(9, "ALU_C0 ", 9, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
277 AliMedium(29, "ALU_C1 ", 29, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
281 AliMedium(15, "AIR_C0 ", 15, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
282 AliMedium(35, "AIR_C1 ", 35, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
285 //_____________________________________________________________________________
286 void AliMAG::DrawModule() const
289 // Draw a shaded view of the L3 magnet
293 //_____________________________________________________________________________
297 // Initialise L3 magnet after it has been built
300 if(AliLog::GetGlobalDebugLevel()>0) {
301 printf("\n%s: ",ClassName());
302 for(i=0;i<35;i++) printf("*");
303 printf(" MAG_INIT ");
304 for(i=0;i<35;i++) printf("*");
305 printf("\n%s: ",ClassName());
307 // Here the MAG initialisation code (if any!)
308 for(i=0;i<80;i++) printf("*");