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.16 2005/12/16 12:11:14 cblume
19 First implementation of calibration scheme by Jan Fiete
21 Revision 1.15 2005/04/20 13:03:36 cblume
22 Fix of geometry and pad plane parameter
24 Revision 1.14 2004/05/07 06:52:50 cblume
25 Bug fix to allow for fPHOShole and not fRICHhole
27 Revision 1.13 2004/02/27 15:40:18 cblume
28 Fix definition of rotation matrices
30 Revision 1.12 2003/09/18 09:06:07 cblume
31 Geometry update, Removal of compiler warnings
33 Revision 1.10 2002/11/21 22:38:47 alibrary
34 Removing AliMC and AliMCProcess
36 Revision 1.9 2002/10/31 17:45:35 cblume
39 Revision 1.8 2002/02/11 14:21:16 cblume
40 Update of the geometry. Get rid of MANY
42 Revision 1.7 2001/05/11 07:56:12 hristov
43 Consistent declarations needed on Alpha
45 Revision 1.6 2001/02/14 18:22:26 cblume
46 Change in the geometry of the padplane
48 Revision 1.5 2000/11/01 14:53:21 cblume
49 Merge with TRD-develop
51 Revision 1.1.4.6 2000/10/15 23:40:01 cblume
54 Revision 1.1.4.5 2000/10/06 16:49:46 cblume
57 Revision 1.1.4.4 2000/10/04 16:34:58 cblume
58 Replace include files by forward declarations
60 Revision 1.1.4.3 2000/09/22 14:43:41 cblume
61 Allow the pad/timebin-dimensions to be changed after initialization
63 Revision 1.4 2000/10/02 21:28:19 fca
64 Removal of useless dependecies via forward declarations
66 Revision 1.3 2000/06/08 18:32:58 cblume
67 Make code compliant to coding conventions
69 Revision 1.2 2000/05/08 16:17:27 cblume
72 Revision 1.1.4.2 2000/05/08 14:46:44 cblume
73 Include options SetPHOShole() and SetRICHhole()
75 Revision 1.1.4.1 2000/04/27 12:46:04 cblume
76 Corrected bug in full geometry
78 Revision 1.1 2000/02/28 19:01:15 cblume
83 ///////////////////////////////////////////////////////////////////////////////
85 // TRD geometry for the spaceframe without holes //
87 ///////////////////////////////////////////////////////////////////////////////
89 #include "TVirtualMC.h"
91 #include "AliTRDgeometryFull.h"
92 #include "AliTRDCommonParam.h"
94 ClassImp(AliTRDgeometryFull)
96 //_____________________________________________________________________________
97 AliTRDgeometryFull::AliTRDgeometryFull():AliTRDgeometry()
100 // AliTRDgeometryFull default constructor
107 //_____________________________________________________________________________
108 AliTRDgeometryFull::~AliTRDgeometryFull()
111 // AliTRDgeometryFull destructor
116 //_____________________________________________________________________________
117 void AliTRDgeometryFull::Init()
120 // Initializes the geometry parameter
129 // The outer lengths of the chambers for the sectors with holes for the PHOS
130 Float_t lengthPH[kNplan][kNcham] = { { 124.0, 117.0, 0.0, 117.0, 124.0 }
131 , { 124.0, 117.0, 0.0, 117.0, 124.0 }
132 , { 131.0, 124.0, 0.0, 124.0, 131.0 }
133 , { 138.0, 131.0, 0.0, 131.0, 138.0 }
134 , { 145.0, 138.0, 0.0, 138.0, 145.0 }
135 , { 147.0, 140.0, 0.0, 140.0, 147.0 } };
137 // , { 147.0, 140.0, 0.0, 140.0, 147.0 } };
139 // The outer lengths of the chambers for the sectors with holes for the RICH
140 Float_t lengthRH[kNplan][kNcham] = { { 87.5, 0.0, 0.0, 0.0, 87.5 }
141 , { 87.5, 0.0, 0.0, 0.0, 87.5 }
142 , { 101.5, 0.0, 0.0, 0.0, 101.5 }
143 , { 115.5, 0.0, 0.0, 0.0, 115.5 }
144 , { 129.5, 0.0, 0.0, 0.0, 129.5 }
145 , { 133.5, 0.0, 0.0, 0.0, 133.5 } };
147 // , { 133.5, 0.0, 0.0, 0.0, 133.5 } };
149 for (icham = 0; icham < kNcham; icham++) {
150 for (iplan = 0; iplan < kNplan; iplan++) {
151 fClengthPH[iplan][icham] = lengthPH[iplan][icham];
152 fClengthRH[iplan][icham] = lengthRH[iplan][icham];
158 //_____________________________________________________________________________
159 void AliTRDgeometryFull::CreateGeometry(Int_t *idtmed)
162 // Create the TRD geometry without hole
165 // Names of the TRD volumina (xx = detector number):
167 // Volume (Air) wrapping the readout chamber components
168 // UTxx includes: UAxx, UDxx, UFxx, UUxx
170 // UUxx the services volume has been reduced by 7.42 mm
171 // in order to allow shifts in radial direction
173 // Lower part of the readout chambers (gas volume + radiator)
175 // UAxx Aluminum frames (Al)
176 // UBxx G10 frames (C)
177 // UCxx Inner volumes (Air)
179 // Upper part of the readout chambers (readout plane + fee)
181 // UDxx G10 frames (C)
182 // UExx Inner volumes of the G10 (Air)
183 // UFxx Aluminum frames (Al)
184 // UGxx Inner volumes of the Al (Air)
186 // Inner material layers
188 // UHxx Radiator (Rohacell)
189 // UIxx Entrance window (Mylar)
190 // UJxx Drift volume (Xe/CO2)
191 // UKxx Amplification volume (Xe/CO2)
192 // ULxx Pad plane (Cu)
193 // UMxx Support structure (Rohacell)
196 //const Int_t kNdet = kNplan * kNcham; ... replaced by kNdets = 30
198 const Int_t kNparTrd = 4;
199 const Int_t kNparCha = 3;
201 Float_t xpos, ypos, zpos;
203 Float_t parTrd[kNparTrd];
204 Float_t parCha[kNparCha];
209 AliTRDgeometry::CreateGeometry(idtmed);
211 // The TRD mother volume for one sector (Air), full length in z-direction
212 // Provides material for side plates of super module
213 parTrd[0] = fgkSwidth1/2.;
214 parTrd[1] = fgkSwidth2/2.;
215 parTrd[2] = fgkSlenTR1/2.;
216 parTrd[3] = fgkSheight/2.;
217 gMC->Gsvolu("UTR1","TRD1",idtmed[1302-1],parTrd,kNparTrd);
218 // The TRD mother volume for one sector (Al), leaving hole for PHOS
220 gMC->Gsvolu("UTR2","TRD1",idtmed[1302-1],parTrd,kNparTrd);
222 // The TRD mother volume for one sector (Al), leaving hole for RICH
224 gMC->Gsvolu("UTR3","TRD1",idtmed[1302-1],parTrd,kNparTrd);
228 // The side plates of the super module (Al)
229 parTrd[0] = fgkSwidth1/2. - fgkSMgapT;
230 parTrd[1] = fgkSwidth2/2. - fgkSMgapT;
231 parTrd[2] = fgkSlenTR1/2.;
232 parTrd[3] = fgkSheight/2.;
233 gMC->Gsvolu("UTS1","TRD1",idtmed[1301-1],parTrd,kNparTrd);
234 // The TRD mother volume for one sector (Al), leaving hole for PHOS
236 gMC->Gsvolu("UTS2","TRD1",idtmed[1301-1],parTrd,kNparTrd);
238 // The TRD mother volume for one sector (Al), leaving hole for RICH
240 gMC->Gsvolu("UTS3","TRD1",idtmed[1301-1],parTrd,kNparTrd);
243 // The inner part of the TRD mother volume for one sector (Air),
244 // full length in z-direction
245 parTrd[0] = fgkSwidth1/2. - fgkSMgapT - fgkSMpltT;
246 parTrd[1] = fgkSwidth2/2. - fgkSMgapT - fgkSMpltT;
247 parTrd[2] = fgkSlenTR1/2.;
248 parTrd[3] = fgkSheight/2.;
249 gMC->Gsvolu("UTI1","TRD1",idtmed[1302-1],parTrd,kNparTrd);
250 // The TRD mother volume for one sector (Air), leaving hole for PHOS
252 gMC->Gsvolu("UTI2","TRD1",idtmed[1302-1],parTrd,kNparTrd);
254 // The TRD mother volume for one sector (Air), leaving hole for RICH
256 gMC->Gsvolu("UTI3","TRD1",idtmed[1302-1],parTrd,kNparTrd);
259 for (Int_t icham = 0; icham < kNcham; icham++) {
260 for (Int_t iplan = 0; iplan < kNplan; iplan++) {
262 Int_t iDet = GetDetectorSec(iplan,icham);
264 // The lower part of the readout chambers (gas volume + radiator)
265 // The aluminum frames
266 sprintf(cTagV,"UA%02d",iDet);
267 parCha[0] = fCwidth[iplan]/2.;
268 parCha[1] = fClength[iplan][icham]/2. - fgkHspace/2.;
269 parCha[2] = fgkCraH/2. + fgkCdrH/2.;
271 fChamberUAboxd[iDet][0] = parCha[0];
272 fChamberUAboxd[iDet][1] = parCha[1];
273 fChamberUAboxd[iDet][2] = parCha[2];
275 gMC->Gsvolu(cTagV,"BOX ",idtmed[1301-1],parCha,kNparCha);
277 sprintf(cTagV,"UB%02d",iDet);
278 parCha[0] = fCwidth[iplan]/2. - fgkCalT;
281 gMC->Gsvolu(cTagV,"BOX ",idtmed[1307-1],parCha,kNparCha);
282 // The inner part (air)
283 sprintf(cTagV,"UC%02d",iDet);
284 parCha[0] = fCwidth[iplan]/2. - fgkCalT - fgkCclsT;
285 parCha[1] = fClength[iplan][icham]/2. - fgkHspace/2.- fgkCclfT;
287 gMC->Gsvolu(cTagV,"BOX ",idtmed[1302-1],parCha,kNparCha);
289 if (fClengthPH[iplan][icham] > 0.0) {
290 // The aluminum frames
291 sprintf(cTagV,"UA%02d",iDet+kNdets);
292 parCha[0] = fCwidth[iplan]/2.;
293 parCha[1] = fClengthPH[iplan][icham]/2. - fgkHspace/2.;
294 parCha[2] = fgkCraH/2. + fgkCdrH/2.;
296 fChamberUAboxd[iDet+kNdets][0] = parCha[0];
297 fChamberUAboxd[iDet+kNdets][1] = parCha[1];
298 fChamberUAboxd[iDet+kNdets][2] = parCha[2];
300 gMC->Gsvolu(cTagV,"BOX ",idtmed[1301-1],parCha,kNparCha);
302 sprintf(cTagV,"UB%02d",iDet+kNdets);
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+kNdets);
309 parCha[0] = fCwidth[iplan]/2. - fgkCalT - fgkCclsT;
310 parCha[1] = fClengthPH[iplan][icham]/2. - fgkHspace/2.- fgkCclfT;
312 gMC->Gsvolu(cTagV,"BOX ",idtmed[1302-1],parCha,kNparCha);
316 if (fClengthRH[iplan][icham] > 0.0) {
317 // The aluminum frames
318 sprintf(cTagV,"UA%02d",iDet+2*kNdets);
319 parCha[0] = fCwidth[iplan]/2.;
320 parCha[1] = fClengthRH[iplan][icham]/2. - fgkHspace/2.;
321 parCha[2] = fgkCraH/2. + fgkCdrH/2.;
323 fChamberUAboxd[iDet+2*kNdets][0] = parCha[0];
324 fChamberUAboxd[iDet+2*kNdets][1] = parCha[1];
325 fChamberUAboxd[iDet+2*kNdets][2] = parCha[2];
327 gMC->Gsvolu(cTagV,"BOX ",idtmed[1301-1],parCha,kNparCha);
329 sprintf(cTagV,"UB%02d",iDet+2*kNdets);
330 parCha[0] = fCwidth[iplan]/2. - fgkCalT;
333 gMC->Gsvolu(cTagV,"BOX ",idtmed[1307-1],parCha,kNparCha);
334 // The inner part (air)
335 sprintf(cTagV,"UC%02d",iDet+2*kNdets);
336 parCha[0] = fCwidth[iplan]/2. - fgkCalT - fgkCclsT;
337 parCha[1] = fClengthRH[iplan][icham]/2. - fgkHspace/2.- fgkCclfT;
339 gMC->Gsvolu(cTagV,"BOX ",idtmed[1302-1],parCha,kNparCha);
343 // The upper part of the readout chambers (readout plane)
345 sprintf(cTagV,"UD%02d",iDet);
346 parCha[0] = fCwidth[iplan]/2. + fgkCroW;
347 parCha[1] = fClength[iplan][icham]/2. - fgkHspace/2.;
348 parCha[2] = fgkCamH/2.;
350 fChamberUDboxd[iDet][0] = parCha[0];
351 fChamberUDboxd[iDet][1] = parCha[1];
352 fChamberUDboxd[iDet][2] = parCha[2];
354 gMC->Gsvolu(cTagV,"BOX ",idtmed[1307-1],parCha,kNparCha);
355 // The inner part of the G10 frame (air)
356 sprintf(cTagV,"UE%02d",iDet);
357 parCha[0] = fCwidth[iplan]/2. + fgkCroW - fgkCcuT;
358 parCha[1] = fClength[iplan][icham]/2. - fgkHspace/2.- fgkCcuT;
360 gMC->Gsvolu(cTagV,"BOX ",idtmed[1302-1],parCha,kNparCha);
361 // The aluminum frames
362 sprintf(cTagV,"UF%02d",iDet);
363 parCha[0] = fCwidth[iplan]/2. + fgkCroW;
364 parCha[1] = fClength[iplan][icham]/2. - fgkHspace/2.;
365 parCha[2] = fgkCroH/2.;
367 fChamberUFboxd[iDet][0] = parCha[0];
368 fChamberUFboxd[iDet][1] = parCha[1];
369 fChamberUFboxd[iDet][2] = parCha[2];
371 gMC->Gsvolu(cTagV,"BOX ",idtmed[1301-1],parCha,kNparCha);
372 // The inner part of the aluminum frames
373 sprintf(cTagV,"UG%02d",iDet);
374 parCha[0] = fCwidth[iplan]/2. + fgkCroW - fgkCauT;
375 parCha[1] = fClength[iplan][icham]/2. - fgkHspace/2.- fgkCauT;
377 gMC->Gsvolu(cTagV,"BOX ",idtmed[1302-1],parCha,kNparCha);
379 if (fClengthPH[iplan][icham] > 0.0) {
380 sprintf(cTagV,"UD%02d",iDet+kNdets);
381 parCha[0] = fCwidth[iplan]/2. + fgkCroW;
382 parCha[1] = fClengthPH[iplan][icham]/2. - fgkHspace/2.;
383 parCha[2] = fgkCamH/2.;
385 fChamberUDboxd[iDet+kNdets][0] = parCha[0];
386 fChamberUDboxd[iDet+kNdets][1] = parCha[1];
387 fChamberUDboxd[iDet+kNdets][2] = parCha[2];
389 gMC->Gsvolu(cTagV,"BOX ",idtmed[1307-1],parCha,kNparCha);
390 // The inner part of the G10 frame (air)
391 sprintf(cTagV,"UE%02d",iDet+kNdets);
392 parCha[0] = fCwidth[iplan]/2. + fgkCroW - fgkCcuT;
393 parCha[1] = fClengthPH[iplan][icham]/2. - fgkHspace/2.- fgkCcuT;
395 gMC->Gsvolu(cTagV,"BOX ",idtmed[1302-1],parCha,kNparCha);
396 // The aluminum frames
397 sprintf(cTagV,"UF%02d",iDet+kNdets);
398 parCha[0] = fCwidth[iplan]/2. + fgkCroW;
399 parCha[1] = fClengthPH[iplan][icham]/2. - fgkHspace/2.;
400 parCha[2] = fgkCroH/2.;
402 fChamberUFboxd[iDet+kNdets][0] = parCha[0];
403 fChamberUFboxd[iDet+kNdets][1] = parCha[1];
404 fChamberUFboxd[iDet+kNdets][2] = parCha[2];
406 gMC->Gsvolu(cTagV,"BOX ",idtmed[1301-1],parCha,kNparCha);
407 // The inner part of the aluminum frames
408 sprintf(cTagV,"UG%02d",iDet+kNdets);
409 parCha[0] = fCwidth[iplan]/2. + fgkCroW - fgkCauT;
410 parCha[1] = fClengthPH[iplan][icham]/2. - fgkHspace/2.- fgkCauT;
412 gMC->Gsvolu(cTagV,"BOX ",idtmed[1302-1],parCha,kNparCha);
416 if (fClengthRH[iplan][icham] > 0.0) {
417 sprintf(cTagV,"UD%02d",iDet+2*kNdets);
418 parCha[0] = fCwidth[iplan]/2. + fgkCroW;
419 parCha[1] = fClengthRH[iplan][icham]/2. - fgkHspace/2.;
420 parCha[2] = fgkCamH/2.;
422 fChamberUDboxd[iDet+2*kNdets][0] = parCha[0];
423 fChamberUDboxd[iDet+2*kNdets][1] = parCha[1];
424 fChamberUDboxd[iDet+2*kNdets][2] = parCha[2];
426 gMC->Gsvolu(cTagV,"BOX ",idtmed[1307-1],parCha,kNparCha);
427 // The inner part of the G10 frame (air)
428 sprintf(cTagV,"UE%02d",iDet+2*kNdets);
429 parCha[0] = fCwidth[iplan]/2. + fgkCroW - fgkCcuT;
430 parCha[1] = fClengthRH[iplan][icham]/2. - fgkHspace/2.- fgkCcuT;
432 gMC->Gsvolu(cTagV,"BOX ",idtmed[1302-1],parCha,kNparCha);
433 // The aluminum frames
434 sprintf(cTagV,"UF%02d",iDet+2*kNdets);
435 parCha[0] = fCwidth[iplan]/2. + fgkCroW;
436 parCha[1] = fClengthRH[iplan][icham]/2. - fgkHspace/2.;
437 parCha[2] = fgkCroH/2.;
439 fChamberUFboxd[iDet+2*kNdets][0] = parCha[0];
440 fChamberUFboxd[iDet+2*kNdets][1] = parCha[1];
441 fChamberUFboxd[iDet+2*kNdets][2] = parCha[2];
443 gMC->Gsvolu(cTagV,"BOX ",idtmed[1301-1],parCha,kNparCha);
444 // The inner part of the aluminum frames
445 sprintf(cTagV,"UG%02d",iDet+2*kNdets);
446 parCha[0] = fCwidth[iplan]/2. + fgkCroW - fgkCauT;
447 parCha[1] = fClengthRH[iplan][icham]/2. - fgkHspace/2.- fgkCauT;
449 gMC->Gsvolu(cTagV,"BOX ",idtmed[1302-1],parCha,kNparCha);
453 // The material layers inside the chambers
456 // Rohacell layer (radiator)
457 parCha[2] = fgkRaThick/2;
458 sprintf(cTagV,"UH%02d",iDet);
459 gMC->Gsvolu(cTagV,"BOX ",idtmed[1315-1],parCha,kNparCha);
460 // Mylar layer (entrance window + HV cathode)
461 parCha[2] = fgkMyThick/2;
462 sprintf(cTagV,"UI%02d",iDet);
463 gMC->Gsvolu(cTagV,"BOX ",idtmed[1308-1],parCha,kNparCha);
464 // Xe/Isobutane layer (drift volume)
465 parCha[2] = fgkDrThick/2.;
466 sprintf(cTagV,"UJ%02d",iDet);
467 gMC->Gsvolu(cTagV,"BOX ",idtmed[1309-1],parCha,kNparCha);
468 // Xe/Isobutane layer (amplification volume)
469 parCha[2] = fgkAmThick/2.;
470 sprintf(cTagV,"UK%02d",iDet);
471 gMC->Gsvolu(cTagV,"BOX ",idtmed[1309-1],parCha,kNparCha);
472 // Cu layer (pad plane)
473 parCha[2] = fgkCuThick/2;
474 sprintf(cTagV,"UL%02d",iDet);
475 gMC->Gsvolu(cTagV,"BOX ",idtmed[1305-1],parCha,kNparCha);
476 // G10 layer (support structure / honeycomb)
477 parCha[2] = fgkSuThick/2;
478 sprintf(cTagV,"UM%02d",iDet);
479 gMC->Gsvolu(cTagV,"BOX ",idtmed[1313-1],parCha,kNparCha);
481 if (fClengthPH[iplan][icham] > 0.0) {
482 // Rohacell layer (radiator)
483 parCha[2] = fgkRaThick/2;
484 sprintf(cTagV,"UH%02d",iDet+kNdets);
485 gMC->Gsvolu(cTagV,"BOX ",idtmed[1315-1],parCha,kNparCha);
486 // Mylar layer (entrance window + HV cathode)
487 parCha[2] = fgkMyThick/2;
488 sprintf(cTagV,"UI%02d",iDet+kNdets);
489 gMC->Gsvolu(cTagV,"BOX ",idtmed[1308-1],parCha,kNparCha);
490 // Xe/Isobutane layer (drift volume)
491 parCha[2] = fgkDrThick/2.;
492 sprintf(cTagV,"UJ%02d",iDet+kNdets);
493 gMC->Gsvolu(cTagV,"BOX ",idtmed[1309-1],parCha,kNparCha);
494 // Xe/Isobutane layer (amplification volume)
495 parCha[2] = fgkAmThick/2.;
496 sprintf(cTagV,"UK%02d",iDet+kNdets);
497 gMC->Gsvolu(cTagV,"BOX ",idtmed[1309-1],parCha,kNparCha);
498 // Cu layer (pad plane)
499 parCha[2] = fgkCuThick/2;
500 sprintf(cTagV,"UL%02d",iDet+kNdets);
501 gMC->Gsvolu(cTagV,"BOX ",idtmed[1305-1],parCha,kNparCha);
502 // G10 layer (support structure / honeycomb)
503 parCha[2] = fgkSuThick/2;
504 sprintf(cTagV,"UM%02d",iDet+kNdets);
505 gMC->Gsvolu(cTagV,"BOX ",idtmed[1313-1],parCha,kNparCha);
509 if (fClengthRH[iplan][icham] > 0.0) {
510 // Rohacell layer (radiator)
511 parCha[2] = fgkRaThick/2;
512 sprintf(cTagV,"UH%02d",iDet+2*kNdets);
513 gMC->Gsvolu(cTagV,"BOX ",idtmed[1315-1],parCha,kNparCha);
514 // Mylar layer (entrance window + HV cathode)
515 parCha[2] = fgkMyThick/2;
516 sprintf(cTagV,"UI%02d",iDet+2*kNdets);
517 gMC->Gsvolu(cTagV,"BOX ",idtmed[1308-1],parCha,kNparCha);
518 // Xe/Isobutane layer (drift volume)
519 parCha[2] = fgkDrThick/2.;
520 sprintf(cTagV,"UJ%02d",iDet+2*kNdets);
521 gMC->Gsvolu(cTagV,"BOX ",idtmed[1309-1],parCha,kNparCha);
522 // Xe/Isobutane layer (amplification volume)
523 parCha[2] = fgkAmThick/2.;
524 sprintf(cTagV,"UK%02d",iDet+2*kNdets);
525 gMC->Gsvolu(cTagV,"BOX ",idtmed[1309-1],parCha,kNparCha);
526 // Cu layer (pad plane)
527 parCha[2] = fgkCuThick/2;
528 sprintf(cTagV,"UL%02d",iDet+2*kNdets);
529 gMC->Gsvolu(cTagV,"BOX ",idtmed[1305-1],parCha,kNparCha);
530 // G10 layer (support structure / honeycomb)
531 parCha[2] = fgkSuThick/2;
532 sprintf(cTagV,"UM%02d",iDet+2*kNdets);
533 gMC->Gsvolu(cTagV,"BOX ",idtmed[1313-1],parCha,kNparCha);
537 // Position the layers in the chambers
541 // Rohacell layer (radiator)
543 sprintf(cTagV,"UH%02d",iDet);
544 sprintf(cTagM,"UC%02d",iDet);
545 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
546 // Mylar layer (entrance window + HV cathode)
548 sprintf(cTagV,"UI%02d",iDet);
549 sprintf(cTagM,"UC%02d",iDet);
550 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
551 // Xe/Isobutane layer (drift volume)
553 sprintf(cTagV,"UJ%02d",iDet);
554 sprintf(cTagM,"UC%02d",iDet);
555 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
557 // Xe/Isobutane layer (amplification volume)
559 sprintf(cTagV,"UK%02d",iDet);
560 sprintf(cTagM,"UE%02d",iDet);
561 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
563 // Cu layer (pad plane)
565 sprintf(cTagV,"UL%02d",iDet);
566 sprintf(cTagM,"UG%02d",iDet);
567 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
568 // G10 layer (support structure)
570 sprintf(cTagV,"UM%02d",iDet);
571 sprintf(cTagM,"UG%02d",iDet);
572 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
574 if (fClengthPH[iplan][icham] > 0.0) {
576 // Rohacell layer (radiator)
578 sprintf(cTagV,"UH%02d",iDet+kNdets);
579 sprintf(cTagM,"UC%02d",iDet+kNdets);
580 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
581 // Mylar layer (entrance window + HV cathode)
583 sprintf(cTagV,"UI%02d",iDet+kNdets);
584 sprintf(cTagM,"UC%02d",iDet+kNdets);
585 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
586 // Xe/Isobutane layer (drift volume)
588 sprintf(cTagV,"UJ%02d",iDet+kNdets);
589 sprintf(cTagM,"UC%02d",iDet+kNdets);
590 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
592 // Xe/Isobutane layer (amplification volume)
594 sprintf(cTagV,"UK%02d",iDet+kNdets);
595 sprintf(cTagM,"UE%02d",iDet+kNdets);
596 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
598 // Cu layer (pad plane)
600 sprintf(cTagV,"UL%02d",iDet+kNdets);
601 sprintf(cTagM,"UG%02d",iDet+kNdets);
602 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
603 // G10 layer (support structure)
605 sprintf(cTagV,"UM%02d",iDet+kNdets);
606 sprintf(cTagM,"UG%02d",iDet+kNdets);
607 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
611 if (fClengthRH[iplan][icham] > 0.0) {
613 // Rohacell layer (radiator)
615 sprintf(cTagV,"UH%02d",iDet+2*kNdets);
616 sprintf(cTagM,"UC%02d",iDet+2*kNdets);
617 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
618 // Mylar layer (entrance window + HV cathode)
620 sprintf(cTagV,"UI%02d",iDet+2*kNdets);
621 sprintf(cTagM,"UC%02d",iDet+2*kNdets);
622 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
623 // Xe/Isobutane layer (drift volume)
625 sprintf(cTagV,"UJ%02d",iDet+2*kNdets);
626 sprintf(cTagM,"UC%02d",iDet+2*kNdets);
627 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
629 // Xe/Isobutane layer (amplification volume)
631 sprintf(cTagV,"UK%02d",iDet+2*kNdets);
632 sprintf(cTagM,"UE%02d",iDet+2*kNdets);
633 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
635 // Cu layer (pad plane)
637 sprintf(cTagV,"UL%02d",iDet+2*kNdets);
638 sprintf(cTagM,"UG%02d",iDet+2*kNdets);
639 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
640 // G10 layer (support structure)
642 sprintf(cTagV,"UM%02d",iDet+2*kNdets);
643 sprintf(cTagM,"UG%02d",iDet+2*kNdets);
644 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
648 // Position the inner volumes of the chambers in the frames
652 // The inside of the lower G10 frame
653 sprintf(cTagV,"UC%02d",iDet);
654 sprintf(cTagM,"UB%02d",iDet);
655 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
656 // The lower G10 frame inside the aluminum frame
657 sprintf(cTagV,"UB%02d",iDet);
658 sprintf(cTagM,"UA%02d",iDet);
659 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
660 // The inside of the upper G10 frame
661 sprintf(cTagV,"UE%02d",iDet);
662 sprintf(cTagM,"UD%02d",iDet);
663 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
664 // The inside of the upper aluminum frame
665 sprintf(cTagV,"UG%02d",iDet);
666 sprintf(cTagM,"UF%02d",iDet);
667 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
669 if (fClengthPH[iplan][icham] > 0.0) {
670 // The inside of the lower G10 frame
671 sprintf(cTagV,"UC%02d",iDet+kNdets);
672 sprintf(cTagM,"UB%02d",iDet+kNdets);
673 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
674 // The lower G10 frame inside the aluminum frame
675 sprintf(cTagV,"UB%02d",iDet+kNdets);
676 sprintf(cTagM,"UA%02d",iDet+kNdets);
677 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
678 // The inside of the upper G10 frame
679 sprintf(cTagV,"UE%02d",iDet+kNdets);
680 sprintf(cTagM,"UD%02d",iDet+kNdets);
681 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
682 // The inside of the upper aluminum frame
683 sprintf(cTagV,"UG%02d",iDet+kNdets);
684 sprintf(cTagM,"UF%02d",iDet+kNdets);
685 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
689 if (fClengthRH[iplan][icham] > 0.0) {
690 // The inside of the lower G10 frame
691 sprintf(cTagV,"UC%02d",iDet+2*kNdets);
692 sprintf(cTagM,"UB%02d",iDet+2*kNdets);
693 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
694 // The lower G10 frame inside the aluminum frame
695 sprintf(cTagV,"UB%02d",iDet+2*kNdets);
696 sprintf(cTagM,"UA%02d",iDet+2*kNdets);
697 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
698 // The inside of the upper G10 frame
699 sprintf(cTagV,"UE%02d",iDet+2*kNdets);
700 sprintf(cTagM,"UD%02d",iDet+2*kNdets);
701 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
702 // The inside of the upper aluminum frame
703 sprintf(cTagV,"UG%02d",iDet+2*kNdets);
704 sprintf(cTagM,"UF%02d",iDet+2*kNdets);
705 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
709 // Position the frames of the chambers in the TRD mother volume
711 ypos = - fClength[iplan][0] - fClength[iplan][1] - fClength[iplan][2]/2.;
712 for (Int_t ic = 0; ic < icham; ic++) {
713 ypos += fClength[iplan][ic];
715 ypos += fClength[iplan][icham]/2.;
716 zpos = fgkCraH/2. + fgkCdrH/2. - fgkSheight/2. + iplan * (fgkCH + fgkVspace);
717 // The lower aluminum frame, radiator + drift region
718 sprintf(cTagV,"UA%02d",iDet);
720 fChamberUAorig[iDet][0] = xpos;
721 fChamberUAorig[iDet][1] = ypos;
722 fChamberUAorig[iDet][2] = zpos;
724 //gMC->Gspos(cTagV,1,"UTI1",xposs,yposs,zposs,0,"ONLY");
726 // The upper G10 frame, amplification region
727 sprintf(cTagV,"UD%02d",iDet);
728 zpos += fgkCamH/2. + fgkCraH/2. + fgkCdrH/2.;
730 fChamberUDorig[iDet][0] = xpos;
731 fChamberUDorig[iDet][1] = ypos;
732 fChamberUDorig[iDet][2] = zpos;
734 //gMC->Gspos(cTagV,1,"UTI1",xposs,yposs,zposs,0,"ONLY");
736 // The upper aluminum frame
737 sprintf(cTagV,"UF%02d",iDet);
738 zpos += fgkCroH/2. + fgkCamH/2.;
740 fChamberUForig[iDet][0] = xpos;
741 fChamberUForig[iDet][1] = ypos;
742 fChamberUForig[iDet][2] = zpos;
744 //gMC->Gspos(cTagV,1,"UTI1",xposs,yposs,zposs,0,"ONLY");
747 if (fClengthPH[iplan][icham] > 0.0) {
749 ypos = - fClength[iplan][0] - fClength[iplan][1] - fClength[iplan][2]/2.;
750 for (Int_t ic = 0; ic < icham; ic++) {
751 ypos += fClength[iplan][ic];
754 ypos += fClength[iplan][icham];
755 ypos -= fClengthPH[iplan][icham]/2.;
758 ypos += fClengthPH[iplan][icham]/2.;
760 zpos = fgkCraH/2. + fgkCdrH/2. - fgkSheight/2. + iplan * (fgkCH + fgkVspace);
761 // The lower aluminum frame, radiator + drift region
762 sprintf(cTagV,"UA%02d",iDet+kNdets);
764 fChamberUAorig[iDet+kNdets][0] = xpos;
765 fChamberUAorig[iDet+kNdets][1] = ypos;
766 fChamberUAorig[iDet+kNdets][2] = zpos;
768 //gMC->Gspos(cTagV,1,"UTI2",xpos,ypos,zpos,0,"ONLY");
770 // The upper G10 frame, amplification region
771 sprintf(cTagV,"UD%02d",iDet+kNdets);
772 zpos += fgkCamH/2. + fgkCraH/2. + fgkCdrH/2.;
774 fChamberUDorig[iDet+kNdets][0] = xpos;
775 fChamberUDorig[iDet+kNdets][1] = ypos;
776 fChamberUDorig[iDet+kNdets][2] = zpos;
778 //gMC->Gspos(cTagV,1,"UTI2",xpos,ypos,zpos,0,"ONLY");
780 // The upper aluminum frame
781 sprintf(cTagV,"UF%02d",iDet+kNdets);
782 zpos += fgkCroH/2. + fgkCamH/2.;
784 fChamberUForig[iDet+kNdets][0] = xpos;
785 fChamberUForig[iDet+kNdets][1] = ypos;
786 fChamberUForig[iDet+kNdets][2] = zpos;
788 //gMC->Gspos(cTagV,1,"UTI2",xpos,ypos,zpos,0,"ONLY");
793 if (fClengthRH[iplan][icham] > 0.0) {
795 ypos = - fClength[iplan][0] - fClength[iplan][1] - fClength[iplan][2]/2.;
796 for (Int_t ic = 0; ic < icham; ic++) {
797 ypos += fClength[iplan][ic];
800 ypos += fClength[iplan][icham];
801 ypos -= fClengthRH[iplan][icham]/2.;
804 ypos += fClengthRH[iplan][icham]/2.;
806 zpos = fgkCraH/2. + fgkCdrH/2. - fgkSheight/2. + iplan * (fgkCH + fgkVspace);
807 // The lower aluminum frame, radiator + drift region
808 sprintf(cTagV,"UA%02d",iDet+2*kNdets);
810 fChamberUAorig[iDet+2*kNdets][0] = xpos;
811 fChamberUAorig[iDet+2*kNdets][1] = ypos;
812 fChamberUAorig[iDet+2*kNdets][2] = zpos;
814 //gMC->Gspos(cTagV,1,"UTI3",xpos,ypos,zpos,0,"ONLY");
816 // The upper G10 frame, amplification region
817 sprintf(cTagV,"UD%02d",iDet+2*kNdets);
818 zpos += fgkCamH/2. + fgkCraH/2. + fgkCdrH/2.;
820 fChamberUDorig[iDet+2*kNdets][0] = xpos;
821 fChamberUDorig[iDet+2*kNdets][1] = ypos;
822 fChamberUDorig[iDet+2*kNdets][2] = zpos;
824 //gMC->Gspos(cTagV,1,"UTI3",xpos,ypos,zpos,0,"ONLY");
826 // The upper aluminum frame
827 sprintf(cTagV,"UF%02d",iDet+2*kNdets);
828 zpos += fgkCroH/2. + fgkCamH/2.;
830 fChamberUForig[iDet+2*kNdets][0] = xpos;
831 fChamberUForig[iDet+2*kNdets][1] = ypos;
832 fChamberUForig[iDet+2*kNdets][2] = zpos;
834 //gMC->Gspos(cTagV,1,"UTI3",xpos,ypos,zpos,0,"ONLY");
842 // Create the volumes of the super module frame
845 // Create the volumes of the services
846 CreateServices(idtmed);
848 for (Int_t icham = 0; icham < kNcham; icham++) {
849 for (Int_t iplan = 0; iplan < kNplan; iplan++) {
851 GroupChamber(iplan,icham,idtmed,kFALSE,kFALSE);
854 if (fClengthPH[iplan][icham] > 0.0) {
855 GroupChamber(iplan,icham,idtmed,kTRUE,kFALSE);
860 if (fClengthRH[iplan][icham] > 0.0) {
861 GroupChamber(iplan,icham,idtmed,kFALSE,kTRUE);
871 gMC->Gspos("UTI1",1,"UTS1",xpos,ypos,zpos,0,"ONLY");
873 gMC->Gspos("UTI2",2,"UTS2",xpos,ypos,zpos,0,"ONLY");
876 gMC->Gspos("UTI3",3,"UTS3",xpos,ypos,zpos,0,"ONLY");
882 gMC->Gspos("UTS1",1,"UTR1",xpos,ypos,zpos,0,"ONLY");
884 gMC->Gspos("UTS2",2,"UTR2",xpos,ypos,zpos,0,"ONLY");
887 gMC->Gspos("UTS3",3,"UTR3",xpos,ypos,zpos,0,"ONLY");
893 gMC->Gspos("UTR1",1,"BTR1",xpos,ypos,zpos,0,"ONLY");
895 gMC->Gspos("UTR2",2,"BTR2",xpos,ypos,zpos,0,"ONLY");
898 gMC->Gspos("UTR1",2,"BTR2",xpos,ypos,zpos,0,"ONLY");
901 gMC->Gspos("UTR3",3,"BTR3",xpos,ypos,zpos,0,"ONLY");
904 gMC->Gspos("UTR1",3,"BTR3",xpos,ypos,zpos,0,"ONLY");
909 //_____________________________________________________________________________
910 void AliTRDgeometryFull::CreateFrame(Int_t *idtmed)
913 // Create the geometry of the frame of the supermodule
915 // Names of the TRD services volumina
917 // USRL Support rails for the chambers (Al)
918 // USxx Support cross bars between the chambers (Al)
930 // The chamber support rails
933 const Float_t kSRLwid = 2.0;
934 const Float_t kSRLhgt = 2.3;
935 const Float_t kSRLdst = 0.6;
936 const Int_t kNparSRL = 3;
937 Float_t parSRL[kNparSRL];
938 parSRL[0] = kSRLwid/2.;
939 parSRL[1] = fgkSlenTR1/2.;
940 parSRL[2] = kSRLhgt/2.;
941 gMC->Gsvolu("USRL","BOX ",idtmed[1301-1],parSRL,kNparSRL);
946 for (iplan = 0; iplan < kNplan; iplan++) {
948 xpos = fCwidth[iplan]/2. + kSRLwid/2. + kSRLdst;
950 zpos = fgkCraH + fgkCdrH - fgkSheight/2. - kSRLhgt/2.
951 + iplan * (fgkCH + fgkVspace);
952 gMC->Gspos("USRL",iplan+1 ,"UTI1", xpos,ypos,zpos,0,"ONLY");
953 gMC->Gspos("USRL",iplan+1+ kNplan,"UTI1",-xpos,ypos,zpos,0,"ONLY");
955 gMC->Gspos("USRL",iplan+1+2*kNplan,"UTI2", xpos,ypos,zpos,0,"ONLY");
956 gMC->Gspos("USRL",iplan+1+3*kNplan,"UTI2",-xpos,ypos,zpos,0,"ONLY");
959 gMC->Gspos("USRL",iplan+1+4*kNplan,"UTI3", xpos,ypos,zpos,0,"ONLY");
960 gMC->Gspos("USRL",iplan+1+5*kNplan,"UTI3",-xpos,ypos,zpos,0,"ONLY");
966 // The cross bars between the chambers
969 const Float_t kSCBwid = 1.0;
970 const Int_t kNparSCB = 3;
971 Float_t parSCB[kNparSCB];
972 parSCB[1] = kSCBwid/2.;
973 parSCB[2] = fgkCH/2.;
978 for (iplan = 0; iplan < kNplan; iplan++) {
980 parSCB[0] = fCwidth[iplan]/2. + kSRLdst/2.;
982 sprintf(cTagV,"US0%01d",iplan);
983 gMC->Gsvolu(cTagV,"BOX ",idtmed[1301-1],parSCB,kNparSCB);
985 ypos = fgkSlenTR1/2. - kSCBwid/2.;
986 zpos = fgkCH/2. - fgkSheight/2. + iplan * (fgkCH + fgkVspace);
987 gMC->Gspos(cTagV,1,"UTI1", xpos,ypos,zpos,0,"ONLY");
989 gMC->Gspos(cTagV,2,"UTI2", xpos,ypos,zpos,0,"ONLY");
992 gMC->Gspos(cTagV,3,"UTI3", xpos,ypos,zpos,0,"ONLY");
995 sprintf(cTagV,"US1%01d",iplan);
996 gMC->Gsvolu(cTagV,"BOX ",idtmed[1301-1],parSCB,kNparSCB);
998 ypos = fClength[iplan][2]/2. + fClength[iplan][1];
999 zpos = fgkCH/2. - fgkSheight/2. + iplan * (fgkCH + fgkVspace);
1000 gMC->Gspos(cTagV,1,"UTI1", xpos,ypos,zpos,0,"ONLY");
1002 gMC->Gspos(cTagV,2,"UTI2", xpos,ypos,zpos,0,"ONLY");
1005 ypos += fClength[iplan][0] - fClengthRH[iplan][0];
1006 gMC->Gspos(cTagV,3,"UTI3", xpos,ypos,zpos,0,"ONLY");
1009 sprintf(cTagV,"US2%01d",iplan);
1010 gMC->Gsvolu(cTagV,"BOX ",idtmed[1301-1],parSCB,kNparSCB);
1012 ypos = fClength[iplan][2]/2.;
1013 zpos = fgkCH/2. - fgkSheight/2. + iplan * (fgkCH + fgkVspace);
1014 gMC->Gspos(cTagV,1,"UTI1", xpos,ypos,zpos,0,"ONLY");
1016 ypos += fClength[iplan][1] - fClengthPH[iplan][1];
1017 gMC->Gspos(cTagV,2,"UTI2", xpos,ypos,zpos,0,"ONLY");
1020 sprintf(cTagV,"US3%01d",iplan);
1021 gMC->Gsvolu(cTagV,"BOX ",idtmed[1301-1],parSCB,kNparSCB);
1023 ypos = - fClength[iplan][2]/2.;
1024 zpos = fgkCH/2. - fgkSheight/2. + iplan * (fgkCH + fgkVspace);
1025 gMC->Gspos(cTagV,1,"UTI1", xpos,ypos,zpos,0,"ONLY");
1027 ypos -= fClength[iplan][3] - fClengthPH[iplan][3];
1028 gMC->Gspos(cTagV,2,"UTI2", xpos,ypos,zpos,0,"ONLY");
1031 sprintf(cTagV,"US4%01d",iplan);
1032 gMC->Gsvolu(cTagV,"BOX ",idtmed[1301-1],parSCB,kNparSCB);
1034 ypos = - fClength[iplan][2]/2. - fClength[iplan][1];
1035 zpos = fgkCH/2. - fgkSheight/2. + iplan * (fgkCH + fgkVspace);
1036 gMC->Gspos(cTagV,1,"UTI1", xpos,ypos,zpos,0,"ONLY");
1038 gMC->Gspos(cTagV,2,"UTI2", xpos,ypos,zpos,0,"ONLY");
1041 ypos -= fClength[iplan][4] - fClengthRH[iplan][4];
1042 gMC->Gspos(cTagV,3,"UTI3", xpos,ypos,zpos,0,"ONLY");
1045 sprintf(cTagV,"US5%01d",iplan);
1046 gMC->Gsvolu(cTagV,"BOX ",idtmed[1301-1],parSCB,kNparSCB);
1048 ypos = - fgkSlenTR1/2. + kSCBwid/2.;
1049 zpos = fgkCH/2. - fgkSheight/2. + iplan * (fgkCH + fgkVspace);
1050 gMC->Gspos(cTagV,1,"UTI1", xpos,ypos,zpos,0,"ONLY");
1052 gMC->Gspos(cTagV,2,"UTI2", xpos,ypos,zpos,0,"ONLY");
1055 gMC->Gspos(cTagV,3,"UTI3", xpos,ypos,zpos,0,"ONLY");
1062 //_____________________________________________________________________________
1063 void AliTRDgeometryFull::CreateServices(Int_t *idtmed)
1066 // Create the geometry of the services
1068 // Names of the TRD services volumina
1070 // UTCL Cooling arterias (Al)
1071 // UTCW Cooling arterias (Water)
1072 // UUxx Volumes for the services at the chambers (Air)
1073 // UTPW Power bars (Cu)
1074 // UTCP Cooling pipes (Al)
1075 // UTCH Cooling pipes (Water)
1076 // UTPL Power lines (Cu)
1077 // UMCM Readout MCMs (G10/Cu/Si)
1080 //const Int_t kNdet = kNplan * kNcham; ... replaced by kNdets = 30
1091 // The rotation matrices
1092 const Int_t kNmatrix = 3;
1093 Int_t matrix[kNmatrix];
1094 gMC->Matrix(matrix[0],100.0, 0.0, 90.0, 90.0, 10.0, 0.0);
1095 gMC->Matrix(matrix[1], 80.0, 0.0, 90.0, 90.0, 10.0,180.0);
1096 gMC->Matrix(matrix[2], 0.0, 0.0, 90.0, 90.0, 90.0, 0.0);
1098 AliTRDCommonParam* commonParam = AliTRDCommonParam::Instance();
1101 printf("<AliTRDgeometryFull::CreateServices> ");
1102 printf("Could not get common params\n");
1107 // The cooling arterias
1110 // Width of the cooling arterias
1111 const Float_t kCOLwid = 0.5;
1112 // Height of the cooling arterias
1113 const Float_t kCOLhgt = 5.5;
1114 // Positioning of the cooling
1115 const Float_t kCOLposx = 1.6;
1116 const Float_t kCOLposz = -0.2;
1117 // Thickness of the walls of the cooling arterias
1118 const Float_t kCOLthk = 0.1;
1119 const Int_t kNparCOL = 3;
1120 Float_t parCOL[kNparCOL];
1121 parCOL[0] = kCOLwid/2.;
1122 parCOL[1] = fgkSlenTR1/2.;
1123 parCOL[2] = kCOLhgt/2.;
1124 gMC->Gsvolu("UTCL","BOX ",idtmed[1324-1],parCOL,kNparCOL);
1125 parCOL[0] -= kCOLthk;
1126 parCOL[1] = fgkSlenTR1/2.;
1127 parCOL[2] -= kCOLthk;
1128 gMC->Gsvolu("UTCW","BOX ",idtmed[1314-1],parCOL,kNparCOL);
1133 gMC->Gspos("UTCW",1,"UTCL", xpos,ypos,zpos,0,"ONLY");
1135 for (iplan = 1; iplan < kNplan; iplan++) {
1137 xpos = fCwidth[iplan]/2. + kCOLwid/2. + kCOLposx;
1139 zpos = kCOLhgt/2. - fgkSheight/2. + kCOLposz + iplan * (fgkCH + fgkVspace);
1140 gMC->Gspos("UTCL",iplan+1 ,"UTI1", xpos,ypos,zpos,matrix[0],"ONLY");
1141 gMC->Gspos("UTCL",iplan+1+ kNplan,"UTI1",-xpos,ypos,zpos,matrix[1],"ONLY");
1143 gMC->Gspos("UTCL",iplan+1+2*kNplan,"UTI2", xpos,ypos,zpos,matrix[0],"ONLY");
1144 gMC->Gspos("UTCL",iplan+1+3*kNplan,"UTI2",-xpos,ypos,zpos,matrix[1],"ONLY");
1147 gMC->Gspos("UTCL",iplan+1+4*kNplan,"UTI3", xpos,ypos,zpos,matrix[0],"ONLY");
1148 gMC->Gspos("UTCL",iplan+1+5*kNplan,"UTI3",-xpos,ypos,zpos,matrix[1],"ONLY");
1157 const Float_t kPWRwid = 0.6;
1158 const Float_t kPWRhgt = 4.5;
1159 const Float_t kPWRposx = 1.05;
1160 const Float_t kPWRposz = 0.9;
1161 const Int_t kNparPWR = 3;
1162 Float_t parPWR[kNparPWR];
1163 parPWR[0] = kPWRwid/2.;
1164 parPWR[1] = fgkSlenTR1/2.;
1165 parPWR[2] = kPWRhgt/2.;
1166 gMC->Gsvolu("UTPW","BOX ",idtmed[1325-1],parPWR,kNparPWR);
1168 for (iplan = 1; iplan < kNplan; iplan++) {
1170 xpos = fCwidth[iplan]/2. + kPWRwid/2. + kPWRposx;
1172 zpos = kPWRhgt/2. - fgkSheight/2. + kPWRposz + iplan * (fgkCH + fgkVspace);
1173 gMC->Gspos("UTPW",iplan+1 ,"UTI1", xpos,ypos,zpos,matrix[0],"ONLY");
1174 gMC->Gspos("UTPW",iplan+1+ kNplan,"UTI1",-xpos,ypos,zpos,matrix[1],"ONLY");
1176 gMC->Gspos("UTPW",iplan+1+2*kNplan,"UTI2", xpos,ypos,zpos,matrix[0],"ONLY");
1177 gMC->Gspos("UTPW",iplan+1+3*kNplan,"UTI2",-xpos,ypos,zpos,matrix[1],"ONLY");
1180 gMC->Gspos("UTPW",iplan+1+4*kNplan,"UTI3", xpos,ypos,zpos,matrix[0],"ONLY");
1181 gMC->Gspos("UTPW",iplan+1+5*kNplan,"UTI3",-xpos,ypos,zpos,matrix[1],"ONLY");
1187 // The volumes for the services at the chambers
1190 const Int_t kNparServ = 3;
1191 Float_t parServ[kNparServ];
1193 for (icham = 0; icham < kNcham; icham++) {
1194 //for (iplan = 0; iplan < kNplan; iplan++) {
1195 // Take out upper plane until TRD mothervolume is adjusted
1196 for (iplan = 0; iplan < kNplan-1; iplan++) {
1198 Int_t iDet = GetDetectorSec(iplan,icham);
1200 sprintf(cTagV,"UU%02d",iDet);
1201 parServ[0] = fCwidth[iplan]/2.;
1202 parServ[1] = fClength[iplan][icham]/2. - fgkHspace/2.;
1203 parServ[2] = fgkVspace/2. - 0.742/2.;
1205 fChamberUUboxd[iDet][0] = parServ[0];
1206 fChamberUUboxd[iDet][1] = parServ[1];
1207 fChamberUUboxd[iDet][2] = parServ[2];
1209 gMC->Gsvolu(cTagV,"BOX",idtmed[1302-1],parServ,kNparServ);
1211 ypos = - fClength[iplan][0] - fClength[iplan][1] - fClength[iplan][2]/2.;
1212 for (Int_t ic = 0; ic < icham; ic++) {
1213 ypos += fClength[iplan][ic];
1215 ypos += fClength[iplan][icham]/2.;
1216 zpos = fgkCH + fgkVspace/2. - fgkSheight/2. + iplan * (fgkCH + fgkVspace);
1219 fChamberUUorig[iDet][0] = xpos;
1220 fChamberUUorig[iDet][1] = ypos;
1221 fChamberUUorig[iDet][2] = zpos;
1223 //gMC->Gspos(cTagV,1,"UTI1",xposs,yposs,zposs,0,"ONLY");
1226 if (fClengthPH[iplan][icham] > 0.0) {
1227 sprintf(cTagV,"UU%02d",iDet+kNdets);
1228 parServ[0] = fCwidth[iplan]/2.;
1229 parServ[1] = fClengthPH[iplan][icham]/2. - fgkHspace/2.;
1230 parServ[2] = fgkVspace/2.;
1232 fChamberUUboxd[iDet+kNdets][0] = parServ[0];
1233 fChamberUUboxd[iDet+kNdets][1] = parServ[1];
1234 fChamberUUboxd[iDet+kNdets][2] = parServ[2];
1236 gMC->Gsvolu(cTagV,"BOX",idtmed[1302-1],parServ,kNparServ);
1238 ypos = - fClength[iplan][0] - fClength[iplan][1] - fClength[iplan][2]/2.;
1239 for (Int_t ic = 0; ic < icham; ic++) {
1240 ypos += fClength[iplan][ic];
1243 ypos += fClength[iplan][icham];
1244 ypos -= fClengthPH[iplan][icham]/2.;
1247 ypos += fClengthPH[iplan][icham]/2.;
1249 zpos = fgkCH + fgkVspace/2. - fgkSheight/2. + iplan * (fgkCH + fgkVspace);
1251 fChamberUUorig[iDet+kNdets][0] = xpos;
1252 fChamberUUorig[iDet+kNdets][1] = ypos;
1253 fChamberUUorig[iDet+kNdets][2] = zpos;
1255 //gMC->Gspos(cTagV,1,"UTI2",xpos,ypos,zpos,0,"ONLY");
1261 if (fClengthRH[iplan][icham] > 0.0) {
1262 sprintf(cTagV,"UU%02d",iDet+2*kNdets);
1263 parServ[0] = fCwidth[iplan]/2.;
1264 parServ[1] = fClengthRH[iplan][icham]/2. - fgkHspace/2.;
1265 parServ[2] = fgkVspace/2.;
1267 fChamberUUboxd[iDet+2*kNdets][0] = parServ[0];
1268 fChamberUUboxd[iDet+2*kNdets][1] = parServ[1];
1269 fChamberUUboxd[iDet+2*kNdets][2] = parServ[2];
1271 gMC->Gsvolu(cTagV,"BOX",idtmed[1302-1],parServ,kNparServ);
1273 ypos = - fClength[iplan][0] - fClength[iplan][1] - fClength[iplan][2]/2.;
1274 for (Int_t ic = 0; ic < icham; ic++) {
1275 ypos += fClength[iplan][ic];
1278 ypos += fClength[iplan][icham];
1279 ypos -= fClengthRH[iplan][icham]/2.;
1282 ypos += fClengthRH[iplan][icham]/2.;
1284 zpos = fgkCH + fgkVspace/2. - fgkSheight/2. + iplan * (fgkCH + fgkVspace);
1286 fChamberUUorig[iDet+2*kNdets][0] = xpos;
1287 fChamberUUorig[iDet+2*kNdets][1] = ypos;
1288 fChamberUUorig[iDet+2*kNdets][2] = zpos;
1290 //gMC->Gspos(cTagV,1,"UTI3",xpos,ypos,zpos,0,"ONLY");
1299 // The cooling pipes inside the service volumes
1302 const Int_t kNparTube = 3;
1303 Float_t parTube[kNparTube];
1304 // The aluminum pipe for the cooling
1308 gMC->Gsvolu("UTCP","TUBE",idtmed[1324-1],parTube,0);
1309 // The cooling water
1311 parTube[1] = 0.2/2.;
1313 gMC->Gsvolu("UTCH","TUBE",idtmed[1314-1],parTube,kNparTube);
1314 // Water inside the cooling pipe
1318 gMC->Gspos("UTCH",1,"UTCP",xpos,ypos,zpos,0,"ONLY");
1320 // Position the cooling pipes in the mother volume
1321 const Int_t kNpar = 3;
1323 for (icham = 0; icham < kNcham; icham++) {
1324 //for (iplan = 0; iplan < kNplan; iplan++) {
1325 // Take out upper plane until TRD mothervolume is adjusted
1326 for (iplan = 0; iplan < kNplan-1; iplan++) {
1327 Int_t iDet = GetDetectorSec(iplan,icham);
1328 Int_t iCopy = GetDetector(iplan,icham,0) * 100;
1329 Int_t nMCMrow = commonParam->GetRowMax(iplan,icham,0);
1330 Float_t ySize = (GetChamberLength(iplan,icham) - 2.*fgkRpadW)
1331 / ((Float_t) nMCMrow);
1332 sprintf(cTagV,"UU%02d",iDet);
1333 for (Int_t iMCMrow = 0; iMCMrow < nMCMrow; iMCMrow++) {
1335 ypos = (0.5 + iMCMrow) * ySize - 1.9
1336 - fClength[iplan][icham]/2. + fgkHspace/2.;
1337 zpos = 0.0 + 0.742/2.;
1339 par[1] = 0.3/2.; // Thickness of the cooling pipes
1340 par[2] = fCwidth[iplan]/2.;
1341 gMC->Gsposp("UTCP",iCopy+iMCMrow,cTagV,xpos,ypos,zpos
1342 ,matrix[2],"ONLY",par,kNpar);
1345 sprintf(cTagV,"UU%02d",iDet+kNdets);
1346 for (Int_t iMCMrow = 0; iMCMrow < nMCMrow; iMCMrow++) {
1348 ypos = (0.5 + iMCMrow) * ySize - 1.9
1349 - fClengthPH[iplan][icham]/2. + fgkHspace/2.;
1351 if (ypos < (fClengthPH[iplan][icham]/2. - fgkHspace/2.)) {
1353 par[1] = 0.3/2.; // Thickness of the cooling pipes
1354 par[2] = fCwidth[iplan]/2.;
1355 gMC->Gsposp("UTCP",iCopy+iMCMrow+nMCMrow,cTagV,xpos,ypos,zpos
1356 ,matrix[2],"ONLY",par,kNpar);
1361 sprintf(cTagV,"UU%02d",iDet+2*kNdets);
1362 for (Int_t iMCMrow = 0; iMCMrow < nMCMrow; iMCMrow++) {
1364 ypos = (0.5 + iMCMrow) * ySize - 1.9
1365 - fClengthRH[iplan][icham]/2. + fgkHspace/2.;
1367 if (ypos < (fClengthRH[iplan][icham]/2. - fgkHspace/2.)) {
1369 par[1] = 0.3/2.; // Thickness of the cooling pipes
1370 par[2] = fCwidth[iplan]/2.;
1371 gMC->Gsposp("UTCP",iCopy+iMCMrow+2*nMCMrow,cTagV,xpos,ypos,zpos
1372 ,matrix[2],"ONLY",par,kNpar);
1383 // The copper power lines
1387 gMC->Gsvolu("UTPL","TUBE",idtmed[1305-1],parTube,0);
1389 // Position the power lines in the mother volume
1390 for (icham = 0; icham < kNcham; icham++) {
1391 //for (iplan = 0; iplan < kNplan; iplan++) {
1392 // Take out upper plane until TRD mothervolume is adjusted
1393 for (iplan = 0; iplan < kNplan-1; iplan++) {
1394 Int_t iDet = GetDetectorSec(iplan,icham);
1395 Int_t iCopy = GetDetector(iplan,icham,0) * 100;
1396 Int_t nMCMrow = commonParam->GetRowMax(iplan,icham,0);
1397 Float_t ySize = (GetChamberLength(iplan,icham) - 2.*fgkRpadW)
1398 / ((Float_t) nMCMrow);
1399 sprintf(cTagV,"UU%02d",iDet);
1400 for (Int_t iMCMrow = 0; iMCMrow < nMCMrow; iMCMrow++) {
1402 ypos = (0.5 + iMCMrow) * ySize - 1.0
1403 - fClength[iplan][icham]/2. + fgkHspace/2.;
1404 zpos = -0.4 + 0.742/2.;
1406 par[1] = 0.2/2.; // Thickness of the power lines
1407 par[2] = fCwidth[iplan]/2.;
1408 gMC->Gsposp("UTPL",iCopy+iMCMrow,cTagV,xpos,ypos,zpos
1409 ,matrix[2],"ONLY",par,kNpar);
1412 sprintf(cTagV,"UU%02d",iDet+kNdets);
1413 for (Int_t iMCMrow = 0; iMCMrow < nMCMrow; iMCMrow++) {
1415 ypos = (0.5 + iMCMrow) * ySize - 1.0
1416 - fClengthPH[iplan][icham]/2. + fgkHspace/2.;
1418 if (ypos < (fClengthPH[iplan][icham]/2. - fgkHspace/2.)) {
1420 par[1] = 0.2/2.; // Thickness of the power lines
1421 par[2] = fCwidth[iplan]/2.;
1422 gMC->Gsposp("UTPL",iCopy+iMCMrow+nMCMrow,cTagV,xpos,ypos,zpos
1423 ,matrix[2],"ONLY",par,kNpar);
1428 sprintf(cTagV,"UU%02d",iDet+2*kNdets);
1429 for (Int_t iMCMrow = 0; iMCMrow < nMCMrow; iMCMrow++) {
1431 ypos = (0.5 + iMCMrow) * ySize - 1.0
1432 - fClengthRH[iplan][icham]/2. + fgkHspace/2.;
1434 if (ypos < (fClengthRH[iplan][icham]/2. - fgkHspace/2.)) {
1436 par[1] = 0.2/2.; // Thickness of the power lines
1437 par[2] = fCwidth[iplan]/2.;
1438 gMC->Gsposp("UTPL",iCopy+iMCMrow+2*nMCMrow,cTagV,xpos,ypos,zpos
1439 ,matrix[2],"ONLY",par,kNpar);
1450 // The mother volume for the MCMs (air)
1451 const Int_t kNparMCM = 3;
1452 Float_t parMCM[kNparMCM];
1455 parMCM[2] = 0.14/2.;
1456 gMC->Gsvolu("UMCM","BOX",idtmed[1302-1],parMCM,kNparMCM);
1458 // The MCM carrier G10 layer
1462 gMC->Gsvolu("UMC1","BOX",idtmed[1319-1],parMCM,kNparMCM);
1463 // The MCM carrier Cu layer
1466 parMCM[2] = 0.0162/2.;
1467 gMC->Gsvolu("UMC2","BOX",idtmed[1318-1],parMCM,kNparMCM);
1468 // The silicon of the chips
1471 parMCM[2] = 0.003/2.;
1472 gMC->Gsvolu("UMC3","BOX",idtmed[1320-1],parMCM,kNparMCM);
1474 // Put the MCM material inside the MCM mother volume
1477 zpos = -0.07 + 0.1/2.;
1478 gMC->Gspos("UMC1",1,"UMCM",xpos,ypos,zpos,0,"ONLY");
1479 zpos += 0.1/2. + 0.0162/2.;
1480 gMC->Gspos("UMC2",1,"UMCM",xpos,ypos,zpos,0,"ONLY");
1481 zpos += 0.00162/2 + 0.003/2.;
1482 gMC->Gspos("UMC3",1,"UMCM",xpos,ypos,zpos,0,"ONLY");
1484 // Position the MCMs in the mother volume
1485 for (icham = 0; icham < kNcham; icham++) {
1486 //for (iplan = 0; iplan < kNplan; iplan++) {
1487 // Take out upper plane until TRD mothervolume is adjusted
1488 for (iplan = 0; iplan < kNplan-1; iplan++) {
1489 Int_t iDet = GetDetectorSec(iplan,icham);
1490 Int_t iCopy = GetDetector(iplan,icham,0) * 1000;
1491 Int_t nMCMrow = commonParam->GetRowMax(iplan,icham,0);
1492 Float_t ySize = (GetChamberLength(iplan,icham) - 2.*fgkRpadW)
1493 / ((Float_t) nMCMrow);
1495 Float_t xSize = (GetChamberWidth(iplan) - 2.* fgkCpadW)
1496 / ((Float_t) nMCMcol);
1497 sprintf(cTagV,"UU%02d",iDet);
1498 for (Int_t iMCMrow = 0; iMCMrow < nMCMrow; iMCMrow++) {
1499 for (Int_t iMCMcol = 0; iMCMcol < nMCMcol; iMCMcol++) {
1500 xpos = (0.5 + iMCMcol) * xSize + 1.0
1501 - fCwidth[iplan]/2.;
1502 ypos = (0.5 + iMCMrow) * ySize + 1.0
1503 - fClength[iplan][icham]/2. + fgkHspace/2.;
1504 zpos = -0.4 + 0.742/2.;
1506 par[1] = 0.2/2.; // Thickness of the power lines
1507 par[2] = fCwidth[iplan]/2.;
1508 gMC->Gspos("UMCM",iCopy+iMCMrow*10+iMCMcol,cTagV
1509 ,xpos,ypos,zpos,0,"ONLY");
1513 sprintf(cTagV,"UU%02d",iDet+kNdets);
1514 for (Int_t iMCMrow = 0; iMCMrow < nMCMrow; iMCMrow++) {
1515 for (Int_t iMCMcol = 0; iMCMcol < nMCMcol; iMCMcol++) {
1516 xpos = (0.5 + iMCMcol) * xSize + 1.0
1517 - fCwidth[iplan]/2.;
1518 ypos = (0.5 + iMCMrow) * ySize + 1.0
1519 - fClengthPH[iplan][icham]/2. + fgkHspace/2.;
1521 if (ypos < (fClengthPH[iplan][icham]/2. - fgkHspace/2.)) {
1523 par[1] = 0.2/2.; // Thickness of the power lines
1524 par[2] = fCwidth[iplan]/2.;
1525 gMC->Gspos("UMCM",iCopy+iMCMrow*10+iMCMcol+10*nMCMrow,cTagV
1526 ,xpos,ypos,zpos,0,"ONLY");
1532 sprintf(cTagV,"UU%02d",iDet+2*kNdets);
1533 for (Int_t iMCMrow = 0; iMCMrow < nMCMrow; iMCMrow++) {
1534 for (Int_t iMCMcol = 0; iMCMcol < nMCMcol; iMCMcol++) {
1535 xpos = (0.5 + iMCMcol) * xSize + 1.0
1536 - fCwidth[iplan]/2.;
1537 ypos = (0.5 + iMCMrow) * ySize + 1.0
1538 - fClengthRH[iplan][icham]/2. + fgkHspace/2.;
1540 if (ypos < (fClengthRH[iplan][icham]/2. - fgkHspace/2.)) {
1542 par[1] = 0.2/2.; // Thickness of the power lines
1543 par[2] = fCwidth[iplan]/2.;
1544 gMC->Gspos("UMCM",iCopy+iMCMrow*10+iMCMcol+20*nMCMrow,cTagV
1545 ,xpos,ypos,zpos,0,"ONLY");
1555 //_____________________________________________________________________________
1556 void AliTRDgeometryFull::GroupChamber(Int_t iplan, Int_t icham, Int_t *idtmed, Bool_t PHOShole, Bool_t RICHhole)
1559 // Group volumes UA, UD, UF, UU in a single chamber (Air)
1560 // UA, UD, UF, UU are boxes
1563 // ... for the moment there are no services (UU) for the upper plane !
1565 const Int_t kNparCha = 3;
1567 Int_t iDet = GetDetectorSec(iplan,icham);
1569 if (PHOShole) iDet += kNdets;
1570 if (RICHhole) iDet += 2*kNdets;
1572 Float_t xyzMin[3], xyzMax[3];
1573 Float_t xyzOrig[3], xyzBoxd[3];
1578 for (Int_t i = 0; i < 3; i++) {
1579 xyzMin[i] = +9999; xyzMax[i] = -9999;
1582 for (Int_t i = 0; i < 3; i++) {
1584 xyzMin[i] = TMath::Min(xyzMin[i],fChamberUAorig[iDet][i]-fChamberUAboxd[iDet][i]);
1585 xyzMax[i] = TMath::Max(xyzMax[i],fChamberUAorig[iDet][i]+fChamberUAboxd[iDet][i]);
1587 xyzMin[i] = TMath::Min(xyzMin[i],fChamberUDorig[iDet][i]-fChamberUDboxd[iDet][i]);
1588 xyzMax[i] = TMath::Max(xyzMax[i],fChamberUDorig[iDet][i]+fChamberUDboxd[iDet][i]);
1590 xyzMin[i] = TMath::Min(xyzMin[i],fChamberUForig[iDet][i]-fChamberUFboxd[iDet][i]);
1591 xyzMax[i] = TMath::Max(xyzMax[i],fChamberUForig[iDet][i]+fChamberUFboxd[iDet][i]);
1593 if (iplan < (kNplan-1)) {
1594 xyzMin[i] = TMath::Min(xyzMin[i],fChamberUUorig[iDet][i]-fChamberUUboxd[iDet][i]);
1595 xyzMax[i] = TMath::Max(xyzMax[i],fChamberUUorig[iDet][i]+fChamberUUboxd[iDet][i]);
1598 xyzOrig[i] = 0.5*(xyzMax[i]+xyzMin[i]);
1599 xyzBoxd[i] = 0.5*(xyzMax[i]-xyzMin[i]);
1603 sprintf(cTagM,"UT%02d",iDet);
1605 gMC->Gsvolu(cTagM,"BOX ",idtmed[1302-1],xyzBoxd,kNparCha);
1607 sprintf(cTagV,"UA%02d",iDet);
1608 gMC->Gspos(cTagV,1,cTagM,
1609 fChamberUAorig[iDet][0]-xyzOrig[0],
1610 fChamberUAorig[iDet][1]-xyzOrig[1],
1611 fChamberUAorig[iDet][2]-xyzOrig[2],
1614 sprintf(cTagV,"UD%02d",iDet);
1615 gMC->Gspos(cTagV,1,cTagM,
1616 fChamberUDorig[iDet][0]-xyzOrig[0],
1617 fChamberUDorig[iDet][1]-xyzOrig[1],
1618 fChamberUDorig[iDet][2]-xyzOrig[2],
1621 sprintf(cTagV,"UF%02d",iDet);
1622 gMC->Gspos(cTagV,1,cTagM,
1623 fChamberUForig[iDet][0]-xyzOrig[0],
1624 fChamberUForig[iDet][1]-xyzOrig[1],
1625 fChamberUForig[iDet][2]-xyzOrig[2],
1628 if (iplan < (kNplan-1)) {
1629 sprintf(cTagV,"UU%02d",iDet);
1630 gMC->Gspos(cTagV,1,cTagM,
1631 fChamberUUorig[iDet][0]-xyzOrig[0],
1632 fChamberUUorig[iDet][1]-xyzOrig[1],
1633 fChamberUUorig[iDet][2]-xyzOrig[2],
1638 sprintf(cTagV,"UT%02d",iDet);
1640 if (!PHOShole && !RICHhole) {
1641 gMC->Gspos(cTagV,1,"UTI1",xyzOrig[0],xyzOrig[1],xyzOrig[2],0,"ONLY");
1645 gMC->Gspos(cTagV,1,"UTI2",xyzOrig[0],xyzOrig[1],xyzOrig[2],0,"ONLY");
1649 gMC->Gspos(cTagV,1,"UTI3",xyzOrig[0],xyzOrig[1],xyzOrig[2],0,"ONLY");