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