1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
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 **************************************************************************/
18 Revision 1.14 2004/05/07 06:52:50 cblume
19 Bug fix to allow for fPHOShole and not fRICHhole
21 Revision 1.13 2004/02/27 15:40:18 cblume
22 Fix definition of rotation matrices
24 Revision 1.12 2003/09/18 09:06:07 cblume
25 Geometry update, Removal of compiler warnings
27 Revision 1.10 2002/11/21 22:38:47 alibrary
28 Removing AliMC and AliMCProcess
30 Revision 1.9 2002/10/31 17:45:35 cblume
33 Revision 1.8 2002/02/11 14:21:16 cblume
34 Update of the geometry. Get rid of MANY
36 Revision 1.7 2001/05/11 07:56:12 hristov
37 Consistent declarations needed on Alpha
39 Revision 1.6 2001/02/14 18:22:26 cblume
40 Change in the geometry of the padplane
42 Revision 1.5 2000/11/01 14:53:21 cblume
43 Merge with TRD-develop
45 Revision 1.1.4.6 2000/10/15 23:40:01 cblume
48 Revision 1.1.4.5 2000/10/06 16:49:46 cblume
51 Revision 1.1.4.4 2000/10/04 16:34:58 cblume
52 Replace include files by forward declarations
54 Revision 1.1.4.3 2000/09/22 14:43:41 cblume
55 Allow the pad/timebin-dimensions to be changed after initialization
57 Revision 1.4 2000/10/02 21:28:19 fca
58 Removal of useless dependecies via forward declarations
60 Revision 1.3 2000/06/08 18:32:58 cblume
61 Make code compliant to coding conventions
63 Revision 1.2 2000/05/08 16:17:27 cblume
66 Revision 1.1.4.2 2000/05/08 14:46:44 cblume
67 Include options SetPHOShole() and SetRICHhole()
69 Revision 1.1.4.1 2000/04/27 12:46:04 cblume
70 Corrected bug in full geometry
72 Revision 1.1 2000/02/28 19:01:15 cblume
77 ///////////////////////////////////////////////////////////////////////////////
79 // TRD geometry for the spaceframe without holes //
81 ///////////////////////////////////////////////////////////////////////////////
83 #include "TVirtualMC.h"
85 #include "AliTRDgeometryFull.h"
86 #include "AliTRDparameter.h"
88 ClassImp(AliTRDgeometryFull)
90 //_____________________________________________________________________________
91 AliTRDgeometryFull::AliTRDgeometryFull():AliTRDgeometry()
94 // AliTRDgeometryFull default constructor
101 //_____________________________________________________________________________
102 AliTRDgeometryFull::~AliTRDgeometryFull()
105 // AliTRDgeometryFull destructor
110 //_____________________________________________________________________________
111 void AliTRDgeometryFull::Init()
114 // Initializes the geometry parameter
123 // The outer lengths of the chambers for the sectors with holes for the PHOS
124 Float_t lengthPH[kNplan][kNcham] = { { 124.0, 117.0, 0.0, 117.0, 124.0 }
125 , { 124.0, 117.0, 0.0, 117.0, 124.0 }
126 , { 131.0, 124.0, 0.0, 124.0, 131.0 }
127 , { 138.0, 131.0, 0.0, 131.0, 138.0 }
128 , { 145.0, 138.0, 0.0, 138.0, 145.0 }
129 , { 147.0, 140.0, 0.0, 140.0, 147.0 } };
131 // , { 147.0, 140.0, 0.0, 140.0, 147.0 } };
133 // The outer lengths of the chambers for the sectors with holes for the RICH
134 Float_t lengthRH[kNplan][kNcham] = { { 87.5, 0.0, 0.0, 0.0, 87.5 }
135 , { 87.5, 0.0, 0.0, 0.0, 87.5 }
136 , { 101.5, 0.0, 0.0, 0.0, 101.5 }
137 , { 115.5, 0.0, 0.0, 0.0, 115.5 }
138 , { 129.5, 0.0, 0.0, 0.0, 129.5 }
139 , { 133.5, 0.0, 0.0, 0.0, 133.5 } };
141 // , { 133.5, 0.0, 0.0, 0.0, 133.5 } };
143 for (icham = 0; icham < kNcham; icham++) {
144 for (iplan = 0; iplan < kNplan; iplan++) {
145 fClengthPH[iplan][icham] = lengthPH[iplan][icham];
146 fClengthRH[iplan][icham] = lengthRH[iplan][icham];
152 //_____________________________________________________________________________
153 void AliTRDgeometryFull::CreateGeometry(Int_t *idtmed)
156 // Create the TRD geometry without hole
159 // Names of the TRD volumina (xx = detector number):
161 // Lower part of the readout chambers (gas volume + radiator)
163 // UAxx Aluminum frames (Al)
164 // UBxx G10 frames (C)
165 // UCxx Inner volumes (Air)
167 // Upper part of the readout chambers (readout plane + fee)
169 // UDxx G10 frames (C)
170 // UExx Inner volumes of the G10 (Air)
171 // UFxx Aluminum frames (Al)
172 // UGxx Inner volumes of the Al (Air)
174 // Inner material layers
176 // UHxx Radiator (Rohacell)
177 // UIxx Entrance window (Mylar)
178 // UJxx Drift volume (Xe/CO2)
179 // UKxx Amplification volume (Xe/CO2)
180 // ULxx Pad plane (Cu)
181 // UMxx Support structure (Rohacell)
184 const Int_t kNdet = kNplan * kNcham;
186 const Int_t kNparTrd = 4;
187 const Int_t kNparCha = 3;
189 Float_t xpos, ypos, zpos;
191 Float_t parTrd[kNparTrd];
192 Float_t parCha[kNparCha];
197 AliTRDgeometry::CreateGeometry(idtmed);
199 // The TRD mother volume for one sector (Air), full length in z-direction
200 // Provides material for side plates of super module
201 parTrd[0] = fgkSwidth1/2.;
202 parTrd[1] = fgkSwidth2/2.;
203 parTrd[2] = fgkSlenTR1/2.;
204 parTrd[3] = fgkSheight/2.;
205 gMC->Gsvolu("UTR1","TRD1",idtmed[1302-1],parTrd,kNparTrd);
206 // The TRD mother volume for one sector (Al), leaving hole for PHOS
208 gMC->Gsvolu("UTR2","TRD1",idtmed[1302-1],parTrd,kNparTrd);
210 // The TRD mother volume for one sector (Al), leaving hole for RICH
212 gMC->Gsvolu("UTR3","TRD1",idtmed[1302-1],parTrd,kNparTrd);
216 // The side plates of the super module (Al)
217 parTrd[0] = fgkSwidth1/2. - fgkSMgapT;
218 parTrd[1] = fgkSwidth2/2. - fgkSMgapT;
219 parTrd[2] = fgkSlenTR1/2.;
220 parTrd[3] = fgkSheight/2.;
221 gMC->Gsvolu("UTS1","TRD1",idtmed[1301-1],parTrd,kNparTrd);
222 // The TRD mother volume for one sector (Al), leaving hole for PHOS
224 gMC->Gsvolu("UTS2","TRD1",idtmed[1301-1],parTrd,kNparTrd);
226 // The TRD mother volume for one sector (Al), leaving hole for RICH
228 gMC->Gsvolu("UTS3","TRD1",idtmed[1301-1],parTrd,kNparTrd);
231 // The inner part of the TRD mother volume for one sector (Air),
232 // full length in z-direction
233 parTrd[0] = fgkSwidth1/2. - fgkSMgapT - fgkSMpltT;
234 parTrd[1] = fgkSwidth2/2. - fgkSMgapT - fgkSMpltT;
235 parTrd[2] = fgkSlenTR1/2.;
236 parTrd[3] = fgkSheight/2.;
237 gMC->Gsvolu("UTI1","TRD1",idtmed[1302-1],parTrd,kNparTrd);
238 // The TRD mother volume for one sector (Air), leaving hole for PHOS
240 gMC->Gsvolu("UTI2","TRD1",idtmed[1302-1],parTrd,kNparTrd);
242 // The TRD mother volume for one sector (Air), leaving hole for RICH
244 gMC->Gsvolu("UTI3","TRD1",idtmed[1302-1],parTrd,kNparTrd);
247 for (Int_t icham = 0; icham < kNcham; icham++) {
248 for (Int_t iplan = 0; iplan < kNplan; iplan++) {
250 Int_t iDet = GetDetectorSec(iplan,icham);
252 // The lower part of the readout chambers (gas volume + radiator)
253 // The aluminum frames
254 sprintf(cTagV,"UA%02d",iDet);
255 parCha[0] = fCwidth[iplan]/2.;
256 parCha[1] = fClength[iplan][icham]/2. - fgkHspace/2.;
257 parCha[2] = fgkCraH/2. + fgkCdrH/2.;
258 gMC->Gsvolu(cTagV,"BOX ",idtmed[1301-1],parCha,kNparCha);
260 sprintf(cTagV,"UB%02d",iDet);
261 parCha[0] = fCwidth[iplan]/2. - fgkCalT;
264 gMC->Gsvolu(cTagV,"BOX ",idtmed[1307-1],parCha,kNparCha);
265 // The inner part (air)
266 sprintf(cTagV,"UC%02d",iDet);
267 parCha[0] = fCwidth[iplan]/2. - fgkCalT - fgkCclsT;
268 parCha[1] = fClength[iplan][icham]/2. - fgkHspace/2.- fgkCclfT;
270 gMC->Gsvolu(cTagV,"BOX ",idtmed[1302-1],parCha,kNparCha);
272 if (fClengthPH[iplan][icham] > 0.0) {
273 // The aluminum frames
274 sprintf(cTagV,"UA%02d",iDet+kNdet);
275 parCha[0] = fCwidth[iplan]/2.;
276 parCha[1] = fClengthPH[iplan][icham]/2. - fgkHspace/2.;
277 parCha[2] = fgkCraH/2. + fgkCdrH/2.;
278 gMC->Gsvolu(cTagV,"BOX ",idtmed[1301-1],parCha,kNparCha);
280 sprintf(cTagV,"UB%02d",iDet+kNdet);
281 parCha[0] = fCwidth[iplan]/2. - fgkCalT;
284 gMC->Gsvolu(cTagV,"BOX ",idtmed[1307-1],parCha,kNparCha);
285 // The inner part (air)
286 sprintf(cTagV,"UC%02d",iDet+kNdet);
287 parCha[0] = fCwidth[iplan]/2. - fgkCalT - fgkCclsT;
288 parCha[1] = fClengthPH[iplan][icham]/2. - fgkHspace/2.- fgkCclfT;
290 gMC->Gsvolu(cTagV,"BOX ",idtmed[1302-1],parCha,kNparCha);
294 if (fClengthRH[iplan][icham] > 0.0) {
295 // The aluminum frames
296 sprintf(cTagV,"UA%02d",iDet+2*kNdet);
297 parCha[0] = fCwidth[iplan]/2.;
298 parCha[1] = fClengthRH[iplan][icham]/2. - fgkHspace/2.;
299 parCha[2] = fgkCraH/2. + fgkCdrH/2.;
300 gMC->Gsvolu(cTagV,"BOX ",idtmed[1301-1],parCha,kNparCha);
302 sprintf(cTagV,"UB%02d",iDet+2*kNdet);
303 parCha[0] = fCwidth[iplan]/2. - fgkCalT;
306 gMC->Gsvolu(cTagV,"BOX ",idtmed[1307-1],parCha,kNparCha);
307 // The inner part (air)
308 sprintf(cTagV,"UC%02d",iDet+2*kNdet);
309 parCha[0] = fCwidth[iplan]/2. - fgkCalT - fgkCclsT;
310 parCha[1] = fClengthRH[iplan][icham]/2. - fgkHspace/2.- fgkCclfT;
312 gMC->Gsvolu(cTagV,"BOX ",idtmed[1302-1],parCha,kNparCha);
316 // The upper part of the readout chambers (readout plane)
318 sprintf(cTagV,"UD%02d",iDet);
319 parCha[0] = fCwidth[iplan]/2. + fgkCroW;
320 parCha[1] = fClength[iplan][icham]/2. - fgkHspace/2.;
321 parCha[2] = fgkCamH/2.;
322 gMC->Gsvolu(cTagV,"BOX ",idtmed[1307-1],parCha,kNparCha);
323 // The inner part of the G10 frame (air)
324 sprintf(cTagV,"UE%02d",iDet);
325 parCha[0] = fCwidth[iplan]/2. + fgkCroW - fgkCcuT;
326 parCha[1] = fClength[iplan][icham]/2. - fgkHspace/2.- fgkCcuT;
328 gMC->Gsvolu(cTagV,"BOX ",idtmed[1302-1],parCha,kNparCha);
329 // The aluminum frames
330 sprintf(cTagV,"UF%02d",iDet);
331 parCha[0] = fCwidth[iplan]/2. + fgkCroW;
332 parCha[1] = fClength[iplan][icham]/2. - fgkHspace/2.;
333 parCha[2] = fgkCroH/2.;
334 gMC->Gsvolu(cTagV,"BOX ",idtmed[1301-1],parCha,kNparCha);
335 // The inner part of the aluminum frames
336 sprintf(cTagV,"UG%02d",iDet);
337 parCha[0] = fCwidth[iplan]/2. + fgkCroW - fgkCauT;
338 parCha[1] = fClength[iplan][icham]/2. - fgkHspace/2.- fgkCauT;
340 gMC->Gsvolu(cTagV,"BOX ",idtmed[1302-1],parCha,kNparCha);
342 if (fClengthPH[iplan][icham] > 0.0) {
343 sprintf(cTagV,"UD%02d",iDet+kNdet);
344 parCha[0] = fCwidth[iplan]/2. + fgkCroW;
345 parCha[1] = fClengthPH[iplan][icham]/2. - fgkHspace/2.;
346 parCha[2] = fgkCamH/2.;
347 gMC->Gsvolu(cTagV,"BOX ",idtmed[1307-1],parCha,kNparCha);
348 // The inner part of the G10 frame (air)
349 sprintf(cTagV,"UE%02d",iDet+kNdet);
350 parCha[0] = fCwidth[iplan]/2. + fgkCroW - fgkCcuT;
351 parCha[1] = fClengthPH[iplan][icham]/2. - fgkHspace/2.- fgkCcuT;
353 gMC->Gsvolu(cTagV,"BOX ",idtmed[1302-1],parCha,kNparCha);
354 // The aluminum frames
355 sprintf(cTagV,"UF%02d",iDet+kNdet);
356 parCha[0] = fCwidth[iplan]/2. + fgkCroW;
357 parCha[1] = fClengthPH[iplan][icham]/2. - fgkHspace/2.;
358 parCha[2] = fgkCroH/2.;
359 gMC->Gsvolu(cTagV,"BOX ",idtmed[1301-1],parCha,kNparCha);
360 // The inner part of the aluminum frames
361 sprintf(cTagV,"UG%02d",iDet+kNdet);
362 parCha[0] = fCwidth[iplan]/2. + fgkCroW - fgkCauT;
363 parCha[1] = fClengthPH[iplan][icham]/2. - fgkHspace/2.- fgkCauT;
365 gMC->Gsvolu(cTagV,"BOX ",idtmed[1302-1],parCha,kNparCha);
369 if (fClengthRH[iplan][icham] > 0.0) {
370 sprintf(cTagV,"UD%02d",iDet+2*kNdet);
371 parCha[0] = fCwidth[iplan]/2. + fgkCroW;
372 parCha[1] = fClengthRH[iplan][icham]/2. - fgkHspace/2.;
373 parCha[2] = fgkCamH/2.;
374 gMC->Gsvolu(cTagV,"BOX ",idtmed[1307-1],parCha,kNparCha);
375 // The inner part of the G10 frame (air)
376 sprintf(cTagV,"UE%02d",iDet+2*kNdet);
377 parCha[0] = fCwidth[iplan]/2. + fgkCroW - fgkCcuT;
378 parCha[1] = fClengthRH[iplan][icham]/2. - fgkHspace/2.- fgkCcuT;
380 gMC->Gsvolu(cTagV,"BOX ",idtmed[1302-1],parCha,kNparCha);
381 // The aluminum frames
382 sprintf(cTagV,"UF%02d",iDet+2*kNdet);
383 parCha[0] = fCwidth[iplan]/2. + fgkCroW;
384 parCha[1] = fClengthRH[iplan][icham]/2. - fgkHspace/2.;
385 parCha[2] = fgkCroH/2.;
386 gMC->Gsvolu(cTagV,"BOX ",idtmed[1301-1],parCha,kNparCha);
387 // The inner part of the aluminum frames
388 sprintf(cTagV,"UG%02d",iDet+2*kNdet);
389 parCha[0] = fCwidth[iplan]/2. + fgkCroW - fgkCauT;
390 parCha[1] = fClengthRH[iplan][icham]/2. - fgkHspace/2.- fgkCauT;
392 gMC->Gsvolu(cTagV,"BOX ",idtmed[1302-1],parCha,kNparCha);
396 // The material layers inside the chambers
399 // Rohacell layer (radiator)
400 parCha[2] = fgkRaThick/2;
401 sprintf(cTagV,"UH%02d",iDet);
402 gMC->Gsvolu(cTagV,"BOX ",idtmed[1315-1],parCha,kNparCha);
403 // Mylar layer (entrance window + HV cathode)
404 parCha[2] = fgkMyThick/2;
405 sprintf(cTagV,"UI%02d",iDet);
406 gMC->Gsvolu(cTagV,"BOX ",idtmed[1308-1],parCha,kNparCha);
407 // Xe/Isobutane layer (drift volume)
408 parCha[2] = fgkDrThick/2.;
409 sprintf(cTagV,"UJ%02d",iDet);
410 gMC->Gsvolu(cTagV,"BOX ",idtmed[1309-1],parCha,kNparCha);
411 // Xe/Isobutane layer (amplification volume)
412 parCha[2] = fgkAmThick/2.;
413 sprintf(cTagV,"UK%02d",iDet);
414 gMC->Gsvolu(cTagV,"BOX ",idtmed[1309-1],parCha,kNparCha);
415 // Cu layer (pad plane)
416 parCha[2] = fgkCuThick/2;
417 sprintf(cTagV,"UL%02d",iDet);
418 gMC->Gsvolu(cTagV,"BOX ",idtmed[1305-1],parCha,kNparCha);
419 // G10 layer (support structure / honeycomb)
420 parCha[2] = fgkSuThick/2;
421 sprintf(cTagV,"UM%02d",iDet);
422 gMC->Gsvolu(cTagV,"BOX ",idtmed[1313-1],parCha,kNparCha);
424 if (fClengthPH[iplan][icham] > 0.0) {
425 // Rohacell layer (radiator)
426 parCha[2] = fgkRaThick/2;
427 sprintf(cTagV,"UH%02d",iDet+kNdet);
428 gMC->Gsvolu(cTagV,"BOX ",idtmed[1315-1],parCha,kNparCha);
429 // Mylar layer (entrance window + HV cathode)
430 parCha[2] = fgkMyThick/2;
431 sprintf(cTagV,"UI%02d",iDet+kNdet);
432 gMC->Gsvolu(cTagV,"BOX ",idtmed[1308-1],parCha,kNparCha);
433 // Xe/Isobutane layer (drift volume)
434 parCha[2] = fgkDrThick/2.;
435 sprintf(cTagV,"UJ%02d",iDet+kNdet);
436 gMC->Gsvolu(cTagV,"BOX ",idtmed[1309-1],parCha,kNparCha);
437 // Xe/Isobutane layer (amplification volume)
438 parCha[2] = fgkAmThick/2.;
439 sprintf(cTagV,"UK%02d",iDet+kNdet);
440 gMC->Gsvolu(cTagV,"BOX ",idtmed[1309-1],parCha,kNparCha);
441 // Cu layer (pad plane)
442 parCha[2] = fgkCuThick/2;
443 sprintf(cTagV,"UL%02d",iDet+kNdet);
444 gMC->Gsvolu(cTagV,"BOX ",idtmed[1305-1],parCha,kNparCha);
445 // G10 layer (support structure / honeycomb)
446 parCha[2] = fgkSuThick/2;
447 sprintf(cTagV,"UM%02d",iDet+kNdet);
448 gMC->Gsvolu(cTagV,"BOX ",idtmed[1313-1],parCha,kNparCha);
452 if (fClengthRH[iplan][icham] > 0.0) {
453 // Rohacell layer (radiator)
454 parCha[2] = fgkRaThick/2;
455 sprintf(cTagV,"UH%02d",iDet+2*kNdet);
456 gMC->Gsvolu(cTagV,"BOX ",idtmed[1315-1],parCha,kNparCha);
457 // Mylar layer (entrance window + HV cathode)
458 parCha[2] = fgkMyThick/2;
459 sprintf(cTagV,"UI%02d",iDet+2*kNdet);
460 gMC->Gsvolu(cTagV,"BOX ",idtmed[1308-1],parCha,kNparCha);
461 // Xe/Isobutane layer (drift volume)
462 parCha[2] = fgkDrThick/2.;
463 sprintf(cTagV,"UJ%02d",iDet+2*kNdet);
464 gMC->Gsvolu(cTagV,"BOX ",idtmed[1309-1],parCha,kNparCha);
465 // Xe/Isobutane layer (amplification volume)
466 parCha[2] = fgkAmThick/2.;
467 sprintf(cTagV,"UK%02d",iDet+2*kNdet);
468 gMC->Gsvolu(cTagV,"BOX ",idtmed[1309-1],parCha,kNparCha);
469 // Cu layer (pad plane)
470 parCha[2] = fgkCuThick/2;
471 sprintf(cTagV,"UL%02d",iDet+2*kNdet);
472 gMC->Gsvolu(cTagV,"BOX ",idtmed[1305-1],parCha,kNparCha);
473 // G10 layer (support structure / honeycomb)
474 parCha[2] = fgkSuThick/2;
475 sprintf(cTagV,"UM%02d",iDet+2*kNdet);
476 gMC->Gsvolu(cTagV,"BOX ",idtmed[1313-1],parCha,kNparCha);
480 // Position the layers in the chambers
484 // Rohacell layer (radiator)
486 sprintf(cTagV,"UH%02d",iDet);
487 sprintf(cTagM,"UC%02d",iDet);
488 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
489 // Mylar layer (entrance window + HV cathode)
491 sprintf(cTagV,"UI%02d",iDet);
492 sprintf(cTagM,"UC%02d",iDet);
493 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
494 // Xe/Isobutane layer (drift volume)
496 sprintf(cTagV,"UJ%02d",iDet);
497 sprintf(cTagM,"UC%02d",iDet);
498 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
500 // Xe/Isobutane layer (amplification volume)
502 sprintf(cTagV,"UK%02d",iDet);
503 sprintf(cTagM,"UE%02d",iDet);
504 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
506 // Cu layer (pad plane)
508 sprintf(cTagV,"UL%02d",iDet);
509 sprintf(cTagM,"UG%02d",iDet);
510 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
511 // G10 layer (support structure)
513 sprintf(cTagV,"UM%02d",iDet);
514 sprintf(cTagM,"UG%02d",iDet);
515 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
517 if (fClengthPH[iplan][icham] > 0.0) {
519 // Rohacell layer (radiator)
521 sprintf(cTagV,"UH%02d",iDet+kNdet);
522 sprintf(cTagM,"UC%02d",iDet+kNdet);
523 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
524 // Mylar layer (entrance window + HV cathode)
526 sprintf(cTagV,"UI%02d",iDet+kNdet);
527 sprintf(cTagM,"UC%02d",iDet+kNdet);
528 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
529 // Xe/Isobutane layer (drift volume)
531 sprintf(cTagV,"UJ%02d",iDet+kNdet);
532 sprintf(cTagM,"UC%02d",iDet+kNdet);
533 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
535 // Xe/Isobutane layer (amplification volume)
537 sprintf(cTagV,"UK%02d",iDet+kNdet);
538 sprintf(cTagM,"UE%02d",iDet+kNdet);
539 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
541 // Cu layer (pad plane)
543 sprintf(cTagV,"UL%02d",iDet+kNdet);
544 sprintf(cTagM,"UG%02d",iDet+kNdet);
545 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
546 // G10 layer (support structure)
548 sprintf(cTagV,"UM%02d",iDet+kNdet);
549 sprintf(cTagM,"UG%02d",iDet+kNdet);
550 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
554 if (fClengthRH[iplan][icham] > 0.0) {
556 // Rohacell layer (radiator)
558 sprintf(cTagV,"UH%02d",iDet+2*kNdet);
559 sprintf(cTagM,"UC%02d",iDet+2*kNdet);
560 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
561 // Mylar layer (entrance window + HV cathode)
563 sprintf(cTagV,"UI%02d",iDet+2*kNdet);
564 sprintf(cTagM,"UC%02d",iDet+2*kNdet);
565 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
566 // Xe/Isobutane layer (drift volume)
568 sprintf(cTagV,"UJ%02d",iDet+2*kNdet);
569 sprintf(cTagM,"UC%02d",iDet+2*kNdet);
570 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
572 // Xe/Isobutane layer (amplification volume)
574 sprintf(cTagV,"UK%02d",iDet+2*kNdet);
575 sprintf(cTagM,"UE%02d",iDet+2*kNdet);
576 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
578 // Cu layer (pad plane)
580 sprintf(cTagV,"UL%02d",iDet+2*kNdet);
581 sprintf(cTagM,"UG%02d",iDet+2*kNdet);
582 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
583 // G10 layer (support structure)
585 sprintf(cTagV,"UM%02d",iDet+2*kNdet);
586 sprintf(cTagM,"UG%02d",iDet+2*kNdet);
587 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
591 // Position the inner volumes of the chambers in the frames
595 // The inside of the lower G10 frame
596 sprintf(cTagV,"UC%02d",iDet);
597 sprintf(cTagM,"UB%02d",iDet);
598 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
599 // The lower G10 frame inside the aluminum frame
600 sprintf(cTagV,"UB%02d",iDet);
601 sprintf(cTagM,"UA%02d",iDet);
602 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
603 // The inside of the upper G10 frame
604 sprintf(cTagV,"UE%02d",iDet);
605 sprintf(cTagM,"UD%02d",iDet);
606 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
607 // The inside of the upper aluminum frame
608 sprintf(cTagV,"UG%02d",iDet);
609 sprintf(cTagM,"UF%02d",iDet);
610 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
612 if (fClengthPH[iplan][icham] > 0.0) {
613 // The inside of the lower G10 frame
614 sprintf(cTagV,"UC%02d",iDet+kNdet);
615 sprintf(cTagM,"UB%02d",iDet+kNdet);
616 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
617 // The lower G10 frame inside the aluminum frame
618 sprintf(cTagV,"UB%02d",iDet+kNdet);
619 sprintf(cTagM,"UA%02d",iDet+kNdet);
620 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
621 // The inside of the upper G10 frame
622 sprintf(cTagV,"UE%02d",iDet+kNdet);
623 sprintf(cTagM,"UD%02d",iDet+kNdet);
624 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
625 // The inside of the upper aluminum frame
626 sprintf(cTagV,"UG%02d",iDet+kNdet);
627 sprintf(cTagM,"UF%02d",iDet+kNdet);
628 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
632 if (fClengthRH[iplan][icham] > 0.0) {
633 // The inside of the lower G10 frame
634 sprintf(cTagV,"UC%02d",iDet+2*kNdet);
635 sprintf(cTagM,"UB%02d",iDet+2*kNdet);
636 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
637 // The lower G10 frame inside the aluminum frame
638 sprintf(cTagV,"UB%02d",iDet+2*kNdet);
639 sprintf(cTagM,"UA%02d",iDet+2*kNdet);
640 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
641 // The inside of the upper G10 frame
642 sprintf(cTagV,"UE%02d",iDet+2*kNdet);
643 sprintf(cTagM,"UD%02d",iDet+2*kNdet);
644 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
645 // The inside of the upper aluminum frame
646 sprintf(cTagV,"UG%02d",iDet+2*kNdet);
647 sprintf(cTagM,"UF%02d",iDet+2*kNdet);
648 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
652 // Position the frames of the chambers in the TRD mother volume
654 ypos = - fClength[iplan][0] - fClength[iplan][1] - fClength[iplan][2]/2.;
655 for (Int_t ic = 0; ic < icham; ic++) {
656 ypos += fClength[iplan][ic];
658 ypos += fClength[iplan][icham]/2.;
659 zpos = fgkCraH/2. + fgkCdrH/2. - fgkSheight/2. + iplan * (fgkCH + fgkVspace);
660 // The lower aluminum frame, radiator + drift region
661 sprintf(cTagV,"UA%02d",iDet);
662 gMC->Gspos(cTagV,1,"UTI1",xpos,ypos,zpos,0,"ONLY");
663 // The upper G10 frame, amplification region
664 sprintf(cTagV,"UD%02d",iDet);
665 zpos += fgkCamH/2. + fgkCraH/2. + fgkCdrH/2.;
666 gMC->Gspos(cTagV,1,"UTI1",xpos,ypos,zpos,0,"ONLY");
667 // The upper aluminum frame
668 sprintf(cTagV,"UF%02d",iDet);
669 zpos += fgkCroH/2. + fgkCamH/2.;
670 gMC->Gspos(cTagV,1,"UTI1",xpos,ypos,zpos,0,"ONLY");
672 if (fClengthPH[iplan][icham] > 0.0) {
674 ypos = - fClength[iplan][0] - fClength[iplan][1] - fClength[iplan][2]/2.;
675 for (Int_t ic = 0; ic < icham; ic++) {
676 ypos += fClength[iplan][ic];
679 ypos += fClength[iplan][icham];
680 ypos -= fClengthPH[iplan][icham]/2.;
683 ypos += fClengthPH[iplan][icham]/2.;
685 zpos = fgkCraH/2. + fgkCdrH/2. - fgkSheight/2. + iplan * (fgkCH + fgkVspace);
686 // The lower aluminum frame, radiator + drift region
687 sprintf(cTagV,"UA%02d",iDet+kNdet);
688 gMC->Gspos(cTagV,1,"UTI2",xpos,ypos,zpos,0,"ONLY");
689 // The upper G10 frame, amplification region
690 sprintf(cTagV,"UD%02d",iDet+kNdet);
691 zpos += fgkCamH/2. + fgkCraH/2. + fgkCdrH/2.;
692 gMC->Gspos(cTagV,1,"UTI2",xpos,ypos,zpos,0,"ONLY");
693 // The upper aluminum frame
694 sprintf(cTagV,"UF%02d",iDet+kNdet);
695 zpos += fgkCroH/2. + fgkCamH/2.;
696 gMC->Gspos(cTagV,1,"UTI2",xpos,ypos,zpos,0,"ONLY");
700 if (fClengthRH[iplan][icham] > 0.0) {
702 ypos = - fClength[iplan][0] - fClength[iplan][1] - fClength[iplan][2]/2.;
703 for (Int_t ic = 0; ic < icham; ic++) {
704 ypos += fClength[iplan][ic];
707 ypos += fClength[iplan][icham];
708 ypos -= fClengthRH[iplan][icham]/2.;
711 ypos += fClengthRH[iplan][icham]/2.;
713 zpos = fgkCraH/2. + fgkCdrH/2. - fgkSheight/2. + iplan * (fgkCH + fgkVspace);
714 // The lower aluminum frame, radiator + drift region
715 sprintf(cTagV,"UA%02d",iDet+2*kNdet);
716 gMC->Gspos(cTagV,1,"UTI3",xpos,ypos,zpos,0,"ONLY");
717 // The upper G10 frame, amplification region
718 sprintf(cTagV,"UD%02d",iDet+2*kNdet);
719 zpos += fgkCamH/2. + fgkCraH/2. + fgkCdrH/2.;
720 gMC->Gspos(cTagV,1,"UTI3",xpos,ypos,zpos,0,"ONLY");
721 // The upper aluminum frame
722 sprintf(cTagV,"UF%02d",iDet+2*kNdet);
723 zpos += fgkCroH/2. + fgkCamH/2.;
724 gMC->Gspos(cTagV,1,"UTI3",xpos,ypos,zpos,0,"ONLY");
734 gMC->Gspos("UTI1",1,"UTS1",xpos,ypos,zpos,0,"ONLY");
736 gMC->Gspos("UTI2",2,"UTS2",xpos,ypos,zpos,0,"ONLY");
739 gMC->Gspos("UTI3",3,"UTS3",xpos,ypos,zpos,0,"ONLY");
745 gMC->Gspos("UTS1",1,"UTR1",xpos,ypos,zpos,0,"ONLY");
747 gMC->Gspos("UTS2",2,"UTR2",xpos,ypos,zpos,0,"ONLY");
750 gMC->Gspos("UTS3",3,"UTR3",xpos,ypos,zpos,0,"ONLY");
756 gMC->Gspos("UTR1",1,"BTR1",xpos,ypos,zpos,0,"ONLY");
758 gMC->Gspos("UTR2",2,"BTR2",xpos,ypos,zpos,0,"ONLY");
761 gMC->Gspos("UTR1",2,"BTR2",xpos,ypos,zpos,0,"ONLY");
764 gMC->Gspos("UTR3",3,"BTR3",xpos,ypos,zpos,0,"ONLY");
767 gMC->Gspos("UTR1",3,"BTR3",xpos,ypos,zpos,0,"ONLY");
770 // Create the volumes of the super module frame
773 // Create the volumes of the services
774 CreateServices(idtmed);
778 //_____________________________________________________________________________
779 void AliTRDgeometryFull::CreateFrame(Int_t *idtmed)
782 // Create the geometry of the frame of the supermodule
784 // Names of the TRD services volumina
786 // USRL Support rails for the chambers (Al)
787 // USxx Support cross bars between the chambers (Al)
799 // The chamber support rails
802 const Float_t kSRLwid = 2.0;
803 const Float_t kSRLhgt = 2.3;
804 const Float_t kSRLdst = 0.6;
805 const Int_t kNparSRL = 3;
806 Float_t parSRL[kNparSRL];
807 parSRL[0] = kSRLwid/2.;
808 parSRL[1] = fgkSlenTR1/2.;
809 parSRL[2] = kSRLhgt/2.;
810 gMC->Gsvolu("USRL","BOX ",idtmed[1301-1],parSRL,kNparSRL);
815 for (iplan = 0; iplan < kNplan; iplan++) {
817 xpos = fCwidth[iplan]/2. + kSRLwid/2. + kSRLdst;
819 zpos = fgkCraH + fgkCdrH - fgkSheight/2. - kSRLhgt/2.
820 + iplan * (fgkCH + fgkVspace);
821 gMC->Gspos("USRL",iplan+1 ,"UTI1", xpos,ypos,zpos,0,"ONLY");
822 gMC->Gspos("USRL",iplan+1+ kNplan,"UTI1",-xpos,ypos,zpos,0,"ONLY");
824 gMC->Gspos("USRL",iplan+1+2*kNplan,"UTI2", xpos,ypos,zpos,0,"ONLY");
825 gMC->Gspos("USRL",iplan+1+3*kNplan,"UTI2",-xpos,ypos,zpos,0,"ONLY");
828 gMC->Gspos("USRL",iplan+1+4*kNplan,"UTI3", xpos,ypos,zpos,0,"ONLY");
829 gMC->Gspos("USRL",iplan+1+5*kNplan,"UTI3",-xpos,ypos,zpos,0,"ONLY");
835 // The cross bars between the chambers
838 const Float_t kSCBwid = 1.0;
839 const Int_t kNparSCB = 3;
840 Float_t parSCB[kNparSCB];
841 parSCB[1] = kSCBwid/2.;
842 parSCB[2] = fgkCH/2.;
847 for (iplan = 0; iplan < kNplan; iplan++) {
849 parSCB[0] = fCwidth[iplan]/2. + kSRLdst/2.;
851 sprintf(cTagV,"US0%01d",iplan);
852 gMC->Gsvolu(cTagV,"BOX ",idtmed[1301-1],parSCB,kNparSCB);
854 ypos = fgkSlenTR1/2. - kSCBwid/2.;
855 zpos = fgkCH/2. - fgkSheight/2. + iplan * (fgkCH + fgkVspace);
856 gMC->Gspos(cTagV,1,"UTI1", xpos,ypos,zpos,0,"ONLY");
858 gMC->Gspos(cTagV,2,"UTI2", xpos,ypos,zpos,0,"ONLY");
861 gMC->Gspos(cTagV,3,"UTI3", xpos,ypos,zpos,0,"ONLY");
864 sprintf(cTagV,"US1%01d",iplan);
865 gMC->Gsvolu(cTagV,"BOX ",idtmed[1301-1],parSCB,kNparSCB);
867 ypos = fClength[iplan][2]/2. + fClength[iplan][1];
868 zpos = fgkCH/2. - fgkSheight/2. + iplan * (fgkCH + fgkVspace);
869 gMC->Gspos(cTagV,1,"UTI1", xpos,ypos,zpos,0,"ONLY");
871 gMC->Gspos(cTagV,2,"UTI2", xpos,ypos,zpos,0,"ONLY");
874 ypos += fClength[iplan][0] - fClengthRH[iplan][0];
875 gMC->Gspos(cTagV,3,"UTI3", xpos,ypos,zpos,0,"ONLY");
878 sprintf(cTagV,"US2%01d",iplan);
879 gMC->Gsvolu(cTagV,"BOX ",idtmed[1301-1],parSCB,kNparSCB);
881 ypos = fClength[iplan][2]/2.;
882 zpos = fgkCH/2. - fgkSheight/2. + iplan * (fgkCH + fgkVspace);
883 gMC->Gspos(cTagV,1,"UTI1", xpos,ypos,zpos,0,"ONLY");
885 ypos += fClength[iplan][1] - fClengthPH[iplan][1];
886 gMC->Gspos(cTagV,2,"UTI2", xpos,ypos,zpos,0,"ONLY");
889 sprintf(cTagV,"US3%01d",iplan);
890 gMC->Gsvolu(cTagV,"BOX ",idtmed[1301-1],parSCB,kNparSCB);
892 ypos = - fClength[iplan][2]/2.;
893 zpos = fgkCH/2. - fgkSheight/2. + iplan * (fgkCH + fgkVspace);
894 gMC->Gspos(cTagV,1,"UTI1", xpos,ypos,zpos,0,"ONLY");
896 ypos -= fClength[iplan][3] - fClengthPH[iplan][3];
897 gMC->Gspos(cTagV,2,"UTI2", xpos,ypos,zpos,0,"ONLY");
900 sprintf(cTagV,"US4%01d",iplan);
901 gMC->Gsvolu(cTagV,"BOX ",idtmed[1301-1],parSCB,kNparSCB);
903 ypos = - fClength[iplan][2]/2. - fClength[iplan][1];
904 zpos = fgkCH/2. - fgkSheight/2. + iplan * (fgkCH + fgkVspace);
905 gMC->Gspos(cTagV,1,"UTI1", xpos,ypos,zpos,0,"ONLY");
907 gMC->Gspos(cTagV,2,"UTI2", xpos,ypos,zpos,0,"ONLY");
910 ypos -= fClength[iplan][4] - fClengthRH[iplan][4];
911 gMC->Gspos(cTagV,3,"UTI3", xpos,ypos,zpos,0,"ONLY");
914 sprintf(cTagV,"US5%01d",iplan);
915 gMC->Gsvolu(cTagV,"BOX ",idtmed[1301-1],parSCB,kNparSCB);
917 ypos = - fgkSlenTR1/2. + kSCBwid/2.;
918 zpos = fgkCH/2. - fgkSheight/2. + iplan * (fgkCH + fgkVspace);
919 gMC->Gspos(cTagV,1,"UTI1", xpos,ypos,zpos,0,"ONLY");
921 gMC->Gspos(cTagV,2,"UTI2", xpos,ypos,zpos,0,"ONLY");
924 gMC->Gspos(cTagV,3,"UTI3", xpos,ypos,zpos,0,"ONLY");
931 //_____________________________________________________________________________
932 void AliTRDgeometryFull::CreateServices(Int_t *idtmed)
935 // Create the geometry of the services
937 // Names of the TRD services volumina
939 // UTCL Cooling arterias (Al)
940 // UTCW Cooling arterias (Water)
941 // UUxx Volumes for the services at the chambers (Air)
942 // UTPW Power bars (Cu)
943 // UTCP Cooling pipes (Al)
944 // UTCH Cooling pipes (Water)
945 // UTPL Power lines (Cu)
946 // UMCM Readout MCMs (G10/Cu/Si)
949 const Int_t kNdet = kNplan * kNcham;
960 // The rotation matrices
961 const Int_t kNmatrix = 3;
962 Int_t matrix[kNmatrix];
963 gMC->Matrix(matrix[0],100.0, 0.0, 90.0, 90.0, 10.0, 0.0);
964 gMC->Matrix(matrix[1], 80.0, 0.0, 90.0, 90.0, 10.0,180.0);
965 gMC->Matrix(matrix[2], 0.0, 0.0, 90.0, 90.0, 90.0, 0.0);
967 AliTRDparameter *parameter = new AliTRDparameter("par","TRD parameter");
970 // The cooling arterias
973 // Width of the cooling arterias
974 const Float_t kCOLwid = 0.5;
975 // Height of the cooling arterias
976 const Float_t kCOLhgt = 5.5;
977 // Positioning of the cooling
978 const Float_t kCOLposx = 1.6;
979 const Float_t kCOLposz = -0.2;
980 // Thickness of the walls of the cooling arterias
981 const Float_t kCOLthk = 0.1;
982 const Int_t kNparCOL = 3;
983 Float_t parCOL[kNparCOL];
984 parCOL[0] = kCOLwid/2.;
985 parCOL[1] = fgkSlenTR1/2.;
986 parCOL[2] = kCOLhgt/2.;
987 gMC->Gsvolu("UTCL","BOX ",idtmed[1324-1],parCOL,kNparCOL);
988 parCOL[0] -= kCOLthk;
989 parCOL[1] = fgkSlenTR1/2.;
990 parCOL[2] -= kCOLthk;
991 gMC->Gsvolu("UTCW","BOX ",idtmed[1314-1],parCOL,kNparCOL);
996 gMC->Gspos("UTCW",1,"UTCL", xpos,ypos,zpos,0,"ONLY");
998 for (iplan = 1; iplan < kNplan; iplan++) {
1000 xpos = fCwidth[iplan]/2. + kCOLwid/2. + kCOLposx;
1002 zpos = kCOLhgt/2. - fgkSheight/2. + kCOLposz + iplan * (fgkCH + fgkVspace);
1003 gMC->Gspos("UTCL",iplan+1 ,"UTI1", xpos,ypos,zpos,matrix[0],"ONLY");
1004 gMC->Gspos("UTCL",iplan+1+ kNplan,"UTI1",-xpos,ypos,zpos,matrix[1],"ONLY");
1006 gMC->Gspos("UTCL",iplan+1+2*kNplan,"UTI2", xpos,ypos,zpos,matrix[0],"ONLY");
1007 gMC->Gspos("UTCL",iplan+1+3*kNplan,"UTI2",-xpos,ypos,zpos,matrix[1],"ONLY");
1010 gMC->Gspos("UTCL",iplan+1+4*kNplan,"UTI3", xpos,ypos,zpos,matrix[0],"ONLY");
1011 gMC->Gspos("UTCL",iplan+1+5*kNplan,"UTI3",-xpos,ypos,zpos,matrix[1],"ONLY");
1020 const Float_t kPWRwid = 0.6;
1021 const Float_t kPWRhgt = 4.5;
1022 const Float_t kPWRposx = 1.05;
1023 const Float_t kPWRposz = 0.9;
1024 const Int_t kNparPWR = 3;
1025 Float_t parPWR[kNparPWR];
1026 parPWR[0] = kPWRwid/2.;
1027 parPWR[1] = fgkSlenTR1/2.;
1028 parPWR[2] = kPWRhgt/2.;
1029 gMC->Gsvolu("UTPW","BOX ",idtmed[1325-1],parPWR,kNparPWR);
1031 for (iplan = 1; iplan < kNplan; iplan++) {
1033 xpos = fCwidth[iplan]/2. + kPWRwid/2. + kPWRposx;
1035 zpos = kPWRhgt/2. - fgkSheight/2. + kPWRposz + iplan * (fgkCH + fgkVspace);
1036 gMC->Gspos("UTPW",iplan+1 ,"UTI1", xpos,ypos,zpos,matrix[0],"ONLY");
1037 gMC->Gspos("UTPW",iplan+1+ kNplan,"UTI1",-xpos,ypos,zpos,matrix[1],"ONLY");
1039 gMC->Gspos("UTPW",iplan+1+2*kNplan,"UTI2", xpos,ypos,zpos,matrix[0],"ONLY");
1040 gMC->Gspos("UTPW",iplan+1+3*kNplan,"UTI2",-xpos,ypos,zpos,matrix[1],"ONLY");
1043 gMC->Gspos("UTPW",iplan+1+4*kNplan,"UTI3", xpos,ypos,zpos,matrix[0],"ONLY");
1044 gMC->Gspos("UTPW",iplan+1+5*kNplan,"UTI3",-xpos,ypos,zpos,matrix[1],"ONLY");
1050 // The volumes for the services at the chambers
1053 const Int_t kNparServ = 3;
1054 Float_t parServ[kNparServ];
1056 for (icham = 0; icham < kNcham; icham++) {
1057 //for (iplan = 0; iplan < kNplan; iplan++) {
1058 // Take out upper plane until TRD mothervolume is adjusted
1059 for (iplan = 0; iplan < kNplan-1; iplan++) {
1061 Int_t iDet = GetDetectorSec(iplan,icham);
1063 sprintf(cTagV,"UU%02d",iDet);
1064 parServ[0] = fCwidth[iplan]/2.;
1065 parServ[1] = fClength[iplan][icham]/2. - fgkHspace/2.;
1066 parServ[2] = fgkVspace/2.;
1067 gMC->Gsvolu(cTagV,"BOX",idtmed[1302-1],parServ,kNparServ);
1069 ypos = - fClength[iplan][0] - fClength[iplan][1] - fClength[iplan][2]/2.;
1070 for (Int_t ic = 0; ic < icham; ic++) {
1071 ypos += fClength[iplan][ic];
1073 ypos += fClength[iplan][icham]/2.;
1074 zpos = fgkCH + fgkVspace/2. - fgkSheight/2. + iplan * (fgkCH + fgkVspace);
1075 gMC->Gspos(cTagV,1,"UTI1",xpos,ypos,zpos,0,"ONLY");
1078 if (fClengthPH[iplan][icham] > 0.0) {
1079 sprintf(cTagV,"UU%02d",iDet+kNdet);
1080 parServ[0] = fCwidth[iplan]/2.;
1081 parServ[1] = fClengthPH[iplan][icham]/2. - fgkHspace/2.;
1082 parServ[2] = fgkVspace/2.;
1083 gMC->Gsvolu(cTagV,"BOX",idtmed[1302-1],parServ,kNparServ);
1085 ypos = - fClength[iplan][0] - fClength[iplan][1] - fClength[iplan][2]/2.;
1086 for (Int_t ic = 0; ic < icham; ic++) {
1087 ypos += fClength[iplan][ic];
1090 ypos += fClength[iplan][icham];
1091 ypos -= fClengthPH[iplan][icham]/2.;
1094 ypos += fClengthPH[iplan][icham]/2.;
1096 zpos = fgkCH + fgkVspace/2. - fgkSheight/2. + iplan * (fgkCH + fgkVspace);
1097 gMC->Gspos(cTagV,1,"UTI2",xpos,ypos,zpos,0,"ONLY");
1102 if (fClengthRH[iplan][icham] > 0.0) {
1103 sprintf(cTagV,"UU%02d",iDet+2*kNdet);
1104 parServ[0] = fCwidth[iplan]/2.;
1105 parServ[1] = fClengthRH[iplan][icham]/2. - fgkHspace/2.;
1106 parServ[2] = fgkVspace/2.;
1107 gMC->Gsvolu(cTagV,"BOX",idtmed[1302-1],parServ,kNparServ);
1109 ypos = - fClength[iplan][0] - fClength[iplan][1] - fClength[iplan][2]/2.;
1110 for (Int_t ic = 0; ic < icham; ic++) {
1111 ypos += fClength[iplan][ic];
1114 ypos += fClength[iplan][icham];
1115 ypos -= fClengthRH[iplan][icham]/2.;
1118 ypos += fClengthRH[iplan][icham]/2.;
1120 zpos = fgkCH + fgkVspace/2. - fgkSheight/2. + iplan * (fgkCH + fgkVspace);
1121 gMC->Gspos(cTagV,1,"UTI3",xpos,ypos,zpos,0,"ONLY");
1129 // The cooling pipes inside the service volumes
1132 const Int_t kNparTube = 3;
1133 Float_t parTube[kNparTube];
1134 // The aluminum pipe for the cooling
1138 gMC->Gsvolu("UTCP","TUBE",idtmed[1324-1],parTube,0);
1139 // The cooling water
1141 parTube[1] = 0.2/2.;
1143 gMC->Gsvolu("UTCH","TUBE",idtmed[1314-1],parTube,kNparTube);
1144 // Water inside the cooling pipe
1148 gMC->Gspos("UTCH",1,"UTCP",xpos,ypos,zpos,0,"ONLY");
1150 // Position the cooling pipes in the mother volume
1151 const Int_t kNpar = 3;
1153 for (icham = 0; icham < kNcham; icham++) {
1154 //for (iplan = 0; iplan < kNplan; iplan++) {
1155 // Take out upper plane until TRD mothervolume is adjusted
1156 for (iplan = 0; iplan < kNplan-1; iplan++) {
1157 Int_t iDet = GetDetectorSec(iplan,icham);
1158 Int_t iCopy = GetDetector(iplan,icham,0) * 100;
1159 Int_t nMCMrow = parameter->GetRowMax(iplan,icham,0);
1160 Float_t ySize = (GetChamberLength(iplan,icham) - 2.*fgkRpadW)
1161 / ((Float_t) nMCMrow);
1162 sprintf(cTagV,"UU%02d",iDet);
1163 for (Int_t iMCMrow = 0; iMCMrow < nMCMrow; iMCMrow++) {
1165 ypos = (0.5 + iMCMrow) * ySize - 1.9
1166 - fClength[iplan][icham]/2. + fgkHspace/2.;
1169 par[1] = 0.3/2.; // Thickness of the cooling pipes
1170 par[2] = fCwidth[iplan]/2.;
1171 gMC->Gsposp("UTCP",iCopy+iMCMrow,cTagV,xpos,ypos,zpos
1172 ,matrix[2],"ONLY",par,kNpar);
1175 sprintf(cTagV,"UU%02d",iDet+kNdet);
1176 for (Int_t iMCMrow = 0; iMCMrow < nMCMrow; iMCMrow++) {
1178 ypos = (0.5 + iMCMrow) * ySize - 1.9
1179 - fClengthPH[iplan][icham]/2. + fgkHspace/2.;
1181 if (ypos < (fClengthPH[iplan][icham]/2. - fgkHspace/2.)) {
1183 par[1] = 0.3/2.; // Thickness of the cooling pipes
1184 par[2] = fCwidth[iplan]/2.;
1185 gMC->Gsposp("UTCP",iCopy+iMCMrow+nMCMrow,cTagV,xpos,ypos,zpos
1186 ,matrix[2],"ONLY",par,kNpar);
1191 sprintf(cTagV,"UU%02d",iDet+2*kNdet);
1192 for (Int_t iMCMrow = 0; iMCMrow < nMCMrow; iMCMrow++) {
1194 ypos = (0.5 + iMCMrow) * ySize - 1.9
1195 - fClengthRH[iplan][icham]/2. + fgkHspace/2.;
1197 if (ypos < (fClengthRH[iplan][icham]/2. - fgkHspace/2.)) {
1199 par[1] = 0.3/2.; // Thickness of the cooling pipes
1200 par[2] = fCwidth[iplan]/2.;
1201 gMC->Gsposp("UTCP",iCopy+iMCMrow+2*nMCMrow,cTagV,xpos,ypos,zpos
1202 ,matrix[2],"ONLY",par,kNpar);
1213 // The copper power lines
1217 gMC->Gsvolu("UTPL","TUBE",idtmed[1305-1],parTube,0);
1219 // Position the power lines in the mother volume
1220 for (icham = 0; icham < kNcham; icham++) {
1221 //for (iplan = 0; iplan < kNplan; iplan++) {
1222 // Take out upper plane until TRD mothervolume is adjusted
1223 for (iplan = 0; iplan < kNplan-1; iplan++) {
1224 Int_t iDet = GetDetectorSec(iplan,icham);
1225 Int_t iCopy = GetDetector(iplan,icham,0) * 100;
1226 Int_t nMCMrow = parameter->GetRowMax(iplan,icham,0);
1227 Float_t ySize = (GetChamberLength(iplan,icham) - 2.*fgkRpadW)
1228 / ((Float_t) nMCMrow);
1229 sprintf(cTagV,"UU%02d",iDet);
1230 for (Int_t iMCMrow = 0; iMCMrow < nMCMrow; iMCMrow++) {
1232 ypos = (0.5 + iMCMrow) * ySize - 1.0
1233 - fClength[iplan][icham]/2. + fgkHspace/2.;
1236 par[1] = 0.2/2.; // Thickness of the power lines
1237 par[2] = fCwidth[iplan]/2.;
1238 gMC->Gsposp("UTPL",iCopy+iMCMrow,cTagV,xpos,ypos,zpos
1239 ,matrix[2],"ONLY",par,kNpar);
1242 sprintf(cTagV,"UU%02d",iDet+kNdet);
1243 for (Int_t iMCMrow = 0; iMCMrow < nMCMrow; iMCMrow++) {
1245 ypos = (0.5 + iMCMrow) * ySize - 1.0
1246 - fClengthPH[iplan][icham]/2. + fgkHspace/2.;
1248 if (ypos < (fClengthPH[iplan][icham]/2. - fgkHspace/2.)) {
1250 par[1] = 0.2/2.; // Thickness of the power lines
1251 par[2] = fCwidth[iplan]/2.;
1252 gMC->Gsposp("UTPL",iCopy+iMCMrow+nMCMrow,cTagV,xpos,ypos,zpos
1253 ,matrix[2],"ONLY",par,kNpar);
1258 sprintf(cTagV,"UU%02d",iDet+2*kNdet);
1259 for (Int_t iMCMrow = 0; iMCMrow < nMCMrow; iMCMrow++) {
1261 ypos = (0.5 + iMCMrow) * ySize - 1.0
1262 - fClengthRH[iplan][icham]/2. + fgkHspace/2.;
1264 if (ypos < (fClengthRH[iplan][icham]/2. - fgkHspace/2.)) {
1266 par[1] = 0.2/2.; // Thickness of the power lines
1267 par[2] = fCwidth[iplan]/2.;
1268 gMC->Gsposp("UTPL",iCopy+iMCMrow+2*nMCMrow,cTagV,xpos,ypos,zpos
1269 ,matrix[2],"ONLY",par,kNpar);
1280 // The mother volume for the MCMs (air)
1281 const Int_t kNparMCM = 3;
1282 Float_t parMCM[kNparMCM];
1285 parMCM[2] = 0.14/2.;
1286 gMC->Gsvolu("UMCM","BOX",idtmed[1302-1],parMCM,kNparMCM);
1288 // The MCM carrier G10 layer
1292 gMC->Gsvolu("UMC1","BOX",idtmed[1319-1],parMCM,kNparMCM);
1293 // The MCM carrier Cu layer
1296 parMCM[2] = 0.0162/2.;
1297 gMC->Gsvolu("UMC2","BOX",idtmed[1318-1],parMCM,kNparMCM);
1298 // The silicon of the chips
1301 parMCM[2] = 0.003/2.;
1302 gMC->Gsvolu("UMC3","BOX",idtmed[1320-1],parMCM,kNparMCM);
1304 // Put the MCM material inside the MCM mother volume
1307 zpos = -0.07 + 0.1/2.;
1308 gMC->Gspos("UMC1",1,"UMCM",xpos,ypos,zpos,0,"ONLY");
1309 zpos += 0.1/2. + 0.0162/2.;
1310 gMC->Gspos("UMC2",1,"UMCM",xpos,ypos,zpos,0,"ONLY");
1311 zpos += 0.00162/2 + 0.003/2.;
1312 gMC->Gspos("UMC3",1,"UMCM",xpos,ypos,zpos,0,"ONLY");
1314 // Position the MCMs in the mother volume
1315 for (icham = 0; icham < kNcham; icham++) {
1316 //for (iplan = 0; iplan < kNplan; iplan++) {
1317 // Take out upper plane until TRD mothervolume is adjusted
1318 for (iplan = 0; iplan < kNplan-1; iplan++) {
1319 Int_t iDet = GetDetectorSec(iplan,icham);
1320 Int_t iCopy = GetDetector(iplan,icham,0) * 1000;
1321 Int_t nMCMrow = parameter->GetRowMax(iplan,icham,0);
1322 Float_t ySize = (GetChamberLength(iplan,icham) - 2.*fgkRpadW)
1323 / ((Float_t) nMCMrow);
1325 Float_t xSize = (GetChamberWidth(iplan) - 2.* fgkCpadW)
1326 / ((Float_t) nMCMcol);
1327 sprintf(cTagV,"UU%02d",iDet);
1328 for (Int_t iMCMrow = 0; iMCMrow < nMCMrow; iMCMrow++) {
1329 for (Int_t iMCMcol = 0; iMCMcol < nMCMcol; iMCMcol++) {
1330 xpos = (0.5 + iMCMcol) * xSize + 1.0
1331 - fCwidth[iplan]/2.;
1332 ypos = (0.5 + iMCMrow) * ySize + 1.0
1333 - fClength[iplan][icham]/2. + fgkHspace/2.;
1336 par[1] = 0.2/2.; // Thickness of the power lines
1337 par[2] = fCwidth[iplan]/2.;
1338 gMC->Gspos("UMCM",iCopy+iMCMrow*10+iMCMcol,cTagV
1339 ,xpos,ypos,zpos,0,"ONLY");
1343 sprintf(cTagV,"UU%02d",iDet+kNdet);
1344 for (Int_t iMCMrow = 0; iMCMrow < nMCMrow; iMCMrow++) {
1345 for (Int_t iMCMcol = 0; iMCMcol < nMCMcol; iMCMcol++) {
1346 xpos = (0.5 + iMCMcol) * xSize + 1.0
1347 - fCwidth[iplan]/2.;
1348 ypos = (0.5 + iMCMrow) * ySize + 1.0
1349 - fClengthPH[iplan][icham]/2. + fgkHspace/2.;
1351 if (ypos < (fClengthPH[iplan][icham]/2. - fgkHspace/2.)) {
1353 par[1] = 0.2/2.; // Thickness of the power lines
1354 par[2] = fCwidth[iplan]/2.;
1355 gMC->Gspos("UMCM",iCopy+iMCMrow*10+iMCMcol+10*nMCMrow,cTagV
1356 ,xpos,ypos,zpos,0,"ONLY");
1362 sprintf(cTagV,"UU%02d",iDet+2*kNdet);
1363 for (Int_t iMCMrow = 0; iMCMrow < nMCMrow; iMCMrow++) {
1364 for (Int_t iMCMcol = 0; iMCMcol < nMCMcol; iMCMcol++) {
1365 xpos = (0.5 + iMCMcol) * xSize + 1.0
1366 - fCwidth[iplan]/2.;
1367 ypos = (0.5 + iMCMrow) * ySize + 1.0
1368 - fClengthRH[iplan][icham]/2. + fgkHspace/2.;
1370 if (ypos < (fClengthRH[iplan][icham]/2. - fgkHspace/2.)) {
1372 par[1] = 0.2/2.; // Thickness of the power lines
1373 par[2] = fCwidth[iplan]/2.;
1374 gMC->Gspos("UMCM",iCopy+iMCMrow*10+iMCMcol+20*nMCMrow,cTagV
1375 ,xpos,ypos,zpos,0,"ONLY");