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