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