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