Change AliTRDdataArrayI to AliTRDdataArray in MakeBranch()
[u/mrichter/AliRoot.git] / TRD / AliTRDgeometryHole.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.1.4.4  2000/10/15 23:40:01  cblume
19 Remove AliTRDconst
20
21 Revision 1.1.4.3  2000/10/06 16:49:46  cblume
22 Made Getters const
23
24 Revision 1.1.4.2  2000/10/04 16:34:58  cblume
25 Replace include files by forward declarations
26
27 Revision 1.1.4.1  2000/09/22 14:43:41  cblume
28 Allow the pad/timebin-dimensions to be changed after initialization
29
30 Revision 1.3  2000/10/02 21:28:19  fca
31 Removal of useless dependecies via forward declarations
32
33 Revision 1.2  2000/06/08 18:32:58  cblume
34 Make code compliant to coding conventions
35
36 Revision 1.1  2000/02/28 19:01:42  cblume
37 Add new TRD classes
38
39 */
40
41 ///////////////////////////////////////////////////////////////////////////////
42 //                                                                           //
43 //  TRD geometry with holes                                                  //
44 //                                                                           //
45 ///////////////////////////////////////////////////////////////////////////////
46
47 #include "AliMC.h"
48
49 #include "AliTRDgeometryHole.h"
50
51 ClassImp(AliTRDgeometryHole)
52
53 //_____________________________________________________________________________
54 AliTRDgeometryHole::AliTRDgeometryHole():AliTRDgeometry()
55 {
56   //
57   // AliTRDgeometryHole default constructor
58   //
59
60   Init();
61
62 }
63
64 //_____________________________________________________________________________
65 AliTRDgeometryHole::~AliTRDgeometryHole()
66 {
67   //
68   // AliTRDgeometryHole destructor
69   //
70
71 }
72
73 //_____________________________________________________________________________
74 void AliTRDgeometryHole::Init()
75 {
76   //
77   // Initializes the geometry parameter
78   //
79
80   Int_t iplan;
81
82   // The length of the inner chambers
83   for (iplan = 0; iplan < fgkNplan; iplan++) 
84     fClengthI[iplan] = 110.0;
85
86   // The length of the middle chambers
87   fClengthM1[0] = 123.5;
88   fClengthM1[1] = 131.0;
89   fClengthM1[2] = 138.5;
90   fClengthM1[3] = 146.0;
91   fClengthM1[4] = 153.0;
92   fClengthM1[5] = 160.5;
93
94   fClengthM2[0] = 123.5 - 7.0;
95   fClengthM2[1] = 131.0 - 7.0;
96   fClengthM2[2] = 138.5 - 7.0;
97   fClengthM2[3] = 146.0 - 7.0;
98   fClengthM2[4] = 153.0 - 7.0;
99   fClengthM2[5] = 160.4 - 7.0;
100
101   // The length of the outer chambers
102   fClengthO1[0] = 123.5;
103   fClengthO1[1] = 131.0;
104   fClengthO1[2] = 134.5;
105   fClengthO1[3] = 142.0;
106   fClengthO1[4] = 142.0;
107   fClengthO1[5] = 134.5;
108
109   fClengthO2[0] = 123.5;
110   fClengthO2[1] = 131.0;
111   fClengthO2[2] = 134.5;
112   fClengthO2[3] = 142.0;
113   fClengthO2[4] = 142.0;
114   fClengthO2[5] = 134.5;
115
116   fClengthO3[0] =  86.5;
117   fClengthO3[1] = 101.5;
118   fClengthO3[2] = 112.5;
119   fClengthO3[3] = 127.5;
120   fClengthO3[4] = 134.5;
121   fClengthO3[5] = 134.5;
122
123   // The maximum number of pads
124   // and the position of pad 0,0,0 
125   // 
126   // chambers seen from the top:
127   //     +----------------------------+
128   //     |                            |
129   //     |                            |     ^
130   //     |                            | rphi|
131   //     |                            |     |
132   //     |0                           |     | 
133   //     +----------------------------+     +------>
134   //                                             z 
135   // chambers seen from the side:           ^
136   //     +----------------------------+ time|
137   //     |                            |     |
138   //     |0                           |     |
139   //     +----------------------------+     +------>
140   //                                             z
141   //                                             
142
143   // The pad row (z-direction)
144   SetRowPadSize(4.5);
145
146 }
147
148 //_____________________________________________________________________________
149 void AliTRDgeometryHole::SetRowPadSize(Float_t size)
150 {
151   //
152   // Redefines the pad size in row direction
153   //
154
155   fRowPadSize = size;
156
157   for (Int_t iplan = 0; iplan < fgkNplan; iplan++) {
158
159     for (Int_t isect = 0; isect < fgkNsect; isect++) {
160       Float_t clengthI = fClengthI[iplan];
161       Float_t clengthM = fClengthM1[iplan];
162       Float_t clengthO = fClengthO1[iplan];
163       switch (isect) {
164       case 12:
165       case 13:
166       case 14:
167       case 15:
168       case 16:
169         clengthM = fClengthM2[iplan];
170         clengthO = fClengthO2[iplan];
171         break;
172       case 4:
173       case 5:
174       case 6:
175         clengthO = fClengthO3[iplan];
176         break;
177       };
178       fRowMax[iplan][0][isect] = 1 + TMath::Nint((clengthO - 2. * fgkCcthick) 
179                                                            / fRowPadSize - 0.5);
180       fRowMax[iplan][1][isect] = 1 + TMath::Nint((clengthM - 2. * fgkCcthick) 
181                                                            / fRowPadSize - 0.5);
182       fRowMax[iplan][2][isect] = 1 + TMath::Nint((clengthI - 2. * fgkCcthick) 
183                                                            / fRowPadSize - 0.5);
184       fRowMax[iplan][3][isect] = 1 + TMath::Nint((clengthM - 2. * fgkCcthick) 
185                                                            / fRowPadSize - 0.5);
186       fRowMax[iplan][4][isect] = 1 + TMath::Nint((clengthO - 2. * fgkCcthick) 
187                                                            / fRowPadSize - 0.5);
188       fRow0[iplan][0][isect]   = -clengthI/2. - clengthM - clengthO + fgkCcthick; 
189       fRow0[iplan][1][isect]   = -clengthI/2. - clengthM            + fgkCcthick;
190       fRow0[iplan][2][isect]   = -clengthI/2.                       + fgkCcthick;
191       fRow0[iplan][3][isect]   =  clengthI/2.                       + fgkCcthick; 
192       fRow0[iplan][4][isect]   =  clengthI/2. + clengthM            + fgkCcthick; 
193     }
194
195   }
196
197 }
198
199 //_____________________________________________________________________________
200 void AliTRDgeometryHole::CreateGeometry(Int_t *idtmed)
201 {
202   //
203   // Create the TRD geometry with hole
204   //
205
206   Int_t iplan;
207
208   const Int_t kNparTrd = 4;
209   const Int_t kNparCha = 3;
210   const Int_t kNplan   = fgkNplan;
211
212   Float_t parTrd[kNparTrd];
213   Float_t parCha[kNparCha];
214
215   Float_t xpos, ypos, zpos;
216
217   AliTRDgeometry::CreateGeometry(idtmed);
218
219   // The TRD mother volume for one sector (Air) (dimensions identical to BTR1)
220   parTrd[0] = fgkSwidth1/2.;
221   parTrd[1] = fgkSwidth2/2.;
222   parTrd[2] = fgkSlenTR1/2.;
223   parTrd[3] = fgkSheight/2.;
224   gMC->Gsvolu("TRD1","TRD1",idtmed[1302-1],parTrd,kNparTrd);
225   
226   // The TRD mother volume for one sector (Air) (dimensions identical to BTR2)
227   parTrd[0] = fgkSwidth1/2.;
228   parTrd[1] = fgkSwidth2/2.;
229   parTrd[2] = fgkSlenTR2/2.;
230   parTrd[3] = fgkSheight/2.;
231   gMC->Gsvolu("TRD2","TRD1",idtmed[1302-1],parTrd,kNparTrd);
232
233   // The TRD mother volume for one sector (Air) (dimensions identical to BTR3)
234   parTrd[0] = fgkSwidth1/2.;
235   parTrd[1] = fgkSwidth2/2.;
236   parTrd[2] = fgkSlenTR3/2.;
237   parTrd[3] = fgkSheight/2.;
238   gMC->Gsvolu("TRD3","TRD1",idtmed[1302-1],parTrd,kNparTrd);
239
240   // Position the chambers in the TRD mother volume
241   for (iplan = 1; iplan <= kNplan; iplan++) {
242
243     // The inner chambers ---------------------------------------------------------------
244
245     // the aluminum frame
246     parCha[0] = fCwidth[iplan-1]/2.;
247     parCha[1] = fClengthI[iplan-1]/2.;
248     parCha[2] = fgkCaframe/2.;
249     xpos       = 0.;
250     ypos       = 0.;
251     zpos       = fgkCheight - fgkCaframe/2. - fgkSheight/2. + (iplan-1) * (fgkCheight + fgkCspace);
252     gMC->Gsposp("UAFI",iplan       ,"TRD1",xpos,ypos,zpos,0,"MANY",parCha,kNparCha);
253
254     // the inner part of the aluminum frame
255     parCha[0] = fCwidth[iplan-1]/2.   - fgkCathick;
256     parCha[1] = fClengthI[iplan-1]/2. - fgkCathick;
257     parCha[2] = fgkCaframe/2.;
258     xpos       = 0.;
259     ypos       = 0.;
260     zpos       = fgkCheight - fgkCaframe/2. - fgkSheight/2. + (iplan-1) * (fgkCheight + fgkCspace);
261     gMC->Gsposp("UAII",iplan       ,"TRD1",xpos,ypos,zpos,0,"ONLY",parCha,kNparCha);
262
263     // the carbon frame
264     parCha[0] = fCwidth[iplan-1]/2.;
265     parCha[1] = fClengthI[iplan-1]/2.;
266     parCha[2] = fgkCcframe/2.;
267     xpos       = 0.;
268     ypos       = 0.;
269     zpos       = fgkCcframe/2.            - fgkSheight/2. + (iplan-1) * (fgkCheight + fgkCspace);
270     gMC->Gsposp("UCFI",iplan       ,"TRD1",xpos,ypos,zpos,0,"MANY",parCha,kNparCha);
271
272     // the inner part of the carbon frame
273     parCha[0] = fCwidth[iplan-1]/2.   - fgkCcthick;
274     parCha[1] = fClengthI[iplan-1]/2. - fgkCcthick;
275     parCha[2] = fgkCcframe/2.;
276     xpos       = 0.;
277     ypos       = 0.;
278     zpos       = fgkCcframe/2.            - fgkSheight/2. + (iplan-1) * (fgkCheight + fgkCspace);
279     gMC->Gsposp("UCII",iplan       ,"TRD1",xpos,ypos,zpos,0,"ONLY",parCha,kNparCha);
280
281     // The middle chambers --------------------------------------------------------------
282
283     // the aluminum frame
284     parCha[0] = fCwidth[iplan-1]/2.;
285     parCha[1] = fClengthM1[iplan-1]/2.;
286     parCha[2] = fgkCaframe/2.;
287     xpos       = 0.;
288     ypos       = fClengthI[iplan-1]/2.+ fClengthM1[iplan-1]/2.;
289     zpos       = fgkCheight - fgkCaframe/2. - fgkSheight/2. + (iplan-1) * (fgkCheight + fgkCspace);
290     gMC->Gsposp("UAFM",iplan         ,"TRD1",xpos, ypos,zpos,0,"MANY",parCha,kNparCha);
291     gMC->Gsposp("UAFM",iplan+  kNplan,"TRD1",xpos,-ypos,zpos,0,"MANY",parCha,kNparCha);
292     parCha[0] = fCwidth[iplan-1]/2.;
293     parCha[1] = fClengthM2[iplan-1]/2.;
294     parCha[2] = fgkCaframe/2.;
295     xpos       = 0.;
296     ypos       = fClengthM2[iplan-1]/2. - fgkSlenTR2/2.;
297     zpos       = fgkCheight - fgkCaframe/2. - fgkSheight/2. + (iplan-1) * (fgkCheight + fgkCspace);
298     gMC->Gsposp("UAFM",iplan+2*kNplan,"TRD2",xpos, ypos,zpos,0,"MANY",parCha,kNparCha);
299
300     // the inner part of the aluminum frame
301     parCha[0] = fCwidth[iplan-1]/2.    - fgkCathick;
302     parCha[1] = fClengthM1[iplan-1]/2. - fgkCathick;
303     parCha[2] = fgkCaframe/2.;
304     xpos       = 0.;
305     ypos       = fClengthI[iplan-1]/2. + fClengthM1[iplan-1]/2.;
306     zpos       = fgkCheight - fgkCaframe/2. - fgkSheight/2. + (iplan-1) * (fgkCheight + fgkCspace);
307     gMC->Gsposp("UAIM",iplan         ,"TRD1",xpos, ypos,zpos,0,"ONLY",parCha,kNparCha);
308     gMC->Gsposp("UAIM",iplan+  kNplan,"TRD1",xpos,-ypos,zpos,0,"ONLY",parCha,kNparCha);
309     parCha[0] = fCwidth[iplan-1]/2.    - fgkCathick;
310     parCha[1] = fClengthM2[iplan-1]/2. - fgkCathick;
311     parCha[2] = fgkCaframe/2.;
312     xpos       = 0.;
313     ypos       = fClengthM2[iplan-1]/2. - fgkSlenTR2/2.;
314     zpos       = fgkCheight - fgkCaframe/2. - fgkSheight/2. + (iplan-1) * (fgkCheight + fgkCspace);
315     gMC->Gsposp("UAIM",iplan+2*kNplan,"TRD2",xpos, ypos,zpos,0,"ONLY",parCha,kNparCha);
316
317     // the carbon frame
318     parCha[0] = fCwidth[iplan-1]/2.;
319     parCha[1] = fClengthM1[iplan-1]/2.;
320     parCha[2] = fgkCcframe/2.;
321     xpos       = 0.;
322     ypos       = fClengthI[iplan-1]/2. + fClengthM1[iplan-1]/2.;
323     zpos       = fgkCcframe/2.         - fgkSheight/2. + (iplan-1) * (fgkCheight + fgkCspace);
324     gMC->Gsposp("UCFM",iplan         ,"TRD1",xpos, ypos,zpos,0,"MANY",parCha,kNparCha);
325     gMC->Gsposp("UCFM",iplan+  kNplan,"TRD1",xpos,-ypos,zpos,0,"MANY",parCha,kNparCha);
326     parCha[0] = fCwidth[iplan-1]/2.;
327     parCha[1] = fClengthM2[iplan-1]/2.;
328     parCha[2] = fgkCcframe/2.;
329     xpos       = 0.;
330     ypos       = fClengthM2[iplan-1]/2. - fgkSlenTR2/2.;
331     zpos       = fgkCcframe/2.          - fgkSheight/2. + (iplan-1) * (fgkCheight + fgkCspace);
332     gMC->Gsposp("UCFM",iplan+2*kNplan,"TRD2",xpos, ypos,zpos,0,"MANY",parCha,kNparCha);
333
334     // the inner part of the carbon frame
335     parCha[0] = fCwidth[iplan-1]/2.    - fgkCcthick;
336     parCha[1] = fClengthM1[iplan-1]/2. - fgkCcthick;
337     parCha[2] = fgkCcframe/2.;
338     xpos       = 0.;
339     ypos       = fClengthI[iplan-1]/2. + fClengthM1[iplan-1]/2.;
340     zpos       = fgkCcframe/2.         - fgkSheight/2. + (iplan-1) * (fgkCheight + fgkCspace);
341     gMC->Gsposp("UCIM",iplan         ,"TRD1",xpos, ypos,zpos,0,"ONLY",parCha,kNparCha);
342     gMC->Gsposp("UCIM",iplan+  kNplan,"TRD1",xpos,-ypos,zpos,0,"ONLY",parCha,kNparCha);
343     parCha[0] = fCwidth[iplan-1]/2.    - fgkCcthick;
344     parCha[1] = fClengthM2[iplan-1]/2. - fgkCcthick;
345     parCha[2] = fgkCcframe/2.;
346     xpos       = 0.;
347     ypos       = fClengthM2[iplan-1]/2. - fgkSlenTR2/2.;
348     zpos       = fgkCcframe/2.          - fgkSheight/2. + (iplan-1) * (fgkCheight + fgkCspace);
349     gMC->Gsposp("UCIM",iplan+2*kNplan,"TRD2",xpos, ypos,zpos,0,"ONLY",parCha,kNparCha);
350
351     // The outer chambers ---------------------------------------------------------------
352
353     // the aluminum frame
354     parCha[0] = fCwidth[iplan-1]/2.;
355     parCha[1] = fClengthO1[iplan-1]/2.;
356     parCha[2] = fgkCaframe/2.;
357     xpos       = 0.;
358     ypos       = fClengthI[iplan-1]/2. + fClengthM1[iplan-1]    + fClengthO1[iplan-1]/2.;
359     zpos       = fgkCheight - fgkCaframe/2. - fgkSheight/2. + (iplan-1) * (fgkCheight + fgkCspace);
360     gMC->Gsposp("UAFO",iplan         ,"TRD1",xpos, ypos,zpos,0,"MANY",parCha,kNparCha);
361     gMC->Gsposp("UAFO",iplan+  kNplan,"TRD1",xpos,-ypos,zpos,0,"MANY",parCha,kNparCha);
362     parCha[0] = fCwidth[iplan-1]/2.;
363     parCha[1] = fClengthO2[iplan-1]/2.;
364     parCha[2] = fgkCaframe/2.;
365     xpos       = 0.;
366     ypos       = fClengthM2[iplan-1]   + fClengthO2[iplan-1]/2. - fgkSlenTR2/2.;
367     zpos       = fgkCheight - fgkCaframe/2. - fgkSheight/2. + (iplan-1) * (fgkCheight + fgkCspace);
368     gMC->Gsposp("UAFO",iplan+2*kNplan,"TRD2",xpos, ypos,zpos,0,"MANY",parCha,kNparCha);
369     parCha[0] = fCwidth[iplan-1]/2.;
370     parCha[1] = fClengthO3[iplan-1]/2.;
371     parCha[2] = fgkCaframe/2.;
372     xpos       = 0.;
373     ypos       = fClengthO3[iplan-1]/2. - fgkSlenTR3/2.;
374     zpos       = fgkCheight - fgkCaframe/2. - fgkSheight/2. + (iplan-1) * (fgkCheight + fgkCspace);
375     gMC->Gsposp("UAFO",iplan+4*kNplan,"TRD3",xpos, ypos,zpos,0,"MANY",parCha,kNparCha);
376
377     // the inner part of the aluminum frame
378     parCha[0] = fCwidth[iplan-1]/2.    - fgkCathick;
379     parCha[1] = fClengthO1[iplan-1]/2. - fgkCathick;
380     parCha[2] = fgkCaframe/2.;
381     xpos       = 0.;
382     ypos       = fClengthI[iplan-1]/2. + fClengthM1[iplan-1]    + fClengthO1[iplan-1]/2.;
383     zpos       = fgkCheight - fgkCaframe/2. - fgkSheight/2. + (iplan-1) * (fgkCheight + fgkCspace);
384     gMC->Gsposp("UAIO",iplan         ,"TRD1",xpos, ypos,zpos,0,"ONLY",parCha,kNparCha);
385     gMC->Gsposp("UAIO",iplan+  kNplan,"TRD1",xpos,-ypos,zpos,0,"ONLY",parCha,kNparCha);
386     parCha[0] = fCwidth[iplan-1]/2.    - fgkCathick;
387     parCha[1] = fClengthO2[iplan-1]/2. - fgkCathick;
388     parCha[2] = fgkCaframe/2.;
389     xpos       = 0.;
390     ypos       = fClengthM2[iplan-1]   + fClengthO2[iplan-1]/2. - fgkSlenTR2/2.;
391     zpos       = fgkCheight - fgkCaframe/2. - fgkSheight/2. + (iplan-1) * (fgkCheight + fgkCspace);
392     gMC->Gsposp("UAIO",iplan+2*kNplan,"TRD2",xpos, ypos,zpos,0,"ONLY",parCha,kNparCha);
393     parCha[0] = fCwidth[iplan-1]/2.    - fgkCathick;
394     parCha[1] = fClengthO3[iplan-1]/2. - fgkCathick;
395     parCha[2] = fgkCaframe/2.;
396     xpos       = 0.;
397     ypos       = fClengthO3[iplan-1]/2. - fgkSlenTR3/2.;
398     zpos       = fgkCheight - fgkCaframe/2. - fgkSheight/2. + (iplan-1) * (fgkCheight + fgkCspace);
399     gMC->Gsposp("UAIO",iplan+4*kNplan,"TRD3",xpos, ypos,zpos,0,"ONLY",parCha,kNparCha);
400
401     // the carbon frame
402     parCha[0] = fCwidth[iplan-1]/2.;
403     parCha[1] = fClengthO1[iplan-1]/2.;
404     parCha[2] = fgkCcframe/2.;
405     xpos       = 0.;
406     ypos       = fClengthI[iplan-1]/2. + fClengthM1[iplan-1]    + fClengthO1[iplan-1]/2.;
407     zpos       = fgkCcframe/2.         - fgkSheight/2. + (iplan-1) * (fgkCheight + fgkCspace);
408     gMC->Gsposp("UCFO",iplan,         "TRD1",xpos, ypos,zpos,0,"MANY",parCha,kNparCha);
409     gMC->Gsposp("UCFO",iplan+  kNplan,"TRD1",xpos,-ypos,zpos,0,"MANY",parCha,kNparCha);
410     parCha[0] = fCwidth[iplan-1]/2.;
411     parCha[1] = fClengthO2[iplan-1]/2.;
412     parCha[2] = fgkCcframe/2.;
413     xpos       = 0.;
414     ypos       = fClengthM2[iplan-1]    + fClengthO2[iplan-1]/2. - fgkSlenTR2/2.;
415     zpos       = fgkCcframe/2.          - fgkSheight/2. + (iplan-1) * (fgkCheight + fgkCspace);
416     gMC->Gsposp("UCFO",iplan+2*kNplan,"TRD2",xpos, ypos,zpos,0,"MANY",parCha,kNparCha);
417     parCha[0] = fCwidth[iplan-1]/2.;
418     parCha[1] = fClengthO3[iplan-1]/2.;
419     parCha[2] = fgkCcframe/2.;
420     xpos       = 0.;
421     ypos       = fClengthO3[iplan-1]/2. - fgkSlenTR3/2.;
422     zpos       = fgkCcframe/2.          - fgkSheight/2. + (iplan-1) * (fgkCheight + fgkCspace);
423     gMC->Gsposp("UCFO",iplan+4*kNplan,"TRD3",xpos, ypos,zpos,0,"MANY",parCha,kNparCha);
424
425     // the inner part of the carbon frame
426     parCha[0] = fCwidth[iplan-1]/2.    - fgkCcthick;
427     parCha[1] = fClengthO1[iplan-1]/2. - fgkCcthick;
428     parCha[2] = fgkCcframe/2.;
429     xpos       = 0.;
430     ypos       = fClengthI[iplan-1]/2. + fClengthM1[iplan-1]    + fClengthO1[iplan-1]/2.;
431     zpos       = fgkCcframe/2.         - fgkSheight/2. + (iplan-1) * (fgkCheight + fgkCspace);
432     gMC->Gsposp("UCIO",iplan         ,"TRD1",xpos, ypos,zpos,0,"ONLY",parCha,kNparCha);
433     gMC->Gsposp("UCIO",iplan+  kNplan,"TRD1",xpos,-ypos,zpos,0,"ONLY",parCha,kNparCha);
434     parCha[0] = fCwidth[iplan-1]/2.    - fgkCcthick;
435     parCha[1] = fClengthO2[iplan-1]/2. - fgkCcthick;
436     parCha[2] = fgkCcframe/2.;
437     xpos       = 0.;
438     ypos       = fClengthM2[iplan-1]    + fClengthO2[iplan-1]/2. - fgkSlenTR2/2.;
439     zpos       = fgkCcframe/2.          - fgkSheight/2. + (iplan-1) * (fgkCheight + fgkCspace);
440     gMC->Gsposp("UCIO",iplan+2*kNplan,"TRD2",xpos, ypos,zpos,0,"ONLY",parCha,kNparCha);
441     parCha[0] = fCwidth[iplan-1]/2.    - fgkCcthick;
442     parCha[1] = fClengthO3[iplan-1]/2. - fgkCcthick;
443     parCha[2] = fgkCcframe/2.;
444     xpos       = 0.;
445     ypos       = fClengthO3[iplan-1]/2. - fgkSlenTR3/2.;
446     zpos       = fgkCcframe/2.          - fgkSheight/2. + (iplan-1) * (fgkCheight + fgkCspace);
447     gMC->Gsposp("UCIO",iplan+4*kNplan,"TRD3",xpos, ypos,zpos,0,"ONLY",parCha,kNparCha);
448
449   }
450
451   xpos     = 0.;
452   ypos     = 0.;
453   zpos     = 0.;
454   gMC->Gspos("TRD1",1,"BTR1",xpos,ypos,zpos,0,"ONLY");
455   gMC->Gspos("TRD2",1,"BTR2",xpos,ypos,zpos,0,"ONLY");
456   gMC->Gspos("TRD3",1,"BTR3",xpos,ypos,zpos,0,"ONLY");
457
458 }