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.12 2003/09/18 09:06:07 cblume
19 Geometry update, Removal of compiler warnings
21 Revision 1.10 2002/11/21 22:38:47 alibrary
22 Removing AliMC and AliMCProcess
24 Revision 1.9 2002/10/31 17:45:35 cblume
27 Revision 1.8 2002/02/11 14:21:16 cblume
28 Update of the geometry. Get rid of MANY
30 Revision 1.7 2001/05/11 07:56:12 hristov
31 Consistent declarations needed on Alpha
33 Revision 1.6 2001/02/14 18:22:26 cblume
34 Change in the geometry of the padplane
36 Revision 1.5 2000/11/01 14:53:21 cblume
37 Merge with TRD-develop
39 Revision 1.1.4.6 2000/10/15 23:40:01 cblume
42 Revision 1.1.4.5 2000/10/06 16:49:46 cblume
45 Revision 1.1.4.4 2000/10/04 16:34:58 cblume
46 Replace include files by forward declarations
48 Revision 1.1.4.3 2000/09/22 14:43:41 cblume
49 Allow the pad/timebin-dimensions to be changed after initialization
51 Revision 1.4 2000/10/02 21:28:19 fca
52 Removal of useless dependecies via forward declarations
54 Revision 1.3 2000/06/08 18:32:58 cblume
55 Make code compliant to coding conventions
57 Revision 1.2 2000/05/08 16:17:27 cblume
60 Revision 1.1.4.2 2000/05/08 14:46:44 cblume
61 Include options SetPHOShole() and SetRICHhole()
63 Revision 1.1.4.1 2000/04/27 12:46:04 cblume
64 Corrected bug in full geometry
66 Revision 1.1 2000/02/28 19:01:15 cblume
71 ///////////////////////////////////////////////////////////////////////////////
73 // TRD geometry for the spaceframe without holes //
75 ///////////////////////////////////////////////////////////////////////////////
77 #include "TVirtualMC.h"
79 #include "AliTRDgeometryFull.h"
80 #include "AliTRDparameter.h"
82 ClassImp(AliTRDgeometryFull)
84 //_____________________________________________________________________________
85 AliTRDgeometryFull::AliTRDgeometryFull():AliTRDgeometry()
88 // AliTRDgeometryFull default constructor
95 //_____________________________________________________________________________
96 AliTRDgeometryFull::~AliTRDgeometryFull()
99 // AliTRDgeometryFull destructor
104 //_____________________________________________________________________________
105 void AliTRDgeometryFull::Init()
108 // Initializes the geometry parameter
117 // The outer lengths of the chambers for the sectors with holes for the PHOS
118 Float_t lengthPH[kNplan][kNcham] = { { 124.0, 117.0, 0.0, 117.0, 124.0 }
119 , { 131.0, 124.0, 0.0, 124.0, 131.0 }
120 , { 138.0, 131.0, 0.0, 131.0, 138.0 }
121 , { 145.0, 138.0, 0.0, 138.0, 145.0 }
122 , { 147.0, 140.0, 0.0, 140.0, 147.0 }
123 , { 147.0, 140.0, 0.0, 140.0, 147.0 } };
125 // The outer lengths of the chambers for the sectors with holes for the RICH
126 Float_t lengthRH[kNplan][kNcham] = { { 87.5, 0.0, 0.0, 0.0, 87.5 }
127 , { 101.5, 0.0, 0.0, 0.0, 101.5 }
128 , { 115.5, 0.0, 0.0, 0.0, 115.5 }
129 , { 129.5, 0.0, 0.0, 0.0, 129.5 }
130 , { 133.5, 0.0, 0.0, 0.0, 133.5 }
131 , { 133.5, 0.0, 0.0, 0.0, 133.5 } };
133 for (icham = 0; icham < kNcham; icham++) {
134 for (iplan = 0; iplan < kNplan; iplan++) {
135 fClengthPH[iplan][icham] = lengthPH[iplan][icham];
136 fClengthRH[iplan][icham] = lengthRH[iplan][icham];
142 //_____________________________________________________________________________
143 void AliTRDgeometryFull::CreateGeometry(Int_t *idtmed)
146 // Create the TRD geometry without hole
149 // Names of the TRD volumina (xx = detector number):
151 // Lower part of the readout chambers (gas volume + radiator)
153 // UAxx Aluminum frames (Al)
154 // UBxx G10 frames (C)
155 // UCxx Inner volumes (Air)
157 // Upper part of the readout chambers (readout plane + fee)
159 // UDxx G10 frames (C)
160 // UExx Inner volumes of the G10 (Air)
161 // UFxx Aluminum frames (Al)
162 // UGxx Inner volumes of the Al (Air)
164 // Inner material layers
166 // UHxx Radiator (Rohacell)
167 // UIxx Entrance window (Mylar)
168 // UJxx Drift volume (Xe/CO2)
169 // UKxx Amplification volume (Xe/CO2)
170 // ULxx Pad plane (Cu)
171 // UMxx Support structure (Rohacell)
174 const Int_t kNdet = kNplan * kNcham;
176 const Int_t kNparTrd = 4;
177 const Int_t kNparCha = 3;
179 Float_t xpos, ypos, zpos;
181 Float_t parTrd[kNparTrd];
182 Float_t parCha[kNparCha];
187 AliTRDgeometry::CreateGeometry(idtmed);
189 // The TRD mother volume for one sector (Air), full length in z-direction
190 // Provides material for side plates of super module
191 parTrd[0] = fgkSwidth1/2.;
192 parTrd[1] = fgkSwidth2/2.;
193 parTrd[2] = fgkSlenTR1/2.;
194 parTrd[3] = fgkSheight/2.;
195 gMC->Gsvolu("UTR1","TRD1",idtmed[1302-1],parTrd,kNparTrd);
196 // The TRD mother volume for one sector (Al), leaving hole for PHOS
198 gMC->Gsvolu("UTR2","TRD1",idtmed[1302-1],parTrd,kNparTrd);
200 // The TRD mother volume for one sector (Al), leaving hole for RICH
202 gMC->Gsvolu("UTR3","TRD1",idtmed[1302-1],parTrd,kNparTrd);
206 // The side plates of the super module (Al)
207 parTrd[0] = fgkSwidth1/2. - fgkSMgapT;
208 parTrd[1] = fgkSwidth2/2. - fgkSMgapT;
209 parTrd[2] = fgkSlenTR1/2.;
210 parTrd[3] = fgkSheight/2.;
211 gMC->Gsvolu("UTS1","TRD1",idtmed[1301-1],parTrd,kNparTrd);
212 // The TRD mother volume for one sector (Al), leaving hole for PHOS
214 gMC->Gsvolu("UTS2","TRD1",idtmed[1301-1],parTrd,kNparTrd);
216 // The TRD mother volume for one sector (Al), leaving hole for RICH
218 gMC->Gsvolu("UTS3","TRD1",idtmed[1301-1],parTrd,kNparTrd);
221 // The inner part of the TRD mother volume for one sector (Air),
222 // full length in z-direction
223 parTrd[0] = fgkSwidth1/2. - fgkSMgapT - fgkSMpltT;
224 parTrd[1] = fgkSwidth2/2. - fgkSMgapT - fgkSMpltT;
225 parTrd[2] = fgkSlenTR1/2.;
226 parTrd[3] = fgkSheight/2.;
227 gMC->Gsvolu("UTI1","TRD1",idtmed[1302-1],parTrd,kNparTrd);
228 // The TRD mother volume for one sector (Air), leaving hole for PHOS
230 gMC->Gsvolu("UTI2","TRD1",idtmed[1302-1],parTrd,kNparTrd);
232 // The TRD mother volume for one sector (Air), leaving hole for RICH
234 gMC->Gsvolu("UTI3","TRD1",idtmed[1302-1],parTrd,kNparTrd);
237 for (Int_t icham = 0; icham < kNcham; icham++) {
238 for (Int_t iplan = 0; iplan < kNplan; iplan++) {
240 Int_t iDet = GetDetectorSec(iplan,icham);
242 // The lower part of the readout chambers (gas volume + radiator)
243 // The aluminum frames
244 sprintf(cTagV,"UA%02d",iDet);
245 parCha[0] = fCwidth[iplan]/2.;
246 parCha[1] = fClength[iplan][icham]/2. - fgkHspace/2.;
247 parCha[2] = fgkCraH/2. + fgkCdrH/2.;
248 gMC->Gsvolu(cTagV,"BOX ",idtmed[1301-1],parCha,kNparCha);
250 sprintf(cTagV,"UB%02d",iDet);
251 parCha[0] = fCwidth[iplan]/2. - fgkCalT;
254 gMC->Gsvolu(cTagV,"BOX ",idtmed[1307-1],parCha,kNparCha);
255 // The inner part (air)
256 sprintf(cTagV,"UC%02d",iDet);
257 parCha[0] = fCwidth[iplan]/2. - fgkCalT - fgkCclsT;
258 parCha[1] = fClength[iplan][icham]/2. - fgkHspace/2.- fgkCclfT;
260 gMC->Gsvolu(cTagV,"BOX ",idtmed[1302-1],parCha,kNparCha);
262 if (fClengthPH[iplan][icham] > 0.0) {
263 // The aluminum frames
264 sprintf(cTagV,"UA%02d",iDet+kNdet);
265 parCha[0] = fCwidth[iplan]/2.;
266 parCha[1] = fClengthPH[iplan][icham]/2. - fgkHspace/2.;
267 parCha[2] = fgkCraH/2. + fgkCdrH/2.;
268 gMC->Gsvolu(cTagV,"BOX ",idtmed[1301-1],parCha,kNparCha);
270 sprintf(cTagV,"UB%02d",iDet+kNdet);
271 parCha[0] = fCwidth[iplan]/2. - fgkCalT;
274 gMC->Gsvolu(cTagV,"BOX ",idtmed[1307-1],parCha,kNparCha);
275 // The inner part (air)
276 sprintf(cTagV,"UC%02d",iDet+kNdet);
277 parCha[0] = fCwidth[iplan]/2. - fgkCalT - fgkCclsT;
278 parCha[1] = fClengthPH[iplan][icham]/2. - fgkHspace/2.- fgkCclfT;
280 gMC->Gsvolu(cTagV,"BOX ",idtmed[1302-1],parCha,kNparCha);
284 if (fClengthRH[iplan][icham] > 0.0) {
285 // The aluminum frames
286 sprintf(cTagV,"UA%02d",iDet+2*kNdet);
287 parCha[0] = fCwidth[iplan]/2.;
288 parCha[1] = fClengthRH[iplan][icham]/2. - fgkHspace/2.;
289 parCha[2] = fgkCraH/2. + fgkCdrH/2.;
290 gMC->Gsvolu(cTagV,"BOX ",idtmed[1301-1],parCha,kNparCha);
292 sprintf(cTagV,"UB%02d",iDet+2*kNdet);
293 parCha[0] = fCwidth[iplan]/2. - fgkCalT;
296 gMC->Gsvolu(cTagV,"BOX ",idtmed[1307-1],parCha,kNparCha);
297 // The inner part (air)
298 sprintf(cTagV,"UC%02d",iDet+2*kNdet);
299 parCha[0] = fCwidth[iplan]/2. - fgkCalT - fgkCclsT;
300 parCha[1] = fClengthRH[iplan][icham]/2. - fgkHspace/2.- fgkCclfT;
302 gMC->Gsvolu(cTagV,"BOX ",idtmed[1302-1],parCha,kNparCha);
306 // The upper part of the readout chambers (readout plane)
308 sprintf(cTagV,"UD%02d",iDet);
309 parCha[0] = fCwidth[iplan]/2. + fgkCroW;
310 parCha[1] = fClength[iplan][icham]/2. - fgkHspace/2.;
311 parCha[2] = fgkCamH/2.;
312 gMC->Gsvolu(cTagV,"BOX ",idtmed[1307-1],parCha,kNparCha);
313 // The inner part of the G10 frame (air)
314 sprintf(cTagV,"UE%02d",iDet);
315 parCha[0] = fCwidth[iplan]/2. + fgkCroW - fgkCcuT;
316 parCha[1] = fClength[iplan][icham]/2. - fgkHspace/2.- fgkCcuT;
318 gMC->Gsvolu(cTagV,"BOX ",idtmed[1302-1],parCha,kNparCha);
319 // The aluminum frames
320 sprintf(cTagV,"UF%02d",iDet);
321 parCha[0] = fCwidth[iplan]/2. + fgkCroW;
322 parCha[1] = fClength[iplan][icham]/2. - fgkHspace/2.;
323 parCha[2] = fgkCroH/2.;
324 gMC->Gsvolu(cTagV,"BOX ",idtmed[1301-1],parCha,kNparCha);
325 // The inner part of the aluminum frames
326 sprintf(cTagV,"UG%02d",iDet);
327 parCha[0] = fCwidth[iplan]/2. + fgkCroW - fgkCauT;
328 parCha[1] = fClength[iplan][icham]/2. - fgkHspace/2.- fgkCauT;
330 gMC->Gsvolu(cTagV,"BOX ",idtmed[1302-1],parCha,kNparCha);
332 if (fClengthPH[iplan][icham] > 0.0) {
333 sprintf(cTagV,"UD%02d",iDet+kNdet);
334 parCha[0] = fCwidth[iplan]/2. + fgkCroW;
335 parCha[1] = fClengthPH[iplan][icham]/2. - fgkHspace/2.;
336 parCha[2] = fgkCamH/2.;
337 gMC->Gsvolu(cTagV,"BOX ",idtmed[1307-1],parCha,kNparCha);
338 // The inner part of the G10 frame (air)
339 sprintf(cTagV,"UE%02d",iDet+kNdet);
340 parCha[0] = fCwidth[iplan]/2. + fgkCroW - fgkCcuT;
341 parCha[1] = fClengthPH[iplan][icham]/2. - fgkHspace/2.- fgkCcuT;
343 gMC->Gsvolu(cTagV,"BOX ",idtmed[1302-1],parCha,kNparCha);
344 // The aluminum frames
345 sprintf(cTagV,"UF%02d",iDet+kNdet);
346 parCha[0] = fCwidth[iplan]/2. + fgkCroW;
347 parCha[1] = fClengthPH[iplan][icham]/2. - fgkHspace/2.;
348 parCha[2] = fgkCroH/2.;
349 gMC->Gsvolu(cTagV,"BOX ",idtmed[1301-1],parCha,kNparCha);
350 // The inner part of the aluminum frames
351 sprintf(cTagV,"UG%02d",iDet+kNdet);
352 parCha[0] = fCwidth[iplan]/2. + fgkCroW - fgkCauT;
353 parCha[1] = fClengthPH[iplan][icham]/2. - fgkHspace/2.- fgkCauT;
355 gMC->Gsvolu(cTagV,"BOX ",idtmed[1302-1],parCha,kNparCha);
359 if (fClengthRH[iplan][icham] > 0.0) {
360 sprintf(cTagV,"UD%02d",iDet+2*kNdet);
361 parCha[0] = fCwidth[iplan]/2. + fgkCroW;
362 parCha[1] = fClengthRH[iplan][icham]/2. - fgkHspace/2.;
363 parCha[2] = fgkCamH/2.;
364 gMC->Gsvolu(cTagV,"BOX ",idtmed[1307-1],parCha,kNparCha);
365 // The inner part of the G10 frame (air)
366 sprintf(cTagV,"UE%02d",iDet+2*kNdet);
367 parCha[0] = fCwidth[iplan]/2. + fgkCroW - fgkCcuT;
368 parCha[1] = fClengthRH[iplan][icham]/2. - fgkHspace/2.- fgkCcuT;
370 gMC->Gsvolu(cTagV,"BOX ",idtmed[1302-1],parCha,kNparCha);
371 // The aluminum frames
372 sprintf(cTagV,"UF%02d",iDet+2*kNdet);
373 parCha[0] = fCwidth[iplan]/2. + fgkCroW;
374 parCha[1] = fClengthRH[iplan][icham]/2. - fgkHspace/2.;
375 parCha[2] = fgkCroH/2.;
376 gMC->Gsvolu(cTagV,"BOX ",idtmed[1301-1],parCha,kNparCha);
377 // The inner part of the aluminum frames
378 sprintf(cTagV,"UG%02d",iDet+2*kNdet);
379 parCha[0] = fCwidth[iplan]/2. + fgkCroW - fgkCauT;
380 parCha[1] = fClengthRH[iplan][icham]/2. - fgkHspace/2.- fgkCauT;
382 gMC->Gsvolu(cTagV,"BOX ",idtmed[1302-1],parCha,kNparCha);
386 // The material layers inside the chambers
389 // Rohacell layer (radiator)
390 parCha[2] = fgkRaThick/2;
391 sprintf(cTagV,"UH%02d",iDet);
392 gMC->Gsvolu(cTagV,"BOX ",idtmed[1315-1],parCha,kNparCha);
393 // Mylar layer (entrance window + HV cathode)
394 parCha[2] = fgkMyThick/2;
395 sprintf(cTagV,"UI%02d",iDet);
396 gMC->Gsvolu(cTagV,"BOX ",idtmed[1308-1],parCha,kNparCha);
397 // Xe/Isobutane layer (drift volume)
398 parCha[2] = fgkDrThick/2.;
399 sprintf(cTagV,"UJ%02d",iDet);
400 gMC->Gsvolu(cTagV,"BOX ",idtmed[1309-1],parCha,kNparCha);
401 // Xe/Isobutane layer (amplification volume)
402 parCha[2] = fgkAmThick/2.;
403 sprintf(cTagV,"UK%02d",iDet);
404 gMC->Gsvolu(cTagV,"BOX ",idtmed[1309-1],parCha,kNparCha);
405 // Cu layer (pad plane)
406 parCha[2] = fgkCuThick/2;
407 sprintf(cTagV,"UL%02d",iDet);
408 gMC->Gsvolu(cTagV,"BOX ",idtmed[1305-1],parCha,kNparCha);
409 // G10 layer (support structure / honeycomb)
410 parCha[2] = fgkSuThick/2;
411 sprintf(cTagV,"UM%02d",iDet);
412 gMC->Gsvolu(cTagV,"BOX ",idtmed[1313-1],parCha,kNparCha);
414 if (fClengthPH[iplan][icham] > 0.0) {
415 // Rohacell layer (radiator)
416 parCha[2] = fgkRaThick/2;
417 sprintf(cTagV,"UH%02d",iDet+kNdet);
418 gMC->Gsvolu(cTagV,"BOX ",idtmed[1315-1],parCha,kNparCha);
419 // Mylar layer (entrance window + HV cathode)
420 parCha[2] = fgkMyThick/2;
421 sprintf(cTagV,"UI%02d",iDet+kNdet);
422 gMC->Gsvolu(cTagV,"BOX ",idtmed[1308-1],parCha,kNparCha);
423 // Xe/Isobutane layer (drift volume)
424 parCha[2] = fgkDrThick/2.;
425 sprintf(cTagV,"UJ%02d",iDet+kNdet);
426 gMC->Gsvolu(cTagV,"BOX ",idtmed[1309-1],parCha,kNparCha);
427 // Xe/Isobutane layer (amplification volume)
428 parCha[2] = fgkAmThick/2.;
429 sprintf(cTagV,"UK%02d",iDet+kNdet);
430 gMC->Gsvolu(cTagV,"BOX ",idtmed[1309-1],parCha,kNparCha);
431 // Cu layer (pad plane)
432 parCha[2] = fgkCuThick/2;
433 sprintf(cTagV,"UL%02d",iDet+kNdet);
434 gMC->Gsvolu(cTagV,"BOX ",idtmed[1305-1],parCha,kNparCha);
435 // G10 layer (support structure / honeycomb)
436 parCha[2] = fgkSuThick/2;
437 sprintf(cTagV,"UM%02d",iDet+kNdet);
438 gMC->Gsvolu(cTagV,"BOX ",idtmed[1313-1],parCha,kNparCha);
442 if (fClengthRH[iplan][icham] > 0.0) {
443 // Rohacell layer (radiator)
444 parCha[2] = fgkRaThick/2;
445 sprintf(cTagV,"UH%02d",iDet+2*kNdet);
446 gMC->Gsvolu(cTagV,"BOX ",idtmed[1315-1],parCha,kNparCha);
447 // Mylar layer (entrance window + HV cathode)
448 parCha[2] = fgkMyThick/2;
449 sprintf(cTagV,"UI%02d",iDet+2*kNdet);
450 gMC->Gsvolu(cTagV,"BOX ",idtmed[1308-1],parCha,kNparCha);
451 // Xe/Isobutane layer (drift volume)
452 parCha[2] = fgkDrThick/2.;
453 sprintf(cTagV,"UJ%02d",iDet+2*kNdet);
454 gMC->Gsvolu(cTagV,"BOX ",idtmed[1309-1],parCha,kNparCha);
455 // Xe/Isobutane layer (amplification volume)
456 parCha[2] = fgkAmThick/2.;
457 sprintf(cTagV,"UK%02d",iDet+2*kNdet);
458 gMC->Gsvolu(cTagV,"BOX ",idtmed[1309-1],parCha,kNparCha);
459 // Cu layer (pad plane)
460 parCha[2] = fgkCuThick/2;
461 sprintf(cTagV,"UL%02d",iDet+2*kNdet);
462 gMC->Gsvolu(cTagV,"BOX ",idtmed[1305-1],parCha,kNparCha);
463 // G10 layer (support structure / honeycomb)
464 parCha[2] = fgkSuThick/2;
465 sprintf(cTagV,"UM%02d",iDet+2*kNdet);
466 gMC->Gsvolu(cTagV,"BOX ",idtmed[1313-1],parCha,kNparCha);
470 // Position the layers in the chambers
474 // Rohacell layer (radiator)
476 sprintf(cTagV,"UH%02d",iDet);
477 sprintf(cTagM,"UC%02d",iDet);
478 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
479 // Mylar layer (entrance window + HV cathode)
481 sprintf(cTagV,"UI%02d",iDet);
482 sprintf(cTagM,"UC%02d",iDet);
483 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
484 // Xe/Isobutane layer (drift volume)
486 sprintf(cTagV,"UJ%02d",iDet);
487 sprintf(cTagM,"UC%02d",iDet);
488 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
490 // Xe/Isobutane layer (amplification volume)
492 sprintf(cTagV,"UK%02d",iDet);
493 sprintf(cTagM,"UE%02d",iDet);
494 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
496 // Cu layer (pad plane)
498 sprintf(cTagV,"UL%02d",iDet);
499 sprintf(cTagM,"UG%02d",iDet);
500 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
501 // G10 layer (support structure)
503 sprintf(cTagV,"UM%02d",iDet);
504 sprintf(cTagM,"UG%02d",iDet);
505 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
507 if (fClengthPH[iplan][icham] > 0.0) {
509 // Rohacell layer (radiator)
511 sprintf(cTagV,"UH%02d",iDet+kNdet);
512 sprintf(cTagM,"UC%02d",iDet+kNdet);
513 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
514 // Mylar layer (entrance window + HV cathode)
516 sprintf(cTagV,"UI%02d",iDet+kNdet);
517 sprintf(cTagM,"UC%02d",iDet+kNdet);
518 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
519 // Xe/Isobutane layer (drift volume)
521 sprintf(cTagV,"UJ%02d",iDet+kNdet);
522 sprintf(cTagM,"UC%02d",iDet+kNdet);
523 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
525 // Xe/Isobutane layer (amplification volume)
527 sprintf(cTagV,"UK%02d",iDet+kNdet);
528 sprintf(cTagM,"UE%02d",iDet+kNdet);
529 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
531 // Cu layer (pad plane)
533 sprintf(cTagV,"UL%02d",iDet+kNdet);
534 sprintf(cTagM,"UG%02d",iDet+kNdet);
535 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
536 // G10 layer (support structure)
538 sprintf(cTagV,"UM%02d",iDet+kNdet);
539 sprintf(cTagM,"UG%02d",iDet+kNdet);
540 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
544 if (fClengthRH[iplan][icham] > 0.0) {
546 // Rohacell layer (radiator)
548 sprintf(cTagV,"UH%02d",iDet+2*kNdet);
549 sprintf(cTagM,"UC%02d",iDet+2*kNdet);
550 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
551 // Mylar layer (entrance window + HV cathode)
553 sprintf(cTagV,"UI%02d",iDet+2*kNdet);
554 sprintf(cTagM,"UC%02d",iDet+2*kNdet);
555 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
556 // Xe/Isobutane layer (drift volume)
558 sprintf(cTagV,"UJ%02d",iDet+2*kNdet);
559 sprintf(cTagM,"UC%02d",iDet+2*kNdet);
560 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
562 // Xe/Isobutane layer (amplification volume)
564 sprintf(cTagV,"UK%02d",iDet+2*kNdet);
565 sprintf(cTagM,"UE%02d",iDet+2*kNdet);
566 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
568 // Cu layer (pad plane)
570 sprintf(cTagV,"UL%02d",iDet+2*kNdet);
571 sprintf(cTagM,"UG%02d",iDet+2*kNdet);
572 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
573 // G10 layer (support structure)
575 sprintf(cTagV,"UM%02d",iDet+2*kNdet);
576 sprintf(cTagM,"UG%02d",iDet+2*kNdet);
577 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
581 // Position the inner volumes of the chambers in the frames
585 // The inside of the lower G10 frame
586 sprintf(cTagV,"UC%02d",iDet);
587 sprintf(cTagM,"UB%02d",iDet);
588 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
589 // The lower G10 frame inside the aluminum frame
590 sprintf(cTagV,"UB%02d",iDet);
591 sprintf(cTagM,"UA%02d",iDet);
592 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
593 // The inside of the upper G10 frame
594 sprintf(cTagV,"UE%02d",iDet);
595 sprintf(cTagM,"UD%02d",iDet);
596 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
597 // The inside of the upper aluminum frame
598 sprintf(cTagV,"UG%02d",iDet);
599 sprintf(cTagM,"UF%02d",iDet);
600 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
602 if (fClengthPH[iplan][icham] > 0.0) {
603 // The inside of the lower G10 frame
604 sprintf(cTagV,"UC%02d",iDet+kNdet);
605 sprintf(cTagM,"UB%02d",iDet+kNdet);
606 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
607 // The lower G10 frame inside the aluminum frame
608 sprintf(cTagV,"UB%02d",iDet+kNdet);
609 sprintf(cTagM,"UA%02d",iDet+kNdet);
610 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
611 // The inside of the upper G10 frame
612 sprintf(cTagV,"UE%02d",iDet+kNdet);
613 sprintf(cTagM,"UD%02d",iDet+kNdet);
614 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
615 // The inside of the upper aluminum frame
616 sprintf(cTagV,"UG%02d",iDet+kNdet);
617 sprintf(cTagM,"UF%02d",iDet+kNdet);
618 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
622 if (fClengthRH[iplan][icham] > 0.0) {
623 // The inside of the lower G10 frame
624 sprintf(cTagV,"UC%02d",iDet+2*kNdet);
625 sprintf(cTagM,"UB%02d",iDet+2*kNdet);
626 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
627 // The lower G10 frame inside the aluminum frame
628 sprintf(cTagV,"UB%02d",iDet+2*kNdet);
629 sprintf(cTagM,"UA%02d",iDet+2*kNdet);
630 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
631 // The inside of the upper G10 frame
632 sprintf(cTagV,"UE%02d",iDet+2*kNdet);
633 sprintf(cTagM,"UD%02d",iDet+2*kNdet);
634 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
635 // The inside of the upper aluminum frame
636 sprintf(cTagV,"UG%02d",iDet+2*kNdet);
637 sprintf(cTagM,"UF%02d",iDet+2*kNdet);
638 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
642 // Position the frames of the chambers in the TRD mother volume
644 ypos = - fClength[iplan][0] - fClength[iplan][1] - fClength[iplan][2]/2.;
645 for (Int_t ic = 0; ic < icham; ic++) {
646 ypos += fClength[iplan][ic];
648 ypos += fClength[iplan][icham]/2.;
649 zpos = fgkCraH/2. + fgkCdrH/2. - fgkSheight/2. + iplan * (fgkCH + fgkVspace);
650 // The lower aluminum frame, radiator + drift region
651 sprintf(cTagV,"UA%02d",iDet);
652 gMC->Gspos(cTagV,1,"UTI1",xpos,ypos,zpos,0,"ONLY");
653 // The upper G10 frame, amplification region
654 sprintf(cTagV,"UD%02d",iDet);
655 zpos += fgkCamH/2. + fgkCraH/2. + fgkCdrH/2.;
656 gMC->Gspos(cTagV,1,"UTI1",xpos,ypos,zpos,0,"ONLY");
657 // The upper aluminum frame
658 sprintf(cTagV,"UF%02d",iDet);
659 zpos += fgkCroH/2. + fgkCamH/2.;
660 gMC->Gspos(cTagV,1,"UTI1",xpos,ypos,zpos,0,"ONLY");
662 if (fClengthPH[iplan][icham] > 0.0) {
664 ypos = - fClength[iplan][0] - fClength[iplan][1] - fClength[iplan][2]/2.;
665 for (Int_t ic = 0; ic < icham; ic++) {
666 ypos += fClength[iplan][ic];
669 ypos += fClength[iplan][icham];
670 ypos -= fClengthPH[iplan][icham]/2.;
673 ypos += fClengthPH[iplan][icham]/2.;
675 zpos = fgkCraH/2. + fgkCdrH/2. - fgkSheight/2. + iplan * (fgkCH + fgkVspace);
676 // The lower aluminum frame, radiator + drift region
677 sprintf(cTagV,"UA%02d",iDet+kNdet);
678 gMC->Gspos(cTagV,1,"UTI2",xpos,ypos,zpos,0,"ONLY");
679 // The upper G10 frame, amplification region
680 sprintf(cTagV,"UD%02d",iDet+kNdet);
681 zpos += fgkCamH/2. + fgkCraH/2. + fgkCdrH/2.;
682 gMC->Gspos(cTagV,1,"UTI2",xpos,ypos,zpos,0,"ONLY");
683 // The upper aluminum frame
684 sprintf(cTagV,"UF%02d",iDet+kNdet);
685 zpos += fgkCroH/2. + fgkCamH/2.;
686 gMC->Gspos(cTagV,1,"UTI2",xpos,ypos,zpos,0,"ONLY");
690 if (fClengthRH[iplan][icham] > 0.0) {
692 ypos = - fClength[iplan][0] - fClength[iplan][1] - fClength[iplan][2]/2.;
693 for (Int_t ic = 0; ic < icham; ic++) {
694 ypos += fClength[iplan][ic];
697 ypos += fClength[iplan][icham];
698 ypos -= fClengthRH[iplan][icham]/2.;
701 ypos += fClengthRH[iplan][icham]/2.;
703 zpos = fgkCraH/2. + fgkCdrH/2. - fgkSheight/2. + iplan * (fgkCH + fgkVspace);
704 // The lower aluminum frame, radiator + drift region
705 sprintf(cTagV,"UA%02d",iDet+2*kNdet);
706 gMC->Gspos(cTagV,1,"UTI3",xpos,ypos,zpos,0,"ONLY");
707 // The upper G10 frame, amplification region
708 sprintf(cTagV,"UD%02d",iDet+2*kNdet);
709 zpos += fgkCamH/2. + fgkCraH/2. + fgkCdrH/2.;
710 gMC->Gspos(cTagV,1,"UTI3",xpos,ypos,zpos,0,"ONLY");
711 // The upper aluminum frame
712 sprintf(cTagV,"UF%02d",iDet+2*kNdet);
713 zpos += fgkCroH/2. + fgkCamH/2.;
714 gMC->Gspos(cTagV,1,"UTI3",xpos,ypos,zpos,0,"ONLY");
724 gMC->Gspos("UTI1",1,"UTS1",xpos,ypos,zpos,0,"ONLY");
726 gMC->Gspos("UTI2",2,"UTS2",xpos,ypos,zpos,0,"ONLY");
729 gMC->Gspos("UTI3",3,"UTS3",xpos,ypos,zpos,0,"ONLY");
735 gMC->Gspos("UTS1",1,"UTR1",xpos,ypos,zpos,0,"ONLY");
737 gMC->Gspos("UTS2",2,"UTR2",xpos,ypos,zpos,0,"ONLY");
740 gMC->Gspos("UTS3",3,"UTR3",xpos,ypos,zpos,0,"ONLY");
746 gMC->Gspos("UTR1",1,"BTR1",xpos,ypos,zpos,0,"ONLY");
748 gMC->Gspos("UTR2",2,"BTR2",xpos,ypos,zpos,0,"ONLY");
751 gMC->Gspos("UTR1",2,"BTR2",xpos,ypos,zpos,0,"ONLY");
754 gMC->Gspos("UTR3",3,"BTR3",xpos,ypos,zpos,0,"ONLY");
757 gMC->Gspos("UTR1",3,"BTR3",xpos,ypos,zpos,0,"ONLY");
760 // Create the volumes of the super module frame
763 // Create the volumes of the services
764 CreateServices(idtmed);
768 //_____________________________________________________________________________
769 void AliTRDgeometryFull::CreateFrame(Int_t *idtmed)
772 // Create the geometry of the frame of the supermodule
774 // Names of the TRD services volumina
776 // USRL Support rails for the chambers (Al)
777 // USxx Support cross bars between the chambers (Al)
789 // The chamber support rails
792 const Float_t kSRLwid = 2.0;
793 const Float_t kSRLhgt = 2.3;
794 const Float_t kSRLdst = 0.6;
795 const Int_t kNparSRL = 3;
796 Float_t parSRL[kNparSRL];
797 parSRL[0] = kSRLwid/2.;
798 parSRL[1] = fgkSlenTR1/2.;
799 parSRL[2] = kSRLhgt/2.;
800 gMC->Gsvolu("USRL","BOX ",idtmed[1301-1],parSRL,kNparSRL);
805 for (iplan = 0; iplan < kNplan; iplan++) {
807 xpos = fCwidth[iplan]/2. + kSRLwid/2. + kSRLdst;
809 zpos = fgkCraH + fgkCdrH - fgkSheight/2. - kSRLhgt/2.
810 + iplan * (fgkCH + fgkVspace);
811 gMC->Gspos("USRL",iplan+1 ,"UTI1", xpos,ypos,zpos,0,"ONLY");
812 gMC->Gspos("USRL",iplan+1+ kNplan,"UTI1",-xpos,ypos,zpos,0,"ONLY");
814 gMC->Gspos("USRL",iplan+1+2*kNplan,"UTI2", xpos,ypos,zpos,0,"ONLY");
815 gMC->Gspos("USRL",iplan+1+3*kNplan,"UTI2",-xpos,ypos,zpos,0,"ONLY");
818 gMC->Gspos("USRL",iplan+1+4*kNplan,"UTI3", xpos,ypos,zpos,0,"ONLY");
819 gMC->Gspos("USRL",iplan+1+5*kNplan,"UTI3",-xpos,ypos,zpos,0,"ONLY");
825 // The cross bars between the chambers
828 const Float_t kSCBwid = 1.0;
829 const Int_t kNparSCB = 3;
830 Float_t parSCB[kNparSCB];
831 parSCB[1] = kSCBwid/2.;
832 parSCB[2] = fgkCH/2.;
837 for (iplan = 0; iplan < kNplan; iplan++) {
839 parSCB[0] = fCwidth[iplan]/2. + kSRLdst/2.;
841 sprintf(cTagV,"US0%01d",iplan);
842 gMC->Gsvolu(cTagV,"BOX ",idtmed[1301-1],parSCB,kNparSCB);
844 ypos = fgkSlenTR1/2. - kSCBwid/2.;
845 zpos = fgkCH/2. - fgkSheight/2. + iplan * (fgkCH + fgkVspace);
846 gMC->Gspos(cTagV,1,"UTI1", xpos,ypos,zpos,0,"ONLY");
848 gMC->Gspos(cTagV,2,"UTI2", xpos,ypos,zpos,0,"ONLY");
851 gMC->Gspos(cTagV,3,"UTI3", xpos,ypos,zpos,0,"ONLY");
854 sprintf(cTagV,"US1%01d",iplan);
855 gMC->Gsvolu(cTagV,"BOX ",idtmed[1301-1],parSCB,kNparSCB);
857 ypos = fClength[iplan][2]/2. + fClength[iplan][1];
858 zpos = fgkCH/2. - fgkSheight/2. + iplan * (fgkCH + fgkVspace);
859 gMC->Gspos(cTagV,1,"UTI1", xpos,ypos,zpos,0,"ONLY");
861 gMC->Gspos(cTagV,2,"UTI2", xpos,ypos,zpos,0,"ONLY");
864 ypos += fClength[iplan][0] - fClengthRH[iplan][0];
865 gMC->Gspos(cTagV,3,"UTI3", xpos,ypos,zpos,0,"ONLY");
868 sprintf(cTagV,"US2%01d",iplan);
869 gMC->Gsvolu(cTagV,"BOX ",idtmed[1301-1],parSCB,kNparSCB);
871 ypos = fClength[iplan][2]/2.;
872 zpos = fgkCH/2. - fgkSheight/2. + iplan * (fgkCH + fgkVspace);
873 gMC->Gspos(cTagV,1,"UTI1", xpos,ypos,zpos,0,"ONLY");
875 ypos += fClength[iplan][1] - fClengthPH[iplan][1];
876 gMC->Gspos(cTagV,2,"UTI2", xpos,ypos,zpos,0,"ONLY");
879 sprintf(cTagV,"US3%01d",iplan);
880 gMC->Gsvolu(cTagV,"BOX ",idtmed[1301-1],parSCB,kNparSCB);
882 ypos = - fClength[iplan][2]/2.;
883 zpos = fgkCH/2. - fgkSheight/2. + iplan * (fgkCH + fgkVspace);
884 gMC->Gspos(cTagV,1,"UTI1", xpos,ypos,zpos,0,"ONLY");
886 ypos -= fClength[iplan][3] - fClengthPH[iplan][3];
887 gMC->Gspos(cTagV,2,"UTI2", xpos,ypos,zpos,0,"ONLY");
890 sprintf(cTagV,"US4%01d",iplan);
891 gMC->Gsvolu(cTagV,"BOX ",idtmed[1301-1],parSCB,kNparSCB);
893 ypos = - fClength[iplan][2]/2. - fClength[iplan][1];
894 zpos = fgkCH/2. - fgkSheight/2. + iplan * (fgkCH + fgkVspace);
895 gMC->Gspos(cTagV,1,"UTI1", xpos,ypos,zpos,0,"ONLY");
897 gMC->Gspos(cTagV,2,"UTI2", xpos,ypos,zpos,0,"ONLY");
900 ypos -= fClength[iplan][4] - fClengthRH[iplan][4];
901 gMC->Gspos(cTagV,3,"UTI3", xpos,ypos,zpos,0,"ONLY");
904 sprintf(cTagV,"US5%01d",iplan);
905 gMC->Gsvolu(cTagV,"BOX ",idtmed[1301-1],parSCB,kNparSCB);
907 ypos = - fgkSlenTR1/2. + kSCBwid/2.;
908 zpos = fgkCH/2. - fgkSheight/2. + iplan * (fgkCH + fgkVspace);
909 gMC->Gspos(cTagV,1,"UTI1", xpos,ypos,zpos,0,"ONLY");
911 gMC->Gspos(cTagV,2,"UTI2", xpos,ypos,zpos,0,"ONLY");
914 gMC->Gspos(cTagV,3,"UTI3", xpos,ypos,zpos,0,"ONLY");
921 //_____________________________________________________________________________
922 void AliTRDgeometryFull::CreateServices(Int_t *idtmed)
925 // Create the geometry of the services
927 // Names of the TRD services volumina
929 // UTCL Cooling arterias (Al)
930 // UTCW Cooling arterias (Water)
931 // UUxx Volumes for the services at the chambers (Air)
932 // UTPW Power bars (Cu)
933 // UTCP Cooling pipes (Al)
934 // UTCH Cooling pipes (Water)
935 // UTPL Power lines (Cu)
936 // UMCM Readout MCMs (G10/Cu/Si)
939 const Int_t kNdet = kNplan * kNcham;
950 // The rotation matrices
951 const Int_t kNmatrix = 3;
952 Int_t matrix[kNmatrix];
953 gMC->Matrix(matrix[0],100.0, 0.0, 90.0, 90.0, 10.0, 0.0);
954 gMC->Matrix(matrix[1], 80.0, 0.0, 90.0, 90.0, 10.0,180.0);
955 gMC->Matrix(matrix[2], 0.0, 0.0, 90.0, 90.0, 90.0, 0.0);
957 AliTRDparameter *parameter = new AliTRDparameter("par","TRD parameter");
960 // The cooling arterias
963 // Width of the cooling arterias
964 const Float_t kCOLwid = 0.5;
965 // Height of the cooling arterias
966 const Float_t kCOLhgt = 5.5;
967 // Positioning of the cooling
968 const Float_t kCOLposx = 1.6;
969 const Float_t kCOLposz = -0.2;
970 // Thickness of the walls of the cooling arterias
971 const Float_t kCOLthk = 0.1;
972 const Int_t kNparCOL = 3;
973 Float_t parCOL[kNparCOL];
974 parCOL[0] = kCOLwid/2.;
975 parCOL[1] = fgkSlenTR1/2.;
976 parCOL[2] = kCOLhgt/2.;
977 gMC->Gsvolu("UTCL","BOX ",idtmed[1324-1],parCOL,kNparCOL);
978 parCOL[0] -= kCOLthk;
979 parCOL[1] = fgkSlenTR1/2.;
980 parCOL[2] -= kCOLthk;
981 gMC->Gsvolu("UTCW","BOX ",idtmed[1314-1],parCOL,kNparCOL);
986 gMC->Gspos("UTCW",1,"UTCL", xpos,ypos,zpos,0,"ONLY");
988 for (iplan = 1; iplan < kNplan; iplan++) {
990 xpos = fCwidth[iplan]/2. + kCOLwid/2. + kCOLposx;
992 zpos = kCOLhgt/2. - fgkSheight/2. + kCOLposz + iplan * (fgkCH + fgkVspace);
993 gMC->Gspos("UTCL",iplan+1 ,"UTI1", xpos,ypos,zpos,matrix[0],"ONLY");
994 gMC->Gspos("UTCL",iplan+1+ kNplan,"UTI1",-xpos,ypos,zpos,matrix[1],"ONLY");
996 gMC->Gspos("UTCL",iplan+1+2*kNplan,"UTI2", xpos,ypos,zpos,matrix[0],"ONLY");
997 gMC->Gspos("UTCL",iplan+1+3*kNplan,"UTI2",-xpos,ypos,zpos,matrix[1],"ONLY");
1000 gMC->Gspos("UTCL",iplan+1+4*kNplan,"UTI3", xpos,ypos,zpos,matrix[0],"ONLY");
1001 gMC->Gspos("UTCL",iplan+1+5*kNplan,"UTI3",-xpos,ypos,zpos,matrix[1],"ONLY");
1010 const Float_t kPWRwid = 0.6;
1011 const Float_t kPWRhgt = 4.5;
1012 const Float_t kPWRposx = 1.05;
1013 const Float_t kPWRposz = 0.9;
1014 const Int_t kNparPWR = 3;
1015 Float_t parPWR[kNparPWR];
1016 parPWR[0] = kPWRwid/2.;
1017 parPWR[1] = fgkSlenTR1/2.;
1018 parPWR[2] = kPWRhgt/2.;
1019 gMC->Gsvolu("UTPW","BOX ",idtmed[1325-1],parPWR,kNparPWR);
1021 for (iplan = 1; iplan < kNplan; iplan++) {
1023 xpos = fCwidth[iplan]/2. + kPWRwid/2. + kPWRposx;
1025 zpos = kPWRhgt/2. - fgkSheight/2. + kPWRposz + iplan * (fgkCH + fgkVspace);
1026 gMC->Gspos("UTPW",iplan+1 ,"UTI1", xpos,ypos,zpos,matrix[0],"ONLY");
1027 gMC->Gspos("UTPW",iplan+1+ kNplan,"UTI1",-xpos,ypos,zpos,matrix[1],"ONLY");
1029 gMC->Gspos("UTPW",iplan+1+2*kNplan,"UTI2", xpos,ypos,zpos,matrix[0],"ONLY");
1030 gMC->Gspos("UTPW",iplan+1+3*kNplan,"UTI2",-xpos,ypos,zpos,matrix[1],"ONLY");
1033 gMC->Gspos("UTPW",iplan+1+4*kNplan,"UTI3", xpos,ypos,zpos,matrix[0],"ONLY");
1034 gMC->Gspos("UTPW",iplan+1+5*kNplan,"UTI3",-xpos,ypos,zpos,matrix[1],"ONLY");
1040 // The volumes for the services at the chambers
1043 const Int_t kNparServ = 3;
1044 Float_t parServ[kNparServ];
1046 for (icham = 0; icham < kNcham; icham++) {
1047 //for (iplan = 0; iplan < kNplan; iplan++) {
1048 // Take out upper plane until TRD mothervolume is adjusted
1049 for (iplan = 0; iplan < kNplan-1; iplan++) {
1051 Int_t iDet = GetDetectorSec(iplan,icham);
1053 sprintf(cTagV,"UU%02d",iDet);
1054 parServ[0] = fCwidth[iplan]/2.;
1055 parServ[1] = fClength[iplan][icham]/2. - fgkHspace/2.;
1056 parServ[2] = fgkVspace/2.;
1057 gMC->Gsvolu(cTagV,"BOX",idtmed[1302-1],parServ,kNparServ);
1059 ypos = - fClength[iplan][0] - fClength[iplan][1] - fClength[iplan][2]/2.;
1060 for (Int_t ic = 0; ic < icham; ic++) {
1061 ypos += fClength[iplan][ic];
1063 ypos += fClength[iplan][icham]/2.;
1064 zpos = fgkCH + fgkVspace/2. - fgkSheight/2. + iplan * (fgkCH + fgkVspace);
1065 gMC->Gspos(cTagV,1,"UTI1",xpos,ypos,zpos,0,"ONLY");
1068 if (fClengthPH[iplan][icham] > 0.0) {
1069 sprintf(cTagV,"UU%02d",iDet+kNdet);
1070 parServ[0] = fCwidth[iplan]/2.;
1071 parServ[1] = fClengthPH[iplan][icham]/2. - fgkHspace/2.;
1072 parServ[2] = fgkVspace/2.;
1073 gMC->Gsvolu(cTagV,"BOX",idtmed[1302-1],parServ,kNparServ);
1075 ypos = - fClength[iplan][0] - fClength[iplan][1] - fClength[iplan][2]/2.;
1076 for (Int_t ic = 0; ic < icham; ic++) {
1077 ypos += fClength[iplan][ic];
1080 ypos += fClength[iplan][icham];
1081 ypos -= fClengthPH[iplan][icham]/2.;
1084 ypos += fClengthPH[iplan][icham]/2.;
1086 zpos = fgkCH + fgkVspace/2. - fgkSheight/2. + iplan * (fgkCH + fgkVspace);
1087 gMC->Gspos(cTagV,1,"UTI2",xpos,ypos,zpos,0,"ONLY");
1092 if (fClengthRH[iplan][icham] > 0.0) {
1093 sprintf(cTagV,"UU%02d",iDet+2*kNdet);
1094 parServ[0] = fCwidth[iplan]/2.;
1095 parServ[1] = fClengthRH[iplan][icham]/2. - fgkHspace/2.;
1096 parServ[2] = fgkVspace/2.;
1097 gMC->Gsvolu(cTagV,"BOX",idtmed[1302-1],parServ,kNparServ);
1099 ypos = - fClength[iplan][0] - fClength[iplan][1] - fClength[iplan][2]/2.;
1100 for (Int_t ic = 0; ic < icham; ic++) {
1101 ypos += fClength[iplan][ic];
1104 ypos += fClength[iplan][icham];
1105 ypos -= fClengthRH[iplan][icham]/2.;
1108 ypos += fClengthRH[iplan][icham]/2.;
1110 zpos = fgkCH + fgkVspace/2. - fgkSheight/2. + iplan * (fgkCH + fgkVspace);
1111 gMC->Gspos(cTagV,1,"UTI3",xpos,ypos,zpos,0,"ONLY");
1119 // The cooling pipes inside the service volumes
1122 const Int_t kNparTube = 3;
1123 Float_t parTube[kNparTube];
1124 // The aluminum pipe for the cooling
1128 gMC->Gsvolu("UTCP","TUBE",idtmed[1324-1],parTube,0);
1129 // The cooling water
1131 parTube[1] = 0.2/2.;
1133 gMC->Gsvolu("UTCH","TUBE",idtmed[1314-1],parTube,kNparTube);
1134 // Water inside the cooling pipe
1138 gMC->Gspos("UTCH",1,"UTCP",xpos,ypos,zpos,0,"ONLY");
1140 // Position the cooling pipes in the mother volume
1141 const Int_t kNpar = 3;
1143 for (icham = 0; icham < kNcham; icham++) {
1144 //for (iplan = 0; iplan < kNplan; iplan++) {
1145 // Take out upper plane until TRD mothervolume is adjusted
1146 for (iplan = 0; iplan < kNplan-1; iplan++) {
1147 Int_t iDet = GetDetectorSec(iplan,icham);
1148 Int_t iCopy = GetDetector(iplan,icham,0) * 100;
1149 Int_t nMCMrow = parameter->GetRowMax(iplan,icham,0);
1150 Float_t ySize = (GetChamberLength(iplan,icham) - 2.*fgkRpadW)
1151 / ((Float_t) nMCMrow);
1152 sprintf(cTagV,"UU%02d",iDet);
1153 for (Int_t iMCMrow = 0; iMCMrow < nMCMrow; iMCMrow++) {
1155 ypos = (0.5 + iMCMrow) * ySize - 1.9
1156 - fClength[iplan][icham]/2. + fgkHspace/2.;
1159 par[1] = 0.3/2.; // Thickness of the cooling pipes
1160 par[2] = fCwidth[iplan]/2.;
1161 gMC->Gsposp("UTCP",iCopy+iMCMrow,cTagV,xpos,ypos,zpos
1162 ,matrix[2],"ONLY",par,kNpar);
1165 sprintf(cTagV,"UU%02d",iDet+kNdet);
1166 for (Int_t iMCMrow = 0; iMCMrow < nMCMrow; iMCMrow++) {
1168 ypos = (0.5 + iMCMrow) * ySize - 1.9
1169 - fClengthPH[iplan][icham]/2. + fgkHspace/2.;
1171 if (ypos < (fClengthPH[iplan][icham]/2. - fgkHspace/2.)) {
1173 par[1] = 0.3/2.; // Thickness of the cooling pipes
1174 par[2] = fCwidth[iplan]/2.;
1175 gMC->Gsposp("UTCP",iCopy+iMCMrow+nMCMrow,cTagV,xpos,ypos,zpos
1176 ,matrix[2],"ONLY",par,kNpar);
1181 sprintf(cTagV,"UU%02d",iDet+2*kNdet);
1182 for (Int_t iMCMrow = 0; iMCMrow < nMCMrow; iMCMrow++) {
1184 ypos = (0.5 + iMCMrow) * ySize - 1.9
1185 - fClengthRH[iplan][icham]/2. + fgkHspace/2.;
1187 if (ypos < (fClengthRH[iplan][icham]/2. - fgkHspace/2.)) {
1189 par[1] = 0.3/2.; // Thickness of the cooling pipes
1190 par[2] = fCwidth[iplan]/2.;
1191 gMC->Gsposp("UTCP",iCopy+iMCMrow+2*nMCMrow,cTagV,xpos,ypos,zpos
1192 ,matrix[2],"ONLY",par,kNpar);
1203 // The copper power lines
1207 gMC->Gsvolu("UTPL","TUBE",idtmed[1305-1],parTube,0);
1209 // Position the power lines in the mother volume
1210 for (icham = 0; icham < kNcham; icham++) {
1211 //for (iplan = 0; iplan < kNplan; iplan++) {
1212 // Take out upper plane until TRD mothervolume is adjusted
1213 for (iplan = 0; iplan < kNplan-1; iplan++) {
1214 Int_t iDet = GetDetectorSec(iplan,icham);
1215 Int_t iCopy = GetDetector(iplan,icham,0) * 100;
1216 Int_t nMCMrow = parameter->GetRowMax(iplan,icham,0);
1217 Float_t ySize = (GetChamberLength(iplan,icham) - 2.*fgkRpadW)
1218 / ((Float_t) nMCMrow);
1219 sprintf(cTagV,"UU%02d",iDet);
1220 for (Int_t iMCMrow = 0; iMCMrow < nMCMrow; iMCMrow++) {
1222 ypos = (0.5 + iMCMrow) * ySize - 1.0
1223 - fClength[iplan][icham]/2. + fgkHspace/2.;
1226 par[1] = 0.2/2.; // Thickness of the power lines
1227 par[2] = fCwidth[iplan]/2.;
1228 gMC->Gsposp("UTPL",iCopy+iMCMrow,cTagV,xpos,ypos,zpos
1229 ,matrix[2],"ONLY",par,kNpar);
1232 sprintf(cTagV,"UU%02d",iDet+kNdet);
1233 for (Int_t iMCMrow = 0; iMCMrow < nMCMrow; iMCMrow++) {
1235 ypos = (0.5 + iMCMrow) * ySize - 1.0
1236 - fClengthPH[iplan][icham]/2. + fgkHspace/2.;
1238 if (ypos < (fClengthPH[iplan][icham]/2. - fgkHspace/2.)) {
1240 par[1] = 0.2/2.; // Thickness of the power lines
1241 par[2] = fCwidth[iplan]/2.;
1242 gMC->Gsposp("UTPL",iCopy+iMCMrow+nMCMrow,cTagV,xpos,ypos,zpos
1243 ,matrix[2],"ONLY",par,kNpar);
1248 sprintf(cTagV,"UU%02d",iDet+2*kNdet);
1249 for (Int_t iMCMrow = 0; iMCMrow < nMCMrow; iMCMrow++) {
1251 ypos = (0.5 + iMCMrow) * ySize - 1.0
1252 - fClengthRH[iplan][icham]/2. + fgkHspace/2.;
1254 if (ypos < (fClengthRH[iplan][icham]/2. - fgkHspace/2.)) {
1256 par[1] = 0.2/2.; // Thickness of the power lines
1257 par[2] = fCwidth[iplan]/2.;
1258 gMC->Gsposp("UTPL",iCopy+iMCMrow+2*nMCMrow,cTagV,xpos,ypos,zpos
1259 ,matrix[2],"ONLY",par,kNpar);
1270 // The mother volume for the MCMs (air)
1271 const Int_t kNparMCM = 3;
1272 Float_t parMCM[kNparMCM];
1275 parMCM[2] = 0.14/2.;
1276 gMC->Gsvolu("UMCM","BOX",idtmed[1302-1],parMCM,kNparMCM);
1278 // The MCM carrier G10 layer
1282 gMC->Gsvolu("UMC1","BOX",idtmed[1319-1],parMCM,kNparMCM);
1283 // The MCM carrier Cu layer
1286 parMCM[2] = 0.0162/2.;
1287 gMC->Gsvolu("UMC2","BOX",idtmed[1318-1],parMCM,kNparMCM);
1288 // The silicon of the chips
1291 parMCM[2] = 0.003/2.;
1292 gMC->Gsvolu("UMC3","BOX",idtmed[1320-1],parMCM,kNparMCM);
1294 // Put the MCM material inside the MCM mother volume
1297 zpos = -0.07 + 0.1/2.;
1298 gMC->Gspos("UMC1",1,"UMCM",xpos,ypos,zpos,0,"ONLY");
1299 zpos += 0.1/2. + 0.0162/2.;
1300 gMC->Gspos("UMC2",1,"UMCM",xpos,ypos,zpos,0,"ONLY");
1301 zpos += 0.00162/2 + 0.003/2.;
1302 gMC->Gspos("UMC3",1,"UMCM",xpos,ypos,zpos,0,"ONLY");
1304 // Position the MCMs in the mother volume
1305 for (icham = 0; icham < kNcham; icham++) {
1306 //for (iplan = 0; iplan < kNplan; iplan++) {
1307 // Take out upper plane until TRD mothervolume is adjusted
1308 for (iplan = 0; iplan < kNplan-1; iplan++) {
1309 Int_t iDet = GetDetectorSec(iplan,icham);
1310 Int_t iCopy = GetDetector(iplan,icham,0) * 1000;
1311 Int_t nMCMrow = parameter->GetRowMax(iplan,icham,0);
1312 Float_t ySize = (GetChamberLength(iplan,icham) - 2.*fgkRpadW)
1313 / ((Float_t) nMCMrow);
1315 Float_t xSize = (GetChamberWidth(iplan) - 2.* fgkCpadW)
1316 / ((Float_t) nMCMcol);
1317 sprintf(cTagV,"UU%02d",iDet);
1318 for (Int_t iMCMrow = 0; iMCMrow < nMCMrow; iMCMrow++) {
1319 for (Int_t iMCMcol = 0; iMCMcol < nMCMcol; iMCMcol++) {
1320 xpos = (0.5 + iMCMcol) * xSize + 1.0
1321 - fCwidth[iplan]/2.;
1322 ypos = (0.5 + iMCMrow) * ySize + 1.0
1323 - fClength[iplan][icham]/2. + fgkHspace/2.;
1326 par[1] = 0.2/2.; // Thickness of the power lines
1327 par[2] = fCwidth[iplan]/2.;
1328 gMC->Gspos("UMCM",iCopy+iMCMrow*10+iMCMcol,cTagV
1329 ,xpos,ypos,zpos,0,"ONLY");
1333 sprintf(cTagV,"UU%02d",iDet+kNdet);
1334 for (Int_t iMCMrow = 0; iMCMrow < nMCMrow; iMCMrow++) {
1335 for (Int_t iMCMcol = 0; iMCMcol < nMCMcol; iMCMcol++) {
1336 xpos = (0.5 + iMCMcol) * xSize + 1.0
1337 - fCwidth[iplan]/2.;
1338 ypos = (0.5 + iMCMrow) * ySize + 1.0
1339 - fClengthPH[iplan][icham]/2. + fgkHspace/2.;
1341 if (ypos < (fClengthPH[iplan][icham]/2. - fgkHspace/2.)) {
1343 par[1] = 0.2/2.; // Thickness of the power lines
1344 par[2] = fCwidth[iplan]/2.;
1345 gMC->Gspos("UMCM",iCopy+iMCMrow*10+iMCMcol+10*nMCMrow,cTagV
1346 ,xpos,ypos,zpos,0,"ONLY");
1352 sprintf(cTagV,"UU%02d",iDet+2*kNdet);
1353 for (Int_t iMCMrow = 0; iMCMrow < nMCMrow; iMCMrow++) {
1354 for (Int_t iMCMcol = 0; iMCMcol < nMCMcol; iMCMcol++) {
1355 xpos = (0.5 + iMCMcol) * xSize + 1.0
1356 - fCwidth[iplan]/2.;
1357 ypos = (0.5 + iMCMrow) * ySize + 1.0
1358 - fClengthRH[iplan][icham]/2. + fgkHspace/2.;
1360 if (ypos < (fClengthRH[iplan][icham]/2. - fgkHspace/2.)) {
1362 par[1] = 0.2/2.; // Thickness of the power lines
1363 par[2] = fCwidth[iplan]/2.;
1364 gMC->Gspos("UMCM",iCopy+iMCMrow*10+iMCMcol+20*nMCMrow,cTagV
1365 ,xpos,ypos,zpos,0,"ONLY");
1378 //_____________________________________________________________________________
1379 void AliTRDgeometryFull::SetOldGeometry()
1382 // Use the old chamber lengths
1388 AliTRDgeometry::SetOldGeometry();
1390 Float_t lengthPH[kNplan][kNcham] = { { 123.5, 116.5, 0.0, 116.5, 123.5 }
1391 , { 131.0, 124.0, 0.0, 124.0, 131.0 }
1392 , { 134.5, 131.5, 0.0, 131.5, 134.5 }
1393 , { 142.0, 139.0, 0.0, 139.0, 142.0 }
1394 , { 142.0, 146.0, 0.0, 146.0, 142.0 }
1395 , { 134.5, 153.5, 0.0, 153.5, 134.5 } };
1397 Float_t lengthRH[kNplan][kNcham] = { { 86.5, 0.0, 0.0, 0.0, 86.5 }
1398 , { 101.5, 0.0, 0.0, 0.0, 101.5 }
1399 , { 112.5, 0.0, 0.0, 0.0, 112.5 }
1400 , { 127.5, 0.0, 0.0, 0.0, 127.5 }
1401 , { 134.5, 0.0, 0.0, 0.0, 134.5 }
1402 , { 134.5, 0.0, 0.0, 0.0, 134.5 } };
1404 for (icham = 0; icham < kNcham; icham++) {
1405 for (iplan = 0; iplan < kNplan; iplan++) {
1406 fClengthPH[iplan][icham] = lengthPH[iplan][icham];
1407 fClengthRH[iplan][icham] = lengthRH[iplan][icham];