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