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