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