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.7 2001/05/11 07:56:12 hristov
19 Consistent declarations needed on Alpha
21 Revision 1.6 2001/02/14 18:22:26 cblume
22 Change in the geometry of the padplane
24 Revision 1.5 2000/11/01 14:53:21 cblume
25 Merge with TRD-develop
27 Revision 1.1.4.6 2000/10/15 23:40:01 cblume
30 Revision 1.1.4.5 2000/10/06 16:49:46 cblume
33 Revision 1.1.4.4 2000/10/04 16:34:58 cblume
34 Replace include files by forward declarations
36 Revision 1.1.4.3 2000/09/22 14:43:41 cblume
37 Allow the pad/timebin-dimensions to be changed after initialization
39 Revision 1.4 2000/10/02 21:28:19 fca
40 Removal of useless dependecies via forward declarations
42 Revision 1.3 2000/06/08 18:32:58 cblume
43 Make code compliant to coding conventions
45 Revision 1.2 2000/05/08 16:17:27 cblume
48 Revision 1.1.4.2 2000/05/08 14:46:44 cblume
49 Include options SetPHOShole() and SetRICHhole()
51 Revision 1.1.4.1 2000/04/27 12:46:04 cblume
52 Corrected bug in full geometry
54 Revision 1.1 2000/02/28 19:01:15 cblume
59 ///////////////////////////////////////////////////////////////////////////////
61 // TRD geometry for the spaceframe without holes //
63 ///////////////////////////////////////////////////////////////////////////////
67 #include "AliTRDgeometryFull.h"
69 ClassImp(AliTRDgeometryFull)
71 //_____________________________________________________________________________
72 AliTRDgeometryFull::AliTRDgeometryFull():AliTRDgeometry()
75 // AliTRDgeometryFull default constructor
82 //_____________________________________________________________________________
83 AliTRDgeometryFull::~AliTRDgeometryFull()
86 // AliTRDgeometryFull destructor
91 //_____________________________________________________________________________
92 void AliTRDgeometryFull::Init()
95 // Initializes the geometry parameter
104 // The outer lengths of the chambers for the sectors with holes for the PHOS
105 Float_t lengthPH[kNplan][kNcham] = { { 123.5, 116.5, 0.0, 116.5, 123.5 }
106 , { 131.0, 124.0, 0.0, 124.0, 131.0 }
107 , { 134.5, 131.5, 0.0, 131.5, 134.5 }
108 , { 142.0, 139.0, 0.0, 139.0, 142.0 }
109 , { 142.0, 146.0, 0.0, 146.0, 142.0 }
110 , { 134.5, 153.5, 0.0, 153.5, 134.5 } };
112 // The outer lengths of the chambers for the sectors with holes for the RICH
113 Float_t lengthRH[kNplan][kNcham] = { { 86.5, 0.0, 0.0, 0.0, 86.5 }
114 , { 101.5, 0.0, 0.0, 0.0, 101.5 }
115 , { 112.5, 0.0, 0.0, 0.0, 112.5 }
116 , { 127.5, 0.0, 0.0, 0.0, 127.5 }
117 , { 134.5, 0.0, 0.0, 0.0, 134.5 }
118 , { 134.5, 0.0, 0.0, 0.0, 134.5 } };
120 for (icham = 0; icham < kNcham; icham++) {
121 for (iplan = 0; iplan < kNplan; iplan++) {
122 fClengthPH[iplan][icham] = lengthPH[iplan][icham];
123 fClengthRH[iplan][icham] = lengthRH[iplan][icham];
129 //_____________________________________________________________________________
130 void AliTRDgeometryFull::CreateGeometry(Int_t *idtmed)
133 // Create the TRD geometry without hole
136 // Names of the TRD volumina (xx = detector number):
138 // Lower part of the readout chambers (gas volume + radiator)
140 // UAxx Aluminum frames (Al)
141 // UBxx G10 frames (C)
142 // UCxx Inner volumes (Air)
144 // Upper part of the readout chambers (readout plane + fee)
146 // UDxx G10 frames (C)
147 // UExx Inner volumes of the G10 (Air)
148 // UFxx Aluminum frames (Al)
149 // UGxx Inner volumes of the Al (Air)
151 // Inner material layers
153 // UHxx Radiator (Rohacell)
154 // UIxx Entrance window (Mylar)
155 // UJxx Drift volume (Xe/CO2)
156 // UKxx Amplification volume (Xe/CO2)
157 // ULxx Pad plane (Cu)
158 // UMxx Support structure (Rohacell)
159 // UNxx FEE + signal lines (Cu)
160 // UOxx Cooling device (Al)
161 // UPxx Cooling device (Water)
164 const Int_t kNdet = kNplan * kNcham;
166 const Int_t kNparTrd = 4;
167 const Int_t kNparCha = 3;
169 Float_t xpos, ypos, zpos;
171 Float_t parTrd[kNparTrd];
172 Float_t parCha[kNparCha];
177 AliTRDgeometry::CreateGeometry(idtmed);
179 // The TRD mother volume for one sector (Air), full length in z-direction
180 parTrd[0] = fgkSwidth1/2.;
181 parTrd[1] = fgkSwidth2/2.;
182 parTrd[2] = fgkSlenTR1/2.;
183 parTrd[3] = fgkSheight/2.;
184 gMC->Gsvolu("UTR1","TRD1",idtmed[1302-1],parTrd,kNparTrd);
186 // The TRD mother volume for one sector (Air), leaving hole for PHOS
188 gMC->Gsvolu("UTR2","TRD1",idtmed[1302-1],parTrd,kNparTrd);
191 // The TRD mother volume for one sector (Air), leaving hole for RICH
193 gMC->Gsvolu("UTR3","TRD1",idtmed[1302-1],parTrd,kNparTrd);
196 for (Int_t icham = 0; icham < kNcham; icham++) {
197 for (Int_t iplan = 0; iplan < kNplan; iplan++) {
199 Int_t iDet = GetDetectorSec(iplan,icham);
201 // The lower part of the readout chambers (gas volume + radiator)
202 // The aluminum frames
203 sprintf(cTagV,"UA%02d",iDet);
204 parCha[0] = fCwidth[iplan]/2.;
205 parCha[1] = fClength[iplan][icham]/2. - fgkHspace/2.;
206 parCha[2] = fgkCraH/2. + fgkCdrH/2.;
207 gMC->Gsvolu(cTagV,"BOX ",idtmed[1301-1],parCha,kNparCha);
209 sprintf(cTagV,"UB%02d",iDet);
210 parCha[0] = fCwidth[iplan]/2. - fgkCalT;
213 gMC->Gsvolu(cTagV,"BOX ",idtmed[1307-1],parCha,kNparCha);
214 // The inner part (air)
215 sprintf(cTagV,"UC%02d",iDet);
216 parCha[0] = fCwidth[iplan]/2. - fgkCalT - fgkCclsT;
217 parCha[1] = fClength[iplan][icham]/2. - fgkHspace/2.- fgkCclfT;
219 gMC->Gsvolu(cTagV,"BOX ",idtmed[1302-1],parCha,kNparCha);
221 if (fClengthPH[iplan][icham] > 0.0) {
222 // The aluminum frames
223 sprintf(cTagV,"UA%02d",iDet+kNdet);
224 parCha[0] = fCwidth[iplan]/2.;
225 parCha[1] = fClengthPH[iplan][icham]/2. - fgkHspace/2.;
226 parCha[2] = fgkCraH/2. + fgkCdrH/2.;
227 gMC->Gsvolu(cTagV,"BOX ",idtmed[1301-1],parCha,kNparCha);
229 sprintf(cTagV,"UB%02d",iDet+kNdet);
230 parCha[0] = fCwidth[iplan]/2. - fgkCalT;
233 gMC->Gsvolu(cTagV,"BOX ",idtmed[1307-1],parCha,kNparCha);
234 // The inner part (air)
235 sprintf(cTagV,"UC%02d",iDet+kNdet);
236 parCha[0] = fCwidth[iplan]/2. - fgkCalT - fgkCclsT;
237 parCha[1] = fClengthPH[iplan][icham]/2. - fgkHspace/2.- fgkCclfT;
239 gMC->Gsvolu(cTagV,"BOX ",idtmed[1302-1],parCha,kNparCha);
243 if (fClengthRH[iplan][icham] > 0.0) {
244 // The aluminum frames
245 sprintf(cTagV,"UA%02d",iDet+2*kNdet);
246 parCha[0] = fCwidth[iplan]/2.;
247 parCha[1] = fClengthRH[iplan][icham]/2. - fgkHspace/2.;
248 parCha[2] = fgkCraH/2. + fgkCdrH/2.;
249 gMC->Gsvolu(cTagV,"BOX ",idtmed[1301-1],parCha,kNparCha);
251 sprintf(cTagV,"UB%02d",iDet+2*kNdet);
252 parCha[0] = fCwidth[iplan]/2. - fgkCalT;
255 gMC->Gsvolu(cTagV,"BOX ",idtmed[1307-1],parCha,kNparCha);
256 // The inner part (air)
257 sprintf(cTagV,"UC%02d",iDet+2*kNdet);
258 parCha[0] = fCwidth[iplan]/2. - fgkCalT - fgkCclsT;
259 parCha[1] = fClengthRH[iplan][icham]/2. - fgkHspace/2.- fgkCclfT;
261 gMC->Gsvolu(cTagV,"BOX ",idtmed[1302-1],parCha,kNparCha);
265 // The upper part of the readout chambers (readout plane + fee)
267 sprintf(cTagV,"UD%02d",iDet);
268 parCha[0] = fCwidth[iplan]/2. + fgkCroW;
269 parCha[1] = fClength[iplan][icham]/2. - fgkHspace/2.;
270 parCha[2] = fgkCamH/2.;
271 gMC->Gsvolu(cTagV,"BOX ",idtmed[1307-1],parCha,kNparCha);
272 // The inner part of the G10 frame (air)
273 sprintf(cTagV,"UE%02d",iDet);
274 parCha[0] = fCwidth[iplan]/2. + fgkCroW - fgkCcuT;
275 parCha[1] = fClength[iplan][icham]/2. - fgkHspace/2.- fgkCcuT;
277 gMC->Gsvolu(cTagV,"BOX ",idtmed[1302-1],parCha,kNparCha);
278 // The aluminum frames
279 sprintf(cTagV,"UF%02d",iDet);
280 parCha[0] = fCwidth[iplan]/2. + fgkCroW;
281 parCha[1] = fClength[iplan][icham]/2. - fgkHspace/2.;
282 parCha[2] = fgkCroH/2.;
283 gMC->Gsvolu(cTagV,"BOX ",idtmed[1301-1],parCha,kNparCha);
284 // The inner part of the aluminum frames
285 sprintf(cTagV,"UG%02d",iDet);
286 parCha[0] = fCwidth[iplan]/2. + fgkCroW - fgkCauT;
287 parCha[1] = fClength[iplan][icham]/2. - fgkHspace/2.- fgkCauT;
289 gMC->Gsvolu(cTagV,"BOX ",idtmed[1302-1],parCha,kNparCha);
291 if (fClengthPH[iplan][icham] > 0.0) {
292 sprintf(cTagV,"UD%02d",iDet+kNdet);
293 parCha[0] = fCwidth[iplan]/2. + fgkCroW;
294 parCha[1] = fClengthPH[iplan][icham]/2. - fgkHspace/2.;
295 parCha[2] = fgkCamH/2.;
296 gMC->Gsvolu(cTagV,"BOX ",idtmed[1307-1],parCha,kNparCha);
297 // The inner part of the G10 frame (air)
298 sprintf(cTagV,"UE%02d",iDet+kNdet);
299 parCha[0] = fCwidth[iplan]/2. + fgkCroW - fgkCcuT;
300 parCha[1] = fClengthPH[iplan][icham]/2. - fgkHspace/2.- fgkCcuT;
302 gMC->Gsvolu(cTagV,"BOX ",idtmed[1302-1],parCha,kNparCha);
303 // The aluminum frames
304 sprintf(cTagV,"UF%02d",iDet+kNdet);
305 parCha[0] = fCwidth[iplan]/2. + fgkCroW;
306 parCha[1] = fClengthPH[iplan][icham]/2. - fgkHspace/2.;
307 parCha[2] = fgkCroH/2.;
308 gMC->Gsvolu(cTagV,"BOX ",idtmed[1301-1],parCha,kNparCha);
309 // The inner part of the aluminum frames
310 sprintf(cTagV,"UG%02d",iDet+kNdet);
311 parCha[0] = fCwidth[iplan]/2. + fgkCroW - fgkCauT;
312 parCha[1] = fClengthPH[iplan][icham]/2. - fgkHspace/2.- fgkCauT;
314 gMC->Gsvolu(cTagV,"BOX ",idtmed[1302-1],parCha,kNparCha);
318 if (fClengthRH[iplan][icham] > 0.0) {
319 sprintf(cTagV,"UD%02d",iDet+2*kNdet);
320 parCha[0] = fCwidth[iplan]/2. + fgkCroW;
321 parCha[1] = fClengthRH[iplan][icham]/2. - fgkHspace/2.;
322 parCha[2] = fgkCamH/2.;
323 gMC->Gsvolu(cTagV,"BOX ",idtmed[1307-1],parCha,kNparCha);
324 // The inner part of the G10 frame (air)
325 sprintf(cTagV,"UE%02d",iDet+2*kNdet);
326 parCha[0] = fCwidth[iplan]/2. + fgkCroW - fgkCcuT;
327 parCha[1] = fClengthRH[iplan][icham]/2. - fgkHspace/2.- fgkCcuT;
329 gMC->Gsvolu(cTagV,"BOX ",idtmed[1302-1],parCha,kNparCha);
330 // The aluminum frames
331 sprintf(cTagV,"UF%02d",iDet+2*kNdet);
332 parCha[0] = fCwidth[iplan]/2. + fgkCroW;
333 parCha[1] = fClengthRH[iplan][icham]/2. - fgkHspace/2.;
334 parCha[2] = fgkCroH/2.;
335 gMC->Gsvolu(cTagV,"BOX ",idtmed[1301-1],parCha,kNparCha);
336 // The inner part of the aluminum frames
337 sprintf(cTagV,"UG%02d",iDet+2*kNdet);
338 parCha[0] = fCwidth[iplan]/2. + fgkCroW - fgkCauT;
339 parCha[1] = fClengthRH[iplan][icham]/2. - fgkHspace/2.- fgkCauT;
341 gMC->Gsvolu(cTagV,"BOX ",idtmed[1302-1],parCha,kNparCha);
345 // The material layers inside the chambers
348 // Rohacell layer (radiator)
349 parCha[2] = fgkRaThick/2;
350 sprintf(cTagV,"UH%02d",iDet);
351 gMC->Gsvolu(cTagV,"BOX ",idtmed[1315-1],parCha,kNparCha);
352 // Mylar layer (entrance window + HV cathode)
353 parCha[2] = fgkMyThick/2;
354 sprintf(cTagV,"UI%02d",iDet);
355 gMC->Gsvolu(cTagV,"BOX ",idtmed[1308-1],parCha,kNparCha);
356 // Xe/Isobutane layer (drift volume)
357 parCha[2] = fgkDrThick/2.;
358 sprintf(cTagV,"UJ%02d",iDet);
359 gMC->Gsvolu(cTagV,"BOX ",idtmed[1309-1],parCha,kNparCha);
360 // Xe/Isobutane layer (amplification volume)
361 parCha[2] = fgkAmThick/2.;
362 sprintf(cTagV,"UK%02d",iDet);
363 gMC->Gsvolu(cTagV,"BOX ",idtmed[1309-1],parCha,kNparCha);
364 // Cu layer (pad plane)
365 parCha[2] = fgkCuThick/2;
366 sprintf(cTagV,"UL%02d",iDet);
367 gMC->Gsvolu(cTagV,"BOX ",idtmed[1305-1],parCha,kNparCha);
368 // G10 layer (support structure / honeycomb)
369 parCha[2] = fgkSuThick/2;
370 sprintf(cTagV,"UM%02d",iDet);
371 gMC->Gsvolu(cTagV,"BOX ",idtmed[1313-1],parCha,kNparCha);
372 // Cu layer (FEE + signal lines)
373 parCha[2] = fgkFeThick/2;
374 sprintf(cTagV,"UN%02d",iDet);
375 gMC->Gsvolu(cTagV,"BOX ",idtmed[1305-1],parCha,kNparCha);
376 // Al layer (cooling devices)
377 parCha[2] = fgkCoThick/2;
378 sprintf(cTagV,"UO%02d",iDet);
379 gMC->Gsvolu(cTagV,"BOX ",idtmed[1301-1],parCha,kNparCha);
380 // Water layer (cooling)
381 parCha[2] = fgkWaThick/2;
382 sprintf(cTagV,"UP%02d",iDet);
383 gMC->Gsvolu(cTagV,"BOX ",idtmed[1314-1],parCha,kNparCha);
385 if (fClengthPH[iplan][icham] > 0.0) {
386 // Rohacell layer (radiator)
387 parCha[2] = fgkRaThick/2;
388 sprintf(cTagV,"UH%02d",iDet+kNdet);
389 gMC->Gsvolu(cTagV,"BOX ",idtmed[1315-1],parCha,kNparCha);
390 // Mylar layer (entrance window + HV cathode)
391 parCha[2] = fgkMyThick/2;
392 sprintf(cTagV,"UI%02d",iDet+kNdet);
393 gMC->Gsvolu(cTagV,"BOX ",idtmed[1308-1],parCha,kNparCha);
394 // Xe/Isobutane layer (drift volume)
395 parCha[2] = fgkDrThick/2.;
396 sprintf(cTagV,"UJ%02d",iDet+kNdet);
397 gMC->Gsvolu(cTagV,"BOX ",idtmed[1309-1],parCha,kNparCha);
398 // Xe/Isobutane layer (amplification volume)
399 parCha[2] = fgkAmThick/2.;
400 sprintf(cTagV,"UK%02d",iDet+kNdet);
401 gMC->Gsvolu(cTagV,"BOX ",idtmed[1309-1],parCha,kNparCha);
402 // Cu layer (pad plane)
403 parCha[2] = fgkCuThick/2;
404 sprintf(cTagV,"UL%02d",iDet+kNdet);
405 gMC->Gsvolu(cTagV,"BOX ",idtmed[1305-1],parCha,kNparCha);
406 // G10 layer (support structure / honeycomb)
407 parCha[2] = fgkSuThick/2;
408 sprintf(cTagV,"UM%02d",iDet+kNdet);
409 gMC->Gsvolu(cTagV,"BOX ",idtmed[1313-1],parCha,kNparCha);
410 // Cu layer (FEE + signal lines)
411 parCha[2] = fgkFeThick/2;
412 sprintf(cTagV,"UN%02d",iDet+kNdet);
413 gMC->Gsvolu(cTagV,"BOX ",idtmed[1305-1],parCha,kNparCha);
414 // Al layer (cooling devices)
415 parCha[2] = fgkCoThick/2;
416 sprintf(cTagV,"UO%02d",iDet+kNdet);
417 gMC->Gsvolu(cTagV,"BOX ",idtmed[1301-1],parCha,kNparCha);
418 // Water layer (cooling)
419 parCha[2] = fgkWaThick/2;
420 sprintf(cTagV,"UP%02d",iDet+kNdet);
421 gMC->Gsvolu(cTagV,"BOX ",idtmed[1314-1],parCha,kNparCha);
425 if (fClengthRH[iplan][icham] > 0.0) {
426 // Rohacell layer (radiator)
427 parCha[2] = fgkRaThick/2;
428 sprintf(cTagV,"UH%02d",iDet+2*kNdet);
429 gMC->Gsvolu(cTagV,"BOX ",idtmed[1315-1],parCha,kNparCha);
430 // Mylar layer (entrance window + HV cathode)
431 parCha[2] = fgkMyThick/2;
432 sprintf(cTagV,"UI%02d",iDet+2*kNdet);
433 gMC->Gsvolu(cTagV,"BOX ",idtmed[1308-1],parCha,kNparCha);
434 // Xe/Isobutane layer (drift volume)
435 parCha[2] = fgkDrThick/2.;
436 sprintf(cTagV,"UJ%02d",iDet+2*kNdet);
437 gMC->Gsvolu(cTagV,"BOX ",idtmed[1309-1],parCha,kNparCha);
438 // Xe/Isobutane layer (amplification volume)
439 parCha[2] = fgkAmThick/2.;
440 sprintf(cTagV,"UK%02d",iDet+2*kNdet);
441 gMC->Gsvolu(cTagV,"BOX ",idtmed[1309-1],parCha,kNparCha);
442 // Cu layer (pad plane)
443 parCha[2] = fgkCuThick/2;
444 sprintf(cTagV,"UL%02d",iDet+2*kNdet);
445 gMC->Gsvolu(cTagV,"BOX ",idtmed[1305-1],parCha,kNparCha);
446 // G10 layer (support structure / honeycomb)
447 parCha[2] = fgkSuThick/2;
448 sprintf(cTagV,"UM%02d",iDet+2*kNdet);
449 gMC->Gsvolu(cTagV,"BOX ",idtmed[1313-1],parCha,kNparCha);
450 // Cu layer (FEE + signal lines)
451 parCha[2] = fgkFeThick/2;
452 sprintf(cTagV,"UN%02d",iDet+2*kNdet);
453 gMC->Gsvolu(cTagV,"BOX ",idtmed[1305-1],parCha,kNparCha);
454 // Al layer (cooling devices)
455 parCha[2] = fgkCoThick/2;
456 sprintf(cTagV,"UO%02d",iDet+2*kNdet);
457 gMC->Gsvolu(cTagV,"BOX ",idtmed[1301-1],parCha,kNparCha);
458 // Water layer (cooling)
459 parCha[2] = fgkWaThick/2;
460 sprintf(cTagV,"UP%02d",iDet+2*kNdet);
461 gMC->Gsvolu(cTagV,"BOX ",idtmed[1314-1],parCha,kNparCha);
465 // Position the layers in the chambers
469 // Rohacell layer (radiator)
471 sprintf(cTagV,"UH%02d",iDet);
472 sprintf(cTagM,"UC%02d",iDet);
473 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
474 // Mylar layer (entrance window + HV cathode)
476 sprintf(cTagV,"UI%02d",iDet);
477 sprintf(cTagM,"UC%02d",iDet);
478 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
479 // Xe/Isobutane layer (drift volume)
481 sprintf(cTagV,"UJ%02d",iDet);
482 sprintf(cTagM,"UC%02d",iDet);
483 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
485 // Xe/Isobutane layer (amplification volume)
487 sprintf(cTagV,"UK%02d",iDet);
488 sprintf(cTagM,"UE%02d",iDet);
489 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
491 // Cu layer (pad plane)
493 sprintf(cTagV,"UL%02d",iDet);
494 sprintf(cTagM,"UG%02d",iDet);
495 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
496 // G10 layer (support structure)
498 sprintf(cTagV,"UM%02d",iDet);
499 sprintf(cTagM,"UG%02d",iDet);
500 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
501 // Cu layer (FEE + signal lines)
503 sprintf(cTagV,"UN%02d",iDet);
504 sprintf(cTagM,"UG%02d",iDet);
505 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
506 // Al layer (cooling devices)
508 sprintf(cTagV,"UO%02d",iDet);
509 sprintf(cTagM,"UG%02d",iDet);
510 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
511 // Water layer (cooling)
513 sprintf(cTagV,"UP%02d",iDet);
514 sprintf(cTagM,"UG%02d",iDet);
515 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
517 if (fClengthPH[iplan][icham] > 0.0) {
519 // Rohacell layer (radiator)
521 sprintf(cTagV,"UH%02d",iDet+kNdet);
522 sprintf(cTagM,"UC%02d",iDet+kNdet);
523 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
524 // Mylar layer (entrance window + HV cathode)
526 sprintf(cTagV,"UI%02d",iDet+kNdet);
527 sprintf(cTagM,"UC%02d",iDet+kNdet);
528 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
529 // Xe/Isobutane layer (drift volume)
531 sprintf(cTagV,"UJ%02d",iDet+kNdet);
532 sprintf(cTagM,"UC%02d",iDet+kNdet);
533 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
535 // Xe/Isobutane layer (amplification volume)
537 sprintf(cTagV,"UK%02d",iDet+kNdet);
538 sprintf(cTagM,"UE%02d",iDet+kNdet);
539 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
541 // Cu layer (pad plane)
543 sprintf(cTagV,"UL%02d",iDet+kNdet);
544 sprintf(cTagM,"UG%02d",iDet+kNdet);
545 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
546 // G10 layer (support structure)
548 sprintf(cTagV,"UM%02d",iDet+kNdet);
549 sprintf(cTagM,"UG%02d",iDet+kNdet);
550 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
551 // Cu layer (FEE + signal lines)
553 sprintf(cTagV,"UN%02d",iDet+kNdet);
554 sprintf(cTagM,"UG%02d",iDet+kNdet);
555 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
556 // Al layer (cooling devices)
558 sprintf(cTagV,"UO%02d",iDet+kNdet);
559 sprintf(cTagM,"UG%02d",iDet+kNdet);
560 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
561 // Water layer (cooling)
563 sprintf(cTagV,"UP%02d",iDet+kNdet);
564 sprintf(cTagM,"UG%02d",iDet+kNdet);
565 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
569 if (fClengthRH[iplan][icham] > 0.0) {
571 // Rohacell layer (radiator)
573 sprintf(cTagV,"UH%02d",iDet+2*kNdet);
574 sprintf(cTagM,"UC%02d",iDet+2*kNdet);
575 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
576 // Mylar layer (entrance window + HV cathode)
578 sprintf(cTagV,"UI%02d",iDet+2*kNdet);
579 sprintf(cTagM,"UC%02d",iDet+2*kNdet);
580 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
581 // Xe/Isobutane layer (drift volume)
583 sprintf(cTagV,"UJ%02d",iDet+2*kNdet);
584 sprintf(cTagM,"UC%02d",iDet+2*kNdet);
585 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
587 // Xe/Isobutane layer (amplification volume)
589 sprintf(cTagV,"UK%02d",iDet+2*kNdet);
590 sprintf(cTagM,"UE%02d",iDet+2*kNdet);
591 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
593 // Cu layer (pad plane)
595 sprintf(cTagV,"UL%02d",iDet+2*kNdet);
596 sprintf(cTagM,"UG%02d",iDet+2*kNdet);
597 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
598 // G10 layer (support structure)
600 sprintf(cTagV,"UM%02d",iDet+2*kNdet);
601 sprintf(cTagM,"UG%02d",iDet+2*kNdet);
602 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
603 // Cu layer (FEE + signal lines)
605 sprintf(cTagV,"UN%02d",iDet+2*kNdet);
606 sprintf(cTagM,"UG%02d",iDet+2*kNdet);
607 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
608 // Al layer (cooling devices)
610 sprintf(cTagV,"UO%02d",iDet+2*kNdet);
611 sprintf(cTagM,"UG%02d",iDet+2*kNdet);
612 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
613 // Water layer (cooling)
615 sprintf(cTagV,"UP%02d",iDet+2*kNdet);
616 sprintf(cTagM,"UG%02d",iDet+2*kNdet);
617 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
621 // Position the inner volumes of the chambers in the frames
625 // The inside of the lower G10 frame
626 sprintf(cTagV,"UC%02d",iDet);
627 sprintf(cTagM,"UB%02d",iDet);
628 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
629 // The lower G10 frame inside the aluminum frame
630 sprintf(cTagV,"UB%02d",iDet);
631 sprintf(cTagM,"UA%02d",iDet);
632 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
633 // The inside of the upper G10 frame
634 sprintf(cTagV,"UE%02d",iDet);
635 sprintf(cTagM,"UD%02d",iDet);
636 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
637 // The inside of the upper aluminum frame
638 sprintf(cTagV,"UG%02d",iDet);
639 sprintf(cTagM,"UF%02d",iDet);
640 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
642 if (fClengthPH[iplan][icham] > 0.0) {
643 // The inside of the lower G10 frame
644 sprintf(cTagV,"UC%02d",iDet+kNdet);
645 sprintf(cTagM,"UB%02d",iDet+kNdet);
646 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
647 // The lower G10 frame inside the aluminum frame
648 sprintf(cTagV,"UB%02d",iDet+kNdet);
649 sprintf(cTagM,"UA%02d",iDet+kNdet);
650 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
651 // The inside of the upper G10 frame
652 sprintf(cTagV,"UE%02d",iDet+kNdet);
653 sprintf(cTagM,"UD%02d",iDet+kNdet);
654 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
655 // The inside of the upper aluminum frame
656 sprintf(cTagV,"UG%02d",iDet+kNdet);
657 sprintf(cTagM,"UF%02d",iDet+kNdet);
658 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
662 if (fClengthRH[iplan][icham] > 0.0) {
663 // The inside of the lower G10 frame
664 sprintf(cTagV,"UC%02d",iDet+2*kNdet);
665 sprintf(cTagM,"UB%02d",iDet+2*kNdet);
666 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
667 // The lower G10 frame inside the aluminum frame
668 sprintf(cTagV,"UB%02d",iDet+2*kNdet);
669 sprintf(cTagM,"UA%02d",iDet+2*kNdet);
670 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
671 // The inside of the upper G10 frame
672 sprintf(cTagV,"UE%02d",iDet+2*kNdet);
673 sprintf(cTagM,"UD%02d",iDet+2*kNdet);
674 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
675 // The inside of the upper aluminum frame
676 sprintf(cTagV,"UG%02d",iDet+2*kNdet);
677 sprintf(cTagM,"UF%02d",iDet+2*kNdet);
678 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
682 // Position the frames of the chambers in the TRD mother volume
684 ypos = - fClength[iplan][0] - fClength[iplan][1] - fClength[iplan][2]/2.;
685 for (Int_t ic = 0; ic < icham; ic++) {
686 ypos += fClength[iplan][ic];
688 ypos += fClength[iplan][icham]/2.;
689 zpos = fgkCraH/2. + fgkCdrH/2. - fgkSheight/2. + iplan * (fgkCH + fgkVspace);
690 // The lower aluminum frame, radiator + drift region
691 sprintf(cTagV,"UA%02d",iDet);
692 gMC->Gspos(cTagV,1,"UTR1",xpos,ypos,zpos,0,"ONLY");
693 // The upper G10 frame, amplification region
694 sprintf(cTagV,"UD%02d",iDet);
695 zpos += fgkCamH/2. + fgkCraH/2. + fgkCdrH/2.;
696 gMC->Gspos(cTagV,1,"UTR1",xpos,ypos,zpos,0,"ONLY");
697 // The upper aluminum frame
698 sprintf(cTagV,"UF%02d",iDet);
699 zpos += fgkCroH/2. + fgkCamH/2.;
700 gMC->Gspos(cTagV,1,"UTR1",xpos,ypos,zpos,0,"ONLY");
702 if (fClengthPH[iplan][icham] > 0.0) {
704 ypos = - fClength[iplan][0] - fClength[iplan][1] - fClength[iplan][2]/2.;
705 for (Int_t ic = 0; ic < icham; ic++) {
706 ypos += fClength[iplan][ic];
709 ypos += fClength[iplan][icham];
710 ypos -= fClengthPH[iplan][icham]/2.;
713 ypos += fClengthPH[iplan][icham]/2.;
715 zpos = fgkCraH/2. + fgkCdrH/2. - fgkSheight/2. + iplan * (fgkCH + fgkVspace);
716 // The lower aluminum frame, radiator + drift region
717 sprintf(cTagV,"UA%02d",iDet+kNdet);
718 gMC->Gspos(cTagV,1,"UTR2",xpos,ypos,zpos,0,"ONLY");
719 // The upper G10 frame, amplification region
720 sprintf(cTagV,"UD%02d",iDet+kNdet);
721 zpos += fgkCamH/2. + fgkCraH/2. + fgkCdrH/2.;
722 gMC->Gspos(cTagV,1,"UTR2",xpos,ypos,zpos,0,"ONLY");
723 // The upper aluminum frame
724 sprintf(cTagV,"UF%02d",iDet+kNdet);
725 zpos += fgkCroH/2. + fgkCamH/2.;
726 gMC->Gspos(cTagV,1,"UTR2",xpos,ypos,zpos,0,"ONLY");
730 if (fClengthRH[iplan][icham] > 0.0) {
732 ypos = - fClength[iplan][0] - fClength[iplan][1] - fClength[iplan][2]/2.;
733 for (Int_t ic = 0; ic < icham; ic++) {
734 ypos += fClength[iplan][ic];
737 ypos += fClength[iplan][icham];
738 ypos -= fClengthRH[iplan][icham]/2.;
741 ypos += fClengthRH[iplan][icham]/2.;
743 zpos = fgkCraH/2. + fgkCdrH/2. - fgkSheight/2. + iplan * (fgkCH + fgkVspace);
744 // The lower aluminum frame, radiator + drift region
745 sprintf(cTagV,"UA%02d",iDet+2*kNdet);
746 gMC->Gspos(cTagV,1,"UTR3",xpos,ypos,zpos,0,"ONLY");
747 // The upper G10 frame, amplification region
748 sprintf(cTagV,"UD%02d",iDet+2*kNdet);
749 zpos += fgkCamH/2. + fgkCraH/2. + fgkCdrH/2.;
750 gMC->Gspos(cTagV,1,"UTR3",xpos,ypos,zpos,0,"ONLY");
751 // The upper aluminum frame
752 sprintf(cTagV,"UF%02d",iDet+2*kNdet);
753 zpos += fgkCroH/2. + fgkCamH/2.;
754 gMC->Gspos(cTagV,1,"UTR3",xpos,ypos,zpos,0,"ONLY");
764 gMC->Gspos("UTR1",1,"BTR1",xpos,ypos,zpos,0,"ONLY");
766 gMC->Gspos("UTR2",2,"BTR2",xpos,ypos,zpos,0,"ONLY");
769 gMC->Gspos("UTR1",2,"BTR2",xpos,ypos,zpos,0,"ONLY");
772 gMC->Gspos("UTR3",3,"BTR3",xpos,ypos,zpos,0,"ONLY");
775 gMC->Gspos("UTR1",3,"BTR3",xpos,ypos,zpos,0,"ONLY");