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