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.6 2001/05/11 07:56:12 hristov
19 Consistent declarations needed on Alpha
21 Revision 1.5 2001/02/14 18:22:26 cblume
22 Change in the geometry of the padplane
24 Revision 1.4 2000/11/01 14:53:21 cblume
25 Merge with TRD-develop
27 Revision 1.1.4.4 2000/10/15 23:40:01 cblume
30 Revision 1.1.4.3 2000/10/06 16:49:46 cblume
33 Revision 1.1.4.2 2000/10/04 16:34:58 cblume
34 Replace include files by forward declarations
36 Revision 1.1.4.1 2000/09/22 14:43:41 cblume
37 Allow the pad/timebin-dimensions to be changed after initialization
39 Revision 1.3 2000/10/02 21:28:19 fca
40 Removal of useless dependecies via forward declarations
42 Revision 1.2 2000/06/08 18:32:58 cblume
43 Make code compliant to coding conventions
45 Revision 1.1 2000/02/28 19:01:42 cblume
50 ///////////////////////////////////////////////////////////////////////////////
52 // TRD geometry with holes //
54 ///////////////////////////////////////////////////////////////////////////////
58 #include "AliTRDgeometryHole.h"
60 ClassImp(AliTRDgeometryHole)
62 //_____________________________________________________________________________
63 AliTRDgeometryHole::AliTRDgeometryHole():AliTRDgeometry()
66 // AliTRDgeometryHole default constructor
73 //_____________________________________________________________________________
74 AliTRDgeometryHole::~AliTRDgeometryHole()
77 // AliTRDgeometryHole destructor
82 //_____________________________________________________________________________
83 void AliTRDgeometryHole::Init()
86 // Initializes the geometry parameter
92 // The outer lengths of the chambers for the sectors with holes for the PHOS
93 Float_t lengthPH[kNplan][kNcham] = { { 0.0, 0.0, 0.0, 116.5, 123.5 }
94 , { 0.0, 0.0, 0.0, 124.0, 131.0 }
95 , { 0.0, 0.0, 0.0, 131.5, 134.5 }
96 , { 0.0, 0.0, 0.0, 139.0, 142.0 }
97 , { 0.0, 0.0, 0.0, 146.0, 142.0 }
98 , { 0.0, 0.0, 0.0, 153.5, 134.5 } };
100 // The outer lengths of the chambers for the sectors with holes for the RICH
101 Float_t lengthRH[kNplan][kNcham] = { { 0.0, 0.0, 0.0, 0.0, 86.5 }
102 , { 0.0, 0.0, 0.0, 0.0, 101.5 }
103 , { 0.0, 0.0, 0.0, 0.0, 112.5 }
104 , { 0.0, 0.0, 0.0, 0.0, 127.5 }
105 , { 0.0, 0.0, 0.0, 0.0, 134.5 }
106 , { 0.0, 0.0, 0.0, 0.0, 134.5 } };
108 for (icham = 0; icham < kNcham; icham++) {
109 for (iplan = 0; iplan < kNplan; iplan++) {
110 fClengthPH[iplan][icham] = lengthPH[iplan][icham];
111 fClengthRH[iplan][icham] = lengthRH[iplan][icham];
117 //_____________________________________________________________________________
118 void AliTRDgeometryHole::CreateGeometry(Int_t *idtmed)
121 // Create the TRD geometry with holes
123 // Names of the TRD volumina (xx = detector number):
125 // Lower part of the readout chambers (gas volume + radiator)
127 // UAxx Aluminum frames (Al)
128 // UBxx G10 frames (C)
129 // UCxx Inner volumes (Air)
131 // Upper part of the readout chambers (readout plane + fee)
133 // UDxx G10 frames (C)
134 // UExx Inner volumes of the G10 (Air)
135 // UFxx Aluminum frames (Al)
136 // UGxx Inner volumes of the Al (Air)
138 // Inner material layers
140 // UHxx Radiator (Rohacell)
141 // UIxx Entrance window (Mylar)
142 // UJxx Drift volume (Xe/CO2)
143 // UKxx Amplification volume (Xe/CO2)
144 // ULxx Pad plane (Cu)
145 // UMxx Support structure (Rohacell)
146 // UNxx FEE + signal lines (Cu)
147 // UOxx Cooling device (Al)
148 // UPxx Cooling device (Water)
151 const Int_t kNdet = kNplan * kNcham;
153 const Int_t kNparTrd = 4;
154 const Int_t kNparCha = 3;
156 Float_t xpos, ypos, zpos;
158 Float_t parTrd[kNparTrd];
159 Float_t parCha[kNparCha];
164 AliTRDgeometry::CreateGeometry(idtmed);
166 // The TRD mother volume for one sector (Air), full length in z-direction
167 parTrd[0] = fgkSwidth1/2.;
168 parTrd[1] = fgkSwidth2/2.;
169 parTrd[2] = fgkSlenTR1/2.;
170 parTrd[3] = fgkSheight/2.;
171 gMC->Gsvolu("UTR1","TRD1",idtmed[1302-1],parTrd,kNparTrd);
173 // The TRD mother volume for one sector (Air), leaving hole for PHOS
174 parTrd[0] = fgkSwidth1/2.;
175 parTrd[1] = fgkSwidth2/2.;
176 parTrd[2] = fgkSlenTR2/2.;
177 parTrd[3] = fgkSheight/2.;
178 gMC->Gsvolu("UTR2","TRD1",idtmed[1302-1],parTrd,kNparTrd);
180 // The TRD mother volume for one sector (Air), leaving hole for RICH
181 parTrd[0] = fgkSwidth1/2.;
182 parTrd[1] = fgkSwidth2/2.;
183 parTrd[2] = fgkSlenTR3/2.;
184 parTrd[3] = fgkSheight/2.;
185 gMC->Gsvolu("UTR3","TRD1",idtmed[1302-1],parTrd,kNparTrd);
187 for (Int_t icham = 0; icham < kNcham; icham++) {
188 for (Int_t iplan = 0; iplan < kNplan; iplan++) {
190 Int_t iDet = GetDetectorSec(iplan,icham);
192 // The lower part of the readout chambers (gas volume + radiator)
193 // The aluminum frames
194 sprintf(cTagV,"UA%02d",iDet);
195 parCha[0] = fCwidth[iplan]/2.;
196 parCha[1] = fClength[iplan][icham]/2. - fgkHspace/2.;
197 parCha[2] = fgkCraH/2. + fgkCdrH/2.;
198 gMC->Gsvolu(cTagV,"BOX ",idtmed[1301-1],parCha,kNparCha);
200 sprintf(cTagV,"UB%02d",iDet);
201 parCha[0] = fCwidth[iplan]/2. - fgkCalT;
204 gMC->Gsvolu(cTagV,"BOX ",idtmed[1307-1],parCha,kNparCha);
205 // The inner part (air)
206 sprintf(cTagV,"UC%02d",iDet);
207 parCha[0] = fCwidth[iplan]/2. - fgkCalT - fgkCclsT;
208 parCha[1] = fClength[iplan][icham]/2. - fgkHspace/2.- fgkCclfT;
210 gMC->Gsvolu(cTagV,"BOX ",idtmed[1302-1],parCha,kNparCha);
211 if (fClengthPH[iplan][icham] > 0.0) {
212 // The aluminum frames
213 sprintf(cTagV,"UA%02d",iDet+kNdet);
214 parCha[0] = fCwidth[iplan]/2.;
215 parCha[1] = fClengthPH[iplan][icham]/2. - fgkHspace/2.;
216 parCha[2] = fgkCraH/2. + fgkCdrH/2.;
217 gMC->Gsvolu(cTagV,"BOX ",idtmed[1301-1],parCha,kNparCha);
219 sprintf(cTagV,"UB%02d",iDet+kNdet);
220 parCha[0] = fCwidth[iplan]/2. - fgkCalT;
223 gMC->Gsvolu(cTagV,"BOX ",idtmed[1307-1],parCha,kNparCha);
224 // The inner part (air)
225 sprintf(cTagV,"UC%02d",iDet+kNdet);
226 parCha[0] = fCwidth[iplan]/2. - fgkCalT - fgkCclsT;
227 parCha[1] = fClengthPH[iplan][icham]/2. - fgkHspace/2.- fgkCclfT;
229 gMC->Gsvolu(cTagV,"BOX ",idtmed[1302-1],parCha,kNparCha);
231 if (fClengthRH[iplan][icham] > 0.0) {
232 // The aluminum frames
233 sprintf(cTagV,"UA%02d",iDet+2*kNdet);
234 parCha[0] = fCwidth[iplan]/2.;
235 parCha[1] = fClengthRH[iplan][icham]/2. - fgkHspace/2.;
236 parCha[2] = fgkCraH/2. + fgkCdrH/2.;
237 gMC->Gsvolu(cTagV,"BOX ",idtmed[1301-1],parCha,kNparCha);
239 sprintf(cTagV,"UB%02d",iDet+2*kNdet);
240 parCha[0] = fCwidth[iplan]/2. - fgkCalT;
243 gMC->Gsvolu(cTagV,"BOX ",idtmed[1307-1],parCha,kNparCha);
244 // The inner part (air)
245 sprintf(cTagV,"UC%02d",iDet+2*kNdet);
246 parCha[0] = fCwidth[iplan]/2. - fgkCalT - fgkCclsT;
247 parCha[1] = fClengthRH[iplan][icham]/2. - fgkHspace/2.- fgkCclfT;
249 gMC->Gsvolu(cTagV,"BOX ",idtmed[1302-1],parCha,kNparCha);
252 // The upper part of the readout chambers (readout plane + fee)
254 sprintf(cTagV,"UD%02d",iDet);
255 parCha[0] = fCwidth[iplan]/2. + fgkCroW;
256 parCha[1] = fClength[iplan][icham]/2. - fgkHspace/2.;
257 parCha[2] = fgkCamH/2.;
258 gMC->Gsvolu(cTagV,"BOX ",idtmed[1307-1],parCha,kNparCha);
259 // The inner part of the G10 frame (air)
260 sprintf(cTagV,"UE%02d",iDet);
261 parCha[0] = fCwidth[iplan]/2. + fgkCroW - fgkCcuT;
262 parCha[1] = fClength[iplan][icham]/2. - fgkHspace/2.- fgkCcuT;
264 gMC->Gsvolu(cTagV,"BOX ",idtmed[1302-1],parCha,kNparCha);
265 // The aluminum frames
266 sprintf(cTagV,"UF%02d",iDet);
267 parCha[0] = fCwidth[iplan]/2. + fgkCroW;
268 parCha[1] = fClength[iplan][icham]/2. - fgkHspace/2.;
269 parCha[2] = fgkCroH/2.;
270 gMC->Gsvolu(cTagV,"BOX ",idtmed[1301-1],parCha,kNparCha);
271 // The inner part of the aluminum frames
272 sprintf(cTagV,"UG%02d",iDet);
273 parCha[0] = fCwidth[iplan]/2. + fgkCroW - fgkCauT;
274 parCha[1] = fClength[iplan][icham]/2. - fgkHspace/2.- fgkCauT;
276 gMC->Gsvolu(cTagV,"BOX ",idtmed[1302-1],parCha,kNparCha);
277 if (fClengthPH[iplan][icham] > 0.0) {
278 sprintf(cTagV,"UD%02d",iDet+kNdet);
279 parCha[0] = fCwidth[iplan]/2. + fgkCroW;
280 parCha[1] = fClengthPH[iplan][icham]/2. - fgkHspace/2.;
281 parCha[2] = fgkCamH/2.;
282 gMC->Gsvolu(cTagV,"BOX ",idtmed[1307-1],parCha,kNparCha);
283 // The inner part of the G10 frame (air)
284 sprintf(cTagV,"UE%02d",iDet+kNdet);
285 parCha[0] = fCwidth[iplan]/2. + fgkCroW - fgkCcuT;
286 parCha[1] = fClengthPH[iplan][icham]/2. - fgkHspace/2.- fgkCcuT;
288 gMC->Gsvolu(cTagV,"BOX ",idtmed[1302-1],parCha,kNparCha);
289 // The aluminum frames
290 sprintf(cTagV,"UF%02d",iDet+kNdet);
291 parCha[0] = fCwidth[iplan]/2. + fgkCroW;
292 parCha[1] = fClengthPH[iplan][icham]/2. - fgkHspace/2.;
293 parCha[2] = fgkCroH/2.;
294 gMC->Gsvolu(cTagV,"BOX ",idtmed[1301-1],parCha,kNparCha);
295 // The inner part of the aluminum frames
296 sprintf(cTagV,"UG%02d",iDet+kNdet);
297 parCha[0] = fCwidth[iplan]/2. + fgkCroW - fgkCauT;
298 parCha[1] = fClengthPH[iplan][icham]/2. - fgkHspace/2.- fgkCauT;
300 gMC->Gsvolu(cTagV,"BOX ",idtmed[1302-1],parCha,kNparCha);
302 if (fClengthRH[iplan][icham] > 0.0) {
303 sprintf(cTagV,"UD%02d",iDet+2*kNdet);
304 parCha[0] = fCwidth[iplan]/2. + fgkCroW;
305 parCha[1] = fClengthRH[iplan][icham]/2. - fgkHspace/2.;
306 parCha[2] = fgkCamH/2.;
307 gMC->Gsvolu(cTagV,"BOX ",idtmed[1307-1],parCha,kNparCha);
308 // The inner part of the G10 frame (air)
309 sprintf(cTagV,"UE%02d",iDet+2*kNdet);
310 parCha[0] = fCwidth[iplan]/2. + fgkCroW - fgkCcuT;
311 parCha[1] = fClengthRH[iplan][icham]/2. - fgkHspace/2.- fgkCcuT;
313 gMC->Gsvolu(cTagV,"BOX ",idtmed[1302-1],parCha,kNparCha);
314 // The aluminum frames
315 sprintf(cTagV,"UF%02d",iDet+2*kNdet);
316 parCha[0] = fCwidth[iplan]/2. + fgkCroW;
317 parCha[1] = fClengthRH[iplan][icham]/2. - fgkHspace/2.;
318 parCha[2] = fgkCroH/2.;
319 gMC->Gsvolu(cTagV,"BOX ",idtmed[1301-1],parCha,kNparCha);
320 // The inner part of the aluminum frames
321 sprintf(cTagV,"UG%02d",iDet+2*kNdet);
322 parCha[0] = fCwidth[iplan]/2. + fgkCroW - fgkCauT;
323 parCha[1] = fClengthRH[iplan][icham]/2. - fgkHspace/2.- fgkCauT;
325 gMC->Gsvolu(cTagV,"BOX ",idtmed[1302-1],parCha,kNparCha);
328 // The material layers inside the chambers
331 // Rohacell layer (radiator)
332 parCha[2] = fgkRaThick/2;
333 sprintf(cTagV,"UH%02d",iDet);
334 gMC->Gsvolu(cTagV,"BOX ",idtmed[1315-1],parCha,kNparCha);
335 // Mylar layer (entrance window + HV cathode)
336 parCha[2] = fgkMyThick/2;
337 sprintf(cTagV,"UI%02d",iDet);
338 gMC->Gsvolu(cTagV,"BOX ",idtmed[1308-1],parCha,kNparCha);
339 // Xe/Isobutane layer (drift volume)
340 parCha[2] = fgkDrThick/2.;
341 sprintf(cTagV,"UJ%02d",iDet);
342 gMC->Gsvolu(cTagV,"BOX ",idtmed[1309-1],parCha,kNparCha);
343 // Xe/Isobutane layer (amplification volume)
344 parCha[2] = fgkAmThick/2.;
345 sprintf(cTagV,"UK%02d",iDet);
346 gMC->Gsvolu(cTagV,"BOX ",idtmed[1309-1],parCha,kNparCha);
347 // Cu layer (pad plane)
348 parCha[2] = fgkCuThick/2;
349 sprintf(cTagV,"UL%02d",iDet);
350 gMC->Gsvolu(cTagV,"BOX ",idtmed[1305-1],parCha,kNparCha);
351 // G10 layer (support structure / honeycomb)
352 parCha[2] = fgkSuThick/2;
353 sprintf(cTagV,"UM%02d",iDet);
354 gMC->Gsvolu(cTagV,"BOX ",idtmed[1313-1],parCha,kNparCha);
355 // Cu layer (FEE + signal lines)
356 parCha[2] = fgkFeThick/2;
357 sprintf(cTagV,"UN%02d",iDet);
358 gMC->Gsvolu(cTagV,"BOX ",idtmed[1305-1],parCha,kNparCha);
359 // Al layer (cooling devices)
360 parCha[2] = fgkCoThick/2;
361 sprintf(cTagV,"UO%02d",iDet);
362 gMC->Gsvolu(cTagV,"BOX ",idtmed[1301-1],parCha,kNparCha);
363 // Water layer (cooling)
364 parCha[2] = fgkWaThick/2;
365 sprintf(cTagV,"UP%02d",iDet);
366 gMC->Gsvolu(cTagV,"BOX ",idtmed[1314-1],parCha,kNparCha);
367 if (fClengthPH[iplan][icham] > 0.0) {
368 // Rohacell layer (radiator)
369 parCha[2] = fgkRaThick/2;
370 sprintf(cTagV,"UH%02d",iDet+kNdet);
371 gMC->Gsvolu(cTagV,"BOX ",idtmed[1315-1],parCha,kNparCha);
372 // Mylar layer (entrance window + HV cathode)
373 parCha[2] = fgkMyThick/2;
374 sprintf(cTagV,"UI%02d",iDet+kNdet);
375 gMC->Gsvolu(cTagV,"BOX ",idtmed[1308-1],parCha,kNparCha);
376 // Xe/Isobutane layer (drift volume)
377 parCha[2] = fgkDrThick/2.;
378 sprintf(cTagV,"UJ%02d",iDet+kNdet);
379 gMC->Gsvolu(cTagV,"BOX ",idtmed[1309-1],parCha,kNparCha);
380 // Xe/Isobutane layer (amplification volume)
381 parCha[2] = fgkAmThick/2.;
382 sprintf(cTagV,"UK%02d",iDet+kNdet);
383 gMC->Gsvolu(cTagV,"BOX ",idtmed[1309-1],parCha,kNparCha);
384 // Cu layer (pad plane)
385 parCha[2] = fgkCuThick/2;
386 sprintf(cTagV,"UL%02d",iDet+kNdet);
387 gMC->Gsvolu(cTagV,"BOX ",idtmed[1305-1],parCha,kNparCha);
388 // G10 layer (support structure / honeycomb)
389 parCha[2] = fgkSuThick/2;
390 sprintf(cTagV,"UM%02d",iDet+kNdet);
391 gMC->Gsvolu(cTagV,"BOX ",idtmed[1313-1],parCha,kNparCha);
392 // Cu layer (FEE + signal lines)
393 parCha[2] = fgkFeThick/2;
394 sprintf(cTagV,"UN%02d",iDet+kNdet);
395 gMC->Gsvolu(cTagV,"BOX ",idtmed[1305-1],parCha,kNparCha);
396 // Al layer (cooling devices)
397 parCha[2] = fgkCoThick/2;
398 sprintf(cTagV,"UO%02d",iDet+kNdet);
399 gMC->Gsvolu(cTagV,"BOX ",idtmed[1301-1],parCha,kNparCha);
400 // Water layer (cooling)
401 parCha[2] = fgkWaThick/2;
402 sprintf(cTagV,"UP%02d",iDet+kNdet);
403 gMC->Gsvolu(cTagV,"BOX ",idtmed[1314-1],parCha,kNparCha);
405 if (fClengthRH[iplan][icham] > 0.0) {
406 // Rohacell layer (radiator)
407 parCha[2] = fgkRaThick/2;
408 sprintf(cTagV,"UH%02d",iDet+2*kNdet);
409 gMC->Gsvolu(cTagV,"BOX ",idtmed[1315-1],parCha,kNparCha);
410 // Mylar layer (entrance window + HV cathode)
411 parCha[2] = fgkMyThick/2;
412 sprintf(cTagV,"UI%02d",iDet+2*kNdet);
413 gMC->Gsvolu(cTagV,"BOX ",idtmed[1308-1],parCha,kNparCha);
414 // Xe/Isobutane layer (drift volume)
415 parCha[2] = fgkDrThick/2.;
416 sprintf(cTagV,"UJ%02d",iDet+2*kNdet);
417 gMC->Gsvolu(cTagV,"BOX ",idtmed[1309-1],parCha,kNparCha);
418 // Xe/Isobutane layer (amplification volume)
419 parCha[2] = fgkAmThick/2.;
420 sprintf(cTagV,"UK%02d",iDet+2*kNdet);
421 gMC->Gsvolu(cTagV,"BOX ",idtmed[1309-1],parCha,kNparCha);
422 // Cu layer (pad plane)
423 parCha[2] = fgkCuThick/2;
424 sprintf(cTagV,"UL%02d",iDet+2*kNdet);
425 gMC->Gsvolu(cTagV,"BOX ",idtmed[1305-1],parCha,kNparCha);
426 // G10 layer (support structure / honeycomb)
427 parCha[2] = fgkSuThick/2;
428 sprintf(cTagV,"UM%02d",iDet+2*kNdet);
429 gMC->Gsvolu(cTagV,"BOX ",idtmed[1313-1],parCha,kNparCha);
430 // Cu layer (FEE + signal lines)
431 parCha[2] = fgkFeThick/2;
432 sprintf(cTagV,"UN%02d",iDet+2*kNdet);
433 gMC->Gsvolu(cTagV,"BOX ",idtmed[1305-1],parCha,kNparCha);
434 // Al layer (cooling devices)
435 parCha[2] = fgkCoThick/2.;
436 sprintf(cTagV,"UO%02d",iDet+2*kNdet);
437 gMC->Gsvolu(cTagV,"BOX ",idtmed[1301-1],parCha,kNparCha);
438 // Water layer (cooling)
439 parCha[2] = fgkWaThick/2;
440 sprintf(cTagV,"UP%02d",iDet+2*kNdet);
441 gMC->Gsvolu(cTagV,"BOX ",idtmed[1314-1],parCha,kNparCha);
444 // Position the layers in the chambers
448 // Rohacell layer (radiator)
450 sprintf(cTagV,"UH%02d",iDet);
451 sprintf(cTagM,"UC%02d",iDet);
452 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
453 // Mylar layer (entrance window + HV cathode)
455 sprintf(cTagV,"UI%02d",iDet);
456 sprintf(cTagM,"UC%02d",iDet);
457 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
458 // Xe/Isobutane layer (drift volume)
460 sprintf(cTagV,"UJ%02d",iDet);
461 sprintf(cTagM,"UC%02d",iDet);
462 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
464 // Xe/Isobutane layer (amplification volume)
466 sprintf(cTagV,"UK%02d",iDet);
467 sprintf(cTagM,"UE%02d",iDet);
468 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
470 // Cu layer (pad plane)
472 sprintf(cTagV,"UL%02d",iDet);
473 sprintf(cTagM,"UG%02d",iDet);
474 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
475 // G10 layer (support structure)
477 sprintf(cTagV,"UM%02d",iDet);
478 sprintf(cTagM,"UG%02d",iDet);
479 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
480 // Cu layer (FEE + signal lines)
482 sprintf(cTagV,"UN%02d",iDet);
483 sprintf(cTagM,"UG%02d",iDet);
484 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
485 // Al layer (cooling devices)
487 sprintf(cTagV,"UO%02d",iDet);
488 sprintf(cTagM,"UG%02d",iDet);
489 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
490 // Water layer (cooling)
492 sprintf(cTagV,"UP%02d",iDet);
493 sprintf(cTagM,"UG%02d",iDet);
494 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
495 if (fClengthPH[iplan][icham] > 0.0) {
497 // Rohacell layer (radiator)
499 sprintf(cTagV,"UH%02d",iDet+kNdet);
500 sprintf(cTagM,"UC%02d",iDet+kNdet);
501 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
502 // Mylar layer (entrance window + HV cathode)
504 sprintf(cTagV,"UI%02d",iDet+kNdet);
505 sprintf(cTagM,"UC%02d",iDet+kNdet);
506 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
507 // Xe/Isobutane layer (drift volume)
509 sprintf(cTagV,"UJ%02d",iDet+kNdet);
510 sprintf(cTagM,"UC%02d",iDet+kNdet);
511 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
513 // Xe/Isobutane layer (amplification volume)
515 sprintf(cTagV,"UK%02d",iDet+kNdet);
516 sprintf(cTagM,"UE%02d",iDet+kNdet);
517 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
519 // Cu layer (pad plane)
521 sprintf(cTagV,"UL%02d",iDet+kNdet);
522 sprintf(cTagM,"UG%02d",iDet+kNdet);
523 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
524 // G10 layer (support structure)
526 sprintf(cTagV,"UM%02d",iDet+kNdet);
527 sprintf(cTagM,"UG%02d",iDet+kNdet);
528 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
529 // Cu layer (FEE + signal lines)
531 sprintf(cTagV,"UN%02d",iDet+kNdet);
532 sprintf(cTagM,"UG%02d",iDet+kNdet);
533 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
534 // Al layer (cooling devices)
536 sprintf(cTagV,"UO%02d",iDet+kNdet);
537 sprintf(cTagM,"UG%02d",iDet+kNdet);
538 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
539 // Water layer (cooling)
541 sprintf(cTagV,"UP%02d",iDet+kNdet);
542 sprintf(cTagM,"UG%02d",iDet+kNdet);
543 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
545 if (fClengthRH[iplan][icham] > 0.0) {
547 // Rohacell layer (radiator)
549 sprintf(cTagV,"UH%02d",iDet+2*kNdet);
550 sprintf(cTagM,"UC%02d",iDet+2*kNdet);
551 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
552 // Mylar layer (entrance window + HV cathode)
554 sprintf(cTagV,"UI%02d",iDet+2*kNdet);
555 sprintf(cTagM,"UC%02d",iDet+2*kNdet);
556 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
557 // Xe/Isobutane layer (drift volume)
559 sprintf(cTagV,"UJ%02d",iDet+2*kNdet);
560 sprintf(cTagM,"UC%02d",iDet+2*kNdet);
561 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
563 // Xe/Isobutane layer (amplification volume)
565 sprintf(cTagV,"UK%02d",iDet+2*kNdet);
566 sprintf(cTagM,"UE%02d",iDet+2*kNdet);
567 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
569 // Cu layer (pad plane)
571 sprintf(cTagV,"UL%02d",iDet+2*kNdet);
572 sprintf(cTagM,"UG%02d",iDet+2*kNdet);
573 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
574 // G10 layer (support structure)
576 sprintf(cTagV,"UM%02d",iDet+2*kNdet);
577 sprintf(cTagM,"UG%02d",iDet+2*kNdet);
578 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
579 // Cu layer (FEE + signal lines)
581 sprintf(cTagV,"UN%02d",iDet+2*kNdet);
582 sprintf(cTagM,"UG%02d",iDet+2*kNdet);
583 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
584 // Al layer (cooling devices)
586 sprintf(cTagV,"UO%02d",iDet+2*kNdet);
587 sprintf(cTagM,"UG%02d",iDet+2*kNdet);
588 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
589 // Water layer (cooling)
591 sprintf(cTagV,"UP%02d",iDet+2*kNdet);
592 sprintf(cTagM,"UG%02d",iDet+2*kNdet);
593 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
596 // Position the inner volumes of the chambers in the frames
600 // The inside of the lower G10 frame
601 sprintf(cTagV,"UC%02d",iDet);
602 sprintf(cTagM,"UB%02d",iDet);
603 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
604 // The lower G10 frame inside the aluminum frame
605 sprintf(cTagV,"UB%02d",iDet);
606 sprintf(cTagM,"UA%02d",iDet);
607 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
608 // The inside of the upper G10 frame
609 sprintf(cTagV,"UE%02d",iDet);
610 sprintf(cTagM,"UD%02d",iDet);
611 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
612 // The inside of the upper aluminum frame
613 sprintf(cTagV,"UG%02d",iDet);
614 sprintf(cTagM,"UF%02d",iDet);
615 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
616 if (fClengthPH[iplan][icham] > 0.0) {
617 // The inside of the lower G10 frame
618 sprintf(cTagV,"UC%02d",iDet+kNdet);
619 sprintf(cTagM,"UB%02d",iDet+kNdet);
620 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
621 // The lower G10 frame inside the aluminum frame
622 sprintf(cTagV,"UB%02d",iDet+kNdet);
623 sprintf(cTagM,"UA%02d",iDet+kNdet);
624 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
625 // The inside of the upper G10 frame
626 sprintf(cTagV,"UE%02d",iDet+kNdet);
627 sprintf(cTagM,"UD%02d",iDet+kNdet);
628 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
629 // The inside of the upper aluminum frame
630 sprintf(cTagV,"UG%02d",iDet+kNdet);
631 sprintf(cTagM,"UF%02d",iDet+kNdet);
632 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
634 if (fClengthRH[iplan][icham] > 0.0) {
635 // The inside of the lower G10 frame
636 sprintf(cTagV,"UC%02d",iDet+2*kNdet);
637 sprintf(cTagM,"UB%02d",iDet+2*kNdet);
638 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
639 // The lower G10 frame inside the aluminum frame
640 sprintf(cTagV,"UB%02d",iDet+2*kNdet);
641 sprintf(cTagM,"UA%02d",iDet+2*kNdet);
642 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
643 // The inside of the upper G10 frame
644 sprintf(cTagV,"UE%02d",iDet+2*kNdet);
645 sprintf(cTagM,"UD%02d",iDet+2*kNdet);
646 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
647 // The inside of the upper aluminum frame
648 sprintf(cTagV,"UG%02d",iDet+2*kNdet);
649 sprintf(cTagM,"UF%02d",iDet+2*kNdet);
650 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
653 // Position the frames of the chambers in the TRD mother volume
655 ypos = - fClength[iplan][0] - fClength[iplan][1] - fClength[iplan][2]/2.;
656 for (Int_t ic = 0; ic < icham; ic++) {
657 ypos += fClength[iplan][ic];
659 ypos += fClength[iplan][icham]/2.;
660 zpos = fgkCraH/2. + fgkCdrH/2. - fgkSheight/2. + iplan * (fgkCH + fgkVspace);
661 // The lower aluminum frame, radiator + drift region
662 sprintf(cTagV,"UA%02d",iDet);
663 gMC->Gspos(cTagV,1,"UTR1",xpos,ypos,zpos,0,"ONLY");
664 // The upper G10 frame, amplification region
665 sprintf(cTagV,"UD%02d",iDet);
666 zpos += fgkCamH/2. + fgkCraH/2. + fgkCdrH/2.;
667 gMC->Gspos(cTagV,1,"UTR1",xpos,ypos,zpos,0,"ONLY");
668 // The upper aluminum frame
669 sprintf(cTagV,"UF%02d",iDet);
670 zpos += fgkCroH/2. + fgkCamH/2.;
671 gMC->Gspos(cTagV,1,"UTR1",xpos,ypos,zpos,0,"ONLY");
672 if (fClengthPH[iplan][icham] > 0.0) {
674 ypos = - fgkSlenTR2/2.;
675 for (Int_t ic = 0; ic < icham; ic++) {
676 ypos += fClengthPH[iplan][ic];
678 ypos += fClengthPH[iplan][icham]/2.;
679 zpos = fgkCraH/2. + fgkCdrH/2. - fgkSheight/2. + iplan * (fgkCH + fgkVspace);
680 // The lower aluminum frame, radiator + drift region
681 sprintf(cTagV,"UA%02d",iDet+kNdet);
682 gMC->Gspos(cTagV,1,"UTR2",xpos,ypos,zpos,0,"ONLY");
683 // The upper G10 frame, amplification region
684 sprintf(cTagV,"UD%02d",iDet+kNdet);
685 zpos += fgkCamH/2. + fgkCraH/2. + fgkCdrH/2.;
686 gMC->Gspos(cTagV,1,"UTR2",xpos,ypos,zpos,0,"ONLY");
687 // The upper aluminum frame
688 sprintf(cTagV,"UF%02d",iDet+kNdet);
689 zpos += fgkCroH/2. + fgkCamH/2.;
690 gMC->Gspos(cTagV,1,"UTR2",xpos,ypos,zpos,0,"ONLY");
692 if (fClengthRH[iplan][icham] > 0.0) {
694 ypos = - fgkSlenTR3/2.;
695 for (Int_t ic = 0; ic < icham; ic++) {
696 ypos += fClengthRH[iplan][ic];
698 ypos += fClengthRH[iplan][icham]/2.;
699 zpos = fgkCraH/2. + fgkCdrH/2. - fgkSheight/2. + iplan * (fgkCH + fgkVspace);
700 // The lower aluminum frame, radiator + drift region
701 sprintf(cTagV,"UA%02d",iDet+2*kNdet);
702 gMC->Gspos(cTagV,1,"UTR3",xpos,ypos,zpos,0,"ONLY");
703 // The upper G10 frame, amplification region
704 sprintf(cTagV,"UD%02d",iDet+2*kNdet);
705 zpos += fgkCamH/2. + fgkCraH/2. + fgkCdrH/2.;
706 gMC->Gspos(cTagV,1,"UTR3",xpos,ypos,zpos,0,"ONLY");
707 // The upper aluminum frame
708 sprintf(cTagV,"UF%02d",iDet+2*kNdet);
709 zpos += fgkCroH/2. + fgkCamH/2.;
710 gMC->Gspos(cTagV,1,"UTR3",xpos,ypos,zpos,0,"ONLY");
719 gMC->Gspos("UTR1",1,"BTR1",xpos,ypos,zpos,0,"ONLY");
720 gMC->Gspos("UTR2",2,"BTR2",xpos,ypos,zpos,0,"ONLY");
721 gMC->Gspos("UTR3",3,"BTR3",xpos,ypos,zpos,0,"ONLY");