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