]> git.uio.no Git - u/mrichter/AliRoot.git/blame - STRUCT/AliMAG.cxx
Rear shield back to default value.
[u/mrichter/AliRoot.git] / STRUCT / AliMAG.cxx
CommitLineData
4c039060 1/**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
3 * *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
6 * *
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 **************************************************************************/
15
eeacf08b 16/* $Id$ */
4c039060 17
fe4da5cc 18///////////////////////////////////////////////////////////////////////////////
19// //
20// L3 Magnet //
21// //
22//Begin_Html
23/*
1439f98e 24<img src="picts/AliMAGClass.gif">
fe4da5cc 25</pre>
26<br clear=left>
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>.
30</font>
31<pre>
32*/
33//End_Html
34// //
35///////////////////////////////////////////////////////////////////////////////
36
37#include "AliMAG.h"
38#include "AliRun.h"
94de3818 39#include "AliMagF.h"
fe4da5cc 40
41ClassImp(AliMAG)
42
43//_____________________________________________________________________________
44AliMAG::AliMAG()
45{
46 //
47 // Default constructor for L3 magnet
48 //
49}
50
51//_____________________________________________________________________________
52AliMAG::AliMAG(const char *name, const char *title)
b8032157 53 : AliModule(name,title)
fe4da5cc 54{
55 //
56 // Standard constructor for L3 magnet
57 //
58 //Begin_Html
59 /*
1439f98e 60 <img src="picts/aliMAG.gif">
fe4da5cc 61 */
62 //End_Html
63
64 SetMarkerColor(7);
65 SetMarkerStyle(2);
66 SetMarkerSize(0.4);
67}
68
fe4da5cc 69//_____________________________________________________________________________
70void AliMAG::CreateGeometry()
71{
72 //
73 // Create geometry for L3 magnet
74 //
75 //Begin_Html
76 /*
1439f98e 77 <img src="picts/mag.gif">
fe4da5cc 78 */
79 //End_Html
80 //Begin_Html
81 /*
1439f98e 82 <img src="picts/tree_mag.gif">
fe4da5cc 83 */
84 //End_Html
85
ad51aeb0 86 Int_t *idtmed = fIdtmed->GetArray()-299;
fe4da5cc 87
88 Float_t dpar[13];
89 Int_t idrotm[399];
90 Float_t par[10];
91
92 // ANGLE POLAIRE MAXIMUM
93
94 // Define Mother
95
96 par[0] = 22.5;
95bb7c88 97 par[1] = 360.;
fe4da5cc 98 par[2] = 8.;
99 par[3] = 2.;
100 par[4] = -600.;
101 par[5] = 580.;
102 par[6] = 790.;
103 par[7] = 600.;
104 par[8] = 580.;
105 par[9] = 790.;
cfce8870 106 gMC->Gsvolu("L3MO", "PGON", idtmed[334], par, 10);
107 gMC->Gspos("L3MO", 1, "ALIC", 0., -30., 0., 0, "ONLY");
fe4da5cc 108
109 // Define coils
110
111 par[5] = 585.;
112 par[6] = 690.;
113 par[8] = 585.;
114 par[9] = 690.;
cfce8870 115 gMC->Gsvolu("L3CO", "PGON", idtmed[328], par, 10);
116 gMC->Gspos("L3CO", 1, "L3MO", 0., 0., 0., 0, "ONLY");
fe4da5cc 117
118 par[5] = 580.;
119 par[6] = 585.;
120 par[8] = 580.;
121 par[9] = 585.;
cfce8870 122 gMC->Gsvolu("L3C1", "PGON", idtmed[308], par, 10);
123 gMC->Gspos("L3C1", 1, "L3MO", 0., 0., 0., 0, "ONLY");
fe4da5cc 124
125 // Define yoke
126
127 par[5] = 690.;
128 par[6] = 790.;
129 par[8] = 690.;
130 par[9] = 790.;
cfce8870 131 gMC->Gsvolu("L3YO", "PGON", idtmed[329], par, 10);
132 gMC->Gspos("L3YO", 1, "L3MO", 0., 0., 0., 0, "ONLY");
fe4da5cc 133
134 // Define the return yoke of L3 (DOOR)
135
136 par[4] = 600.;
137 par[5] = 0.;
138 par[6] = 790.;
139 par[7] = 700.;
140 par[8] = par[5];
141 par[9] = par[6];
cfce8870 142 gMC->Gsvolu("L3DO", "PGON", idtmed[334], par, 10);
a00df67b 143 gMC->Gsvolu("L3DX", "PGON", idtmed[334], par, 10);
fe4da5cc 144
145 par[4] = 610.;
146 par[5] = 0.;
147 par[6] = 790.;
148 par[7] = 700.;
149 par[8] = par[5];
150 par[9] = par[6];
cfce8870 151 gMC->Gsvolu("L3FR", "PGON", idtmed[329], par, 10);
a00df67b 152 gMC->Gsvolu("L3FX", "PGON", idtmed[329], par, 10);
fe4da5cc 153
154 // INNER LAYER
155
156 par[4] = 600.;
157 par[7] = 610.;
cfce8870 158 gMC->Gsvolu("L3IR", "PGON", idtmed[309], par, 10);
a00df67b 159 gMC->Gsvolu("L3IX", "PGON", idtmed[309], par, 10);
fe4da5cc 160
161 // DOOR OPENING
162
163 dpar[0] = 22.5;
95bb7c88 164 dpar[1] = 360;
fe4da5cc 165 dpar[2] = 8.;
166 dpar[3] = 3.;
167 dpar[4] = 610.;
168 dpar[5] = 0.;
169 dpar[6] = 163.5;
170 dpar[7] = 670.;
171 dpar[8] = dpar[5];
172 dpar[9] = dpar[6];
173 dpar[10] = 700.;
174 dpar[11] = dpar[5];
175 dpar[12] = dpar[6] + 50.;
cfce8870 176 gMC->Gsvolu("L3O1", "PGON", idtmed[314], dpar, 13);
a00df67b 177 gMC->Gsvolu("L3O3", "PGON", idtmed[314], dpar, 13);
fe4da5cc 178 par[4] = 600.;
179 par[5] = 0.;
180 par[6] = 163.5;
181 par[7] = 610.;
182 par[8] = 0.;
183 par[9] = 163.5;
cfce8870 184 gMC->Gsvolu("L3O2", "PGON", idtmed[314], par, 10);
a00df67b 185 gMC->Gsvolu("L3O4", "PGON", idtmed[314], par, 10);
fe4da5cc 186
187 // THE DOOR OPENING HAS TO BE PLACED WITH 'MANY' SINCE THE REGION
188 // WILL CONTAIN A MUON CHAMBER, BEAM PIPE AND BEAM SHIELD
189 // PLACED WITH 'ONLY'.
190
a00df67b 191 AliMatrix(idrotm[300], 90., 0., 90., 90., 180., 0.);
192
193 gMC->Gspos("L3DO", 1, "ALIC", 0., -30., 0., 0, "MANY");
cfce8870 194 gMC->Gspos("L3FR", 1, "L3DO", 0., 0., 0., 0, "MANY");
195 gMC->Gspos("L3IR", 1, "L3DO", 0., 0., 0., 0, "MANY");
fe4da5cc 196
a00df67b 197 gMC->Gspos("L3DX", 1, "ALIC", 0., -30., 0., idrotm[300], "MANY");
198 gMC->Gspos("L3FX", 1, "L3DX", 0., 0., 0., 0, "MANY");
199 gMC->Gspos("L3IX", 1, "L3DX", 0., 0., 0., 0, "MANY");
200
ad3762d0 201 if(!strcmp(gMC->GetName(),"TGeant3")) {
a00df67b 202
203 gMC->Gspos("L3O1", 1, "L3FR", 0., 30., 0., 0, "MANY");
204 gMC->Gspos("L3O2", 1, "L3IR", 0., 30., 0., 0, "MANY");
205 gMC->Gspos("L3O3", 1, "L3FX", 0., 30., 0., 0, "MANY");
206 gMC->Gspos("L3O4", 1, "L3IX", 0., 30., 0., 0, "MANY");
207
208 }
209 else {
210 gMC->Gspos("L3O1", 1, "ALIC", 0., 0., 0., 0, "MANY");
211 gMC->Gspos("L3O2", 1, "ALIC", 0., 0., 0., 0, "MANY");
212 gMC->Gsbool("L3O1", "L3DO");
213 gMC->Gsbool("L3O2", "L3DO");
214
215 gMC->Gspos("L3O3", 1, "ALIC", 0., 0., 0., idrotm[300], "MANY");
216 gMC->Gspos("L3O4", 1, "ALIC", 0., 0., 0., idrotm[300], "MANY");
217 gMC->Gsbool("L3O3", "L3DX");
218 gMC->Gsbool("L3O4", "L3DX");
219 }
fe4da5cc 220}
221
222//_____________________________________________________________________________
223void AliMAG::CreateMaterials()
224{
225 //
226 // Create materials for L3 magnet
227 //
228
b43eb0dc 229 Int_t isxfld = gAlice->Field()->Integ();
230 Float_t sxmgmx = gAlice->Field()->Max();
fe4da5cc 231
232 Float_t epsil, stmin, deemax, tmaxfd, stemax;
233 // --- Define the various materials for GEANT ---
234
235 // Aluminum
236 AliMaterial(9, "Al$", 26.98, 13., 2.7, 8.9, 37.2);
237 AliMaterial(29, "Al$", 26.98, 13., 2.7, 8.9, 37.2);
238
239 // Iron
240 AliMaterial(10, "Fe$", 55.85, 26., 7.87, 1.76, 17.1);
241 AliMaterial(30, "Fe$", 55.85, 26., 7.87, 1.76, 17.1);
242
243 // Air
244 AliMaterial(15, "Air$", 14.61, 7.3, .001205, 30420., 67500);
245 AliMaterial(35, "Air$", 14.61, 7.3, .001205, 30420., 67500);
246
247 // ****************
248 // Defines tracking media parameters.
249 // Les valeurs sont commentees pour laisser le defaut
250 // a GEANT (version 3-21, page CONS200), f.m.
251 epsil = .001; // Tracking precision,
252 stemax = -1.; // Maximum displacement for multiple scat
253 tmaxfd = -20.; // Maximum angle due to field deflection
254 deemax = -.3; // Maximum fractional energy loss, DLS
255 stmin = -.8;
256 // ***************
257
258 // IRON
259
b43eb0dc 260 AliMedium(10, "FE_C0 ", 10, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
261 AliMedium(30, "FE_C1 ", 30, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
fe4da5cc 262
263 // ALUMINUM
264
b43eb0dc 265 AliMedium(9, "ALU_C0 ", 9, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
266 AliMedium(29, "ALU_C1 ", 29, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
fe4da5cc 267
268 // AIR
269
b43eb0dc 270 AliMedium(15, "AIR_C0 ", 15, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
271 AliMedium(35, "AIR_C1 ", 35, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
fe4da5cc 272}
273
274//_____________________________________________________________________________
b8032157 275void AliMAG::DrawModule()
fe4da5cc 276{
277 //
278 // Draw a shaded view of the L3 magnet
279 //
280}
281
282//_____________________________________________________________________________
283void AliMAG::Init()
284{
285 //
286 // Initialise L3 magnet after it has been built
287 Int_t i;
288 //
9e1a0ddb 289 if(fDebug) {
290 printf("\n%s: ",ClassName());
291 for(i=0;i<35;i++) printf("*");
292 printf(" MAG_INIT ");
293 for(i=0;i<35;i++) printf("*");
294 printf("\n%s: ",ClassName());
295 //
296 // Here the MAG initialisation code (if any!)
297 for(i=0;i<80;i++) printf("*");
298 printf("\n");
299 }
fe4da5cc 300}
301