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