]> git.uio.no Git - u/mrichter/AliRoot.git/blob - STRUCT/AliDIPOv2.cxx
Volume placed outside mother volume (DDIP) corrected (Galina Chabratova)
[u/mrichter/AliRoot.git] / STRUCT / AliDIPOv2.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.11  2000/06/11 12:33:46  morsch
19 Coding rule violations corrected
20
21 Revision 1.10  2000/06/09 19:32:56  morsch
22 New detailed and corrected version from Galina Chabratova
23
24 Revision 1.9  2000/04/27 09:29:53  fca
25 Reverting to version 1.6.2
26
27 Revision 1.6.2.1  1999/12/03 16:38:51  fca
28 Correct overlap in magnet
29
30 Revision 1.6  1999/09/29 09:24:30  fca
31 Introduction of the Copyright and cvs Log
32
33 */
34
35 ///////////////////////////////////////////////////////////////////////////////
36 //                                                                           //
37 //  Magnetic Dipole version 1                                                //
38 //                                                                           //
39 //Begin_Html
40 /*
41 <img src="picts/AliDIPOv2Class.gif">
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 "AliDIPOv2.h"
55 #include "AliRun.h"
56 #include "AliConst.h"
57  
58 ClassImp(AliDIPOv2)
59  
60 //_____________________________________________________________________________
61 AliDIPOv2::AliDIPOv2() 
62 {
63   //
64   // Last design of magnetic dipole version 2
65   //
66 }
67  
68 //_____________________________________________________________________________
69 AliDIPOv2::AliDIPOv2(const char *name, const char *title)
70   : AliDIPO(name,title)
71 {
72   //
73   // Standard constructor for the magnetic dipole version 2    
74    SetMarkerColor(7);
75    SetMarkerStyle(2);
76    SetMarkerSize(0.4);
77 }
78  
79 //_____________________________________________________________________________
80 void AliDIPOv2::CreateGeometry()
81 {
82   //
83   // Creation of the geometry of the magnetic DIPOLE version 2
84   //
85
86   //  AliMC* gMC = AliMC::GetMC();
87
88   Float_t cpar[5], tpar[15], ypar[12];
89   Float_t dz, dx, dy;
90   Int_t idrotm[1899];
91   Float_t accMax, the1, phi1, the2, phi2, the3, phi3;
92   
93   Int_t *idtmed = fIdtmed->GetArray()-1799;
94
95   accMax = 9.;   // ANGLE POLAIRE MAXIMUM 
96
97   //       DIPOLE MAGNET 
98
99   tpar[0] = 0.; 
100   tpar[1] = 360.;
101   tpar[2] = 4.; 
102   //
103   tpar[3] = -250.55;
104   tpar[4] = 144.;
105   tpar[5] = 527.34; 
106   //
107   tpar[6] = -160.7;
108   tpar[7] = 144.;
109   tpar[8] = 527.34; 
110   //
111   tpar[9] = 150.8;
112   tpar[10] = 193.3;
113   tpar[11] = 527.34;
114   //
115   tpar[12] = 250.55;
116   tpar[13] = 193.3;
117   tpar[14] = 527.34;
118
119
120   gMC->Gsvolu("DDIP", "PCON", idtmed[1814], tpar, 15);  
121   //       COILS 
122   // air - m.f. 
123   cpar[0] = 207.;
124   cpar[1] = 274.;
125   cpar[2] = 37.65;
126   cpar[3] = 119.;
127   cpar[4] = 241. ; 
128   //   coil - high cuts
129   gMC->Gsvolu("DC1 ", "TUBS", idtmed[1853], cpar, 5);
130   cpar[3] = -61.;
131   cpar[4] = 61.;
132   gMC->Gsvolu("DC2 ", "TUBS", idtmed[1853], cpar, 5);
133
134   //  coil - low cuts cuts
135   cpar[0] = 207.;
136 //  cpar[1] = cpar[0] + 10.;
137   cpar[1] = 217;
138   cpar[3] = 119.;
139   cpar[4] = 241.;
140
141   gMC->Gsvolu("DC3 ", "TUBS", idtmed[1813], cpar, 5);
142   cpar[0] = 207.; 
143   cpar[1] = 217; 
144   cpar[3] = -61.;
145   cpar[4] = 61.;
146   gMC->Gsvolu("DC4 ", "TUBS", idtmed[1813], cpar, 5);
147
148   gMC->Gspos("DC3 ", 1, "DC1 ", 0., 0., 0., 0, "ONLY");
149   gMC->Gspos("DC4 ", 1, "DC2 ", 0., 0., 0., 0, "ONLY");
150
151 //  dz =  37.65 - 243.55
152   dz = -205.9-2.45;
153   dx = 5.;
154   gMC->Gspos("DC1 ", 1, "DDIP", dx, 0.,  dz, 0, "ONLY");
155   gMC->Gspos("DC1 ", 2, "DDIP", dx, 0., -dz, 0, "ONLY");
156   gMC->Gspos("DC2 ", 1, "DDIP", -dx, 0.,  dz, 0, "ONLY");
157   gMC->Gspos("DC2 ", 2, "DDIP", -dx, 0., -dz, 0, "ONLY");
158   the1 = 180.;
159   phi1 = 0.;
160   the2 = 90.;
161   phi2 = 151.;
162   the3 = 90.;
163   phi3 = 61.;
164   AliMatrix(idrotm[1800], the1, phi1, the2, phi2, the3, phi3);
165   phi2 = 29.;  //90-61
166   the3 = -90.;
167   phi3 = -61.;
168   AliMatrix(idrotm[1801], the1, phi1, the2, phi2, the3, phi3);
169   the1 = 0.;
170   phi1 = 0.;
171   the2 = 90.;
172   phi2 = 151.;
173   the3 = 90.;
174   phi3 = 61.;
175   AliMatrix(idrotm[1802], the1, phi1, the2, phi2, the3, phi3);
176   phi2 = 29.;
177   the3 = -90.;
178   phi3 = -61.;
179   AliMatrix(idrotm[1803], the1, phi1, the2, phi2, the3, phi3);
180
181   cpar[0] = 25.;
182   cpar[1] = 100.3; //25+75.3
183   cpar[2] = 33.5;
184   cpar[3] = 270.;
185   cpar[4] = 360.;
186 //*  coil high cuts
187   gMC->Gsvolu("DC11", "TUBS", idtmed[1853], cpar, 5);
188
189   dx = TMath::Sin(30.5*kDegrad) * -(207.+33.5)+5./TMath::Sin(30.5*kDegrad) ; 
190   dy = TMath::Cos(30.5*kDegrad) * -(207.+33.5);  
191   dz = cpar[1] - 243.55-2.45;
192   gMC->Gspos("DC11", 1, "DDIP",  dx, dy,  dz, idrotm[1800], "ONLY");
193   gMC->Gspos("DC11", 2, "DDIP",  dx, dy, -dz, idrotm[1802], "ONLY");
194   gMC->Gspos("DC11", 3, "DDIP", -dx, dy,  dz, idrotm[1801], "ONLY");
195   gMC->Gspos("DC11", 4, "DDIP", -dx, dy, -dz, idrotm[1803], "ONLY");
196
197
198
199 //* ... higher cuts
200   cpar[0] = 25.;
201   cpar[1] = 100.3; //25+75.3
202   cpar[2] = 33.5;
203   cpar[3] = 0.;
204   cpar[4] = 90.;
205 //*  coil high cuts
206   gMC->Gsvolu("DC12", "TUBS", idtmed[1853], cpar, 5);
207
208   dx = TMath::Sin(30.5*kDegrad) * -(207.+33.5)+5./TMath::Sin(30.5*kDegrad) ; 
209   dy = TMath::Cos(30.5*kDegrad) *(207.+33.5);  
210   dz = cpar[1] - 243.55-2.45;
211   gMC->Gspos("DC12", 1, "DDIP",  dx, dy,  dz, idrotm[1801], "ONLY");
212   gMC->Gspos("DC12", 2, "DDIP",  dx, dy, -dz, idrotm[1803], "ONLY");
213   gMC->Gspos("DC12", 3, "DDIP", -dx, dy,  dz, idrotm[1800], "ONLY");
214   gMC->Gspos("DC12", 4, "DDIP", -dx, dy, -dz, idrotm[1802], "ONLY");
215
216   the1 = 90.;
217   phi1 = 61.;
218   the2 = 90.;
219   phi2 = 151.;
220   the3 = 0.;
221   phi3 = 0.;
222   AliMatrix(idrotm[1804], the1, phi1, the2, phi2, the3, phi3);
223   the1 = 90.;
224   phi1 = -61.;
225   the2 = 90.;
226   phi2 = -151.;
227   AliMatrix(idrotm[1805], the1, phi1, the2, phi2, the3, phi3);
228   the1 = 90.;
229   phi1 = 119.; //180 -61
230   the2 = 90.;
231   phi2 = 209.; //270-61
232   AliMatrix(idrotm[1806], the1, phi1, the2, phi2, the3, phi3);
233   the1 = 90.;
234   phi1 = -119.;
235   the2 = 90.;
236   phi2 = -209.;
237   AliMatrix(idrotm[1807], the1, phi1, the2, phi2, the3, phi3); 
238
239 //*  coil - high cuts
240
241   tpar[0] = 37.65;
242   tpar[1] = 33.5;
243   tpar[2] = 145.5;
244   gMC->Gsvolu("DL1 ", "BOX ", idtmed[1853], tpar, 3);
245
246 // coil - low cuts
247
248   tpar[0] = 5.;
249   dx = 37.65  - 5.;  
250   gMC->Gsvolu("DL2 ", "BOX ", idtmed[1813], tpar, 3);
251   gMC->Gspos("DL2 ", 1, "DL1 ", dx, 0., 0., 0, "ONLY");
252
253   dx =-53.62;
254   dy =-241.26819;
255   dz = 0.0; 
256   gMC->Gspos("DL1 ", 1, "DDIP", dx,  dy, dz, idrotm[1804], "ONLY");
257   gMC->Gspos("DL1 ", 2, "DDIP", dx, -dy, dz, idrotm[1805], "ONLY");
258   gMC->Gspos("DL1 ", 3, "DDIP",-dx,  dy, dz, idrotm[1806], "ONLY");
259   gMC->Gspos("DL1 ", 4, "DDIP",-dx, -dy, dz, idrotm[1807], "ONLY");
260
261   // Contactor
262
263  //  high cuts
264
265   //Steel outer face planes
266
267   cpar[0] = 207.-18.6;
268   cpar[1] = 274.+18.6;
269   cpar[2] = 1.;
270   cpar[3] = -50.;
271   cpar[4] = 50.; 
272  
273   gMC->Gsvolu("DCO1", "TUBS", idtmed[1818], cpar, 5);
274   dx = -5.;
275   dz = 168.25-1.5-1.;
276   gMC->Gspos("DCO1", 1, "DDIP", dx, 0, dz, 0, "ONLY");
277   dz = 243.55+4.5+1.5+1.;
278   gMC->Gspos("DCO1", 2, "DDIP", dx, 0, dz, 0, "ONLY");
279   
280   // 9.06.2000
281
282   //  cpar[0] = 207.-18.6;
283   //  cpar[1] = 274.+18.6;
284   // cpar[2] = 1.;
285   cpar[3] = 180.-50.;
286   cpar[4] = 180.+50.; 
287  
288   gMC->Gsvolu("DCO2", "TUBS", idtmed[1818], cpar, 5);
289   dx = +5.;
290   dz = 168.25-1.5-1.;
291   gMC->Gspos("DCO2", 1, "DDIP", dx, 0, dz, 0, "ONLY");
292   dz = 243.55+4.5+1.5+1.;
293   gMC->Gspos("DCO2", 2, "DDIP", dx, 0, dz, 0, "ONLY");
294  
295
296
297   // Resin face planes
298
299   cpar[0] = 207.;
300   cpar[1] = 274.;
301   cpar[2] = .75;
302   cpar[3] = -50.;
303   cpar[4] = 50.; 
304  
305   gMC->Gsvolu("DCO3", "TUBS", idtmed[1812], cpar, 5);
306   dx = -5;
307   dz = 168.25-0.75;
308   gMC->Gspos("DCO3", 1, "DDIP", dx,  0, dz, 0, "ONLY");
309   dz = 243.55+4.5+0.75;
310   gMC->Gspos("DCO3", 2, "DDIP", dx,  0, dz, 0, "ONLY");
311
312   // 9.06.2000
313
314   cpar[3] = 180.-50.;
315   cpar[4] = 180.+50.; 
316   gMC->Gsvolu("DCO4", "TUBS", idtmed[1812], cpar, 5);
317   dx = +5;
318   dz = 168.25-0.75;
319   gMC->Gspos("DCO4", 1, "DDIP", dx,  0, dz, 0, "ONLY");
320   dz = 243.55+4.5+0.75;
321   gMC->Gspos("DCO4", 2, "DDIP", dx,  0, dz, 0, "ONLY");
322
323  
324   // G10 face plane
325
326   cpar[0] = 207.;
327   cpar[1] = 274.;
328   cpar[2] = 2.25;
329   cpar[3] = -50.;
330   cpar[4] = 50.; 
331  
332   gMC->Gsvolu("DCO5", "TUBS", idtmed[1810], cpar, 5);
333
334   dx = -5;
335   dz = 243.55+2.25;
336   gMC->Gspos("DCO5", 1, "DDIP", dx,  0, dz, 0, "ONLY");
337
338   // 9.06.2000
339
340   cpar[3] = 180.-50.;
341   cpar[4] = 180.+50.; 
342
343   gMC->Gsvolu("DCO6", "TUBS", idtmed[1810], cpar, 5);
344
345   dx = +5;
346    dz = 243.55+2.25;
347   gMC->Gspos("DCO6", 1, "DDIP", dx,  0, dz, 0, "ONLY");
348
349   //Steel supported planes
350
351   cpar[0] = 274.+1.5+2.;
352   cpar[1] = 274.+18.6;
353   cpar[2] = 1.;
354   cpar[3] = -50.;
355   cpar[4] = 50.;  
356  
357   gMC->Gsvolu("DCO7", "TUBS", idtmed[1818], cpar, 5);
358
359   dx = -5;
360   dz = 168.25+1.;
361   gMC->Gspos("DCO7", 1, "DDIP", dx, 0, dz, 0, "ONLY");
362
363   // 9.06.2000
364   cpar[0] = 274.+1.5+2.;
365   cpar[1] = 274.+18.6;
366   cpar[2] = 1.;
367   cpar[3] = 180.-50.;
368   cpar[4] = 180.+50.; 
369
370  
371   gMC->Gsvolu("DCO8", "TUBS", idtmed[1818], cpar, 5);
372
373   dx = +5;
374   dz = 168.25+1.;
375   gMC->Gspos("DCO8", 1, "DDIP", dx, 0, dz, 0, "ONLY");
376
377   //
378
379   cpar[0] = 207.- 18.6;
380   cpar[1] = 207.- 2.- 1.5;
381   cpar[2] = 1.;
382   cpar[3] = -50.;
383   cpar[4] = 50.; 
384
385   gMC->Gsvolu("DCO9", "TUBS", idtmed[1818], cpar, 5);
386
387   dx = -5;
388   dz = 168.25+1.;
389   gMC->Gspos("DCO9", 1, "DDIP", dx, 0, dz, 0, "ONLY");
390
391   // 9.06.2000
392
393   cpar[0] = 207.- 18.6;
394   cpar[1] = 207.- 2.- 1.5;
395   cpar[2] = 1.;
396   cpar[3] = 180.-50.;
397   cpar[4] = 180.+50.; 
398
399   gMC->Gsvolu("DCOA", "TUBS", idtmed[1818], cpar, 5);
400
401   dx = +5;
402   dz = 168.25+1.;
403   gMC->Gspos("DCOA", 1, "DDIP", dx, 0, dz, 0, "ONLY");
404
405
406   // Sides steel planes
407
408   cpar[0] = 207. - 1.5 -2.;
409   cpar[1] = 207. - 1.5 ;
410   cpar[2] = ((243.55+4.5+1.5)-168.25)/2;
411   cpar[3] = -50.;
412   cpar[4] = 50.; 
413  
414   gMC->Gsvolu("DCOB", "TUBS", idtmed[1818], cpar, 5);
415
416   cpar[0] = 274. + 1.5;
417   cpar[1] = 274. + 1.5 +2.;
418
419   gMC->Gsvolu("DCOC", "TUBS", idtmed[1818], cpar, 5);
420
421   dx=-5.;
422   dz = ((243.55+4.5+1.5)+168.25)/2;
423   gMC->Gspos("DCOB", 1, "DDIP", dx,  0, dz, 0, "ONLY");
424   gMC->Gspos("DCOC", 1, "DDIP", dx,  0, dz, 0, "ONLY");
425
426   // 9.06.2000
427
428   cpar[0] = 207. - 1.5 -2.;
429   cpar[1] = 207. - 1.5 ;
430   cpar[2] = ((243.55+4.5+1.5)-168.25)/2;
431   cpar[3] = 180.-50.;
432   cpar[4] = 180.+50.; 
433
434   gMC->Gsvolu("DCOD", "TUBS", idtmed[1818], cpar, 5);
435
436   cpar[0] = 274. + 1.5;
437   cpar[1] = 274. + 1.5 +2.;
438
439   gMC->Gsvolu("DCOE", "TUBS", idtmed[1818], cpar, 5);
440
441   dx=+5.;
442   dz = ((243.55+4.5+1.5)+168.25)/2;
443   gMC->Gspos("DCOD", 1, "DDIP", dx,  0, dz, 0, "ONLY");
444   gMC->Gspos("DCOE", 1, "DDIP", dx,  0, dz, 0, "ONLY");
445
446
447   // Top and bottom resin  planes
448
449   cpar[0] = 207. - 1.5 ;
450   cpar[1] = 207. ;
451   cpar[2] = ((243.55+4.5+1.5)-168.25)/2;
452   cpar[3] = -50.;
453   cpar[4] = 50.; 
454  
455   gMC->Gsvolu("DCOF", "TUBS", idtmed[1812], cpar, 5);
456
457   cpar[0] = 274.;
458   cpar[1] = 274. + 1.5;
459
460   gMC->Gsvolu("DCOG", "TUBS", idtmed[1812], cpar, 5);
461
462
463   dx=-5.;
464   dz = ((243.55+4.5+1.5)+168.25)/2;
465   gMC->Gspos("DCOF", 1, "DDIP", dx,  0, dz, 0, "ONLY");
466   gMC->Gspos("DCOG", 1, "DDIP", dx,  0, dz, 0, "ONLY");
467
468   // 9.06.2000
469   cpar[0] = 207. - 1.5 ;
470   cpar[1] = 207. ;
471   cpar[2] = ((243.55+4.5+1.5)-168.25)/2;
472
473   cpar[3] = 180.-50.;
474   cpar[4] = 180.+50.; 
475
476   gMC->Gsvolu("DCOH", "TUBS", idtmed[1812], cpar, 5);
477
478   cpar[0] = 274.;
479   cpar[1] = 274. + 1.5;
480
481   gMC->Gsvolu("DCOI", "TUBS", idtmed[1812], cpar, 5);
482
483
484   dx=+5.;
485   dz = ((243.55+4.5+1.5)+168.25)/2;
486   gMC->Gspos("DCOH", 1, "DDIP", dx,  0, dz, 0, "ONLY");
487   gMC->Gspos("DCOI", 1, "DDIP", dx,  0, dz, 0, "ONLY");
488
489
490   // Aluminum cabels
491
492   cpar[0] = 274. + 1.5  +2.;
493   cpar[1] = 274. + 1.5  +2. + 80.;
494   cpar[2] = 5.05/2;
495   cpar[3] = -24.;
496   cpar[4] = 24.; 
497  
498   gMC->Gsvolu("DCOJ", "TUBS", idtmed[1811], cpar, 5);
499
500   //  dx = 274. + 1.5  +2. +40.;
501   //  dx = 5. + 1.5 +2. +40.;
502   //  dx = 5. + 1.5 +2.;
503   dx=-5.;
504   dz = 168.25 + 5.05 + 5.05/2;
505   gMC->Gspos("DCOJ", 1, "DDIP", dx,  0, dz, 0, "ONLY");
506
507   dz = 243.55 - 5.05/2;
508   gMC->Gspos("DCOJ", 2, "DDIP", dx,  0, dz, 0, "ONLY");
509
510   // 9.06.2000
511
512   cpar[3] = 180.-24.;
513   cpar[4] = 180.+24.; 
514
515    gMC->Gsvolu("DCOK", "TUBS", idtmed[1811], cpar, 5);
516
517   //  dx = 274. + 1.5  +2. +40.;
518   //  dx = 5. + 1.5 +2. +40.;
519   //  dx = 5. + 1.5 +2.;
520   dx=+5.;
521   dz = 168.25 + 5.05 + 5.05/2;
522   gMC->Gspos("DCOK", 1, "DDIP", dx,  0, dz, 0, "ONLY");
523
524   dz = 243.55 - 5.05/2;
525   gMC->Gspos("DCOK", 2, "DDIP", dx,  0, dz, 0, "ONLY");
526
527  
528   //   YOKE 
529
530 // Top and bottom blocks
531   ypar[0] = 298.1 ; 
532   ypar[1] = 69.5;
533   ypar[2] = 155.75;
534
535 // iron- high cuts
536   gMC->Gsvolu("DY1 ", "BOX ", idtmed[1858], ypar, 3);
537   ypar[0] = 144.+10. ; 
538   ypar[1] = 193.3+10.;
539   ypar[2] = 5.;
540   ypar[3] = 155.75;
541   dy = -69.5 + 5.;
542 // iron- low cuts
543   gMC->Gsvolu("DY11", "TRD1", idtmed[1818], ypar, 4);
544   gMC->Gspos("DY11", 1, "DY1 ", 0.,  dy, 0., 0, "ONLY");
545
546   dy = 365.5;
547   dz = 4.95;
548   gMC->Gspos("DY1 ", 1, "DDIP", 0.,  dy, -dz, 0, "ONLY");
549
550   the1 = 270.;
551   phi1 = 0.;
552   the2 = 270.;
553   phi2 = 90.;
554   the3 = 0.;
555   phi3 = 0.;
556   AliMatrix(idrotm[1808], the1, phi1, the2, phi2, the3, phi3);
557  gMC->Gspos("DY1 ", 2, "DDIP", 0., -dy, -dz, idrotm[1808] , "ONLY");
558
559 // side walls
560   //  ypar[0] = 579./2. ; 
561   ypar[0] = 296. ; 
562   ypar[1] = 0.;
563   ypar[2] = 0.;
564   ypar[3] = 155.75;
565   ypar[4] = 47.9 ;
566   ypar[5] = 72.55;
567   ypar[6] = 4.3058039629 ;
568   // z+ 
569   ypar[7] = 155.75;
570   ypar[8] = 47.9 ;
571   ypar[9] = 72.55;
572   ypar[10] = 4.3058039629 ;
573
574 // iron - high cuts
575
576   gMC->Gsvolu("DY2 ", "TRAP", idtmed[1858], ypar,11);
577
578   ypar[4] = 47.9 -5.;
579   ypar[5] = 72.55 -5.;
580
581   ypar[8] = 47.9 -5.;
582   ypar[9] = 72.55 -5.;
583
584
585 // iron - low cuts
586
587   gMC->Gsvolu("DY22", "TRAP", idtmed[1818], ypar,11);
588
589   dy = 0.;
590   dx = -5.;
591
592   gMC->Gspos("DY22", 1, "DY2 ", dx,  dy, 0., 0, "ONLY");
593
594   the1 = 90.;
595   phi1 = 180.;
596   the2 = 180.;
597   phi2 = 180.;
598   the3 = 90.;
599   phi3 = 90.;
600   AliMatrix(idrotm[1809], the1, phi1, the2, phi2, the3, phi3);
601
602   the1 = 90.;
603   phi1 = 0.;
604   the2 = 180.;
605   phi2 = 0.;
606   the3 = 90. ;
607   phi3 = 90.;
608   AliMatrix(idrotm[1810], the1, phi1, the2, phi2, the3, phi3);
609
610   dx = 228.875;
611   dz = - 4.95;
612   gMC->Gspos("DY2 ", 1, "DDIP", dx, 0.0,  dz, idrotm[1809], "ONLY");
613   gMC->Gspos("DY2 ", 2, "DDIP", -dx, 0.0,  dz, idrotm[1810], "ONLY");
614
615   dz=975.;
616   gMC->Gspos("DDIP", 1, "ALIC", 0., 0., dz, 0, "ONLY");
617
618   gMC->Gsatt("DDIP", "SEEN", 0);
619 //  gMC->Gsatt("DC21", "SEEN", 0);
620 //  gMC->Gsatt("DC22", "SEEN", 0);
621 //  gMC->Gsatt("DC3 ", "SEEN", 0);
622 //  gMC->Gsatt("DC4 ", "SEEN", 0);
623 }
624
625 //_____________________________________________________________________________
626 void AliDIPOv2::DrawModule()
627 {
628   //
629   // Draw a shaded view of the muon absorber
630   //
631
632   AliMC* gMC = AliMC::GetMC();
633   
634   // Set everything unseen
635   gMC->Gsatt("*", "seen", -1);
636   // 
637   // Set ALIC mother transparent
638   gMC->Gsatt("ALIC","SEEN",0);
639   //
640   // Set the volumes visible
641   gMC->Gsatt("DDIP","seen",0);
642   gMC->Gsatt("DC1 ","seen",1);
643   gMC->Gsatt("DC2 ","seen",1);
644   gMC->Gsatt("DC3 ","seen",1);
645   gMC->Gsatt("DC4 ","seen",1);
646   gMC->Gsatt("DC11","seen",1);
647   gMC->Gsatt("DC21","seen",1);
648   gMC->Gsatt("DC12","seen",1);
649   gMC->Gsatt("DC22","seen",1);
650   gMC->Gsatt("DL1 ","seen",1);
651   gMC->Gsatt("DL2 ","seen",1);
652   gMC->Gsatt("DY1 ","seen",1);
653   gMC->Gsatt("DY2 ","seen",1);
654   gMC->Gsatt("DYL ","seen",1);
655   gMC->Gsatt("DY3 ","seen",1);
656  // gMC->Gsatt("DY4 ","seen",1);
657  // gMC->Gsatt("DY5 ","seen",1);
658  // gMC->Gsatt("DY6 ","seen",1);
659 //  gMC->Gsatt("DY7 ","seen",1);
660   //
661   gMC->Gdopt("hide", "on");
662   gMC->Gdopt("shad", "on");
663   gMC->Gsatt("*", "fill", 7);
664   gMC->SetClipBox(".");
665   gMC->SetClipBox(".");
666   gMC->DefaultRange();
667   gMC->Gdraw("alic", 30, 30, 0, 17, 13.5, .019, .019);
668   gMC->Gdhead(1111, "Magnetic Dipole Version 2");
669   gMC->Gdman(16, 4, "MAN");
670 }
671
672 //_____________________________________________________________________________
673 void AliDIPOv2::CreateMaterials()
674 {
675   //
676   // Create Materials for Magnetic Dipole version 2
677   //
678   
679   Int_t isxfld   = gAlice->Field()->Integ();
680   Float_t sxmgmx = gAlice->Field()->Max();
681   
682   Float_t asteel[4] = { 55.847,51.9961,58.6934,28.0855 };
683   Float_t zsteel[4] = { 26.,24.,28.,14. };
684   Float_t wsteel[4] = { .715,.18,.1,.005 };
685
686   Float_t acoil[3]  = { 26.98,1.01,16. };
687   Float_t zcoil[3]  = { 13.,1.,8. };
688   Float_t wcoil[3]  = { .66,.226,.114 };
689
690   Float_t aresi[3]  = { 1.01,12.011,16.};
691   Float_t zresi[3]  = { 1.,6.,8. };
692   Float_t wresi[3]  = { .0644,.7655,.1701 };
693
694   Float_t aG10[5] = { 1.01,12.011,16.,28.085 ,79.904 };
695   Float_t zG10[5] = { 1.,6.,8.,14.,35. };
696   Float_t wG10[5] = { .02089,.22338,.28493,.41342,.05738 };
697
698   Float_t aAlCon[2] = { 14.61, 26.98};
699   Float_t zAlCon[2] = { 7.3, 13.};
700   Float_t wAlCon[2] = { .0004,.9996};
701
702   
703   Float_t epsil, stmin, deemax, tmaxfd, stemax;
704   
705   // --- Define the various materials for GEANT --- 
706   //     Aluminum 
707   AliMaterial(9, "ALUMINIUM$", 26.98, 13., 2.7, 8.9, 37.2);
708   AliMaterial(29, "ALUMINIUM$", 26.98, 13., 2.7, 8.9, 37.2);
709   AliMaterial(49, "ALUMINIUM$", 26.98, 13., 2.7, 8.9, 37.2);
710   
711   //     Iron 
712   AliMaterial(10, "IRON$     ", 55.85, 26., 7.87, 1.76, 17.1);
713   AliMaterial(30, "IRON$     ", 55.85, 26., 7.87, 1.76, 17.1);
714   AliMaterial(50, "IRON$     ", 55.85, 26., 7.87, 1.76, 17.1);
715   
716   //     Air 
717   AliMaterial(15, "AIR$      ", 14.61, 7.3, .001205, 30423.24, 67500);
718   AliMaterial(35, "AIR$      ", 14.61, 7.3, .001205, 30423.24, 67500);
719   AliMaterial(55, "AIR$      ", 14.61, 7.3, .001205, 30423.24, 67500);
720   
721   //     Vacuum 
722   AliMaterial(16, "VACUUM$ ", 1e-16, 1e-16, 1e-16, 1e16, 1e16);
723   AliMaterial(36, "VACUUM$ ", 1e-16, 1e-16, 1e-16, 1e16, 1e16);
724   AliMaterial(56, "VACUUM$ ", 1e-16, 1e-16, 1e-16, 1e16, 1e16);
725   
726   //     stainless Steel 
727   AliMixture(19, "STAINLESS STEEL$", asteel, zsteel, 7.88, 4, wsteel);
728   AliMixture(39, "STAINLESS STEEL$", asteel, zsteel, 7.88, 4, wsteel);
729   AliMixture(59, "STAINLESS STEEL$", asteel, zsteel, 7.88, 4, wsteel);
730   
731   //     Coil 
732   AliMixture(14, "Al$", acoil, zcoil, 2.122, 3, wcoil);
733   AliMixture(34, "Al$", acoil, zcoil, 2.122, 3, wcoil);
734   AliMixture(54, "Al$", acoil, zcoil, 2.122, 3, wcoil);
735
736   //RESIN
737   AliMixture(13, "RESIN$", aresi, zresi, 1.05, 3, wresi);
738   AliMixture(33, "RESIN$", aresi, zresi, 1.05, 3, wresi);
739   AliMixture(53, "RESIN$", aresi, zresi, 1.05, 3, wresi);  
740
741   //G10
742   AliMixture(11, "G10$", aG10, zG10, 1.7, 5, wG10);
743   AliMixture(31, "G10$", aG10, zG10, 1.7, 5, wG10);
744   AliMixture(51, "G10$", aG10, zG10, 1.7, 5, wG10); 
745  
746   //Aluminium Conductor
747   AliMixture(12, "AlCond$", aAlCon, zAlCon, 1.3506, 2, wAlCon);
748   AliMixture(32, "AlCond$", aAlCon, zAlCon, 1.3506, 2, wAlCon);
749   AliMixture(52, "AlCond$", aAlCon, zAlCon, 1.3506, 2, wAlCon);  
750
751   // **************** 
752   //     Defines tracking media parameters. 
753   //     Les valeurs sont commentees pour laisser le defaut 
754   //     a GEANT (version 3-21, page CONS200), f.m. 
755   epsil  = .001;  // Tracking precision, 
756   stemax = -1.;   // Maximum displacement for multiple scat 
757   tmaxfd = -20.;  // Maximum angle due to field deflection 
758   deemax = -.3;   // Maximum fractional energy loss, DLS 
759   stmin  = -.8;
760   // *************** 
761   
762   //    Aluminum 
763   AliMedium(9, "ALU_C0          ",  9, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
764   AliMedium(29, "ALU_C1          ", 29, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
765   AliMedium(49, "ALU_C2          ", 49, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
766   
767   //    Iron 
768   AliMedium(10, "FE_C0           ", 10, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
769   AliMedium(30, "FE_C1           ", 30, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
770   AliMedium(50, "FE_C2           ", 50, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
771   
772   //    Air 
773   AliMedium(15, "AIR_C0          ", 15, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
774   AliMedium(35, "AIR_C1          ", 35, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
775   AliMedium(55, "AIR_C2          ", 55, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
776   
777   //    Vacuum 
778   AliMedium(16, "VA_C0           ", 16, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
779   AliMedium(36, "VA_C1           ", 36, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
780   AliMedium(56, "VA_C2           ", 56, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
781   
782   //    Steel 
783   AliMedium(19, "ST_C0           ", 19, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
784   AliMedium(39, "ST_C1           ", 39, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
785   AliMedium(59, "ST_C3           ", 59, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
786   
787   //    Coil 
788   AliMedium(14, "Coil_C1         ", 14, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
789   AliMedium(34, "Coil_C2         ", 34, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
790   AliMedium(54, "Coil_C3         ", 54, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
791
792   //    Resin 
793   AliMedium(13, "RESIN_C0         ", 13, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
794   AliMedium(33, "RESIN_C1         ", 33, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
795   AliMedium(53, "RESIN_C2         ", 53, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
796
797   //    G10 
798   AliMedium(11, "G10_C0         ", 11, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
799   AliMedium(31, "G10_C1         ", 31, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
800   AliMedium(51, "G10_C2         ", 51, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
801
802   //Aluminium Contactor
803   AliMedium(12, "AlCond_C0         ", 12, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
804   AliMedium(32, "AlCond_C1         ", 32, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
805   AliMedium(52, "AlCond_C2         ", 52, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
806 }
807
808
809
810
811
812