Change of argument list of methods GetPadCxy, GetPadIxy, SetHit and FirstPad
[u/mrichter/AliRoot.git] / FMD / AliFMDv1.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  1999/09/29 09:24:14  fca
19 Introduction of the Copyright and cvs Log
20
21 */
22
23 ///////////////////////////////////////////////////////////////////////////////
24 //                                                                           //
25 //  Forward Multiplicity Detector version 1                                  //
26 //                                                                           //
27 //Begin_Html
28 /*
29 <img src="picts/AliFMDv1Class.gif">
30 </pre>
31 <br clear=left>
32 <font size=+2 color=red>
33 <p>The responsible person for this module is
34 <a href="mailto:Valeri.Kondratiev@cern.ch">Valeri Kondratiev</a>.
35 </font>
36 <pre>
37 */
38 //End_Html
39 //                                                                           //
40 ///////////////////////////////////////////////////////////////////////////////
41
42 #include "AliRun.h"
43 #include "AliFMDv1.h"
44 #include "AliMC.h"
45 #include "stdlib.h"
46  
47 ClassImp(AliFMDv1)
48  
49 //_____________________________________________________________________________
50 AliFMDv1::AliFMDv1()
51 {
52   //
53   // Default constructor for FMD version 1
54   //
55 }
56  
57 //_____________________________________________________________________________
58 AliFMDv1::AliFMDv1(const char *name, const char *title)
59   : AliFMD(name,title)
60 {
61   //
62   // Standard constructor for FMD version 1
63   //
64   AliModule *start = gAlice->GetModule("START");
65   if(start) {
66     Error("ctor","This version of FMD is incompatible with START\n");
67     exit(1);
68   }
69 }
70  
71 //___________________________________________
72 void AliFMDv1::CreateGeometry()
73 {
74   //
75   // Creation of the geometry of the FMD version 1
76   //
77   //Begin_Html
78   /*
79     <img src="picts/AliFMDv1Tree.gif">
80   */
81   //End_Html
82   //Begin_Html
83   /*
84     <img src="picts/AliFMDv1.gif">
85   */
86   //End_Html
87
88   
89   Float_t rout, z;
90   Float_t par[3], rin;
91
92   Int_t irotm[100];
93   
94   TArrayI &idtmed = *fIdtmed;    
95   
96   // ******************************************************** 
97   //       DEFINE DISK#3  OF FMD 
98   // ******************************************************** 
99   
100   gMC->Gsvolu("BR3_", "BOX ", idtmed[4], par, 0);
101   gMC->Gsvolu("CB3_", "BOX ", idtmed[5], par, 0);
102   gMC->Gsvolu("BR5_", "BOX ", idtmed[4], par, 0);
103   gMC->Gsvolu("CB5_", "BOX ", idtmed[5], par, 0);
104
105   //       Define parameters for the right disk 
106   
107   rin  = 4.5;
108   rout = 10.5;
109   z    = 77.;
110
111   //       Ring #1 
112
113   par[0] = rin;
114   par[1] = rout;
115   par[2] = 1.5;
116   gMC->Gsvolu("R1R3", "TUBE", idtmed[1], par, 3);
117   gMC->Gspos("R1R3", 1, "ALIC", 0., 0., z + 1.5, 0, "ONLY");
118
119   //       Ring #2 
120
121   par[0] = rout;
122   par[1] = rout + .65;
123   par[2] = 1.5;
124   gMC->Gsvolu("R2R3", "TUBE", idtmed[2], par, 3);
125   gMC->Gspos("R2R3", 1, "ALIC", 0., 0., z + 1.5, 0, "ONLY");
126
127   //       Ring #3 
128
129   par[0] = rout + .65;
130   par[1] = rout + 5.65;
131   par[2] = .025;
132   gMC->Gsvolu("R3R3", "TUBE", idtmed[3], par, 3);
133   gMC->Gspos("R3R3", 1, "ALIC", 0., 0., z + 1.525, 0, "ONLY");
134
135   //       Bracket #1
136
137   par[0] = 1.5;
138   par[1] = 0.1;
139   par[2] = 15.35;
140   gMC->Matrix(irotm[11], 90., 0., 161.2, 90., 71.2, 90.);
141   gMC->Gsposp("BR3_",1,"ALIC", 0., 25.25, 85.0, irotm[11],"ONLY",par,3); 
142   par[1] = 0.5;
143   gMC->Gsposp("CB3_",1,"ALIC", 0., 25.41, 84.53,irotm[11],"ONLY",par,3); 
144
145
146   //       Bracket #2
147
148   par[0] = 1.5;
149   par[1] = 0.1;
150   par[2] = 15.35;
151   gMC->Matrix(irotm[12], 90., 180., 161.2, 270., 71.2, 270.);
152   gMC->Gsposp("BR3_",2,"ALIC", 0.,-25.25, 85.0, irotm[12],"ONLY",par,3); 
153   par[1] = 0.5;
154   gMC->Gsposp("CB3_",2,"ALIC", 0.,-25.41, 84.53,irotm[12],"ONLY",par,3); 
155
156
157   //       Bracket #3
158
159   par[0] = 1.5;
160   par[1] = 0.1;
161   par[2] = 15.35;
162   gMC->Matrix(irotm[13], 90., 270., 161.2, 0., 71.2, 0.);
163   gMC->Gsposp("BR3_",3,"ALIC", 25.25, 0., 85.0, irotm[13],"ONLY",par,3); 
164   par[1] = 0.5;
165   gMC->Gsposp("CB3_",3,"ALIC", 25.41, 0., 84.53,irotm[13],"ONLY",par,3); 
166
167
168   //       Bracket #4
169
170   par[0] = 1.5;
171   par[1] = 0.1;
172   par[2] = 15.35;
173   gMC->Matrix(irotm[14], 90., 90., 161.2, 180., 71.2, 180.);
174   gMC->Gsposp("BR3_",4,"ALIC", -25.25, 0., 85.0, irotm[14],"ONLY",par,3); 
175   par[1] = 0.5;
176   gMC->Gsposp("CB3_",4,"ALIC", -25.41, 0., 84.53,irotm[14],"ONLY",par,3); 
177
178   //       Right support ring 
179
180   par[0] = 39.;
181   par[1] = 41.;
182   par[2] = .5;
183   gMC->Gsvolu("R1SP", "TUBE", idtmed[4], par, 3);
184   gMC->Gspos("R1SP", 1, "ALIC", 0., 0., 89.5, 0, "ONLY");
185
186   //       Define parameters for the left disk
187   
188   rin  = 4.5;
189   rout = 10.5;
190   z    = -77.;
191
192   //       Ring #1 
193
194   par[0] = rin;
195   par[1] = rout;
196   par[2] = 1.5;
197   gMC->Gsvolu("R1L3", "TUBE", idtmed[1], par, 3);
198   gMC->Gspos("R1L3", 1, "ALIC", 0., 0., z - 1.5, 0, "ONLY");
199
200   //       Ring #2 
201
202   par[0] = rout;
203   par[1] = rout + .65;
204   par[2] = 1.5;
205   gMC->Gsvolu("R2L3", "TUBE", idtmed[2], par, 3);
206   gMC->Gspos("R2L3", 1, "ALIC", 0., 0., z - 1.5, 0, "ONLY");
207
208   //       Ring #3 
209
210   par[0] = rout + .65;
211   par[1] = rout + 5.65;
212   par[2] = .025;
213   gMC->Gsvolu("R3L3", "TUBE", idtmed[3], par, 3);
214   gMC->Gspos("R3L3", 1, "ALIC", 0., 0., z - 1.525, 0, "ONLY");
215
216   //       Bracket #1
217
218   par[0] = 1.5;
219   par[1] = 0.1;
220   par[2] = 15.35;
221   gMC->Matrix(irotm[61], 90., 0., 180.-161.2, 90., 180.-71.2, 90.);
222   gMC->Gsposp("BR3_",5,"ALIC", 0., 25.25, -85.0, irotm[61],"ONLY",par,3); 
223   par[1] = 0.5;
224   gMC->Gsposp("CB3_",5,"ALIC", 0., 25.41, -84.53,irotm[61],"ONLY",par,3); 
225
226   gMC->Matrix(irotm[91], 90., 0., 90.-10.6, 90., 180.-10.6, 90.);
227   par[1] = 0.1;
228   par[2] = 81.4;
229   gMC->Gsposp("BR5_",1,"ALIC", 0., 55.0, -170.0,irotm[91],"ONLY",par,3); 
230   par[1] = 0.5;
231   gMC->Gsposp("CB5_",1,"ALIC", 0., 55.5, -169.5,irotm[91],"ONLY",par,3); 
232
233   //       Bracket #2
234
235   par[0] = 1.5;
236   par[1] = 0.1;
237   par[2] = 15.35;
238   gMC->Matrix(irotm[62], 90., 180., 180.-161.2, 270., 180.-71.2, 270.);
239   gMC->Gsposp("BR3_",6,"ALIC", 0.,-25.25, -85.0,irotm[62],"ONLY",par,3); 
240   par[1] = 0.5;
241   gMC->Gsposp("CB3_",6,"ALIC", 0.,-25.41, -84.53,irotm[62],"ONLY",par,3); 
242
243   gMC->Matrix(irotm[92], 90., 180., 90.-10.6, 270., 180.-10.6, 270.);
244   par[1] = 0.1;
245   par[2] = 81.4;
246   gMC->Gsposp("BR5_",2,"ALIC", 0., -55.0, -170.0,irotm[92],"ONLY",par,3); 
247   par[1] = 0.5;
248   gMC->Gsposp("CB5_",2,"ALIC", 0., -55.5, -169.5,irotm[92],"ONLY",par,3); 
249
250   //       Bracket #3
251
252   par[0] = 1.5;
253   par[1] = 0.1;
254   par[2] = 15.35;
255   gMC->Matrix(irotm[63], 90., 270., 180.-161.2, 0., 180.-71.2, 0.);
256   gMC->Gsposp("BR3_",7,"ALIC", 25.25, 0., -85.0, irotm[63],"ONLY",par,3); 
257   par[1] = 0.5;
258   gMC->Gsposp("CB3_",7,"ALIC", 25.41, 0., -84.53,irotm[63],"ONLY",par,3); 
259
260   gMC->Matrix(irotm[93], 90., 270., 90.-10.6, 0., 180.-10.6, 0.);
261   par[1] = 0.1;
262   par[2] = 81.4;
263   gMC->Gsposp("BR5_",3,"ALIC", 55., 0., -170.,irotm[93],"ONLY",par,3); 
264   par[1] = 0.5;
265   gMC->Gsposp("CB5_",3,"ALIC", 55.5, 0., -169.5,irotm[93],"ONLY",par,3); 
266
267   //       Bracket #4
268
269   par[0] = 1.5;
270   par[1] = 0.1;
271   par[2] = 15.35;
272   gMC->Matrix(irotm[64], 90., 90., 180.-161.2, 180., 180.-71.2, 180.);
273   gMC->Gsposp("BR3_",8,"ALIC", -25.25, 0., -85., irotm[64],"ONLY",par,3); 
274   par[1] = 0.5;
275   gMC->Gsposp("CB3_",8,"ALIC", -25.41, 0., -84.53,irotm[64],"ONLY",par,3); 
276
277   gMC->Matrix(irotm[94], 90., 90., 90.-10.6, 180., 180.-10.6, 180.);
278   par[1] = 0.1;
279   par[2] = 81.4;
280   gMC->Gsposp("BR5_",4,"ALIC", -55., 0., -170.,irotm[94],"ONLY",par,3); 
281   par[1] = 0.5;
282   gMC->Gsposp("CB5_",4,"ALIC", -55.5, 0., -169.5,irotm[94],"ONLY",par,3); 
283
284   //       Central support ring 
285
286   par[0] = 39.;
287   par[1] = 41.;
288   par[2] = .5;
289   gMC->Gsvolu("R2SP", "TUBE", idtmed[4], par, 3);
290   gMC->Gspos("R2SP", 1, "ALIC", 0., 0., -89.5, 0, "ONLY");
291
292   //        Left support ring 
293
294   par[0] = 69.;
295   par[1] = 71.;
296   par[2] = .5;
297   gMC->Gsvolu("R3SP", "TUBE", idtmed[4], par, 3);
298   gMC->Gspos("R3SP", 1, "ALIC", 0., 0., -249.5, 0, "ONLY");
299
300   // ******************************************************** 
301   //       DEFINE  DISK#2  OF FMD 
302   // ******************************************************** 
303   
304   gMC->Gsvolu("BR2_", "BOX ", idtmed[4], par, 0);
305   gMC->Gsvolu("CB2_", "BOX ", idtmed[5], par, 0);
306
307   //       Define parameters for right disk #2
308   
309   rin  = 7.7;
310   rout = 13.7;
311   z    = 64.4;
312
313   //       Ring #1 
314
315   par[0] = rin;
316   par[1] = rout;
317   par[2] = 1.5;
318   gMC->Gsvolu("R1R2", "TUBE", idtmed[1], par, 3);
319   gMC->Gspos("R1R2", 1, "ALIC", 0., 0., z + 1.5, 0, "ONLY");
320
321   //       Ring #2 
322
323   par[0] = rout;
324   par[1] = rout + .65;
325   par[2] = 1.5;
326   gMC->Gsvolu("R2R2", "TUBE", idtmed[2], par, 3);
327   gMC->Gspos("R2R2", 1, "ALIC", 0., 0., z + 1.5, 0, "ONLY");
328
329   //       Ring #3 
330
331   par[0] = rout + .65;
332   par[1] = rout + 5.65;
333   par[2] = .025;
334   gMC->Gsvolu("R3R2", "TUBE", idtmed[3], par, 3);
335   gMC->Gspos("R3R2", 1, "ALIC", 0., 0., z + 1.525, 0, "ONLY");
336
337   //       Bracket #1
338
339   par[0] = 1.5;
340   par[1] = 0.1;
341   par[2] = 17.35;
342   gMC->Matrix(irotm[21], 90., 30., 139.3, 120., 49.3, 120.);
343   gMC->Gsposp("BR2_",1,"ALIC", -13.4, 23.3, 78.7, irotm[21],"ONLY",par,3); 
344   par[1] = 0.5;
345   gMC->Gsposp("CB2_",1,"ALIC", -13.56, 23.6, 78.4, irotm[21],"ONLY",par,3); 
346
347   //       Bracket #2
348
349   par[0] = 1.5;
350   par[1] = 0.1;
351   par[2] = 17.35;
352   gMC->Matrix(irotm[22], 90., 210., 139.3, 300., 49.3, 300.);
353   gMC->Gsposp("BR2_",2,"ALIC", 13.4,-23.3, 78.7, irotm[22],"ONLY",par,3); 
354   par[1] = 0.5;
355   gMC->Gsposp("CB2_",2,"ALIC", 13.5,-23.6, 78.4,irotm[22],"ONLY",par,3); 
356
357
358   //       Bracket #3
359
360   par[0] = 1.5;
361   par[1] = 0.1;
362   par[2] = 17.35;
363   gMC->Matrix(irotm[23], 90., 300., 139.3, 30., 49.3, 30.);
364   gMC->Gsposp("BR2_",3,"ALIC", 23.3, 13.4, 78.7, irotm[23],"ONLY",par,3); 
365   par[1] = 0.5;
366   gMC->Gsposp("CB2_",3,"ALIC", 23.6, 13.56, 78.4,irotm[23],"ONLY",par,3); 
367
368   //       Bracket #4
369
370   par[0] = 1.5;
371   par[1] = 0.1;
372   par[2] = 17.35;
373   gMC->Matrix(irotm[24], 90., 120., 139.3, 210., 49.3, 210.);
374   gMC->Gsposp("BR2_",4,"ALIC", -23.3, -13.4, 78.7,irotm[24],"ONLY",par,3); 
375   par[1] = 0.5;
376   gMC->Gsposp("CB2_",4,"ALIC", -23.6, -13.56, 78.4,irotm[24],"ONLY",par,3); 
377
378   //       Define parameters for left disk
379   
380   rin  = 7.7;
381   rout = 13.7;
382   z    = -64.4;
383
384   //       Ring #1 
385
386   par[0] = rin;
387   par[1] = rout;
388   par[2] = 1.5;
389   gMC->Gsvolu("R1L2", "TUBE", idtmed[1], par, 3);
390   gMC->Gspos("R1L2", 1, "ALIC", 0., 0., z - 1.5, 0, "ONLY");
391
392   //       Ring #2 
393
394   par[0] = rout;
395   par[1] = rout + .65;
396   par[2] = 1.5;
397   gMC->Gsvolu("R2L2", "TUBE", idtmed[2], par, 3);
398   gMC->Gspos("R2L2", 1, "ALIC", 0., 0., z - 1.5, 0, "ONLY");
399
400   //       Ring #3 
401
402   par[0] = rout + .65;
403   par[1] = rout + 5.65;
404   par[2] = .025;
405   gMC->Gsvolu("R3L2", "TUBE", idtmed[3], par, 3);
406   gMC->Gspos("R3L2", 1, "ALIC", 0., 0., z - 1.525, 0, "ONLY");
407
408   //       Bracket #1
409
410   par[0] = 1.5;
411   par[1] = 0.1;
412   par[2] = 17.35;
413   gMC->Matrix(irotm[51], 90., 30., 180.-139.3, 120., 180.-49.3, 120.);
414   gMC->Gsposp("BR2_",5,"ALIC", -13.4, 23.3, -78.7, irotm[51],"ONLY",par,3); 
415   par[1] = 0.5;
416   gMC->Gsposp("CB2_",5,"ALIC", -13.56, 23.6, -78.4,irotm[51],"ONLY",par,3); 
417
418   gMC->Matrix(irotm[81], 90., 30., 90.-10.6, 120., 180.-10.6, 120.);
419   par[1] = 0.1;
420   par[2] = 81.4;
421   gMC->Gsposp("BR5_",5,"ALIC", -27.5, 47.6, -170.0,irotm[81],"ONLY",par,3); 
422   par[1] = 0.5;
423   gMC->Gsposp("CB5_",5,"ALIC", -27.85, 48., -169.5,irotm[81],"ONLY",par,3); 
424
425   //       Bracket #2
426
427   par[0] = 1.5;
428   par[1] = 0.1;
429   par[2] = 17.35;
430   gMC->Matrix(irotm[52], 90., 210., 180.-139.3, 300., 180.-49.3, 300.);
431   gMC->Gsposp("BR2_",6,"ALIC", 13.4, -23.3, -78.7,irotm[52],"ONLY",par,3); 
432   par[1] = 0.5;
433   gMC->Gsposp("CB2_",6,"ALIC", 13.56, -23.6, -78.4,irotm[52],"ONLY",par,3); 
434
435   gMC->Matrix(irotm[82], 90., 210., 90.-10.6, 300., 180.-10.6, 300.);
436   par[1] = 0.1;
437   par[2] = 81.4;
438   gMC->Gsposp("BR5_",6,"ALIC", 27.5, -47.6, -170.0,irotm[82],"ONLY",par,3); 
439   par[1] = 0.5;
440   gMC->Gsposp("CB5_",6,"ALIC", 27.85, -48., -169.5,irotm[82],"ONLY",par,3); 
441
442   //       Bracket #3
443
444   par[0] = 1.5;
445   par[1] = 0.1;
446   par[2] = 17.35;
447   gMC->Matrix(irotm[53], 90., 300., 180.-139.3, 30., 180.-49.3, 30.);
448   gMC->Gsposp("BR2_",7,"ALIC", 23.3, 13.4, -78.7, irotm[53],"ONLY",par,3); 
449   par[1] = 0.5;
450   gMC->Gsposp("CB2_",7,"ALIC", 23.6, 13.56, -78.4,irotm[53],"ONLY",par,3); 
451
452   gMC->Matrix(irotm[83], 90., 300., 90.-10.6, 30., 180.-10.6, 30.);
453   par[1] = 0.1;
454   par[2] = 81.4;
455   gMC->Gsposp("BR5_",7,"ALIC", 47.6, 27.5, -170.,irotm[83],"ONLY",par,3); 
456   par[1] = 0.5;
457   gMC->Gsposp("CB5_",7,"ALIC", 48., 27.85, -169.5,irotm[83],"ONLY",par,3); 
458
459   //       Bracket #4
460
461   par[0] = 1.5;
462   par[1] = 0.1;
463   par[2] = 17.35;
464   gMC->Matrix(irotm[54], 90., 120., 180.-139.3, 210., 180.-49.3, 210.);
465   gMC->Gsposp("BR2_",8,"ALIC", -23.3, -13.4, -78.7, irotm[54],"ONLY",par,3); 
466   par[1] = 0.5;
467   gMC->Gsposp("CB2_",8,"ALIC", -23.6, -13.56, -78.4,irotm[54],"ONLY",par,3); 
468
469   gMC->Matrix(irotm[84], 90., 120., 90.-10.6, 210., 180.-10.6, 210.);
470   par[1] = 0.1;
471   par[2] = 81.4;
472   gMC->Gsposp("BR5_",8,"ALIC", -47.6, -27.5, -170.,irotm[84],"ONLY",par,3); 
473   par[1] = 0.5;
474   gMC->Gsposp("CB5_",8,"ALIC", -48., -27.85, -169.5,irotm[84],"ONLY",par,3); 
475
476   // ******************************************************** 
477   //       DEFINE  DISK#1  OF FMD 
478   // ******************************************************** 
479   
480   gMC->Gsvolu("BR1_", "BOX ", idtmed[4], par, 0);
481   gMC->Gsvolu("CB1_", "BOX ", idtmed[5], par, 0);
482   
483   //       Define parameters for right disk #1
484   
485   rin  = 12.4;
486   rout = 18.4;
487   z    = 59.4;
488
489   //       Ring #1 
490
491   par[0] = rin;
492   par[1] = rout;
493   par[2] = 1.5;
494   gMC->Gsvolu("R1R1", "TUBE", idtmed[1], par, 3);
495   gMC->Gspos("R1R1", 1, "ALIC", 0., 0., z + 1.5, 0, "ONLY");
496
497   //       Ring #2 
498
499   par[0] = rout;
500   par[1] = rout + .65;
501   par[2] = 1.5;
502   gMC->Gsvolu("R2R1", "TUBE", idtmed[2], par, 3);
503   gMC->Gspos("R2R1", 1, "ALIC", 0., 0., z + 1.5, 0, "ONLY");
504
505   //       Ring #3 
506
507   par[0] = rout + .65;
508   par[1] = rout + 5.65;
509   par[2] = .025;
510   gMC->Gsvolu("R3R1", "TUBE", idtmed[3], par, 3);
511   gMC->Gspos("R3R1", 1, "ALIC", 0., 0., z + 1.525, 0, "ONLY");
512
513   //       Bracket #1
514
515   par[0] = 1.5;
516   par[1] = 0.1;
517   par[2] = 17.5;
518   gMC->Matrix(irotm[31], 90., 60., 128., 150., 38., 150.);
519   gMC->Gsposp("BR1_",1,"ALIC", -25.3, 14.6, 76.2, irotm[31],"ONLY",par,3); 
520   par[1] = 0.5;
521   gMC->Gsposp("CB1_",1,"ALIC", -25.35, 14.8, 75.9, irotm[31],"ONLY",par,3); 
522
523   //       Bracket #2
524
525   par[0] = 1.5;
526   par[1] = 0.1;
527   par[2] = 17.5;
528   gMC->Matrix(irotm[32], 90., 240., 128., 330., 38., 330.);
529   gMC->Gsposp("BR1_",2,"ALIC", 25.3, -14.6, 76.2, irotm[32],"ONLY",par,3); 
530   par[1] = 0.5;
531   gMC->Gsposp("CB1_",2,"ALIC", 25.35, -14.8, 75.9,irotm[32],"ONLY",par,3); 
532
533   //       Bracket #3
534
535   par[0] = 1.5;
536   par[1] = 0.1;
537   par[2] = 17.5;
538   gMC->Matrix(irotm[33], 90., 330., 128., 60., 38., 60.);
539   gMC->Gsposp("BR1_",3,"ALIC", 14.6, 25.3, 76.2, irotm[33],"ONLY",par,3); 
540   par[1] = 0.5;
541   gMC->Gsposp("CB1_",3,"ALIC", 14.8, 25.35, 75.9,irotm[33],"ONLY",par,3); 
542
543   //       Bracket #4
544
545   par[0] = 1.5;
546   par[1] = 0.1;
547   par[2] = 17.5;
548   gMC->Matrix(irotm[34], 90., 150., 128., 240., 38., 240.);
549   gMC->Gsposp("BR1_",4,"ALIC", -14.6, -25.3, 76.2,irotm[34],"ONLY",par,3); 
550   par[1] = 0.5;
551   gMC->Gsposp("CB1_",4,"ALIC", -14.8, -25.35, 75.9,irotm[34],"ONLY",par,3); 
552
553   //       Define parameters for left disk #1
554   
555   rin  = 12.4;
556   rout = 18.4;
557   z    = -59.4;
558
559   //       Ring #1 
560
561   par[0] = rin;
562   par[1] = rout;
563   par[2] = 1.5;
564   gMC->Gsvolu("R1L1", "TUBE", idtmed[1], par, 3);
565   gMC->Gspos("R1L1", 1, "ALIC", 0., 0., z - 1.5, 0, "ONLY");
566
567   //       Ring #2 
568
569   par[0] = rout;
570   par[1] = rout + .65;
571   par[2] = 1.5;
572   gMC->Gsvolu("R2L1", "TUBE", idtmed[2], par, 3);
573   gMC->Gspos("R2L1", 1, "ALIC", 0., 0., z - 1.5, 0, "ONLY");
574
575   //       Ring #3 
576
577   par[0] = rout + .65;
578   par[1] = rout + 5.65;
579   par[2] = .025;
580   gMC->Gsvolu("R3L1", "TUBE", idtmed[3], par, 3);
581   gMC->Gspos("R3L1", 1, "ALIC", 0., 0., z - 1.525, 0, "ONLY");
582
583   //       Bracket #1
584
585   par[0] = 1.5;
586   par[1] = 0.1;
587   par[2] = 17.5;
588   gMC->Matrix(irotm[41], 90., 60., 180.-128., 150., 180.-38.0, 150.);
589   gMC->Gsposp("BR1_",5,"ALIC", -25.3, 14.6, -76.2, irotm[41],"ONLY",par,3); 
590   par[1] = 0.5;
591   gMC->Gsposp("CB1_",5,"ALIC", -25.35, 14.8, -75.9,irotm[41],"ONLY",par,3); 
592
593   gMC->Matrix(irotm[1], 90., 60., 90.-10.6, 150., 180.-10.6, 150.);
594   par[1] = 0.1;
595   par[2] = 81.4;
596   gMC->Gsposp("BR5_",9,"ALIC", -47.6, 27.5, -170.,irotm[1],"ONLY",par,3); 
597   par[1] = 0.5;
598   gMC->Gsposp("CB5_",9,"ALIC", -48., 27.85, -169.5,irotm[1],"ONLY",par,3); 
599
600   //       Bracket #2
601
602   par[0] = 1.5;
603   par[1] = 0.1;
604   par[2] = 17.5;
605   gMC->Matrix(irotm[42], 90., 240., 180.-128., 330., 180.-38., 330.);
606   gMC->Gsposp("BR1_",6,"ALIC", 25.3,-14.6, -76.2,irotm[42],"ONLY",par,3); 
607   par[1] = 0.5;
608   gMC->Gsposp("CB1_",6,"ALIC", 25.35,-14.8, -75.9,irotm[42],"ONLY",par,3); 
609
610   gMC->Matrix(irotm[2], 90., 240., 90.-10.6, 330., 180.-10.6, 330.);
611   par[1] = 0.1;
612   par[2] = 81.4;
613   gMC->Gsposp("BR5_",10,"ALIC", 47.6, -27.5, -170.0,irotm[2],"ONLY",par,3); 
614   par[1] = 0.5;
615   gMC->Gsposp("CB5_",10,"ALIC", 48., -27.85, -169.5,irotm[2],"ONLY",par,3); 
616
617   //       Bracket #3
618
619   par[0] = 1.5;
620   par[1] = 0.1;
621   par[2] = 17.5;
622   gMC->Matrix(irotm[43], 90., 330., 180.-128., 60., 180.-38., 60.);
623   gMC->Gsposp("BR1_",7,"ALIC", 14.6, 25.3, -76.2, irotm[43],"ONLY",par,3); 
624   par[1] = 0.5;
625   gMC->Gsposp("CB1_",7,"ALIC", 14.8, 25.35, -75.9,irotm[43],"ONLY",par,3); 
626
627   gMC->Matrix(irotm[3], 90., 330., 90.-10.6, 60., 180.-10.6, 60.);
628   par[1] = 0.1;
629   par[2] = 81.4;
630   gMC->Gsposp("BR5_",11,"ALIC", 27.5, 47.6, -170.,irotm[3],"ONLY",par,3); 
631   par[1] = 0.5;
632   gMC->Gsposp("CB5_",11,"ALIC", 27.85, 48., -169.5,irotm[3],"ONLY",par,3); 
633
634   //       Bracket #4
635
636   par[0] = 1.5;
637   par[1] = 0.1;
638   par[2] = 17.5;
639   gMC->Matrix(irotm[44], 90., 150., 180.-128., 240., 180.-38., 240.);
640   gMC->Gsposp("BR1_",8,"ALIC", -14.6, -25.3, -76.2, irotm[44],"ONLY",par,3); 
641   par[1] = 0.5;
642   gMC->Gsposp("CB1_",8,"ALIC", -14.8, -25.35, -75.9,irotm[44],"ONLY",par,3); 
643
644   gMC->Matrix(irotm[4], 90., 150., 90.-10.6, 240., 180.-10.6, 240.);
645   par[1] = 0.1;
646   par[2] = 81.4;
647   gMC->Gsposp("BR5_",12,"ALIC", -27.5, -47.6, -170.,irotm[4],"ONLY",par,3); 
648   par[1] = 0.5;
649   gMC->Gsposp("CB5_",12,"ALIC", -27.85, -48., -169.5,irotm[4],"ONLY",par,3); 
650
651   // *********************************************************** 
652   //       DEFINE LEFT DISK#4 OF FMD 
653   // *********************************************************** 
654
655   gMC->Gsvolu("BR4_", "BOX ", idtmed[4], par, 0);
656   gMC->Gsvolu("CB4_", "BOX ", idtmed[5], par, 0);
657
658   //       Define parameters 
659
660   rin  = 4.5;
661   rout = 10.5;
662   z    = -229.5;
663
664   //       Ring #1 
665
666   par[0] = rin;
667   par[1] = rout;
668   par[2] = 1.5;
669   gMC->Gsvolu("R1L4", "TUBE", idtmed[1], par, 3);
670   gMC->Gspos("R1L4", 1, "ALIC", 0., 0., z - 1.5, 0, "ONLY");
671
672   //       Ring #2 
673
674   par[0] = rout;
675   par[1] = rout + .65;
676   par[2] = 1.5;
677   gMC->Gsvolu("R2L4", "TUBE", idtmed[2], par, 3);
678   gMC->Gspos("R2L4", 1, "ALIC", 0., 0., z - 1.5, 0, "ONLY");
679
680   //       Ring #3 
681
682   par[0] = rout + .65;
683   par[1] = rout + 5.65;
684   par[2] = .025;
685   gMC->Gsvolu("R3L4", "TUBE", idtmed[3], par, 3);
686   gMC->Gspos("R3L4", 1, "ALIC", 0., 0., z - 1.525, 0, "ONLY");
687
688   //       Bracket #1
689
690   par[0] = 1.5;
691   par[1] = 0.1;
692   par[2] = 31.25;
693   gMC->Matrix(irotm[71], 90., 0., 90.-71., 90., 180.-71., 90.);
694   gMC->Gsposp("BR4_",1,"ALIC", 0., 40.25, -240., irotm[71],"ONLY",par,3); 
695   par[1] = 0.5;
696   gMC->Gsposp("CB4_",1,"ALIC", 0., 40.75, -239.5, irotm[71],"ONLY",par,3); 
697
698   //       Bracket #2
699
700   par[0] = 1.5;
701   par[1] = 0.1;
702   par[2] = 31.25;
703   gMC->Matrix(irotm[72], 90., 180., 90.-71., 270., 180.-71., 270.);
704   gMC->Gsposp("BR4_",2,"ALIC", 0., -40.25, -240., irotm[72],"ONLY",par,3); 
705   par[1] = 0.5;
706   gMC->Gsposp("CB4_",2,"ALIC", 0., -40.75, -239.5,irotm[72],"ONLY",par,3); 
707
708   //       Bracket #3
709
710   par[0] = 1.5;
711   par[1] = 0.1;
712   par[2] = 31.25;
713   gMC->Matrix(irotm[73], 90., 270., 90.-71., 0., 180.-71., 0.);
714   gMC->Gsposp("BR4_",3,"ALIC", 40.25, 0., -240., irotm[73],"ONLY",par,3); 
715   par[1] = 0.5;
716   gMC->Gsposp("CB4_",3,"ALIC", 40.75, 0., -239.5,irotm[73],"ONLY",par,3); 
717
718   //       Bracket #4
719
720   par[0] = 1.5;
721   par[1] = 0.1;
722   par[2] = 31.25;
723   gMC->Matrix(irotm[74], 90., 90., 90.-71., 180., 180.-71., 180.);
724   gMC->Gsposp("BR4_",4,"ALIC", -40.25, 0., -240.,irotm[74],"ONLY",par,3); 
725   par[1] = 0.5;
726   gMC->Gsposp("CB4_",4,"ALIC", -40.75, 0., -239.5,irotm[74],"ONLY",par,3); 
727 }
728
729 //_____________________________________________________________________________
730 void AliFMDv1::DrawModule()
731 {
732   //
733   // Draw a shaded view of the FMD version 1
734   //
735
736   // Set everything unseen
737   gMC->Gsatt("*", "seen", -1);
738   // 
739   // Set ALIC mother transparent
740   gMC->Gsatt("ALIC","SEEN",0);
741   //
742   // Set the volumes visible
743   gMC->Gsatt("R1R3","SEEN",1);
744   gMC->Gsatt("R2R3","SEEN",1);
745   gMC->Gsatt("R3R3","SEEN",1);
746   gMC->Gsatt("R1L3","SEEN",1);
747   gMC->Gsatt("R2L3","SEEN",1);
748   gMC->Gsatt("R3L3","SEEN",1);
749   gMC->Gsatt("R1R2","SEEN",1);
750   gMC->Gsatt("R2R2","SEEN",1);
751   gMC->Gsatt("R3R2","SEEN",1);
752   gMC->Gsatt("R1L2","SEEN",1);
753   gMC->Gsatt("R2L2","SEEN",1);
754   gMC->Gsatt("R3L2","SEEN",1);
755   gMC->Gsatt("R1R1","SEEN",1);
756   gMC->Gsatt("R2R1","SEEN",1);
757   gMC->Gsatt("R3R1","SEEN",1);
758   gMC->Gsatt("R1L1","SEEN",1);
759   gMC->Gsatt("R2L1","SEEN",1);
760   gMC->Gsatt("R3L1","SEEN",1);
761   gMC->Gsatt("R1L4","SEEN",1);
762   gMC->Gsatt("R2L4","SEEN",1);
763   gMC->Gsatt("R3L4","SEEN",1);
764   gMC->Gsatt("BR1_","SEEN",1);
765   gMC->Gsatt("BR2_","SEEN",1);
766   gMC->Gsatt("BR3_","SEEN",1);
767   gMC->Gsatt("BR4_","SEEN",1);
768   gMC->Gsatt("BR5_","SEEN",1);
769   gMC->Gsatt("CB1_","SEEN",1);
770   gMC->Gsatt("CB2_","SEEN",1);
771   gMC->Gsatt("CB3_","SEEN",1);
772   gMC->Gsatt("CB4_","SEEN",1);
773   gMC->Gsatt("CB5_","SEEN",1);
774   gMC->Gsatt("R1SP","SEEN",1);
775   gMC->Gsatt("R2SP","SEEN",1);
776   gMC->Gsatt("R3SP","SEEN",1);
777   //
778   gMC->Gdopt("hide", "on");
779   gMC->Gdopt("shad", "on");
780   gMC->Gsatt("*", "fill", 7);
781   gMC->SetClipBox(".");
782   gMC->SetClipBox("*", 0, 1000, -1000, 1000, -1000, 1000);
783   gMC->DefaultRange();
784   gMC->Gdraw("alic", 40, 30, 0, 6, 9, .08, .08);
785   gMC->Gdhead(1111, "Forward Multiplicity Detector version 1");
786   gMC->Gdman(13, 9, "MAN");
787 }
788
789 //_____________________________________________________________________________
790 void AliFMDv1::CreateMaterials()
791 {
792   //
793   // Create Materials for version 1 of FMD
794   //
795
796   //     Material for ring #1 
797   Float_t ar1[8] = { 55.8,58.7,52.,47.9,16.,28.,207.2,27. };
798   Float_t zr1[8] = { 26.,28.,24.,22.,8.,14.,82.,13. };
799   Float_t wr1[8] = { .27,.081,.054,.045,.18,.25,.06,.06 };
800   //     Material for ring #2 
801   Float_t ar2[3] = { 55.8,27.,16. };
802   Float_t zr2[3] = { 26.,13.,8. };
803   Float_t wr2[3] = { .35,.34,.31 };
804   //     Material for ring #3 
805   Float_t ar3[3] = { 28.,27.,16. };
806   Float_t zr3[3] = { 14.,13.,8. };
807   Float_t wr3[3] = { .37,.33,.3 };
808   //     Material for brackets 
809   Float_t abr[2] = { 1.,12. };
810   Float_t zbr[2] = { 1.,6. };
811   Float_t wbr[2] = { .1,.9 };
812   //     Material for cables 
813   Float_t acb[4] = { 1.,12.,37.,63.54 };
814   Float_t zcb[4] = { 1.,6.,17.,2.9 };
815   Float_t wcb[4] = { .02,.14,.12,.72 };
816   
817   Float_t epsil, stmin, deemax, tmaxfd, stemax;
818   
819   Int_t   ISXFLD = gAlice->Field()->Integ();
820   Float_t SXMGMX = gAlice->Field()->Max();
821   
822   //     Ring #1 
823   
824   AliMixture(1, "FMD_R1$", ar1, zr1, 2.69, 8, wr1);
825   
826   //     Ring #2 
827   
828   AliMixture(2, "FMD_R2$", ar2, zr2, 2.63, 3, wr2);
829   
830   //     Ring #3 
831   
832   AliMixture(3, "FMD_R3$", ar3, zr3, 3.15, 3, wr3);
833
834   //     Brackets 
835   
836   AliMixture(4, "FMD_BR$", abr, zbr, 1.8, 2, wbr);
837
838   //     Cables
839   
840   AliMixture(5, "FMD_CB$", acb, zcb, 3.11, 4, wcb);
841
842   // ******************************************************* 
843   //     Defines tracking media parameters. 
844   // ******************************************************* 
845   epsil  = .001; // Tracking precision, DLS 
846   stemax = -1.;  // Maximum displacement for multiple scattering 
847   tmaxfd = -20.; // Maximum angle due to field deflection 
848   deemax = -.3;  // Maximum fractional energy loss, DLS 
849   stmin  = -.8;
850   // ******************************************************** 
851   AliMedium(1, "FMD_R1_L3        ", 1, 0, ISXFLD, SXMGMX, tmaxfd, stemax, deemax, epsil, stmin);
852   AliMedium(2, "FMD_R2_L3        ", 2, 0, ISXFLD, SXMGMX, tmaxfd, stemax, deemax, epsil, stmin);
853   AliMedium(3, "FMD_R3_L3        ", 3, 0, ISXFLD, SXMGMX, tmaxfd, stemax, deemax, epsil, stmin);
854   AliMedium(4, "FMD_BR_L3        ", 4, 0, ISXFLD, SXMGMX, tmaxfd, stemax, deemax, epsil, stmin);
855   AliMedium(5, "FMD_CB_L3        ", 5, 0, ISXFLD, SXMGMX, tmaxfd, stemax, deemax, epsil, stmin);
856 }
857
858
859