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.15 2005/04/20 13:03:36 cblume
19 Fix of geometry and pad plane parameter
21 Revision 1.14 2004/05/07 06:52:50 cblume
22 Bug fix to allow for fPHOShole and not fRICHhole
24 Revision 1.13 2004/02/27 15:40:18 cblume
25 Fix definition of rotation matrices
27 Revision 1.12 2003/09/18 09:06:07 cblume
28 Geometry update, Removal of compiler warnings
30 Revision 1.10 2002/11/21 22:38:47 alibrary
31 Removing AliMC and AliMCProcess
33 Revision 1.9 2002/10/31 17:45:35 cblume
36 Revision 1.8 2002/02/11 14:21:16 cblume
37 Update of the geometry. Get rid of MANY
39 Revision 1.7 2001/05/11 07:56:12 hristov
40 Consistent declarations needed on Alpha
42 Revision 1.6 2001/02/14 18:22:26 cblume
43 Change in the geometry of the padplane
45 Revision 1.5 2000/11/01 14:53:21 cblume
46 Merge with TRD-develop
48 Revision 1.1.4.6 2000/10/15 23:40:01 cblume
51 Revision 1.1.4.5 2000/10/06 16:49:46 cblume
54 Revision 1.1.4.4 2000/10/04 16:34:58 cblume
55 Replace include files by forward declarations
57 Revision 1.1.4.3 2000/09/22 14:43:41 cblume
58 Allow the pad/timebin-dimensions to be changed after initialization
60 Revision 1.4 2000/10/02 21:28:19 fca
61 Removal of useless dependecies via forward declarations
63 Revision 1.3 2000/06/08 18:32:58 cblume
64 Make code compliant to coding conventions
66 Revision 1.2 2000/05/08 16:17:27 cblume
69 Revision 1.1.4.2 2000/05/08 14:46:44 cblume
70 Include options SetPHOShole() and SetRICHhole()
72 Revision 1.1.4.1 2000/04/27 12:46:04 cblume
73 Corrected bug in full geometry
75 Revision 1.1 2000/02/28 19:01:15 cblume
80 ///////////////////////////////////////////////////////////////////////////////
82 // TRD geometry for the spaceframe without holes //
84 ///////////////////////////////////////////////////////////////////////////////
86 #include "TVirtualMC.h"
88 #include "AliTRDgeometryFull.h"
89 #include "AliTRDCommonParam.h"
91 ClassImp(AliTRDgeometryFull)
93 //_____________________________________________________________________________
94 AliTRDgeometryFull::AliTRDgeometryFull():AliTRDgeometry()
97 // AliTRDgeometryFull default constructor
104 //_____________________________________________________________________________
105 AliTRDgeometryFull::~AliTRDgeometryFull()
108 // AliTRDgeometryFull destructor
113 //_____________________________________________________________________________
114 void AliTRDgeometryFull::Init()
117 // Initializes the geometry parameter
126 // The outer lengths of the chambers for the sectors with holes for the PHOS
127 Float_t lengthPH[kNplan][kNcham] = { { 124.0, 117.0, 0.0, 117.0, 124.0 }
128 , { 124.0, 117.0, 0.0, 117.0, 124.0 }
129 , { 131.0, 124.0, 0.0, 124.0, 131.0 }
130 , { 138.0, 131.0, 0.0, 131.0, 138.0 }
131 , { 145.0, 138.0, 0.0, 138.0, 145.0 }
132 , { 147.0, 140.0, 0.0, 140.0, 147.0 } };
134 // , { 147.0, 140.0, 0.0, 140.0, 147.0 } };
136 // The outer lengths of the chambers for the sectors with holes for the RICH
137 Float_t lengthRH[kNplan][kNcham] = { { 87.5, 0.0, 0.0, 0.0, 87.5 }
138 , { 87.5, 0.0, 0.0, 0.0, 87.5 }
139 , { 101.5, 0.0, 0.0, 0.0, 101.5 }
140 , { 115.5, 0.0, 0.0, 0.0, 115.5 }
141 , { 129.5, 0.0, 0.0, 0.0, 129.5 }
142 , { 133.5, 0.0, 0.0, 0.0, 133.5 } };
144 // , { 133.5, 0.0, 0.0, 0.0, 133.5 } };
146 for (icham = 0; icham < kNcham; icham++) {
147 for (iplan = 0; iplan < kNplan; iplan++) {
148 fClengthPH[iplan][icham] = lengthPH[iplan][icham];
149 fClengthRH[iplan][icham] = lengthRH[iplan][icham];
155 //_____________________________________________________________________________
156 void AliTRDgeometryFull::CreateGeometry(Int_t *idtmed)
159 // Create the TRD geometry without hole
162 // Names of the TRD volumina (xx = detector number):
164 // Lower part of the readout chambers (gas volume + radiator)
166 // UAxx Aluminum frames (Al)
167 // UBxx G10 frames (C)
168 // UCxx Inner volumes (Air)
170 // Upper part of the readout chambers (readout plane + fee)
172 // UDxx G10 frames (C)
173 // UExx Inner volumes of the G10 (Air)
174 // UFxx Aluminum frames (Al)
175 // UGxx Inner volumes of the Al (Air)
177 // Inner material layers
179 // UHxx Radiator (Rohacell)
180 // UIxx Entrance window (Mylar)
181 // UJxx Drift volume (Xe/CO2)
182 // UKxx Amplification volume (Xe/CO2)
183 // ULxx Pad plane (Cu)
184 // UMxx Support structure (Rohacell)
187 const Int_t kNdet = kNplan * kNcham;
189 const Int_t kNparTrd = 4;
190 const Int_t kNparCha = 3;
192 Float_t xpos, ypos, zpos;
194 Float_t parTrd[kNparTrd];
195 Float_t parCha[kNparCha];
200 AliTRDgeometry::CreateGeometry(idtmed);
202 // The TRD mother volume for one sector (Air), full length in z-direction
203 // Provides material for side plates of super module
204 parTrd[0] = fgkSwidth1/2.;
205 parTrd[1] = fgkSwidth2/2.;
206 parTrd[2] = fgkSlenTR1/2.;
207 parTrd[3] = fgkSheight/2.;
208 gMC->Gsvolu("UTR1","TRD1",idtmed[1302-1],parTrd,kNparTrd);
209 // The TRD mother volume for one sector (Al), leaving hole for PHOS
211 gMC->Gsvolu("UTR2","TRD1",idtmed[1302-1],parTrd,kNparTrd);
213 // The TRD mother volume for one sector (Al), leaving hole for RICH
215 gMC->Gsvolu("UTR3","TRD1",idtmed[1302-1],parTrd,kNparTrd);
219 // The side plates of the super module (Al)
220 parTrd[0] = fgkSwidth1/2. - fgkSMgapT;
221 parTrd[1] = fgkSwidth2/2. - fgkSMgapT;
222 parTrd[2] = fgkSlenTR1/2.;
223 parTrd[3] = fgkSheight/2.;
224 gMC->Gsvolu("UTS1","TRD1",idtmed[1301-1],parTrd,kNparTrd);
225 // The TRD mother volume for one sector (Al), leaving hole for PHOS
227 gMC->Gsvolu("UTS2","TRD1",idtmed[1301-1],parTrd,kNparTrd);
229 // The TRD mother volume for one sector (Al), leaving hole for RICH
231 gMC->Gsvolu("UTS3","TRD1",idtmed[1301-1],parTrd,kNparTrd);
234 // The inner part of the TRD mother volume for one sector (Air),
235 // full length in z-direction
236 parTrd[0] = fgkSwidth1/2. - fgkSMgapT - fgkSMpltT;
237 parTrd[1] = fgkSwidth2/2. - fgkSMgapT - fgkSMpltT;
238 parTrd[2] = fgkSlenTR1/2.;
239 parTrd[3] = fgkSheight/2.;
240 gMC->Gsvolu("UTI1","TRD1",idtmed[1302-1],parTrd,kNparTrd);
241 // The TRD mother volume for one sector (Air), leaving hole for PHOS
243 gMC->Gsvolu("UTI2","TRD1",idtmed[1302-1],parTrd,kNparTrd);
245 // The TRD mother volume for one sector (Air), leaving hole for RICH
247 gMC->Gsvolu("UTI3","TRD1",idtmed[1302-1],parTrd,kNparTrd);
250 for (Int_t icham = 0; icham < kNcham; icham++) {
251 for (Int_t iplan = 0; iplan < kNplan; iplan++) {
253 Int_t iDet = GetDetectorSec(iplan,icham);
255 // The lower part of the readout chambers (gas volume + radiator)
256 // The aluminum frames
257 sprintf(cTagV,"UA%02d",iDet);
258 parCha[0] = fCwidth[iplan]/2.;
259 parCha[1] = fClength[iplan][icham]/2. - fgkHspace/2.;
260 parCha[2] = fgkCraH/2. + fgkCdrH/2.;
261 gMC->Gsvolu(cTagV,"BOX ",idtmed[1301-1],parCha,kNparCha);
263 sprintf(cTagV,"UB%02d",iDet);
264 parCha[0] = fCwidth[iplan]/2. - fgkCalT;
267 gMC->Gsvolu(cTagV,"BOX ",idtmed[1307-1],parCha,kNparCha);
268 // The inner part (air)
269 sprintf(cTagV,"UC%02d",iDet);
270 parCha[0] = fCwidth[iplan]/2. - fgkCalT - fgkCclsT;
271 parCha[1] = fClength[iplan][icham]/2. - fgkHspace/2.- fgkCclfT;
273 gMC->Gsvolu(cTagV,"BOX ",idtmed[1302-1],parCha,kNparCha);
275 if (fClengthPH[iplan][icham] > 0.0) {
276 // The aluminum frames
277 sprintf(cTagV,"UA%02d",iDet+kNdet);
278 parCha[0] = fCwidth[iplan]/2.;
279 parCha[1] = fClengthPH[iplan][icham]/2. - fgkHspace/2.;
280 parCha[2] = fgkCraH/2. + fgkCdrH/2.;
281 gMC->Gsvolu(cTagV,"BOX ",idtmed[1301-1],parCha,kNparCha);
283 sprintf(cTagV,"UB%02d",iDet+kNdet);
284 parCha[0] = fCwidth[iplan]/2. - fgkCalT;
287 gMC->Gsvolu(cTagV,"BOX ",idtmed[1307-1],parCha,kNparCha);
288 // The inner part (air)
289 sprintf(cTagV,"UC%02d",iDet+kNdet);
290 parCha[0] = fCwidth[iplan]/2. - fgkCalT - fgkCclsT;
291 parCha[1] = fClengthPH[iplan][icham]/2. - fgkHspace/2.- fgkCclfT;
293 gMC->Gsvolu(cTagV,"BOX ",idtmed[1302-1],parCha,kNparCha);
297 if (fClengthRH[iplan][icham] > 0.0) {
298 // The aluminum frames
299 sprintf(cTagV,"UA%02d",iDet+2*kNdet);
300 parCha[0] = fCwidth[iplan]/2.;
301 parCha[1] = fClengthRH[iplan][icham]/2. - fgkHspace/2.;
302 parCha[2] = fgkCraH/2. + fgkCdrH/2.;
303 gMC->Gsvolu(cTagV,"BOX ",idtmed[1301-1],parCha,kNparCha);
305 sprintf(cTagV,"UB%02d",iDet+2*kNdet);
306 parCha[0] = fCwidth[iplan]/2. - fgkCalT;
309 gMC->Gsvolu(cTagV,"BOX ",idtmed[1307-1],parCha,kNparCha);
310 // The inner part (air)
311 sprintf(cTagV,"UC%02d",iDet+2*kNdet);
312 parCha[0] = fCwidth[iplan]/2. - fgkCalT - fgkCclsT;
313 parCha[1] = fClengthRH[iplan][icham]/2. - fgkHspace/2.- fgkCclfT;
315 gMC->Gsvolu(cTagV,"BOX ",idtmed[1302-1],parCha,kNparCha);
319 // The upper part of the readout chambers (readout plane)
321 sprintf(cTagV,"UD%02d",iDet);
322 parCha[0] = fCwidth[iplan]/2. + fgkCroW;
323 parCha[1] = fClength[iplan][icham]/2. - fgkHspace/2.;
324 parCha[2] = fgkCamH/2.;
325 gMC->Gsvolu(cTagV,"BOX ",idtmed[1307-1],parCha,kNparCha);
326 // The inner part of the G10 frame (air)
327 sprintf(cTagV,"UE%02d",iDet);
328 parCha[0] = fCwidth[iplan]/2. + fgkCroW - fgkCcuT;
329 parCha[1] = fClength[iplan][icham]/2. - fgkHspace/2.- fgkCcuT;
331 gMC->Gsvolu(cTagV,"BOX ",idtmed[1302-1],parCha,kNparCha);
332 // The aluminum frames
333 sprintf(cTagV,"UF%02d",iDet);
334 parCha[0] = fCwidth[iplan]/2. + fgkCroW;
335 parCha[1] = fClength[iplan][icham]/2. - fgkHspace/2.;
336 parCha[2] = fgkCroH/2.;
337 gMC->Gsvolu(cTagV,"BOX ",idtmed[1301-1],parCha,kNparCha);
338 // The inner part of the aluminum frames
339 sprintf(cTagV,"UG%02d",iDet);
340 parCha[0] = fCwidth[iplan]/2. + fgkCroW - fgkCauT;
341 parCha[1] = fClength[iplan][icham]/2. - fgkHspace/2.- fgkCauT;
343 gMC->Gsvolu(cTagV,"BOX ",idtmed[1302-1],parCha,kNparCha);
345 if (fClengthPH[iplan][icham] > 0.0) {
346 sprintf(cTagV,"UD%02d",iDet+kNdet);
347 parCha[0] = fCwidth[iplan]/2. + fgkCroW;
348 parCha[1] = fClengthPH[iplan][icham]/2. - fgkHspace/2.;
349 parCha[2] = fgkCamH/2.;
350 gMC->Gsvolu(cTagV,"BOX ",idtmed[1307-1],parCha,kNparCha);
351 // The inner part of the G10 frame (air)
352 sprintf(cTagV,"UE%02d",iDet+kNdet);
353 parCha[0] = fCwidth[iplan]/2. + fgkCroW - fgkCcuT;
354 parCha[1] = fClengthPH[iplan][icham]/2. - fgkHspace/2.- fgkCcuT;
356 gMC->Gsvolu(cTagV,"BOX ",idtmed[1302-1],parCha,kNparCha);
357 // The aluminum frames
358 sprintf(cTagV,"UF%02d",iDet+kNdet);
359 parCha[0] = fCwidth[iplan]/2. + fgkCroW;
360 parCha[1] = fClengthPH[iplan][icham]/2. - fgkHspace/2.;
361 parCha[2] = fgkCroH/2.;
362 gMC->Gsvolu(cTagV,"BOX ",idtmed[1301-1],parCha,kNparCha);
363 // The inner part of the aluminum frames
364 sprintf(cTagV,"UG%02d",iDet+kNdet);
365 parCha[0] = fCwidth[iplan]/2. + fgkCroW - fgkCauT;
366 parCha[1] = fClengthPH[iplan][icham]/2. - fgkHspace/2.- fgkCauT;
368 gMC->Gsvolu(cTagV,"BOX ",idtmed[1302-1],parCha,kNparCha);
372 if (fClengthRH[iplan][icham] > 0.0) {
373 sprintf(cTagV,"UD%02d",iDet+2*kNdet);
374 parCha[0] = fCwidth[iplan]/2. + fgkCroW;
375 parCha[1] = fClengthRH[iplan][icham]/2. - fgkHspace/2.;
376 parCha[2] = fgkCamH/2.;
377 gMC->Gsvolu(cTagV,"BOX ",idtmed[1307-1],parCha,kNparCha);
378 // The inner part of the G10 frame (air)
379 sprintf(cTagV,"UE%02d",iDet+2*kNdet);
380 parCha[0] = fCwidth[iplan]/2. + fgkCroW - fgkCcuT;
381 parCha[1] = fClengthRH[iplan][icham]/2. - fgkHspace/2.- fgkCcuT;
383 gMC->Gsvolu(cTagV,"BOX ",idtmed[1302-1],parCha,kNparCha);
384 // The aluminum frames
385 sprintf(cTagV,"UF%02d",iDet+2*kNdet);
386 parCha[0] = fCwidth[iplan]/2. + fgkCroW;
387 parCha[1] = fClengthRH[iplan][icham]/2. - fgkHspace/2.;
388 parCha[2] = fgkCroH/2.;
389 gMC->Gsvolu(cTagV,"BOX ",idtmed[1301-1],parCha,kNparCha);
390 // The inner part of the aluminum frames
391 sprintf(cTagV,"UG%02d",iDet+2*kNdet);
392 parCha[0] = fCwidth[iplan]/2. + fgkCroW - fgkCauT;
393 parCha[1] = fClengthRH[iplan][icham]/2. - fgkHspace/2.- fgkCauT;
395 gMC->Gsvolu(cTagV,"BOX ",idtmed[1302-1],parCha,kNparCha);
399 // The material layers inside the chambers
402 // Rohacell layer (radiator)
403 parCha[2] = fgkRaThick/2;
404 sprintf(cTagV,"UH%02d",iDet);
405 gMC->Gsvolu(cTagV,"BOX ",idtmed[1315-1],parCha,kNparCha);
406 // Mylar layer (entrance window + HV cathode)
407 parCha[2] = fgkMyThick/2;
408 sprintf(cTagV,"UI%02d",iDet);
409 gMC->Gsvolu(cTagV,"BOX ",idtmed[1308-1],parCha,kNparCha);
410 // Xe/Isobutane layer (drift volume)
411 parCha[2] = fgkDrThick/2.;
412 sprintf(cTagV,"UJ%02d",iDet);
413 gMC->Gsvolu(cTagV,"BOX ",idtmed[1309-1],parCha,kNparCha);
414 // Xe/Isobutane layer (amplification volume)
415 parCha[2] = fgkAmThick/2.;
416 sprintf(cTagV,"UK%02d",iDet);
417 gMC->Gsvolu(cTagV,"BOX ",idtmed[1309-1],parCha,kNparCha);
418 // Cu layer (pad plane)
419 parCha[2] = fgkCuThick/2;
420 sprintf(cTagV,"UL%02d",iDet);
421 gMC->Gsvolu(cTagV,"BOX ",idtmed[1305-1],parCha,kNparCha);
422 // G10 layer (support structure / honeycomb)
423 parCha[2] = fgkSuThick/2;
424 sprintf(cTagV,"UM%02d",iDet);
425 gMC->Gsvolu(cTagV,"BOX ",idtmed[1313-1],parCha,kNparCha);
427 if (fClengthPH[iplan][icham] > 0.0) {
428 // Rohacell layer (radiator)
429 parCha[2] = fgkRaThick/2;
430 sprintf(cTagV,"UH%02d",iDet+kNdet);
431 gMC->Gsvolu(cTagV,"BOX ",idtmed[1315-1],parCha,kNparCha);
432 // Mylar layer (entrance window + HV cathode)
433 parCha[2] = fgkMyThick/2;
434 sprintf(cTagV,"UI%02d",iDet+kNdet);
435 gMC->Gsvolu(cTagV,"BOX ",idtmed[1308-1],parCha,kNparCha);
436 // Xe/Isobutane layer (drift volume)
437 parCha[2] = fgkDrThick/2.;
438 sprintf(cTagV,"UJ%02d",iDet+kNdet);
439 gMC->Gsvolu(cTagV,"BOX ",idtmed[1309-1],parCha,kNparCha);
440 // Xe/Isobutane layer (amplification volume)
441 parCha[2] = fgkAmThick/2.;
442 sprintf(cTagV,"UK%02d",iDet+kNdet);
443 gMC->Gsvolu(cTagV,"BOX ",idtmed[1309-1],parCha,kNparCha);
444 // Cu layer (pad plane)
445 parCha[2] = fgkCuThick/2;
446 sprintf(cTagV,"UL%02d",iDet+kNdet);
447 gMC->Gsvolu(cTagV,"BOX ",idtmed[1305-1],parCha,kNparCha);
448 // G10 layer (support structure / honeycomb)
449 parCha[2] = fgkSuThick/2;
450 sprintf(cTagV,"UM%02d",iDet+kNdet);
451 gMC->Gsvolu(cTagV,"BOX ",idtmed[1313-1],parCha,kNparCha);
455 if (fClengthRH[iplan][icham] > 0.0) {
456 // Rohacell layer (radiator)
457 parCha[2] = fgkRaThick/2;
458 sprintf(cTagV,"UH%02d",iDet+2*kNdet);
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+2*kNdet);
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+2*kNdet);
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+2*kNdet);
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+2*kNdet);
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+2*kNdet);
479 gMC->Gsvolu(cTagV,"BOX ",idtmed[1313-1],parCha,kNparCha);
483 // Position the layers in the chambers
487 // Rohacell layer (radiator)
489 sprintf(cTagV,"UH%02d",iDet);
490 sprintf(cTagM,"UC%02d",iDet);
491 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
492 // Mylar layer (entrance window + HV cathode)
494 sprintf(cTagV,"UI%02d",iDet);
495 sprintf(cTagM,"UC%02d",iDet);
496 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
497 // Xe/Isobutane layer (drift volume)
499 sprintf(cTagV,"UJ%02d",iDet);
500 sprintf(cTagM,"UC%02d",iDet);
501 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
503 // Xe/Isobutane layer (amplification volume)
505 sprintf(cTagV,"UK%02d",iDet);
506 sprintf(cTagM,"UE%02d",iDet);
507 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
509 // Cu layer (pad plane)
511 sprintf(cTagV,"UL%02d",iDet);
512 sprintf(cTagM,"UG%02d",iDet);
513 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
514 // G10 layer (support structure)
516 sprintf(cTagV,"UM%02d",iDet);
517 sprintf(cTagM,"UG%02d",iDet);
518 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
520 if (fClengthPH[iplan][icham] > 0.0) {
522 // Rohacell layer (radiator)
524 sprintf(cTagV,"UH%02d",iDet+kNdet);
525 sprintf(cTagM,"UC%02d",iDet+kNdet);
526 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
527 // Mylar layer (entrance window + HV cathode)
529 sprintf(cTagV,"UI%02d",iDet+kNdet);
530 sprintf(cTagM,"UC%02d",iDet+kNdet);
531 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
532 // Xe/Isobutane layer (drift volume)
534 sprintf(cTagV,"UJ%02d",iDet+kNdet);
535 sprintf(cTagM,"UC%02d",iDet+kNdet);
536 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
538 // Xe/Isobutane layer (amplification volume)
540 sprintf(cTagV,"UK%02d",iDet+kNdet);
541 sprintf(cTagM,"UE%02d",iDet+kNdet);
542 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
544 // Cu layer (pad plane)
546 sprintf(cTagV,"UL%02d",iDet+kNdet);
547 sprintf(cTagM,"UG%02d",iDet+kNdet);
548 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
549 // G10 layer (support structure)
551 sprintf(cTagV,"UM%02d",iDet+kNdet);
552 sprintf(cTagM,"UG%02d",iDet+kNdet);
553 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
557 if (fClengthRH[iplan][icham] > 0.0) {
559 // Rohacell layer (radiator)
561 sprintf(cTagV,"UH%02d",iDet+2*kNdet);
562 sprintf(cTagM,"UC%02d",iDet+2*kNdet);
563 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
564 // Mylar layer (entrance window + HV cathode)
566 sprintf(cTagV,"UI%02d",iDet+2*kNdet);
567 sprintf(cTagM,"UC%02d",iDet+2*kNdet);
568 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
569 // Xe/Isobutane layer (drift volume)
571 sprintf(cTagV,"UJ%02d",iDet+2*kNdet);
572 sprintf(cTagM,"UC%02d",iDet+2*kNdet);
573 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
575 // Xe/Isobutane layer (amplification volume)
577 sprintf(cTagV,"UK%02d",iDet+2*kNdet);
578 sprintf(cTagM,"UE%02d",iDet+2*kNdet);
579 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
581 // Cu layer (pad plane)
583 sprintf(cTagV,"UL%02d",iDet+2*kNdet);
584 sprintf(cTagM,"UG%02d",iDet+2*kNdet);
585 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
586 // G10 layer (support structure)
588 sprintf(cTagV,"UM%02d",iDet+2*kNdet);
589 sprintf(cTagM,"UG%02d",iDet+2*kNdet);
590 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
594 // Position the inner volumes of the chambers in the frames
598 // The inside of the lower G10 frame
599 sprintf(cTagV,"UC%02d",iDet);
600 sprintf(cTagM,"UB%02d",iDet);
601 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
602 // The lower G10 frame inside the aluminum frame
603 sprintf(cTagV,"UB%02d",iDet);
604 sprintf(cTagM,"UA%02d",iDet);
605 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
606 // The inside of the upper G10 frame
607 sprintf(cTagV,"UE%02d",iDet);
608 sprintf(cTagM,"UD%02d",iDet);
609 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
610 // The inside of the upper aluminum frame
611 sprintf(cTagV,"UG%02d",iDet);
612 sprintf(cTagM,"UF%02d",iDet);
613 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
615 if (fClengthPH[iplan][icham] > 0.0) {
616 // The inside of the lower G10 frame
617 sprintf(cTagV,"UC%02d",iDet+kNdet);
618 sprintf(cTagM,"UB%02d",iDet+kNdet);
619 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
620 // The lower G10 frame inside the aluminum frame
621 sprintf(cTagV,"UB%02d",iDet+kNdet);
622 sprintf(cTagM,"UA%02d",iDet+kNdet);
623 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
624 // The inside of the upper G10 frame
625 sprintf(cTagV,"UE%02d",iDet+kNdet);
626 sprintf(cTagM,"UD%02d",iDet+kNdet);
627 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
628 // The inside of the upper aluminum frame
629 sprintf(cTagV,"UG%02d",iDet+kNdet);
630 sprintf(cTagM,"UF%02d",iDet+kNdet);
631 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
635 if (fClengthRH[iplan][icham] > 0.0) {
636 // The inside of the lower G10 frame
637 sprintf(cTagV,"UC%02d",iDet+2*kNdet);
638 sprintf(cTagM,"UB%02d",iDet+2*kNdet);
639 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
640 // The lower G10 frame inside the aluminum frame
641 sprintf(cTagV,"UB%02d",iDet+2*kNdet);
642 sprintf(cTagM,"UA%02d",iDet+2*kNdet);
643 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
644 // The inside of the upper G10 frame
645 sprintf(cTagV,"UE%02d",iDet+2*kNdet);
646 sprintf(cTagM,"UD%02d",iDet+2*kNdet);
647 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
648 // The inside of the upper aluminum frame
649 sprintf(cTagV,"UG%02d",iDet+2*kNdet);
650 sprintf(cTagM,"UF%02d",iDet+2*kNdet);
651 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
655 // Position the frames of the chambers in the TRD mother volume
657 ypos = - fClength[iplan][0] - fClength[iplan][1] - fClength[iplan][2]/2.;
658 for (Int_t ic = 0; ic < icham; ic++) {
659 ypos += fClength[iplan][ic];
661 ypos += fClength[iplan][icham]/2.;
662 zpos = fgkCraH/2. + fgkCdrH/2. - fgkSheight/2. + iplan * (fgkCH + fgkVspace);
663 // The lower aluminum frame, radiator + drift region
664 sprintf(cTagV,"UA%02d",iDet);
665 gMC->Gspos(cTagV,1,"UTI1",xpos,ypos,zpos,0,"ONLY");
666 // The upper G10 frame, amplification region
667 sprintf(cTagV,"UD%02d",iDet);
668 zpos += fgkCamH/2. + fgkCraH/2. + fgkCdrH/2.;
669 gMC->Gspos(cTagV,1,"UTI1",xpos,ypos,zpos,0,"ONLY");
670 // The upper aluminum frame
671 sprintf(cTagV,"UF%02d",iDet);
672 zpos += fgkCroH/2. + fgkCamH/2.;
673 gMC->Gspos(cTagV,1,"UTI1",xpos,ypos,zpos,0,"ONLY");
675 if (fClengthPH[iplan][icham] > 0.0) {
677 ypos = - fClength[iplan][0] - fClength[iplan][1] - fClength[iplan][2]/2.;
678 for (Int_t ic = 0; ic < icham; ic++) {
679 ypos += fClength[iplan][ic];
682 ypos += fClength[iplan][icham];
683 ypos -= fClengthPH[iplan][icham]/2.;
686 ypos += fClengthPH[iplan][icham]/2.;
688 zpos = fgkCraH/2. + fgkCdrH/2. - fgkSheight/2. + iplan * (fgkCH + fgkVspace);
689 // The lower aluminum frame, radiator + drift region
690 sprintf(cTagV,"UA%02d",iDet+kNdet);
691 gMC->Gspos(cTagV,1,"UTI2",xpos,ypos,zpos,0,"ONLY");
692 // The upper G10 frame, amplification region
693 sprintf(cTagV,"UD%02d",iDet+kNdet);
694 zpos += fgkCamH/2. + fgkCraH/2. + fgkCdrH/2.;
695 gMC->Gspos(cTagV,1,"UTI2",xpos,ypos,zpos,0,"ONLY");
696 // The upper aluminum frame
697 sprintf(cTagV,"UF%02d",iDet+kNdet);
698 zpos += fgkCroH/2. + fgkCamH/2.;
699 gMC->Gspos(cTagV,1,"UTI2",xpos,ypos,zpos,0,"ONLY");
703 if (fClengthRH[iplan][icham] > 0.0) {
705 ypos = - fClength[iplan][0] - fClength[iplan][1] - fClength[iplan][2]/2.;
706 for (Int_t ic = 0; ic < icham; ic++) {
707 ypos += fClength[iplan][ic];
710 ypos += fClength[iplan][icham];
711 ypos -= fClengthRH[iplan][icham]/2.;
714 ypos += fClengthRH[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+2*kNdet);
719 gMC->Gspos(cTagV,1,"UTI3",xpos,ypos,zpos,0,"ONLY");
720 // The upper G10 frame, amplification region
721 sprintf(cTagV,"UD%02d",iDet+2*kNdet);
722 zpos += fgkCamH/2. + fgkCraH/2. + fgkCdrH/2.;
723 gMC->Gspos(cTagV,1,"UTI3",xpos,ypos,zpos,0,"ONLY");
724 // The upper aluminum frame
725 sprintf(cTagV,"UF%02d",iDet+2*kNdet);
726 zpos += fgkCroH/2. + fgkCamH/2.;
727 gMC->Gspos(cTagV,1,"UTI3",xpos,ypos,zpos,0,"ONLY");
737 gMC->Gspos("UTI1",1,"UTS1",xpos,ypos,zpos,0,"ONLY");
739 gMC->Gspos("UTI2",2,"UTS2",xpos,ypos,zpos,0,"ONLY");
742 gMC->Gspos("UTI3",3,"UTS3",xpos,ypos,zpos,0,"ONLY");
748 gMC->Gspos("UTS1",1,"UTR1",xpos,ypos,zpos,0,"ONLY");
750 gMC->Gspos("UTS2",2,"UTR2",xpos,ypos,zpos,0,"ONLY");
753 gMC->Gspos("UTS3",3,"UTR3",xpos,ypos,zpos,0,"ONLY");
759 gMC->Gspos("UTR1",1,"BTR1",xpos,ypos,zpos,0,"ONLY");
761 gMC->Gspos("UTR2",2,"BTR2",xpos,ypos,zpos,0,"ONLY");
764 gMC->Gspos("UTR1",2,"BTR2",xpos,ypos,zpos,0,"ONLY");
767 gMC->Gspos("UTR3",3,"BTR3",xpos,ypos,zpos,0,"ONLY");
770 gMC->Gspos("UTR1",3,"BTR3",xpos,ypos,zpos,0,"ONLY");
773 // Create the volumes of the super module frame
776 // Create the volumes of the services
777 CreateServices(idtmed);
781 //_____________________________________________________________________________
782 void AliTRDgeometryFull::CreateFrame(Int_t *idtmed)
785 // Create the geometry of the frame of the supermodule
787 // Names of the TRD services volumina
789 // USRL Support rails for the chambers (Al)
790 // USxx Support cross bars between the chambers (Al)
802 // The chamber support rails
805 const Float_t kSRLwid = 2.0;
806 const Float_t kSRLhgt = 2.3;
807 const Float_t kSRLdst = 0.6;
808 const Int_t kNparSRL = 3;
809 Float_t parSRL[kNparSRL];
810 parSRL[0] = kSRLwid/2.;
811 parSRL[1] = fgkSlenTR1/2.;
812 parSRL[2] = kSRLhgt/2.;
813 gMC->Gsvolu("USRL","BOX ",idtmed[1301-1],parSRL,kNparSRL);
818 for (iplan = 0; iplan < kNplan; iplan++) {
820 xpos = fCwidth[iplan]/2. + kSRLwid/2. + kSRLdst;
822 zpos = fgkCraH + fgkCdrH - fgkSheight/2. - kSRLhgt/2.
823 + iplan * (fgkCH + fgkVspace);
824 gMC->Gspos("USRL",iplan+1 ,"UTI1", xpos,ypos,zpos,0,"ONLY");
825 gMC->Gspos("USRL",iplan+1+ kNplan,"UTI1",-xpos,ypos,zpos,0,"ONLY");
827 gMC->Gspos("USRL",iplan+1+2*kNplan,"UTI2", xpos,ypos,zpos,0,"ONLY");
828 gMC->Gspos("USRL",iplan+1+3*kNplan,"UTI2",-xpos,ypos,zpos,0,"ONLY");
831 gMC->Gspos("USRL",iplan+1+4*kNplan,"UTI3", xpos,ypos,zpos,0,"ONLY");
832 gMC->Gspos("USRL",iplan+1+5*kNplan,"UTI3",-xpos,ypos,zpos,0,"ONLY");
838 // The cross bars between the chambers
841 const Float_t kSCBwid = 1.0;
842 const Int_t kNparSCB = 3;
843 Float_t parSCB[kNparSCB];
844 parSCB[1] = kSCBwid/2.;
845 parSCB[2] = fgkCH/2.;
850 for (iplan = 0; iplan < kNplan; iplan++) {
852 parSCB[0] = fCwidth[iplan]/2. + kSRLdst/2.;
854 sprintf(cTagV,"US0%01d",iplan);
855 gMC->Gsvolu(cTagV,"BOX ",idtmed[1301-1],parSCB,kNparSCB);
857 ypos = fgkSlenTR1/2. - kSCBwid/2.;
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 gMC->Gspos(cTagV,3,"UTI3", xpos,ypos,zpos,0,"ONLY");
867 sprintf(cTagV,"US1%01d",iplan);
868 gMC->Gsvolu(cTagV,"BOX ",idtmed[1301-1],parSCB,kNparSCB);
870 ypos = fClength[iplan][2]/2. + fClength[iplan][1];
871 zpos = fgkCH/2. - fgkSheight/2. + iplan * (fgkCH + fgkVspace);
872 gMC->Gspos(cTagV,1,"UTI1", xpos,ypos,zpos,0,"ONLY");
874 gMC->Gspos(cTagV,2,"UTI2", xpos,ypos,zpos,0,"ONLY");
877 ypos += fClength[iplan][0] - fClengthRH[iplan][0];
878 gMC->Gspos(cTagV,3,"UTI3", xpos,ypos,zpos,0,"ONLY");
881 sprintf(cTagV,"US2%01d",iplan);
882 gMC->Gsvolu(cTagV,"BOX ",idtmed[1301-1],parSCB,kNparSCB);
884 ypos = fClength[iplan][2]/2.;
885 zpos = fgkCH/2. - fgkSheight/2. + iplan * (fgkCH + fgkVspace);
886 gMC->Gspos(cTagV,1,"UTI1", xpos,ypos,zpos,0,"ONLY");
888 ypos += fClength[iplan][1] - fClengthPH[iplan][1];
889 gMC->Gspos(cTagV,2,"UTI2", xpos,ypos,zpos,0,"ONLY");
892 sprintf(cTagV,"US3%01d",iplan);
893 gMC->Gsvolu(cTagV,"BOX ",idtmed[1301-1],parSCB,kNparSCB);
895 ypos = - fClength[iplan][2]/2.;
896 zpos = fgkCH/2. - fgkSheight/2. + iplan * (fgkCH + fgkVspace);
897 gMC->Gspos(cTagV,1,"UTI1", xpos,ypos,zpos,0,"ONLY");
899 ypos -= fClength[iplan][3] - fClengthPH[iplan][3];
900 gMC->Gspos(cTagV,2,"UTI2", xpos,ypos,zpos,0,"ONLY");
903 sprintf(cTagV,"US4%01d",iplan);
904 gMC->Gsvolu(cTagV,"BOX ",idtmed[1301-1],parSCB,kNparSCB);
906 ypos = - fClength[iplan][2]/2. - fClength[iplan][1];
907 zpos = fgkCH/2. - fgkSheight/2. + iplan * (fgkCH + fgkVspace);
908 gMC->Gspos(cTagV,1,"UTI1", xpos,ypos,zpos,0,"ONLY");
910 gMC->Gspos(cTagV,2,"UTI2", xpos,ypos,zpos,0,"ONLY");
913 ypos -= fClength[iplan][4] - fClengthRH[iplan][4];
914 gMC->Gspos(cTagV,3,"UTI3", xpos,ypos,zpos,0,"ONLY");
917 sprintf(cTagV,"US5%01d",iplan);
918 gMC->Gsvolu(cTagV,"BOX ",idtmed[1301-1],parSCB,kNparSCB);
920 ypos = - fgkSlenTR1/2. + kSCBwid/2.;
921 zpos = fgkCH/2. - fgkSheight/2. + iplan * (fgkCH + fgkVspace);
922 gMC->Gspos(cTagV,1,"UTI1", xpos,ypos,zpos,0,"ONLY");
924 gMC->Gspos(cTagV,2,"UTI2", xpos,ypos,zpos,0,"ONLY");
927 gMC->Gspos(cTagV,3,"UTI3", xpos,ypos,zpos,0,"ONLY");
934 //_____________________________________________________________________________
935 void AliTRDgeometryFull::CreateServices(Int_t *idtmed)
938 // Create the geometry of the services
940 // Names of the TRD services volumina
942 // UTCL Cooling arterias (Al)
943 // UTCW Cooling arterias (Water)
944 // UUxx Volumes for the services at the chambers (Air)
945 // UTPW Power bars (Cu)
946 // UTCP Cooling pipes (Al)
947 // UTCH Cooling pipes (Water)
948 // UTPL Power lines (Cu)
949 // UMCM Readout MCMs (G10/Cu/Si)
952 const Int_t kNdet = kNplan * kNcham;
963 // The rotation matrices
964 const Int_t kNmatrix = 3;
965 Int_t matrix[kNmatrix];
966 gMC->Matrix(matrix[0],100.0, 0.0, 90.0, 90.0, 10.0, 0.0);
967 gMC->Matrix(matrix[1], 80.0, 0.0, 90.0, 90.0, 10.0,180.0);
968 gMC->Matrix(matrix[2], 0.0, 0.0, 90.0, 90.0, 90.0, 0.0);
970 AliTRDCommonParam* commonParam = AliTRDCommonParam::Instance();
973 printf("<AliTRDgeometryFull::CreateServices> ");
974 printf("Could not get common params\n");
979 // The cooling arterias
982 // Width of the cooling arterias
983 const Float_t kCOLwid = 0.5;
984 // Height of the cooling arterias
985 const Float_t kCOLhgt = 5.5;
986 // Positioning of the cooling
987 const Float_t kCOLposx = 1.6;
988 const Float_t kCOLposz = -0.2;
989 // Thickness of the walls of the cooling arterias
990 const Float_t kCOLthk = 0.1;
991 const Int_t kNparCOL = 3;
992 Float_t parCOL[kNparCOL];
993 parCOL[0] = kCOLwid/2.;
994 parCOL[1] = fgkSlenTR1/2.;
995 parCOL[2] = kCOLhgt/2.;
996 gMC->Gsvolu("UTCL","BOX ",idtmed[1324-1],parCOL,kNparCOL);
997 parCOL[0] -= kCOLthk;
998 parCOL[1] = fgkSlenTR1/2.;
999 parCOL[2] -= kCOLthk;
1000 gMC->Gsvolu("UTCW","BOX ",idtmed[1314-1],parCOL,kNparCOL);
1005 gMC->Gspos("UTCW",1,"UTCL", xpos,ypos,zpos,0,"ONLY");
1007 for (iplan = 1; iplan < kNplan; iplan++) {
1009 xpos = fCwidth[iplan]/2. + kCOLwid/2. + kCOLposx;
1011 zpos = kCOLhgt/2. - fgkSheight/2. + kCOLposz + iplan * (fgkCH + fgkVspace);
1012 gMC->Gspos("UTCL",iplan+1 ,"UTI1", xpos,ypos,zpos,matrix[0],"ONLY");
1013 gMC->Gspos("UTCL",iplan+1+ kNplan,"UTI1",-xpos,ypos,zpos,matrix[1],"ONLY");
1015 gMC->Gspos("UTCL",iplan+1+2*kNplan,"UTI2", xpos,ypos,zpos,matrix[0],"ONLY");
1016 gMC->Gspos("UTCL",iplan+1+3*kNplan,"UTI2",-xpos,ypos,zpos,matrix[1],"ONLY");
1019 gMC->Gspos("UTCL",iplan+1+4*kNplan,"UTI3", xpos,ypos,zpos,matrix[0],"ONLY");
1020 gMC->Gspos("UTCL",iplan+1+5*kNplan,"UTI3",-xpos,ypos,zpos,matrix[1],"ONLY");
1029 const Float_t kPWRwid = 0.6;
1030 const Float_t kPWRhgt = 4.5;
1031 const Float_t kPWRposx = 1.05;
1032 const Float_t kPWRposz = 0.9;
1033 const Int_t kNparPWR = 3;
1034 Float_t parPWR[kNparPWR];
1035 parPWR[0] = kPWRwid/2.;
1036 parPWR[1] = fgkSlenTR1/2.;
1037 parPWR[2] = kPWRhgt/2.;
1038 gMC->Gsvolu("UTPW","BOX ",idtmed[1325-1],parPWR,kNparPWR);
1040 for (iplan = 1; iplan < kNplan; iplan++) {
1042 xpos = fCwidth[iplan]/2. + kPWRwid/2. + kPWRposx;
1044 zpos = kPWRhgt/2. - fgkSheight/2. + kPWRposz + iplan * (fgkCH + fgkVspace);
1045 gMC->Gspos("UTPW",iplan+1 ,"UTI1", xpos,ypos,zpos,matrix[0],"ONLY");
1046 gMC->Gspos("UTPW",iplan+1+ kNplan,"UTI1",-xpos,ypos,zpos,matrix[1],"ONLY");
1048 gMC->Gspos("UTPW",iplan+1+2*kNplan,"UTI2", xpos,ypos,zpos,matrix[0],"ONLY");
1049 gMC->Gspos("UTPW",iplan+1+3*kNplan,"UTI2",-xpos,ypos,zpos,matrix[1],"ONLY");
1052 gMC->Gspos("UTPW",iplan+1+4*kNplan,"UTI3", xpos,ypos,zpos,matrix[0],"ONLY");
1053 gMC->Gspos("UTPW",iplan+1+5*kNplan,"UTI3",-xpos,ypos,zpos,matrix[1],"ONLY");
1059 // The volumes for the services at the chambers
1062 const Int_t kNparServ = 3;
1063 Float_t parServ[kNparServ];
1065 for (icham = 0; icham < kNcham; icham++) {
1066 //for (iplan = 0; iplan < kNplan; iplan++) {
1067 // Take out upper plane until TRD mothervolume is adjusted
1068 for (iplan = 0; iplan < kNplan-1; iplan++) {
1070 Int_t iDet = GetDetectorSec(iplan,icham);
1072 sprintf(cTagV,"UU%02d",iDet);
1073 parServ[0] = fCwidth[iplan]/2.;
1074 parServ[1] = fClength[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];
1082 ypos += fClength[iplan][icham]/2.;
1083 zpos = fgkCH + fgkVspace/2. - fgkSheight/2. + iplan * (fgkCH + fgkVspace);
1084 gMC->Gspos(cTagV,1,"UTI1",xpos,ypos,zpos,0,"ONLY");
1087 if (fClengthPH[iplan][icham] > 0.0) {
1088 sprintf(cTagV,"UU%02d",iDet+kNdet);
1089 parServ[0] = fCwidth[iplan]/2.;
1090 parServ[1] = fClengthPH[iplan][icham]/2. - fgkHspace/2.;
1091 parServ[2] = fgkVspace/2.;
1092 gMC->Gsvolu(cTagV,"BOX",idtmed[1302-1],parServ,kNparServ);
1094 ypos = - fClength[iplan][0] - fClength[iplan][1] - fClength[iplan][2]/2.;
1095 for (Int_t ic = 0; ic < icham; ic++) {
1096 ypos += fClength[iplan][ic];
1099 ypos += fClength[iplan][icham];
1100 ypos -= fClengthPH[iplan][icham]/2.;
1103 ypos += fClengthPH[iplan][icham]/2.;
1105 zpos = fgkCH + fgkVspace/2. - fgkSheight/2. + iplan * (fgkCH + fgkVspace);
1106 gMC->Gspos(cTagV,1,"UTI2",xpos,ypos,zpos,0,"ONLY");
1111 if (fClengthRH[iplan][icham] > 0.0) {
1112 sprintf(cTagV,"UU%02d",iDet+2*kNdet);
1113 parServ[0] = fCwidth[iplan]/2.;
1114 parServ[1] = fClengthRH[iplan][icham]/2. - fgkHspace/2.;
1115 parServ[2] = fgkVspace/2.;
1116 gMC->Gsvolu(cTagV,"BOX",idtmed[1302-1],parServ,kNparServ);
1118 ypos = - fClength[iplan][0] - fClength[iplan][1] - fClength[iplan][2]/2.;
1119 for (Int_t ic = 0; ic < icham; ic++) {
1120 ypos += fClength[iplan][ic];
1123 ypos += fClength[iplan][icham];
1124 ypos -= fClengthRH[iplan][icham]/2.;
1127 ypos += fClengthRH[iplan][icham]/2.;
1129 zpos = fgkCH + fgkVspace/2. - fgkSheight/2. + iplan * (fgkCH + fgkVspace);
1130 gMC->Gspos(cTagV,1,"UTI3",xpos,ypos,zpos,0,"ONLY");
1138 // The cooling pipes inside the service volumes
1141 const Int_t kNparTube = 3;
1142 Float_t parTube[kNparTube];
1143 // The aluminum pipe for the cooling
1147 gMC->Gsvolu("UTCP","TUBE",idtmed[1324-1],parTube,0);
1148 // The cooling water
1150 parTube[1] = 0.2/2.;
1152 gMC->Gsvolu("UTCH","TUBE",idtmed[1314-1],parTube,kNparTube);
1153 // Water inside the cooling pipe
1157 gMC->Gspos("UTCH",1,"UTCP",xpos,ypos,zpos,0,"ONLY");
1159 // Position the cooling pipes in the mother volume
1160 const Int_t kNpar = 3;
1162 for (icham = 0; icham < kNcham; icham++) {
1163 //for (iplan = 0; iplan < kNplan; iplan++) {
1164 // Take out upper plane until TRD mothervolume is adjusted
1165 for (iplan = 0; iplan < kNplan-1; iplan++) {
1166 Int_t iDet = GetDetectorSec(iplan,icham);
1167 Int_t iCopy = GetDetector(iplan,icham,0) * 100;
1168 Int_t nMCMrow = commonParam->GetRowMax(iplan,icham,0);
1169 Float_t ySize = (GetChamberLength(iplan,icham) - 2.*fgkRpadW)
1170 / ((Float_t) nMCMrow);
1171 sprintf(cTagV,"UU%02d",iDet);
1172 for (Int_t iMCMrow = 0; iMCMrow < nMCMrow; iMCMrow++) {
1174 ypos = (0.5 + iMCMrow) * ySize - 1.9
1175 - fClength[iplan][icham]/2. + fgkHspace/2.;
1178 par[1] = 0.3/2.; // Thickness of the cooling pipes
1179 par[2] = fCwidth[iplan]/2.;
1180 gMC->Gsposp("UTCP",iCopy+iMCMrow,cTagV,xpos,ypos,zpos
1181 ,matrix[2],"ONLY",par,kNpar);
1184 sprintf(cTagV,"UU%02d",iDet+kNdet);
1185 for (Int_t iMCMrow = 0; iMCMrow < nMCMrow; iMCMrow++) {
1187 ypos = (0.5 + iMCMrow) * ySize - 1.9
1188 - fClengthPH[iplan][icham]/2. + fgkHspace/2.;
1190 if (ypos < (fClengthPH[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+nMCMrow,cTagV,xpos,ypos,zpos
1195 ,matrix[2],"ONLY",par,kNpar);
1200 sprintf(cTagV,"UU%02d",iDet+2*kNdet);
1201 for (Int_t iMCMrow = 0; iMCMrow < nMCMrow; iMCMrow++) {
1203 ypos = (0.5 + iMCMrow) * ySize - 1.9
1204 - fClengthRH[iplan][icham]/2. + fgkHspace/2.;
1206 if (ypos < (fClengthRH[iplan][icham]/2. - fgkHspace/2.)) {
1208 par[1] = 0.3/2.; // Thickness of the cooling pipes
1209 par[2] = fCwidth[iplan]/2.;
1210 gMC->Gsposp("UTCP",iCopy+iMCMrow+2*nMCMrow,cTagV,xpos,ypos,zpos
1211 ,matrix[2],"ONLY",par,kNpar);
1222 // The copper power lines
1226 gMC->Gsvolu("UTPL","TUBE",idtmed[1305-1],parTube,0);
1228 // Position the power lines in the mother volume
1229 for (icham = 0; icham < kNcham; icham++) {
1230 //for (iplan = 0; iplan < kNplan; iplan++) {
1231 // Take out upper plane until TRD mothervolume is adjusted
1232 for (iplan = 0; iplan < kNplan-1; iplan++) {
1233 Int_t iDet = GetDetectorSec(iplan,icham);
1234 Int_t iCopy = GetDetector(iplan,icham,0) * 100;
1235 Int_t nMCMrow = commonParam->GetRowMax(iplan,icham,0);
1236 Float_t ySize = (GetChamberLength(iplan,icham) - 2.*fgkRpadW)
1237 / ((Float_t) nMCMrow);
1238 sprintf(cTagV,"UU%02d",iDet);
1239 for (Int_t iMCMrow = 0; iMCMrow < nMCMrow; iMCMrow++) {
1241 ypos = (0.5 + iMCMrow) * ySize - 1.0
1242 - fClength[iplan][icham]/2. + fgkHspace/2.;
1245 par[1] = 0.2/2.; // Thickness of the power lines
1246 par[2] = fCwidth[iplan]/2.;
1247 gMC->Gsposp("UTPL",iCopy+iMCMrow,cTagV,xpos,ypos,zpos
1248 ,matrix[2],"ONLY",par,kNpar);
1251 sprintf(cTagV,"UU%02d",iDet+kNdet);
1252 for (Int_t iMCMrow = 0; iMCMrow < nMCMrow; iMCMrow++) {
1254 ypos = (0.5 + iMCMrow) * ySize - 1.0
1255 - fClengthPH[iplan][icham]/2. + fgkHspace/2.;
1257 if (ypos < (fClengthPH[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+nMCMrow,cTagV,xpos,ypos,zpos
1262 ,matrix[2],"ONLY",par,kNpar);
1267 sprintf(cTagV,"UU%02d",iDet+2*kNdet);
1268 for (Int_t iMCMrow = 0; iMCMrow < nMCMrow; iMCMrow++) {
1270 ypos = (0.5 + iMCMrow) * ySize - 1.0
1271 - fClengthRH[iplan][icham]/2. + fgkHspace/2.;
1273 if (ypos < (fClengthRH[iplan][icham]/2. - fgkHspace/2.)) {
1275 par[1] = 0.2/2.; // Thickness of the power lines
1276 par[2] = fCwidth[iplan]/2.;
1277 gMC->Gsposp("UTPL",iCopy+iMCMrow+2*nMCMrow,cTagV,xpos,ypos,zpos
1278 ,matrix[2],"ONLY",par,kNpar);
1289 // The mother volume for the MCMs (air)
1290 const Int_t kNparMCM = 3;
1291 Float_t parMCM[kNparMCM];
1294 parMCM[2] = 0.14/2.;
1295 gMC->Gsvolu("UMCM","BOX",idtmed[1302-1],parMCM,kNparMCM);
1297 // The MCM carrier G10 layer
1301 gMC->Gsvolu("UMC1","BOX",idtmed[1319-1],parMCM,kNparMCM);
1302 // The MCM carrier Cu layer
1305 parMCM[2] = 0.0162/2.;
1306 gMC->Gsvolu("UMC2","BOX",idtmed[1318-1],parMCM,kNparMCM);
1307 // The silicon of the chips
1310 parMCM[2] = 0.003/2.;
1311 gMC->Gsvolu("UMC3","BOX",idtmed[1320-1],parMCM,kNparMCM);
1313 // Put the MCM material inside the MCM mother volume
1316 zpos = -0.07 + 0.1/2.;
1317 gMC->Gspos("UMC1",1,"UMCM",xpos,ypos,zpos,0,"ONLY");
1318 zpos += 0.1/2. + 0.0162/2.;
1319 gMC->Gspos("UMC2",1,"UMCM",xpos,ypos,zpos,0,"ONLY");
1320 zpos += 0.00162/2 + 0.003/2.;
1321 gMC->Gspos("UMC3",1,"UMCM",xpos,ypos,zpos,0,"ONLY");
1323 // Position the MCMs in the mother volume
1324 for (icham = 0; icham < kNcham; icham++) {
1325 //for (iplan = 0; iplan < kNplan; iplan++) {
1326 // Take out upper plane until TRD mothervolume is adjusted
1327 for (iplan = 0; iplan < kNplan-1; iplan++) {
1328 Int_t iDet = GetDetectorSec(iplan,icham);
1329 Int_t iCopy = GetDetector(iplan,icham,0) * 1000;
1330 Int_t nMCMrow = commonParam->GetRowMax(iplan,icham,0);
1331 Float_t ySize = (GetChamberLength(iplan,icham) - 2.*fgkRpadW)
1332 / ((Float_t) nMCMrow);
1334 Float_t xSize = (GetChamberWidth(iplan) - 2.* fgkCpadW)
1335 / ((Float_t) nMCMcol);
1336 sprintf(cTagV,"UU%02d",iDet);
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 - fClength[iplan][icham]/2. + fgkHspace/2.;
1345 par[1] = 0.2/2.; // Thickness of the power lines
1346 par[2] = fCwidth[iplan]/2.;
1347 gMC->Gspos("UMCM",iCopy+iMCMrow*10+iMCMcol,cTagV
1348 ,xpos,ypos,zpos,0,"ONLY");
1352 sprintf(cTagV,"UU%02d",iDet+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 - fClengthPH[iplan][icham]/2. + fgkHspace/2.;
1360 if (ypos < (fClengthPH[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+10*nMCMrow,cTagV
1365 ,xpos,ypos,zpos,0,"ONLY");
1371 sprintf(cTagV,"UU%02d",iDet+2*kNdet);
1372 for (Int_t iMCMrow = 0; iMCMrow < nMCMrow; iMCMrow++) {
1373 for (Int_t iMCMcol = 0; iMCMcol < nMCMcol; iMCMcol++) {
1374 xpos = (0.5 + iMCMcol) * xSize + 1.0
1375 - fCwidth[iplan]/2.;
1376 ypos = (0.5 + iMCMrow) * ySize + 1.0
1377 - fClengthRH[iplan][icham]/2. + fgkHspace/2.;
1379 if (ypos < (fClengthRH[iplan][icham]/2. - fgkHspace/2.)) {
1381 par[1] = 0.2/2.; // Thickness of the power lines
1382 par[2] = fCwidth[iplan]/2.;
1383 gMC->Gspos("UMCM",iCopy+iMCMrow*10+iMCMcol+20*nMCMrow,cTagV
1384 ,xpos,ypos,zpos,0,"ONLY");