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