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.13 2004/02/27 15:40:18 cblume
19 Fix definition of rotation matrices
21 Revision 1.12 2003/09/18 09:06:07 cblume
22 Geometry update, Removal of compiler warnings
24 Revision 1.10 2002/11/21 22:38:47 alibrary
25 Removing AliMC and AliMCProcess
27 Revision 1.9 2002/10/31 17:45:35 cblume
30 Revision 1.8 2002/02/11 14:21:16 cblume
31 Update of the geometry. Get rid of MANY
33 Revision 1.7 2001/05/11 07:56:12 hristov
34 Consistent declarations needed on Alpha
36 Revision 1.6 2001/02/14 18:22:26 cblume
37 Change in the geometry of the padplane
39 Revision 1.5 2000/11/01 14:53:21 cblume
40 Merge with TRD-develop
42 Revision 1.1.4.6 2000/10/15 23:40:01 cblume
45 Revision 1.1.4.5 2000/10/06 16:49:46 cblume
48 Revision 1.1.4.4 2000/10/04 16:34:58 cblume
49 Replace include files by forward declarations
51 Revision 1.1.4.3 2000/09/22 14:43:41 cblume
52 Allow the pad/timebin-dimensions to be changed after initialization
54 Revision 1.4 2000/10/02 21:28:19 fca
55 Removal of useless dependecies via forward declarations
57 Revision 1.3 2000/06/08 18:32:58 cblume
58 Make code compliant to coding conventions
60 Revision 1.2 2000/05/08 16:17:27 cblume
63 Revision 1.1.4.2 2000/05/08 14:46:44 cblume
64 Include options SetPHOShole() and SetRICHhole()
66 Revision 1.1.4.1 2000/04/27 12:46:04 cblume
67 Corrected bug in full geometry
69 Revision 1.1 2000/02/28 19:01:15 cblume
74 ///////////////////////////////////////////////////////////////////////////////
76 // TRD geometry for the spaceframe without holes //
78 ///////////////////////////////////////////////////////////////////////////////
80 #include "TVirtualMC.h"
82 #include "AliTRDgeometryFull.h"
83 #include "AliTRDparameter.h"
85 ClassImp(AliTRDgeometryFull)
87 //_____________________________________________________________________________
88 AliTRDgeometryFull::AliTRDgeometryFull():AliTRDgeometry()
91 // AliTRDgeometryFull default constructor
98 //_____________________________________________________________________________
99 AliTRDgeometryFull::~AliTRDgeometryFull()
102 // AliTRDgeometryFull destructor
107 //_____________________________________________________________________________
108 void AliTRDgeometryFull::Init()
111 // Initializes the geometry parameter
120 // The outer lengths of the chambers for the sectors with holes for the PHOS
121 Float_t lengthPH[kNplan][kNcham] = { { 124.0, 117.0, 0.0, 117.0, 124.0 }
122 , { 131.0, 124.0, 0.0, 124.0, 131.0 }
123 , { 138.0, 131.0, 0.0, 131.0, 138.0 }
124 , { 145.0, 138.0, 0.0, 138.0, 145.0 }
125 , { 147.0, 140.0, 0.0, 140.0, 147.0 }
126 , { 147.0, 140.0, 0.0, 140.0, 147.0 } };
128 // The outer lengths of the chambers for the sectors with holes for the RICH
129 Float_t lengthRH[kNplan][kNcham] = { { 87.5, 0.0, 0.0, 0.0, 87.5 }
130 , { 101.5, 0.0, 0.0, 0.0, 101.5 }
131 , { 115.5, 0.0, 0.0, 0.0, 115.5 }
132 , { 129.5, 0.0, 0.0, 0.0, 129.5 }
133 , { 133.5, 0.0, 0.0, 0.0, 133.5 }
134 , { 133.5, 0.0, 0.0, 0.0, 133.5 } };
136 for (icham = 0; icham < kNcham; icham++) {
137 for (iplan = 0; iplan < kNplan; iplan++) {
138 fClengthPH[iplan][icham] = lengthPH[iplan][icham];
139 fClengthRH[iplan][icham] = lengthRH[iplan][icham];
145 //_____________________________________________________________________________
146 void AliTRDgeometryFull::CreateGeometry(Int_t *idtmed)
149 // Create the TRD geometry without hole
152 // Names of the TRD volumina (xx = detector number):
154 // Lower part of the readout chambers (gas volume + radiator)
156 // UAxx Aluminum frames (Al)
157 // UBxx G10 frames (C)
158 // UCxx Inner volumes (Air)
160 // Upper part of the readout chambers (readout plane + fee)
162 // UDxx G10 frames (C)
163 // UExx Inner volumes of the G10 (Air)
164 // UFxx Aluminum frames (Al)
165 // UGxx Inner volumes of the Al (Air)
167 // Inner material layers
169 // UHxx Radiator (Rohacell)
170 // UIxx Entrance window (Mylar)
171 // UJxx Drift volume (Xe/CO2)
172 // UKxx Amplification volume (Xe/CO2)
173 // ULxx Pad plane (Cu)
174 // UMxx Support structure (Rohacell)
177 const Int_t kNdet = kNplan * kNcham;
179 const Int_t kNparTrd = 4;
180 const Int_t kNparCha = 3;
182 Float_t xpos, ypos, zpos;
184 Float_t parTrd[kNparTrd];
185 Float_t parCha[kNparCha];
190 AliTRDgeometry::CreateGeometry(idtmed);
192 // The TRD mother volume for one sector (Air), full length in z-direction
193 // Provides material for side plates of super module
194 parTrd[0] = fgkSwidth1/2.;
195 parTrd[1] = fgkSwidth2/2.;
196 parTrd[2] = fgkSlenTR1/2.;
197 parTrd[3] = fgkSheight/2.;
198 gMC->Gsvolu("UTR1","TRD1",idtmed[1302-1],parTrd,kNparTrd);
199 // The TRD mother volume for one sector (Al), leaving hole for PHOS
201 gMC->Gsvolu("UTR2","TRD1",idtmed[1302-1],parTrd,kNparTrd);
203 // The TRD mother volume for one sector (Al), leaving hole for RICH
205 gMC->Gsvolu("UTR3","TRD1",idtmed[1302-1],parTrd,kNparTrd);
209 // The side plates of the super module (Al)
210 parTrd[0] = fgkSwidth1/2. - fgkSMgapT;
211 parTrd[1] = fgkSwidth2/2. - fgkSMgapT;
212 parTrd[2] = fgkSlenTR1/2.;
213 parTrd[3] = fgkSheight/2.;
214 gMC->Gsvolu("UTS1","TRD1",idtmed[1301-1],parTrd,kNparTrd);
215 // The TRD mother volume for one sector (Al), leaving hole for PHOS
217 gMC->Gsvolu("UTS2","TRD1",idtmed[1301-1],parTrd,kNparTrd);
219 // The TRD mother volume for one sector (Al), leaving hole for RICH
221 gMC->Gsvolu("UTS3","TRD1",idtmed[1301-1],parTrd,kNparTrd);
224 // The inner part of the TRD mother volume for one sector (Air),
225 // full length in z-direction
226 parTrd[0] = fgkSwidth1/2. - fgkSMgapT - fgkSMpltT;
227 parTrd[1] = fgkSwidth2/2. - fgkSMgapT - fgkSMpltT;
228 parTrd[2] = fgkSlenTR1/2.;
229 parTrd[3] = fgkSheight/2.;
230 gMC->Gsvolu("UTI1","TRD1",idtmed[1302-1],parTrd,kNparTrd);
231 // The TRD mother volume for one sector (Air), leaving hole for PHOS
233 gMC->Gsvolu("UTI2","TRD1",idtmed[1302-1],parTrd,kNparTrd);
235 // The TRD mother volume for one sector (Air), leaving hole for RICH
237 gMC->Gsvolu("UTI3","TRD1",idtmed[1302-1],parTrd,kNparTrd);
240 for (Int_t icham = 0; icham < kNcham; icham++) {
241 for (Int_t iplan = 0; iplan < kNplan; iplan++) {
243 Int_t iDet = GetDetectorSec(iplan,icham);
245 // The lower part of the readout chambers (gas volume + radiator)
246 // The aluminum frames
247 sprintf(cTagV,"UA%02d",iDet);
248 parCha[0] = fCwidth[iplan]/2.;
249 parCha[1] = fClength[iplan][icham]/2. - fgkHspace/2.;
250 parCha[2] = fgkCraH/2. + fgkCdrH/2.;
251 gMC->Gsvolu(cTagV,"BOX ",idtmed[1301-1],parCha,kNparCha);
253 sprintf(cTagV,"UB%02d",iDet);
254 parCha[0] = fCwidth[iplan]/2. - fgkCalT;
257 gMC->Gsvolu(cTagV,"BOX ",idtmed[1307-1],parCha,kNparCha);
258 // The inner part (air)
259 sprintf(cTagV,"UC%02d",iDet);
260 parCha[0] = fCwidth[iplan]/2. - fgkCalT - fgkCclsT;
261 parCha[1] = fClength[iplan][icham]/2. - fgkHspace/2.- fgkCclfT;
263 gMC->Gsvolu(cTagV,"BOX ",idtmed[1302-1],parCha,kNparCha);
265 if (fClengthPH[iplan][icham] > 0.0) {
266 // The aluminum frames
267 sprintf(cTagV,"UA%02d",iDet+kNdet);
268 parCha[0] = fCwidth[iplan]/2.;
269 parCha[1] = fClengthPH[iplan][icham]/2. - fgkHspace/2.;
270 parCha[2] = fgkCraH/2. + fgkCdrH/2.;
271 gMC->Gsvolu(cTagV,"BOX ",idtmed[1301-1],parCha,kNparCha);
273 sprintf(cTagV,"UB%02d",iDet+kNdet);
274 parCha[0] = fCwidth[iplan]/2. - fgkCalT;
277 gMC->Gsvolu(cTagV,"BOX ",idtmed[1307-1],parCha,kNparCha);
278 // The inner part (air)
279 sprintf(cTagV,"UC%02d",iDet+kNdet);
280 parCha[0] = fCwidth[iplan]/2. - fgkCalT - fgkCclsT;
281 parCha[1] = fClengthPH[iplan][icham]/2. - fgkHspace/2.- fgkCclfT;
283 gMC->Gsvolu(cTagV,"BOX ",idtmed[1302-1],parCha,kNparCha);
287 if (fClengthRH[iplan][icham] > 0.0) {
288 // The aluminum frames
289 sprintf(cTagV,"UA%02d",iDet+2*kNdet);
290 parCha[0] = fCwidth[iplan]/2.;
291 parCha[1] = fClengthRH[iplan][icham]/2. - fgkHspace/2.;
292 parCha[2] = fgkCraH/2. + fgkCdrH/2.;
293 gMC->Gsvolu(cTagV,"BOX ",idtmed[1301-1],parCha,kNparCha);
295 sprintf(cTagV,"UB%02d",iDet+2*kNdet);
296 parCha[0] = fCwidth[iplan]/2. - fgkCalT;
299 gMC->Gsvolu(cTagV,"BOX ",idtmed[1307-1],parCha,kNparCha);
300 // The inner part (air)
301 sprintf(cTagV,"UC%02d",iDet+2*kNdet);
302 parCha[0] = fCwidth[iplan]/2. - fgkCalT - fgkCclsT;
303 parCha[1] = fClengthRH[iplan][icham]/2. - fgkHspace/2.- fgkCclfT;
305 gMC->Gsvolu(cTagV,"BOX ",idtmed[1302-1],parCha,kNparCha);
309 // The upper part of the readout chambers (readout plane)
311 sprintf(cTagV,"UD%02d",iDet);
312 parCha[0] = fCwidth[iplan]/2. + fgkCroW;
313 parCha[1] = fClength[iplan][icham]/2. - fgkHspace/2.;
314 parCha[2] = fgkCamH/2.;
315 gMC->Gsvolu(cTagV,"BOX ",idtmed[1307-1],parCha,kNparCha);
316 // The inner part of the G10 frame (air)
317 sprintf(cTagV,"UE%02d",iDet);
318 parCha[0] = fCwidth[iplan]/2. + fgkCroW - fgkCcuT;
319 parCha[1] = fClength[iplan][icham]/2. - fgkHspace/2.- fgkCcuT;
321 gMC->Gsvolu(cTagV,"BOX ",idtmed[1302-1],parCha,kNparCha);
322 // The aluminum frames
323 sprintf(cTagV,"UF%02d",iDet);
324 parCha[0] = fCwidth[iplan]/2. + fgkCroW;
325 parCha[1] = fClength[iplan][icham]/2. - fgkHspace/2.;
326 parCha[2] = fgkCroH/2.;
327 gMC->Gsvolu(cTagV,"BOX ",idtmed[1301-1],parCha,kNparCha);
328 // The inner part of the aluminum frames
329 sprintf(cTagV,"UG%02d",iDet);
330 parCha[0] = fCwidth[iplan]/2. + fgkCroW - fgkCauT;
331 parCha[1] = fClength[iplan][icham]/2. - fgkHspace/2.- fgkCauT;
333 gMC->Gsvolu(cTagV,"BOX ",idtmed[1302-1],parCha,kNparCha);
335 if (fClengthPH[iplan][icham] > 0.0) {
336 sprintf(cTagV,"UD%02d",iDet+kNdet);
337 parCha[0] = fCwidth[iplan]/2. + fgkCroW;
338 parCha[1] = fClengthPH[iplan][icham]/2. - fgkHspace/2.;
339 parCha[2] = fgkCamH/2.;
340 gMC->Gsvolu(cTagV,"BOX ",idtmed[1307-1],parCha,kNparCha);
341 // The inner part of the G10 frame (air)
342 sprintf(cTagV,"UE%02d",iDet+kNdet);
343 parCha[0] = fCwidth[iplan]/2. + fgkCroW - fgkCcuT;
344 parCha[1] = fClengthPH[iplan][icham]/2. - fgkHspace/2.- fgkCcuT;
346 gMC->Gsvolu(cTagV,"BOX ",idtmed[1302-1],parCha,kNparCha);
347 // The aluminum frames
348 sprintf(cTagV,"UF%02d",iDet+kNdet);
349 parCha[0] = fCwidth[iplan]/2. + fgkCroW;
350 parCha[1] = fClengthPH[iplan][icham]/2. - fgkHspace/2.;
351 parCha[2] = fgkCroH/2.;
352 gMC->Gsvolu(cTagV,"BOX ",idtmed[1301-1],parCha,kNparCha);
353 // The inner part of the aluminum frames
354 sprintf(cTagV,"UG%02d",iDet+kNdet);
355 parCha[0] = fCwidth[iplan]/2. + fgkCroW - fgkCauT;
356 parCha[1] = fClengthPH[iplan][icham]/2. - fgkHspace/2.- fgkCauT;
358 gMC->Gsvolu(cTagV,"BOX ",idtmed[1302-1],parCha,kNparCha);
362 if (fClengthRH[iplan][icham] > 0.0) {
363 sprintf(cTagV,"UD%02d",iDet+2*kNdet);
364 parCha[0] = fCwidth[iplan]/2. + fgkCroW;
365 parCha[1] = fClengthRH[iplan][icham]/2. - fgkHspace/2.;
366 parCha[2] = fgkCamH/2.;
367 gMC->Gsvolu(cTagV,"BOX ",idtmed[1307-1],parCha,kNparCha);
368 // The inner part of the G10 frame (air)
369 sprintf(cTagV,"UE%02d",iDet+2*kNdet);
370 parCha[0] = fCwidth[iplan]/2. + fgkCroW - fgkCcuT;
371 parCha[1] = fClengthRH[iplan][icham]/2. - fgkHspace/2.- fgkCcuT;
373 gMC->Gsvolu(cTagV,"BOX ",idtmed[1302-1],parCha,kNparCha);
374 // The aluminum frames
375 sprintf(cTagV,"UF%02d",iDet+2*kNdet);
376 parCha[0] = fCwidth[iplan]/2. + fgkCroW;
377 parCha[1] = fClengthRH[iplan][icham]/2. - fgkHspace/2.;
378 parCha[2] = fgkCroH/2.;
379 gMC->Gsvolu(cTagV,"BOX ",idtmed[1301-1],parCha,kNparCha);
380 // The inner part of the aluminum frames
381 sprintf(cTagV,"UG%02d",iDet+2*kNdet);
382 parCha[0] = fCwidth[iplan]/2. + fgkCroW - fgkCauT;
383 parCha[1] = fClengthRH[iplan][icham]/2. - fgkHspace/2.- fgkCauT;
385 gMC->Gsvolu(cTagV,"BOX ",idtmed[1302-1],parCha,kNparCha);
389 // The material layers inside the chambers
392 // Rohacell layer (radiator)
393 parCha[2] = fgkRaThick/2;
394 sprintf(cTagV,"UH%02d",iDet);
395 gMC->Gsvolu(cTagV,"BOX ",idtmed[1315-1],parCha,kNparCha);
396 // Mylar layer (entrance window + HV cathode)
397 parCha[2] = fgkMyThick/2;
398 sprintf(cTagV,"UI%02d",iDet);
399 gMC->Gsvolu(cTagV,"BOX ",idtmed[1308-1],parCha,kNparCha);
400 // Xe/Isobutane layer (drift volume)
401 parCha[2] = fgkDrThick/2.;
402 sprintf(cTagV,"UJ%02d",iDet);
403 gMC->Gsvolu(cTagV,"BOX ",idtmed[1309-1],parCha,kNparCha);
404 // Xe/Isobutane layer (amplification volume)
405 parCha[2] = fgkAmThick/2.;
406 sprintf(cTagV,"UK%02d",iDet);
407 gMC->Gsvolu(cTagV,"BOX ",idtmed[1309-1],parCha,kNparCha);
408 // Cu layer (pad plane)
409 parCha[2] = fgkCuThick/2;
410 sprintf(cTagV,"UL%02d",iDet);
411 gMC->Gsvolu(cTagV,"BOX ",idtmed[1305-1],parCha,kNparCha);
412 // G10 layer (support structure / honeycomb)
413 parCha[2] = fgkSuThick/2;
414 sprintf(cTagV,"UM%02d",iDet);
415 gMC->Gsvolu(cTagV,"BOX ",idtmed[1313-1],parCha,kNparCha);
417 if (fClengthPH[iplan][icham] > 0.0) {
418 // Rohacell layer (radiator)
419 parCha[2] = fgkRaThick/2;
420 sprintf(cTagV,"UH%02d",iDet+kNdet);
421 gMC->Gsvolu(cTagV,"BOX ",idtmed[1315-1],parCha,kNparCha);
422 // Mylar layer (entrance window + HV cathode)
423 parCha[2] = fgkMyThick/2;
424 sprintf(cTagV,"UI%02d",iDet+kNdet);
425 gMC->Gsvolu(cTagV,"BOX ",idtmed[1308-1],parCha,kNparCha);
426 // Xe/Isobutane layer (drift volume)
427 parCha[2] = fgkDrThick/2.;
428 sprintf(cTagV,"UJ%02d",iDet+kNdet);
429 gMC->Gsvolu(cTagV,"BOX ",idtmed[1309-1],parCha,kNparCha);
430 // Xe/Isobutane layer (amplification volume)
431 parCha[2] = fgkAmThick/2.;
432 sprintf(cTagV,"UK%02d",iDet+kNdet);
433 gMC->Gsvolu(cTagV,"BOX ",idtmed[1309-1],parCha,kNparCha);
434 // Cu layer (pad plane)
435 parCha[2] = fgkCuThick/2;
436 sprintf(cTagV,"UL%02d",iDet+kNdet);
437 gMC->Gsvolu(cTagV,"BOX ",idtmed[1305-1],parCha,kNparCha);
438 // G10 layer (support structure / honeycomb)
439 parCha[2] = fgkSuThick/2;
440 sprintf(cTagV,"UM%02d",iDet+kNdet);
441 gMC->Gsvolu(cTagV,"BOX ",idtmed[1313-1],parCha,kNparCha);
445 if (fClengthRH[iplan][icham] > 0.0) {
446 // Rohacell layer (radiator)
447 parCha[2] = fgkRaThick/2;
448 sprintf(cTagV,"UH%02d",iDet+2*kNdet);
449 gMC->Gsvolu(cTagV,"BOX ",idtmed[1315-1],parCha,kNparCha);
450 // Mylar layer (entrance window + HV cathode)
451 parCha[2] = fgkMyThick/2;
452 sprintf(cTagV,"UI%02d",iDet+2*kNdet);
453 gMC->Gsvolu(cTagV,"BOX ",idtmed[1308-1],parCha,kNparCha);
454 // Xe/Isobutane layer (drift volume)
455 parCha[2] = fgkDrThick/2.;
456 sprintf(cTagV,"UJ%02d",iDet+2*kNdet);
457 gMC->Gsvolu(cTagV,"BOX ",idtmed[1309-1],parCha,kNparCha);
458 // Xe/Isobutane layer (amplification volume)
459 parCha[2] = fgkAmThick/2.;
460 sprintf(cTagV,"UK%02d",iDet+2*kNdet);
461 gMC->Gsvolu(cTagV,"BOX ",idtmed[1309-1],parCha,kNparCha);
462 // Cu layer (pad plane)
463 parCha[2] = fgkCuThick/2;
464 sprintf(cTagV,"UL%02d",iDet+2*kNdet);
465 gMC->Gsvolu(cTagV,"BOX ",idtmed[1305-1],parCha,kNparCha);
466 // G10 layer (support structure / honeycomb)
467 parCha[2] = fgkSuThick/2;
468 sprintf(cTagV,"UM%02d",iDet+2*kNdet);
469 gMC->Gsvolu(cTagV,"BOX ",idtmed[1313-1],parCha,kNparCha);
473 // Position the layers in the chambers
477 // Rohacell layer (radiator)
479 sprintf(cTagV,"UH%02d",iDet);
480 sprintf(cTagM,"UC%02d",iDet);
481 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
482 // Mylar layer (entrance window + HV cathode)
484 sprintf(cTagV,"UI%02d",iDet);
485 sprintf(cTagM,"UC%02d",iDet);
486 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
487 // Xe/Isobutane layer (drift volume)
489 sprintf(cTagV,"UJ%02d",iDet);
490 sprintf(cTagM,"UC%02d",iDet);
491 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
493 // Xe/Isobutane layer (amplification volume)
495 sprintf(cTagV,"UK%02d",iDet);
496 sprintf(cTagM,"UE%02d",iDet);
497 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
499 // Cu layer (pad plane)
501 sprintf(cTagV,"UL%02d",iDet);
502 sprintf(cTagM,"UG%02d",iDet);
503 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
504 // G10 layer (support structure)
506 sprintf(cTagV,"UM%02d",iDet);
507 sprintf(cTagM,"UG%02d",iDet);
508 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
510 if (fClengthPH[iplan][icham] > 0.0) {
512 // Rohacell layer (radiator)
514 sprintf(cTagV,"UH%02d",iDet+kNdet);
515 sprintf(cTagM,"UC%02d",iDet+kNdet);
516 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
517 // Mylar layer (entrance window + HV cathode)
519 sprintf(cTagV,"UI%02d",iDet+kNdet);
520 sprintf(cTagM,"UC%02d",iDet+kNdet);
521 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
522 // Xe/Isobutane layer (drift volume)
524 sprintf(cTagV,"UJ%02d",iDet+kNdet);
525 sprintf(cTagM,"UC%02d",iDet+kNdet);
526 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
528 // Xe/Isobutane layer (amplification volume)
530 sprintf(cTagV,"UK%02d",iDet+kNdet);
531 sprintf(cTagM,"UE%02d",iDet+kNdet);
532 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
534 // Cu layer (pad plane)
536 sprintf(cTagV,"UL%02d",iDet+kNdet);
537 sprintf(cTagM,"UG%02d",iDet+kNdet);
538 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
539 // G10 layer (support structure)
541 sprintf(cTagV,"UM%02d",iDet+kNdet);
542 sprintf(cTagM,"UG%02d",iDet+kNdet);
543 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
547 if (fClengthRH[iplan][icham] > 0.0) {
549 // Rohacell layer (radiator)
551 sprintf(cTagV,"UH%02d",iDet+2*kNdet);
552 sprintf(cTagM,"UC%02d",iDet+2*kNdet);
553 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
554 // Mylar layer (entrance window + HV cathode)
556 sprintf(cTagV,"UI%02d",iDet+2*kNdet);
557 sprintf(cTagM,"UC%02d",iDet+2*kNdet);
558 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
559 // Xe/Isobutane layer (drift volume)
561 sprintf(cTagV,"UJ%02d",iDet+2*kNdet);
562 sprintf(cTagM,"UC%02d",iDet+2*kNdet);
563 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
565 // Xe/Isobutane layer (amplification volume)
567 sprintf(cTagV,"UK%02d",iDet+2*kNdet);
568 sprintf(cTagM,"UE%02d",iDet+2*kNdet);
569 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
571 // Cu layer (pad plane)
573 sprintf(cTagV,"UL%02d",iDet+2*kNdet);
574 sprintf(cTagM,"UG%02d",iDet+2*kNdet);
575 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
576 // G10 layer (support structure)
578 sprintf(cTagV,"UM%02d",iDet+2*kNdet);
579 sprintf(cTagM,"UG%02d",iDet+2*kNdet);
580 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
584 // Position the inner volumes of the chambers in the frames
588 // The inside of the lower G10 frame
589 sprintf(cTagV,"UC%02d",iDet);
590 sprintf(cTagM,"UB%02d",iDet);
591 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
592 // The lower G10 frame inside the aluminum frame
593 sprintf(cTagV,"UB%02d",iDet);
594 sprintf(cTagM,"UA%02d",iDet);
595 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
596 // The inside of the upper G10 frame
597 sprintf(cTagV,"UE%02d",iDet);
598 sprintf(cTagM,"UD%02d",iDet);
599 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
600 // The inside of the upper aluminum frame
601 sprintf(cTagV,"UG%02d",iDet);
602 sprintf(cTagM,"UF%02d",iDet);
603 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
605 if (fClengthPH[iplan][icham] > 0.0) {
606 // The inside of the lower G10 frame
607 sprintf(cTagV,"UC%02d",iDet+kNdet);
608 sprintf(cTagM,"UB%02d",iDet+kNdet);
609 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
610 // The lower G10 frame inside the aluminum frame
611 sprintf(cTagV,"UB%02d",iDet+kNdet);
612 sprintf(cTagM,"UA%02d",iDet+kNdet);
613 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
614 // The inside of the upper G10 frame
615 sprintf(cTagV,"UE%02d",iDet+kNdet);
616 sprintf(cTagM,"UD%02d",iDet+kNdet);
617 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
618 // The inside of the upper aluminum frame
619 sprintf(cTagV,"UG%02d",iDet+kNdet);
620 sprintf(cTagM,"UF%02d",iDet+kNdet);
621 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
625 if (fClengthRH[iplan][icham] > 0.0) {
626 // The inside of the lower G10 frame
627 sprintf(cTagV,"UC%02d",iDet+2*kNdet);
628 sprintf(cTagM,"UB%02d",iDet+2*kNdet);
629 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
630 // The lower G10 frame inside the aluminum frame
631 sprintf(cTagV,"UB%02d",iDet+2*kNdet);
632 sprintf(cTagM,"UA%02d",iDet+2*kNdet);
633 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
634 // The inside of the upper G10 frame
635 sprintf(cTagV,"UE%02d",iDet+2*kNdet);
636 sprintf(cTagM,"UD%02d",iDet+2*kNdet);
637 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
638 // The inside of the upper aluminum frame
639 sprintf(cTagV,"UG%02d",iDet+2*kNdet);
640 sprintf(cTagM,"UF%02d",iDet+2*kNdet);
641 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
645 // Position the frames of the chambers in the TRD mother volume
647 ypos = - fClength[iplan][0] - fClength[iplan][1] - fClength[iplan][2]/2.;
648 for (Int_t ic = 0; ic < icham; ic++) {
649 ypos += fClength[iplan][ic];
651 ypos += fClength[iplan][icham]/2.;
652 zpos = fgkCraH/2. + fgkCdrH/2. - fgkSheight/2. + iplan * (fgkCH + fgkVspace);
653 // The lower aluminum frame, radiator + drift region
654 sprintf(cTagV,"UA%02d",iDet);
655 gMC->Gspos(cTagV,1,"UTI1",xpos,ypos,zpos,0,"ONLY");
656 // The upper G10 frame, amplification region
657 sprintf(cTagV,"UD%02d",iDet);
658 zpos += fgkCamH/2. + fgkCraH/2. + fgkCdrH/2.;
659 gMC->Gspos(cTagV,1,"UTI1",xpos,ypos,zpos,0,"ONLY");
660 // The upper aluminum frame
661 sprintf(cTagV,"UF%02d",iDet);
662 zpos += fgkCroH/2. + fgkCamH/2.;
663 gMC->Gspos(cTagV,1,"UTI1",xpos,ypos,zpos,0,"ONLY");
665 if (fClengthPH[iplan][icham] > 0.0) {
667 ypos = - fClength[iplan][0] - fClength[iplan][1] - fClength[iplan][2]/2.;
668 for (Int_t ic = 0; ic < icham; ic++) {
669 ypos += fClength[iplan][ic];
672 ypos += fClength[iplan][icham];
673 ypos -= fClengthPH[iplan][icham]/2.;
676 ypos += fClengthPH[iplan][icham]/2.;
678 zpos = fgkCraH/2. + fgkCdrH/2. - fgkSheight/2. + iplan * (fgkCH + fgkVspace);
679 // The lower aluminum frame, radiator + drift region
680 sprintf(cTagV,"UA%02d",iDet+kNdet);
681 gMC->Gspos(cTagV,1,"UTI2",xpos,ypos,zpos,0,"ONLY");
682 // The upper G10 frame, amplification region
683 sprintf(cTagV,"UD%02d",iDet+kNdet);
684 zpos += fgkCamH/2. + fgkCraH/2. + fgkCdrH/2.;
685 gMC->Gspos(cTagV,1,"UTI2",xpos,ypos,zpos,0,"ONLY");
686 // The upper aluminum frame
687 sprintf(cTagV,"UF%02d",iDet+kNdet);
688 zpos += fgkCroH/2. + fgkCamH/2.;
689 gMC->Gspos(cTagV,1,"UTI2",xpos,ypos,zpos,0,"ONLY");
693 if (fClengthRH[iplan][icham] > 0.0) {
695 ypos = - fClength[iplan][0] - fClength[iplan][1] - fClength[iplan][2]/2.;
696 for (Int_t ic = 0; ic < icham; ic++) {
697 ypos += fClength[iplan][ic];
700 ypos += fClength[iplan][icham];
701 ypos -= fClengthRH[iplan][icham]/2.;
704 ypos += fClengthRH[iplan][icham]/2.;
706 zpos = fgkCraH/2. + fgkCdrH/2. - fgkSheight/2. + iplan * (fgkCH + fgkVspace);
707 // The lower aluminum frame, radiator + drift region
708 sprintf(cTagV,"UA%02d",iDet+2*kNdet);
709 gMC->Gspos(cTagV,1,"UTI3",xpos,ypos,zpos,0,"ONLY");
710 // The upper G10 frame, amplification region
711 sprintf(cTagV,"UD%02d",iDet+2*kNdet);
712 zpos += fgkCamH/2. + fgkCraH/2. + fgkCdrH/2.;
713 gMC->Gspos(cTagV,1,"UTI3",xpos,ypos,zpos,0,"ONLY");
714 // The upper aluminum frame
715 sprintf(cTagV,"UF%02d",iDet+2*kNdet);
716 zpos += fgkCroH/2. + fgkCamH/2.;
717 gMC->Gspos(cTagV,1,"UTI3",xpos,ypos,zpos,0,"ONLY");
727 gMC->Gspos("UTI1",1,"UTS1",xpos,ypos,zpos,0,"ONLY");
729 gMC->Gspos("UTI2",2,"UTS2",xpos,ypos,zpos,0,"ONLY");
732 gMC->Gspos("UTI3",3,"UTS3",xpos,ypos,zpos,0,"ONLY");
738 gMC->Gspos("UTS1",1,"UTR1",xpos,ypos,zpos,0,"ONLY");
740 gMC->Gspos("UTS2",2,"UTR2",xpos,ypos,zpos,0,"ONLY");
743 gMC->Gspos("UTS3",3,"UTR3",xpos,ypos,zpos,0,"ONLY");
749 gMC->Gspos("UTR1",1,"BTR1",xpos,ypos,zpos,0,"ONLY");
751 gMC->Gspos("UTR2",2,"BTR2",xpos,ypos,zpos,0,"ONLY");
754 gMC->Gspos("UTR1",2,"BTR2",xpos,ypos,zpos,0,"ONLY");
757 gMC->Gspos("UTR3",3,"BTR3",xpos,ypos,zpos,0,"ONLY");
760 gMC->Gspos("UTR1",3,"BTR3",xpos,ypos,zpos,0,"ONLY");
763 // Create the volumes of the super module frame
766 // Create the volumes of the services
767 CreateServices(idtmed);
771 //_____________________________________________________________________________
772 void AliTRDgeometryFull::CreateFrame(Int_t *idtmed)
775 // Create the geometry of the frame of the supermodule
777 // Names of the TRD services volumina
779 // USRL Support rails for the chambers (Al)
780 // USxx Support cross bars between the chambers (Al)
792 // The chamber support rails
795 const Float_t kSRLwid = 2.0;
796 const Float_t kSRLhgt = 2.3;
797 const Float_t kSRLdst = 0.6;
798 const Int_t kNparSRL = 3;
799 Float_t parSRL[kNparSRL];
800 parSRL[0] = kSRLwid/2.;
801 parSRL[1] = fgkSlenTR1/2.;
802 parSRL[2] = kSRLhgt/2.;
803 gMC->Gsvolu("USRL","BOX ",idtmed[1301-1],parSRL,kNparSRL);
808 for (iplan = 0; iplan < kNplan; iplan++) {
810 xpos = fCwidth[iplan]/2. + kSRLwid/2. + kSRLdst;
812 zpos = fgkCraH + fgkCdrH - fgkSheight/2. - kSRLhgt/2.
813 + iplan * (fgkCH + fgkVspace);
814 gMC->Gspos("USRL",iplan+1 ,"UTI1", xpos,ypos,zpos,0,"ONLY");
815 gMC->Gspos("USRL",iplan+1+ kNplan,"UTI1",-xpos,ypos,zpos,0,"ONLY");
817 gMC->Gspos("USRL",iplan+1+2*kNplan,"UTI2", xpos,ypos,zpos,0,"ONLY");
818 gMC->Gspos("USRL",iplan+1+3*kNplan,"UTI2",-xpos,ypos,zpos,0,"ONLY");
821 gMC->Gspos("USRL",iplan+1+4*kNplan,"UTI3", xpos,ypos,zpos,0,"ONLY");
822 gMC->Gspos("USRL",iplan+1+5*kNplan,"UTI3",-xpos,ypos,zpos,0,"ONLY");
828 // The cross bars between the chambers
831 const Float_t kSCBwid = 1.0;
832 const Int_t kNparSCB = 3;
833 Float_t parSCB[kNparSCB];
834 parSCB[1] = kSCBwid/2.;
835 parSCB[2] = fgkCH/2.;
840 for (iplan = 0; iplan < kNplan; iplan++) {
842 parSCB[0] = fCwidth[iplan]/2. + kSRLdst/2.;
844 sprintf(cTagV,"US0%01d",iplan);
845 gMC->Gsvolu(cTagV,"BOX ",idtmed[1301-1],parSCB,kNparSCB);
847 ypos = fgkSlenTR1/2. - kSCBwid/2.;
848 zpos = fgkCH/2. - fgkSheight/2. + iplan * (fgkCH + fgkVspace);
849 gMC->Gspos(cTagV,1,"UTI1", xpos,ypos,zpos,0,"ONLY");
851 gMC->Gspos(cTagV,2,"UTI2", xpos,ypos,zpos,0,"ONLY");
854 gMC->Gspos(cTagV,3,"UTI3", xpos,ypos,zpos,0,"ONLY");
857 sprintf(cTagV,"US1%01d",iplan);
858 gMC->Gsvolu(cTagV,"BOX ",idtmed[1301-1],parSCB,kNparSCB);
860 ypos = fClength[iplan][2]/2. + fClength[iplan][1];
861 zpos = fgkCH/2. - fgkSheight/2. + iplan * (fgkCH + fgkVspace);
862 gMC->Gspos(cTagV,1,"UTI1", xpos,ypos,zpos,0,"ONLY");
864 gMC->Gspos(cTagV,2,"UTI2", xpos,ypos,zpos,0,"ONLY");
867 ypos += fClength[iplan][0] - fClengthRH[iplan][0];
868 gMC->Gspos(cTagV,3,"UTI3", xpos,ypos,zpos,0,"ONLY");
871 sprintf(cTagV,"US2%01d",iplan);
872 gMC->Gsvolu(cTagV,"BOX ",idtmed[1301-1],parSCB,kNparSCB);
874 ypos = fClength[iplan][2]/2.;
875 zpos = fgkCH/2. - fgkSheight/2. + iplan * (fgkCH + fgkVspace);
876 gMC->Gspos(cTagV,1,"UTI1", xpos,ypos,zpos,0,"ONLY");
878 ypos += fClength[iplan][1] - fClengthPH[iplan][1];
879 gMC->Gspos(cTagV,2,"UTI2", xpos,ypos,zpos,0,"ONLY");
882 sprintf(cTagV,"US3%01d",iplan);
883 gMC->Gsvolu(cTagV,"BOX ",idtmed[1301-1],parSCB,kNparSCB);
885 ypos = - fClength[iplan][2]/2.;
886 zpos = fgkCH/2. - fgkSheight/2. + iplan * (fgkCH + fgkVspace);
887 gMC->Gspos(cTagV,1,"UTI1", xpos,ypos,zpos,0,"ONLY");
889 ypos -= fClength[iplan][3] - fClengthPH[iplan][3];
890 gMC->Gspos(cTagV,2,"UTI2", xpos,ypos,zpos,0,"ONLY");
893 sprintf(cTagV,"US4%01d",iplan);
894 gMC->Gsvolu(cTagV,"BOX ",idtmed[1301-1],parSCB,kNparSCB);
896 ypos = - fClength[iplan][2]/2. - fClength[iplan][1];
897 zpos = fgkCH/2. - fgkSheight/2. + iplan * (fgkCH + fgkVspace);
898 gMC->Gspos(cTagV,1,"UTI1", xpos,ypos,zpos,0,"ONLY");
900 gMC->Gspos(cTagV,2,"UTI2", xpos,ypos,zpos,0,"ONLY");
903 ypos -= fClength[iplan][4] - fClengthRH[iplan][4];
904 gMC->Gspos(cTagV,3,"UTI3", xpos,ypos,zpos,0,"ONLY");
907 sprintf(cTagV,"US5%01d",iplan);
908 gMC->Gsvolu(cTagV,"BOX ",idtmed[1301-1],parSCB,kNparSCB);
910 ypos = - fgkSlenTR1/2. + kSCBwid/2.;
911 zpos = fgkCH/2. - fgkSheight/2. + iplan * (fgkCH + fgkVspace);
912 gMC->Gspos(cTagV,1,"UTI1", xpos,ypos,zpos,0,"ONLY");
914 gMC->Gspos(cTagV,2,"UTI2", xpos,ypos,zpos,0,"ONLY");
917 gMC->Gspos(cTagV,3,"UTI3", xpos,ypos,zpos,0,"ONLY");
924 //_____________________________________________________________________________
925 void AliTRDgeometryFull::CreateServices(Int_t *idtmed)
928 // Create the geometry of the services
930 // Names of the TRD services volumina
932 // UTCL Cooling arterias (Al)
933 // UTCW Cooling arterias (Water)
934 // UUxx Volumes for the services at the chambers (Air)
935 // UTPW Power bars (Cu)
936 // UTCP Cooling pipes (Al)
937 // UTCH Cooling pipes (Water)
938 // UTPL Power lines (Cu)
939 // UMCM Readout MCMs (G10/Cu/Si)
942 const Int_t kNdet = kNplan * kNcham;
953 // The rotation matrices
954 const Int_t kNmatrix = 3;
955 Int_t matrix[kNmatrix];
956 gMC->Matrix(matrix[0],100.0, 0.0, 90.0, 90.0, 10.0, 0.0);
957 gMC->Matrix(matrix[1], 80.0, 0.0, 90.0, 90.0, 10.0,180.0);
958 gMC->Matrix(matrix[2], 0.0, 0.0, 90.0, 90.0, 90.0, 0.0);
960 AliTRDparameter *parameter = new AliTRDparameter("par","TRD parameter");
963 // The cooling arterias
966 // Width of the cooling arterias
967 const Float_t kCOLwid = 0.5;
968 // Height of the cooling arterias
969 const Float_t kCOLhgt = 5.5;
970 // Positioning of the cooling
971 const Float_t kCOLposx = 1.6;
972 const Float_t kCOLposz = -0.2;
973 // Thickness of the walls of the cooling arterias
974 const Float_t kCOLthk = 0.1;
975 const Int_t kNparCOL = 3;
976 Float_t parCOL[kNparCOL];
977 parCOL[0] = kCOLwid/2.;
978 parCOL[1] = fgkSlenTR1/2.;
979 parCOL[2] = kCOLhgt/2.;
980 gMC->Gsvolu("UTCL","BOX ",idtmed[1324-1],parCOL,kNparCOL);
981 parCOL[0] -= kCOLthk;
982 parCOL[1] = fgkSlenTR1/2.;
983 parCOL[2] -= kCOLthk;
984 gMC->Gsvolu("UTCW","BOX ",idtmed[1314-1],parCOL,kNparCOL);
989 gMC->Gspos("UTCW",1,"UTCL", xpos,ypos,zpos,0,"ONLY");
991 for (iplan = 1; iplan < kNplan; iplan++) {
993 xpos = fCwidth[iplan]/2. + kCOLwid/2. + kCOLposx;
995 zpos = kCOLhgt/2. - fgkSheight/2. + kCOLposz + iplan * (fgkCH + fgkVspace);
996 gMC->Gspos("UTCL",iplan+1 ,"UTI1", xpos,ypos,zpos,matrix[0],"ONLY");
997 gMC->Gspos("UTCL",iplan+1+ kNplan,"UTI1",-xpos,ypos,zpos,matrix[1],"ONLY");
999 gMC->Gspos("UTCL",iplan+1+2*kNplan,"UTI2", xpos,ypos,zpos,matrix[0],"ONLY");
1000 gMC->Gspos("UTCL",iplan+1+3*kNplan,"UTI2",-xpos,ypos,zpos,matrix[1],"ONLY");
1003 gMC->Gspos("UTCL",iplan+1+4*kNplan,"UTI3", xpos,ypos,zpos,matrix[0],"ONLY");
1004 gMC->Gspos("UTCL",iplan+1+5*kNplan,"UTI3",-xpos,ypos,zpos,matrix[1],"ONLY");
1013 const Float_t kPWRwid = 0.6;
1014 const Float_t kPWRhgt = 4.5;
1015 const Float_t kPWRposx = 1.05;
1016 const Float_t kPWRposz = 0.9;
1017 const Int_t kNparPWR = 3;
1018 Float_t parPWR[kNparPWR];
1019 parPWR[0] = kPWRwid/2.;
1020 parPWR[1] = fgkSlenTR1/2.;
1021 parPWR[2] = kPWRhgt/2.;
1022 gMC->Gsvolu("UTPW","BOX ",idtmed[1325-1],parPWR,kNparPWR);
1024 for (iplan = 1; iplan < kNplan; iplan++) {
1026 xpos = fCwidth[iplan]/2. + kPWRwid/2. + kPWRposx;
1028 zpos = kPWRhgt/2. - fgkSheight/2. + kPWRposz + iplan * (fgkCH + fgkVspace);
1029 gMC->Gspos("UTPW",iplan+1 ,"UTI1", xpos,ypos,zpos,matrix[0],"ONLY");
1030 gMC->Gspos("UTPW",iplan+1+ kNplan,"UTI1",-xpos,ypos,zpos,matrix[1],"ONLY");
1032 gMC->Gspos("UTPW",iplan+1+2*kNplan,"UTI2", xpos,ypos,zpos,matrix[0],"ONLY");
1033 gMC->Gspos("UTPW",iplan+1+3*kNplan,"UTI2",-xpos,ypos,zpos,matrix[1],"ONLY");
1036 gMC->Gspos("UTPW",iplan+1+4*kNplan,"UTI3", xpos,ypos,zpos,matrix[0],"ONLY");
1037 gMC->Gspos("UTPW",iplan+1+5*kNplan,"UTI3",-xpos,ypos,zpos,matrix[1],"ONLY");
1043 // The volumes for the services at the chambers
1046 const Int_t kNparServ = 3;
1047 Float_t parServ[kNparServ];
1049 for (icham = 0; icham < kNcham; icham++) {
1050 //for (iplan = 0; iplan < kNplan; iplan++) {
1051 // Take out upper plane until TRD mothervolume is adjusted
1052 for (iplan = 0; iplan < kNplan-1; iplan++) {
1054 Int_t iDet = GetDetectorSec(iplan,icham);
1056 sprintf(cTagV,"UU%02d",iDet);
1057 parServ[0] = fCwidth[iplan]/2.;
1058 parServ[1] = fClength[iplan][icham]/2. - fgkHspace/2.;
1059 parServ[2] = fgkVspace/2.;
1060 gMC->Gsvolu(cTagV,"BOX",idtmed[1302-1],parServ,kNparServ);
1062 ypos = - fClength[iplan][0] - fClength[iplan][1] - fClength[iplan][2]/2.;
1063 for (Int_t ic = 0; ic < icham; ic++) {
1064 ypos += fClength[iplan][ic];
1066 ypos += fClength[iplan][icham]/2.;
1067 zpos = fgkCH + fgkVspace/2. - fgkSheight/2. + iplan * (fgkCH + fgkVspace);
1068 gMC->Gspos(cTagV,1,"UTI1",xpos,ypos,zpos,0,"ONLY");
1071 if (fClengthPH[iplan][icham] > 0.0) {
1072 sprintf(cTagV,"UU%02d",iDet+kNdet);
1073 parServ[0] = fCwidth[iplan]/2.;
1074 parServ[1] = fClengthPH[iplan][icham]/2. - fgkHspace/2.;
1075 parServ[2] = fgkVspace/2.;
1076 gMC->Gsvolu(cTagV,"BOX",idtmed[1302-1],parServ,kNparServ);
1078 ypos = - fClength[iplan][0] - fClength[iplan][1] - fClength[iplan][2]/2.;
1079 for (Int_t ic = 0; ic < icham; ic++) {
1080 ypos += fClength[iplan][ic];
1083 ypos += fClength[iplan][icham];
1084 ypos -= fClengthPH[iplan][icham]/2.;
1087 ypos += fClengthPH[iplan][icham]/2.;
1089 zpos = fgkCH + fgkVspace/2. - fgkSheight/2. + iplan * (fgkCH + fgkVspace);
1090 gMC->Gspos(cTagV,1,"UTI2",xpos,ypos,zpos,0,"ONLY");
1095 if (fClengthRH[iplan][icham] > 0.0) {
1096 sprintf(cTagV,"UU%02d",iDet+2*kNdet);
1097 parServ[0] = fCwidth[iplan]/2.;
1098 parServ[1] = fClengthRH[iplan][icham]/2. - fgkHspace/2.;
1099 parServ[2] = fgkVspace/2.;
1100 gMC->Gsvolu(cTagV,"BOX",idtmed[1302-1],parServ,kNparServ);
1102 ypos = - fClength[iplan][0] - fClength[iplan][1] - fClength[iplan][2]/2.;
1103 for (Int_t ic = 0; ic < icham; ic++) {
1104 ypos += fClength[iplan][ic];
1107 ypos += fClength[iplan][icham];
1108 ypos -= fClengthRH[iplan][icham]/2.;
1111 ypos += fClengthRH[iplan][icham]/2.;
1113 zpos = fgkCH + fgkVspace/2. - fgkSheight/2. + iplan * (fgkCH + fgkVspace);
1114 gMC->Gspos(cTagV,1,"UTI3",xpos,ypos,zpos,0,"ONLY");
1122 // The cooling pipes inside the service volumes
1125 const Int_t kNparTube = 3;
1126 Float_t parTube[kNparTube];
1127 // The aluminum pipe for the cooling
1131 gMC->Gsvolu("UTCP","TUBE",idtmed[1324-1],parTube,0);
1132 // The cooling water
1134 parTube[1] = 0.2/2.;
1136 gMC->Gsvolu("UTCH","TUBE",idtmed[1314-1],parTube,kNparTube);
1137 // Water inside the cooling pipe
1141 gMC->Gspos("UTCH",1,"UTCP",xpos,ypos,zpos,0,"ONLY");
1143 // Position the cooling pipes in the mother volume
1144 const Int_t kNpar = 3;
1146 for (icham = 0; icham < kNcham; icham++) {
1147 //for (iplan = 0; iplan < kNplan; iplan++) {
1148 // Take out upper plane until TRD mothervolume is adjusted
1149 for (iplan = 0; iplan < kNplan-1; iplan++) {
1150 Int_t iDet = GetDetectorSec(iplan,icham);
1151 Int_t iCopy = GetDetector(iplan,icham,0) * 100;
1152 Int_t nMCMrow = parameter->GetRowMax(iplan,icham,0);
1153 Float_t ySize = (GetChamberLength(iplan,icham) - 2.*fgkRpadW)
1154 / ((Float_t) nMCMrow);
1155 sprintf(cTagV,"UU%02d",iDet);
1156 for (Int_t iMCMrow = 0; iMCMrow < nMCMrow; iMCMrow++) {
1158 ypos = (0.5 + iMCMrow) * ySize - 1.9
1159 - fClength[iplan][icham]/2. + fgkHspace/2.;
1162 par[1] = 0.3/2.; // Thickness of the cooling pipes
1163 par[2] = fCwidth[iplan]/2.;
1164 gMC->Gsposp("UTCP",iCopy+iMCMrow,cTagV,xpos,ypos,zpos
1165 ,matrix[2],"ONLY",par,kNpar);
1168 sprintf(cTagV,"UU%02d",iDet+kNdet);
1169 for (Int_t iMCMrow = 0; iMCMrow < nMCMrow; iMCMrow++) {
1171 ypos = (0.5 + iMCMrow) * ySize - 1.9
1172 - fClengthPH[iplan][icham]/2. + fgkHspace/2.;
1174 if (ypos < (fClengthPH[iplan][icham]/2. - fgkHspace/2.)) {
1176 par[1] = 0.3/2.; // Thickness of the cooling pipes
1177 par[2] = fCwidth[iplan]/2.;
1178 gMC->Gsposp("UTCP",iCopy+iMCMrow+nMCMrow,cTagV,xpos,ypos,zpos
1179 ,matrix[2],"ONLY",par,kNpar);
1184 sprintf(cTagV,"UU%02d",iDet+2*kNdet);
1185 for (Int_t iMCMrow = 0; iMCMrow < nMCMrow; iMCMrow++) {
1187 ypos = (0.5 + iMCMrow) * ySize - 1.9
1188 - fClengthRH[iplan][icham]/2. + fgkHspace/2.;
1190 if (ypos < (fClengthRH[iplan][icham]/2. - fgkHspace/2.)) {
1192 par[1] = 0.3/2.; // Thickness of the cooling pipes
1193 par[2] = fCwidth[iplan]/2.;
1194 gMC->Gsposp("UTCP",iCopy+iMCMrow+2*nMCMrow,cTagV,xpos,ypos,zpos
1195 ,matrix[2],"ONLY",par,kNpar);
1206 // The copper power lines
1210 gMC->Gsvolu("UTPL","TUBE",idtmed[1305-1],parTube,0);
1212 // Position the power lines in the mother volume
1213 for (icham = 0; icham < kNcham; icham++) {
1214 //for (iplan = 0; iplan < kNplan; iplan++) {
1215 // Take out upper plane until TRD mothervolume is adjusted
1216 for (iplan = 0; iplan < kNplan-1; iplan++) {
1217 Int_t iDet = GetDetectorSec(iplan,icham);
1218 Int_t iCopy = GetDetector(iplan,icham,0) * 100;
1219 Int_t nMCMrow = parameter->GetRowMax(iplan,icham,0);
1220 Float_t ySize = (GetChamberLength(iplan,icham) - 2.*fgkRpadW)
1221 / ((Float_t) nMCMrow);
1222 sprintf(cTagV,"UU%02d",iDet);
1223 for (Int_t iMCMrow = 0; iMCMrow < nMCMrow; iMCMrow++) {
1225 ypos = (0.5 + iMCMrow) * ySize - 1.0
1226 - fClength[iplan][icham]/2. + fgkHspace/2.;
1229 par[1] = 0.2/2.; // Thickness of the power lines
1230 par[2] = fCwidth[iplan]/2.;
1231 gMC->Gsposp("UTPL",iCopy+iMCMrow,cTagV,xpos,ypos,zpos
1232 ,matrix[2],"ONLY",par,kNpar);
1235 sprintf(cTagV,"UU%02d",iDet+kNdet);
1236 for (Int_t iMCMrow = 0; iMCMrow < nMCMrow; iMCMrow++) {
1238 ypos = (0.5 + iMCMrow) * ySize - 1.0
1239 - fClengthPH[iplan][icham]/2. + fgkHspace/2.;
1241 if (ypos < (fClengthPH[iplan][icham]/2. - fgkHspace/2.)) {
1243 par[1] = 0.2/2.; // Thickness of the power lines
1244 par[2] = fCwidth[iplan]/2.;
1245 gMC->Gsposp("UTPL",iCopy+iMCMrow+nMCMrow,cTagV,xpos,ypos,zpos
1246 ,matrix[2],"ONLY",par,kNpar);
1251 sprintf(cTagV,"UU%02d",iDet+2*kNdet);
1252 for (Int_t iMCMrow = 0; iMCMrow < nMCMrow; iMCMrow++) {
1254 ypos = (0.5 + iMCMrow) * ySize - 1.0
1255 - fClengthRH[iplan][icham]/2. + fgkHspace/2.;
1257 if (ypos < (fClengthRH[iplan][icham]/2. - fgkHspace/2.)) {
1259 par[1] = 0.2/2.; // Thickness of the power lines
1260 par[2] = fCwidth[iplan]/2.;
1261 gMC->Gsposp("UTPL",iCopy+iMCMrow+2*nMCMrow,cTagV,xpos,ypos,zpos
1262 ,matrix[2],"ONLY",par,kNpar);
1273 // The mother volume for the MCMs (air)
1274 const Int_t kNparMCM = 3;
1275 Float_t parMCM[kNparMCM];
1278 parMCM[2] = 0.14/2.;
1279 gMC->Gsvolu("UMCM","BOX",idtmed[1302-1],parMCM,kNparMCM);
1281 // The MCM carrier G10 layer
1285 gMC->Gsvolu("UMC1","BOX",idtmed[1319-1],parMCM,kNparMCM);
1286 // The MCM carrier Cu layer
1289 parMCM[2] = 0.0162/2.;
1290 gMC->Gsvolu("UMC2","BOX",idtmed[1318-1],parMCM,kNparMCM);
1291 // The silicon of the chips
1294 parMCM[2] = 0.003/2.;
1295 gMC->Gsvolu("UMC3","BOX",idtmed[1320-1],parMCM,kNparMCM);
1297 // Put the MCM material inside the MCM mother volume
1300 zpos = -0.07 + 0.1/2.;
1301 gMC->Gspos("UMC1",1,"UMCM",xpos,ypos,zpos,0,"ONLY");
1302 zpos += 0.1/2. + 0.0162/2.;
1303 gMC->Gspos("UMC2",1,"UMCM",xpos,ypos,zpos,0,"ONLY");
1304 zpos += 0.00162/2 + 0.003/2.;
1305 gMC->Gspos("UMC3",1,"UMCM",xpos,ypos,zpos,0,"ONLY");
1307 // Position the MCMs in the mother volume
1308 for (icham = 0; icham < kNcham; icham++) {
1309 //for (iplan = 0; iplan < kNplan; iplan++) {
1310 // Take out upper plane until TRD mothervolume is adjusted
1311 for (iplan = 0; iplan < kNplan-1; iplan++) {
1312 Int_t iDet = GetDetectorSec(iplan,icham);
1313 Int_t iCopy = GetDetector(iplan,icham,0) * 1000;
1314 Int_t nMCMrow = parameter->GetRowMax(iplan,icham,0);
1315 Float_t ySize = (GetChamberLength(iplan,icham) - 2.*fgkRpadW)
1316 / ((Float_t) nMCMrow);
1318 Float_t xSize = (GetChamberWidth(iplan) - 2.* fgkCpadW)
1319 / ((Float_t) nMCMcol);
1320 sprintf(cTagV,"UU%02d",iDet);
1321 for (Int_t iMCMrow = 0; iMCMrow < nMCMrow; iMCMrow++) {
1322 for (Int_t iMCMcol = 0; iMCMcol < nMCMcol; iMCMcol++) {
1323 xpos = (0.5 + iMCMcol) * xSize + 1.0
1324 - fCwidth[iplan]/2.;
1325 ypos = (0.5 + iMCMrow) * ySize + 1.0
1326 - fClength[iplan][icham]/2. + fgkHspace/2.;
1329 par[1] = 0.2/2.; // Thickness of the power lines
1330 par[2] = fCwidth[iplan]/2.;
1331 gMC->Gspos("UMCM",iCopy+iMCMrow*10+iMCMcol,cTagV
1332 ,xpos,ypos,zpos,0,"ONLY");
1336 sprintf(cTagV,"UU%02d",iDet+kNdet);
1337 for (Int_t iMCMrow = 0; iMCMrow < nMCMrow; iMCMrow++) {
1338 for (Int_t iMCMcol = 0; iMCMcol < nMCMcol; iMCMcol++) {
1339 xpos = (0.5 + iMCMcol) * xSize + 1.0
1340 - fCwidth[iplan]/2.;
1341 ypos = (0.5 + iMCMrow) * ySize + 1.0
1342 - fClengthPH[iplan][icham]/2. + fgkHspace/2.;
1344 if (ypos < (fClengthPH[iplan][icham]/2. - fgkHspace/2.)) {
1346 par[1] = 0.2/2.; // Thickness of the power lines
1347 par[2] = fCwidth[iplan]/2.;
1348 gMC->Gspos("UMCM",iCopy+iMCMrow*10+iMCMcol+10*nMCMrow,cTagV
1349 ,xpos,ypos,zpos,0,"ONLY");
1355 sprintf(cTagV,"UU%02d",iDet+2*kNdet);
1356 for (Int_t iMCMrow = 0; iMCMrow < nMCMrow; iMCMrow++) {
1357 for (Int_t iMCMcol = 0; iMCMcol < nMCMcol; iMCMcol++) {
1358 xpos = (0.5 + iMCMcol) * xSize + 1.0
1359 - fCwidth[iplan]/2.;
1360 ypos = (0.5 + iMCMrow) * ySize + 1.0
1361 - fClengthRH[iplan][icham]/2. + fgkHspace/2.;
1363 if (ypos < (fClengthRH[iplan][icham]/2. - fgkHspace/2.)) {
1365 par[1] = 0.2/2.; // Thickness of the power lines
1366 par[2] = fCwidth[iplan]/2.;
1367 gMC->Gspos("UMCM",iCopy+iMCMrow*10+iMCMcol+20*nMCMrow,cTagV
1368 ,xpos,ypos,zpos,0,"ONLY");
1381 //_____________________________________________________________________________
1382 void AliTRDgeometryFull::SetOldGeometry()
1385 // Use the old chamber lengths
1391 AliTRDgeometry::SetOldGeometry();
1393 Float_t lengthPH[kNplan][kNcham] = { { 123.5, 116.5, 0.0, 116.5, 123.5 }
1394 , { 131.0, 124.0, 0.0, 124.0, 131.0 }
1395 , { 134.5, 131.5, 0.0, 131.5, 134.5 }
1396 , { 142.0, 139.0, 0.0, 139.0, 142.0 }
1397 , { 142.0, 146.0, 0.0, 146.0, 142.0 }
1398 , { 134.5, 153.5, 0.0, 153.5, 134.5 } };
1400 Float_t lengthRH[kNplan][kNcham] = { { 86.5, 0.0, 0.0, 0.0, 86.5 }
1401 , { 101.5, 0.0, 0.0, 0.0, 101.5 }
1402 , { 112.5, 0.0, 0.0, 0.0, 112.5 }
1403 , { 127.5, 0.0, 0.0, 0.0, 127.5 }
1404 , { 134.5, 0.0, 0.0, 0.0, 134.5 }
1405 , { 134.5, 0.0, 0.0, 0.0, 134.5 } };
1407 for (icham = 0; icham < kNcham; icham++) {
1408 for (iplan = 0; iplan < kNplan; iplan++) {
1409 fClengthPH[iplan][icham] = lengthPH[iplan][icham];
1410 fClengthRH[iplan][icham] = lengthRH[iplan][icham];