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.12 2004/02/02 13:37:52 hristov
19 Implementing of new function to check for holes (M.Ivanov)
21 Revision 1.11 2003/09/18 09:06:07 cblume
22 Geometry update, Removal of compiler warnings
24 Revision 1.9 2002/11/21 22:38:47 alibrary
25 Removing AliMC and AliMCProcess
27 Revision 1.8 2002/10/31 17:45:35 cblume
30 Revision 1.7 2002/02/11 14:21:16 cblume
31 Update of the geometry. Get rid of MANY
33 Revision 1.6 2001/05/11 07:56:12 hristov
34 Consistent declarations needed on Alpha
36 Revision 1.5 2001/02/14 18:22:26 cblume
37 Change in the geometry of the padplane
39 Revision 1.4 2000/11/01 14:53:21 cblume
40 Merge with TRD-develop
42 Revision 1.1.4.4 2000/10/15 23:40:01 cblume
45 Revision 1.1.4.3 2000/10/06 16:49:46 cblume
48 Revision 1.1.4.2 2000/10/04 16:34:58 cblume
49 Replace include files by forward declarations
51 Revision 1.1.4.1 2000/09/22 14:43:41 cblume
52 Allow the pad/timebin-dimensions to be changed after initialization
54 Revision 1.3 2000/10/02 21:28:19 fca
55 Removal of useless dependecies via forward declarations
57 Revision 1.2 2000/06/08 18:32:58 cblume
58 Make code compliant to coding conventions
60 Revision 1.1 2000/02/28 19:01:42 cblume
65 ///////////////////////////////////////////////////////////////////////////////
67 // TRD geometry with holes //
69 ///////////////////////////////////////////////////////////////////////////////
71 #include "TVirtualMC.h"
73 #include "AliTRDgeometryHole.h"
75 ClassImp(AliTRDgeometryHole)
77 //_____________________________________________________________________________
78 AliTRDgeometryHole::AliTRDgeometryHole():AliTRDgeometry()
81 // AliTRDgeometryHole default constructor
88 //_____________________________________________________________________________
89 AliTRDgeometryHole::~AliTRDgeometryHole()
92 // AliTRDgeometryHole destructor
97 Bool_t AliTRDgeometryHole::IsHole(Int_t iplan, Int_t icham, Int_t isec) const
99 // Position of Holes for PHOS (P) and RICH (R) starting at 6h
100 // P P P - - R R R - - - - - - - - P P
101 //Int_t cham[18] = {1, 1, 1, 0, 0, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1};
102 Int_t cham[18] = {2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0 }; // did we want this?
104 if ((cham[17-isec]==1) && (fClengthPH[iplan][icham]<0.00001)) return kTRUE;
105 if ((cham[17-isec]==2) &&(fClengthRH[iplan][icham]<0.000001)) return kTRUE;
110 //_____________________________________________________________________________
111 void AliTRDgeometryHole::Init()
114 // Initializes the geometry parameter
120 // The outer lengths of the chambers for the sectors with holes for the PHOS
121 Float_t lengthPH[kNplan][kNcham] = { { 0.0, 0.0, 0.0, 117.0, 124.0 }
122 , { 0.0, 0.0, 0.0, 124.0, 131.0 }
123 , { 0.0, 0.0, 0.0, 131.0, 138.0 }
124 , { 0.0, 0.0, 0.0, 138.0, 145.0 }
125 , { 0.0, 0.0, 0.0, 140.0, 147.0 }
126 , { 0.0, 0.0, 0.0, 140.0, 147.0 } };
128 // The outer lengths of the chambers for the sectors with holes for the RICH
129 Float_t lengthRH[kNplan][kNcham] = { { 0.0, 0.0, 0.0, 0.0, 87.5 }
130 , { 0.0, 0.0, 0.0, 0.0, 101.5 }
131 , { 0.0, 0.0, 0.0, 0.0, 115.5 }
132 , { 0.0, 0.0, 0.0, 0.0, 129.5 }
133 , { 0.0, 0.0, 0.0, 0.0, 133.5 }
134 , { 0.0, 0.0, 0.0, 0.0, 133.5 } };
136 for (icham = 0; icham < kNcham; icham++) {
137 for (iplan = 0; iplan < kNplan; iplan++) {
138 fClengthPH[iplan][icham] = lengthPH[iplan][icham];
139 fClengthRH[iplan][icham] = lengthRH[iplan][icham];
145 //_____________________________________________________________________________
146 void AliTRDgeometryHole::CreateGeometry(Int_t *idtmed)
149 // Create the TRD geometry with holes
151 // Names of the TRD volumina (xx = detector number):
153 // Lower part of the readout chambers (gas volume + radiator)
155 // UAxx Aluminum frames (Al)
156 // UBxx G10 frames (C)
157 // UCxx Inner volumes (Air)
159 // Upper part of the readout chambers (readout plane + fee)
161 // UDxx G10 frames (C)
162 // UExx Inner volumes of the G10 (Air)
163 // UFxx Aluminum frames (Al)
164 // UGxx Inner volumes of the Al (Air)
166 // Inner material layers
168 // UHxx Radiator (Rohacell)
169 // UIxx Entrance window (Mylar)
170 // UJxx Drift volume (Xe/CO2)
171 // UKxx Amplification volume (Xe/CO2)
172 // ULxx Pad plane (Cu)
173 // UMxx Support structure (Rohacell)
174 // UNxx FEE + signal lines (Cu)
175 // UOxx Cooling device (Al)
176 // UPxx Cooling device (Water)
179 const Int_t kNdet = kNplan * kNcham;
181 const Int_t kNparTrd = 4;
182 const Int_t kNparCha = 3;
184 Float_t xpos, ypos, zpos;
186 Float_t parTrd[kNparTrd];
187 Float_t parCha[kNparCha];
192 AliTRDgeometry::CreateGeometry(idtmed);
194 // The TRD mother volume for one sector (Air), full length in z-direction
195 parTrd[0] = fgkSwidth1/2.;
196 parTrd[1] = fgkSwidth2/2.;
197 parTrd[2] = fgkSlenTR1/2.;
198 parTrd[3] = fgkSheight/2.;
199 gMC->Gsvolu("UTR1","TRD1",idtmed[1302-1],parTrd,kNparTrd);
201 // The TRD mother volume for one sector (Air), leaving hole for PHOS
202 parTrd[0] = fgkSwidth1/2.;
203 parTrd[1] = fgkSwidth2/2.;
204 parTrd[2] = fgkSlenTR2/2.;
205 parTrd[3] = fgkSheight/2.;
206 gMC->Gsvolu("UTR2","TRD1",idtmed[1302-1],parTrd,kNparTrd);
208 // The TRD mother volume for one sector (Air), leaving hole for RICH
209 parTrd[0] = fgkSwidth1/2.;
210 parTrd[1] = fgkSwidth2/2.;
211 parTrd[2] = fgkSlenTR3/2.;
212 parTrd[3] = fgkSheight/2.;
213 gMC->Gsvolu("UTR3","TRD1",idtmed[1302-1],parTrd,kNparTrd);
215 for (Int_t icham = 0; icham < kNcham; icham++) {
216 for (Int_t iplan = 0; iplan < kNplan; iplan++) {
218 Int_t iDet = GetDetectorSec(iplan,icham);
220 // The lower part of the readout chambers (gas volume + radiator)
221 // The aluminum frames
222 sprintf(cTagV,"UA%02d",iDet);
223 parCha[0] = fCwidth[iplan]/2.;
224 parCha[1] = fClength[iplan][icham]/2. - fgkHspace/2.;
225 parCha[2] = fgkCraH/2. + fgkCdrH/2.;
226 gMC->Gsvolu(cTagV,"BOX ",idtmed[1301-1],parCha,kNparCha);
228 sprintf(cTagV,"UB%02d",iDet);
229 parCha[0] = fCwidth[iplan]/2. - fgkCalT;
232 gMC->Gsvolu(cTagV,"BOX ",idtmed[1307-1],parCha,kNparCha);
233 // The inner part (air)
234 sprintf(cTagV,"UC%02d",iDet);
235 parCha[0] = fCwidth[iplan]/2. - fgkCalT - fgkCclsT;
236 parCha[1] = fClength[iplan][icham]/2. - fgkHspace/2.- fgkCclfT;
238 gMC->Gsvolu(cTagV,"BOX ",idtmed[1302-1],parCha,kNparCha);
239 if (fClengthPH[iplan][icham] > 0.0) {
240 // The aluminum frames
241 sprintf(cTagV,"UA%02d",iDet+kNdet);
242 parCha[0] = fCwidth[iplan]/2.;
243 parCha[1] = fClengthPH[iplan][icham]/2. - fgkHspace/2.;
244 parCha[2] = fgkCraH/2. + fgkCdrH/2.;
245 gMC->Gsvolu(cTagV,"BOX ",idtmed[1301-1],parCha,kNparCha);
247 sprintf(cTagV,"UB%02d",iDet+kNdet);
248 parCha[0] = fCwidth[iplan]/2. - fgkCalT;
251 gMC->Gsvolu(cTagV,"BOX ",idtmed[1307-1],parCha,kNparCha);
252 // The inner part (air)
253 sprintf(cTagV,"UC%02d",iDet+kNdet);
254 parCha[0] = fCwidth[iplan]/2. - fgkCalT - fgkCclsT;
255 parCha[1] = fClengthPH[iplan][icham]/2. - fgkHspace/2.- fgkCclfT;
257 gMC->Gsvolu(cTagV,"BOX ",idtmed[1302-1],parCha,kNparCha);
259 if (fClengthRH[iplan][icham] > 0.0) {
260 // The aluminum frames
261 sprintf(cTagV,"UA%02d",iDet+2*kNdet);
262 parCha[0] = fCwidth[iplan]/2.;
263 parCha[1] = fClengthRH[iplan][icham]/2. - fgkHspace/2.;
264 parCha[2] = fgkCraH/2. + fgkCdrH/2.;
265 gMC->Gsvolu(cTagV,"BOX ",idtmed[1301-1],parCha,kNparCha);
267 sprintf(cTagV,"UB%02d",iDet+2*kNdet);
268 parCha[0] = fCwidth[iplan]/2. - fgkCalT;
271 gMC->Gsvolu(cTagV,"BOX ",idtmed[1307-1],parCha,kNparCha);
272 // The inner part (air)
273 sprintf(cTagV,"UC%02d",iDet+2*kNdet);
274 parCha[0] = fCwidth[iplan]/2. - fgkCalT - fgkCclsT;
275 parCha[1] = fClengthRH[iplan][icham]/2. - fgkHspace/2.- fgkCclfT;
277 gMC->Gsvolu(cTagV,"BOX ",idtmed[1302-1],parCha,kNparCha);
280 // The upper part of the readout chambers (readout plane + fee)
282 sprintf(cTagV,"UD%02d",iDet);
283 parCha[0] = fCwidth[iplan]/2. + fgkCroW;
284 parCha[1] = fClength[iplan][icham]/2. - fgkHspace/2.;
285 parCha[2] = fgkCamH/2.;
286 gMC->Gsvolu(cTagV,"BOX ",idtmed[1307-1],parCha,kNparCha);
287 // The inner part of the G10 frame (air)
288 sprintf(cTagV,"UE%02d",iDet);
289 parCha[0] = fCwidth[iplan]/2. + fgkCroW - fgkCcuT;
290 parCha[1] = fClength[iplan][icham]/2. - fgkHspace/2.- fgkCcuT;
292 gMC->Gsvolu(cTagV,"BOX ",idtmed[1302-1],parCha,kNparCha);
293 // The aluminum frames
294 sprintf(cTagV,"UF%02d",iDet);
295 parCha[0] = fCwidth[iplan]/2. + fgkCroW;
296 parCha[1] = fClength[iplan][icham]/2. - fgkHspace/2.;
297 parCha[2] = fgkCroH/2.;
298 gMC->Gsvolu(cTagV,"BOX ",idtmed[1301-1],parCha,kNparCha);
299 // The inner part of the aluminum frames
300 sprintf(cTagV,"UG%02d",iDet);
301 parCha[0] = fCwidth[iplan]/2. + fgkCroW - fgkCauT;
302 parCha[1] = fClength[iplan][icham]/2. - fgkHspace/2.- fgkCauT;
304 gMC->Gsvolu(cTagV,"BOX ",idtmed[1302-1],parCha,kNparCha);
305 if (fClengthPH[iplan][icham] > 0.0) {
306 sprintf(cTagV,"UD%02d",iDet+kNdet);
307 parCha[0] = fCwidth[iplan]/2. + fgkCroW;
308 parCha[1] = fClengthPH[iplan][icham]/2. - fgkHspace/2.;
309 parCha[2] = fgkCamH/2.;
310 gMC->Gsvolu(cTagV,"BOX ",idtmed[1307-1],parCha,kNparCha);
311 // The inner part of the G10 frame (air)
312 sprintf(cTagV,"UE%02d",iDet+kNdet);
313 parCha[0] = fCwidth[iplan]/2. + fgkCroW - fgkCcuT;
314 parCha[1] = fClengthPH[iplan][icham]/2. - fgkHspace/2.- fgkCcuT;
316 gMC->Gsvolu(cTagV,"BOX ",idtmed[1302-1],parCha,kNparCha);
317 // The aluminum frames
318 sprintf(cTagV,"UF%02d",iDet+kNdet);
319 parCha[0] = fCwidth[iplan]/2. + fgkCroW;
320 parCha[1] = fClengthPH[iplan][icham]/2. - fgkHspace/2.;
321 parCha[2] = fgkCroH/2.;
322 gMC->Gsvolu(cTagV,"BOX ",idtmed[1301-1],parCha,kNparCha);
323 // The inner part of the aluminum frames
324 sprintf(cTagV,"UG%02d",iDet+kNdet);
325 parCha[0] = fCwidth[iplan]/2. + fgkCroW - fgkCauT;
326 parCha[1] = fClengthPH[iplan][icham]/2. - fgkHspace/2.- fgkCauT;
328 gMC->Gsvolu(cTagV,"BOX ",idtmed[1302-1],parCha,kNparCha);
330 if (fClengthRH[iplan][icham] > 0.0) {
331 sprintf(cTagV,"UD%02d",iDet+2*kNdet);
332 parCha[0] = fCwidth[iplan]/2. + fgkCroW;
333 parCha[1] = fClengthRH[iplan][icham]/2. - fgkHspace/2.;
334 parCha[2] = fgkCamH/2.;
335 gMC->Gsvolu(cTagV,"BOX ",idtmed[1307-1],parCha,kNparCha);
336 // The inner part of the G10 frame (air)
337 sprintf(cTagV,"UE%02d",iDet+2*kNdet);
338 parCha[0] = fCwidth[iplan]/2. + fgkCroW - fgkCcuT;
339 parCha[1] = fClengthRH[iplan][icham]/2. - fgkHspace/2.- fgkCcuT;
341 gMC->Gsvolu(cTagV,"BOX ",idtmed[1302-1],parCha,kNparCha);
342 // The aluminum frames
343 sprintf(cTagV,"UF%02d",iDet+2*kNdet);
344 parCha[0] = fCwidth[iplan]/2. + fgkCroW;
345 parCha[1] = fClengthRH[iplan][icham]/2. - fgkHspace/2.;
346 parCha[2] = fgkCroH/2.;
347 gMC->Gsvolu(cTagV,"BOX ",idtmed[1301-1],parCha,kNparCha);
348 // The inner part of the aluminum frames
349 sprintf(cTagV,"UG%02d",iDet+2*kNdet);
350 parCha[0] = fCwidth[iplan]/2. + fgkCroW - fgkCauT;
351 parCha[1] = fClengthRH[iplan][icham]/2. - fgkHspace/2.- fgkCauT;
353 gMC->Gsvolu(cTagV,"BOX ",idtmed[1302-1],parCha,kNparCha);
356 // The material layers inside the chambers
359 // Rohacell layer (radiator)
360 parCha[2] = fgkRaThick/2;
361 sprintf(cTagV,"UH%02d",iDet);
362 gMC->Gsvolu(cTagV,"BOX ",idtmed[1315-1],parCha,kNparCha);
363 // Mylar layer (entrance window + HV cathode)
364 parCha[2] = fgkMyThick/2;
365 sprintf(cTagV,"UI%02d",iDet);
366 gMC->Gsvolu(cTagV,"BOX ",idtmed[1308-1],parCha,kNparCha);
367 // Xe/Isobutane layer (drift volume)
368 parCha[2] = fgkDrThick/2.;
369 sprintf(cTagV,"UJ%02d",iDet);
370 gMC->Gsvolu(cTagV,"BOX ",idtmed[1309-1],parCha,kNparCha);
371 // Xe/Isobutane layer (amplification volume)
372 parCha[2] = fgkAmThick/2.;
373 sprintf(cTagV,"UK%02d",iDet);
374 gMC->Gsvolu(cTagV,"BOX ",idtmed[1309-1],parCha,kNparCha);
375 // Cu layer (pad plane)
376 parCha[2] = fgkCuThick/2;
377 sprintf(cTagV,"UL%02d",iDet);
378 gMC->Gsvolu(cTagV,"BOX ",idtmed[1305-1],parCha,kNparCha);
379 // G10 layer (support structure / honeycomb)
380 parCha[2] = fgkSuThick/2;
381 sprintf(cTagV,"UM%02d",iDet);
382 gMC->Gsvolu(cTagV,"BOX ",idtmed[1313-1],parCha,kNparCha);
383 // Cu layer (FEE + signal lines)
384 parCha[2] = fgkFeThick/2;
385 sprintf(cTagV,"UN%02d",iDet);
386 gMC->Gsvolu(cTagV,"BOX ",idtmed[1305-1],parCha,kNparCha);
387 // Al layer (cooling devices)
388 parCha[2] = fgkCoThick/2;
389 sprintf(cTagV,"UO%02d",iDet);
390 gMC->Gsvolu(cTagV,"BOX ",idtmed[1301-1],parCha,kNparCha);
391 // Water layer (cooling)
392 parCha[2] = fgkWaThick/2;
393 sprintf(cTagV,"UP%02d",iDet);
394 gMC->Gsvolu(cTagV,"BOX ",idtmed[1314-1],parCha,kNparCha);
395 if (fClengthPH[iplan][icham] > 0.0) {
396 // Rohacell layer (radiator)
397 parCha[2] = fgkRaThick/2;
398 sprintf(cTagV,"UH%02d",iDet+kNdet);
399 gMC->Gsvolu(cTagV,"BOX ",idtmed[1315-1],parCha,kNparCha);
400 // Mylar layer (entrance window + HV cathode)
401 parCha[2] = fgkMyThick/2;
402 sprintf(cTagV,"UI%02d",iDet+kNdet);
403 gMC->Gsvolu(cTagV,"BOX ",idtmed[1308-1],parCha,kNparCha);
404 // Xe/Isobutane layer (drift volume)
405 parCha[2] = fgkDrThick/2.;
406 sprintf(cTagV,"UJ%02d",iDet+kNdet);
407 gMC->Gsvolu(cTagV,"BOX ",idtmed[1309-1],parCha,kNparCha);
408 // Xe/Isobutane layer (amplification volume)
409 parCha[2] = fgkAmThick/2.;
410 sprintf(cTagV,"UK%02d",iDet+kNdet);
411 gMC->Gsvolu(cTagV,"BOX ",idtmed[1309-1],parCha,kNparCha);
412 // Cu layer (pad plane)
413 parCha[2] = fgkCuThick/2;
414 sprintf(cTagV,"UL%02d",iDet+kNdet);
415 gMC->Gsvolu(cTagV,"BOX ",idtmed[1305-1],parCha,kNparCha);
416 // G10 layer (support structure / honeycomb)
417 parCha[2] = fgkSuThick/2;
418 sprintf(cTagV,"UM%02d",iDet+kNdet);
419 gMC->Gsvolu(cTagV,"BOX ",idtmed[1313-1],parCha,kNparCha);
420 // Cu layer (FEE + signal lines)
421 parCha[2] = fgkFeThick/2;
422 sprintf(cTagV,"UN%02d",iDet+kNdet);
423 gMC->Gsvolu(cTagV,"BOX ",idtmed[1305-1],parCha,kNparCha);
424 // Al layer (cooling devices)
425 parCha[2] = fgkCoThick/2;
426 sprintf(cTagV,"UO%02d",iDet+kNdet);
427 gMC->Gsvolu(cTagV,"BOX ",idtmed[1301-1],parCha,kNparCha);
428 // Water layer (cooling)
429 parCha[2] = fgkWaThick/2;
430 sprintf(cTagV,"UP%02d",iDet+kNdet);
431 gMC->Gsvolu(cTagV,"BOX ",idtmed[1314-1],parCha,kNparCha);
433 if (fClengthRH[iplan][icham] > 0.0) {
434 // Rohacell layer (radiator)
435 parCha[2] = fgkRaThick/2;
436 sprintf(cTagV,"UH%02d",iDet+2*kNdet);
437 gMC->Gsvolu(cTagV,"BOX ",idtmed[1315-1],parCha,kNparCha);
438 // Mylar layer (entrance window + HV cathode)
439 parCha[2] = fgkMyThick/2;
440 sprintf(cTagV,"UI%02d",iDet+2*kNdet);
441 gMC->Gsvolu(cTagV,"BOX ",idtmed[1308-1],parCha,kNparCha);
442 // Xe/Isobutane layer (drift volume)
443 parCha[2] = fgkDrThick/2.;
444 sprintf(cTagV,"UJ%02d",iDet+2*kNdet);
445 gMC->Gsvolu(cTagV,"BOX ",idtmed[1309-1],parCha,kNparCha);
446 // Xe/Isobutane layer (amplification volume)
447 parCha[2] = fgkAmThick/2.;
448 sprintf(cTagV,"UK%02d",iDet+2*kNdet);
449 gMC->Gsvolu(cTagV,"BOX ",idtmed[1309-1],parCha,kNparCha);
450 // Cu layer (pad plane)
451 parCha[2] = fgkCuThick/2;
452 sprintf(cTagV,"UL%02d",iDet+2*kNdet);
453 gMC->Gsvolu(cTagV,"BOX ",idtmed[1305-1],parCha,kNparCha);
454 // G10 layer (support structure / honeycomb)
455 parCha[2] = fgkSuThick/2;
456 sprintf(cTagV,"UM%02d",iDet+2*kNdet);
457 gMC->Gsvolu(cTagV,"BOX ",idtmed[1313-1],parCha,kNparCha);
458 // Cu layer (FEE + signal lines)
459 parCha[2] = fgkFeThick/2;
460 sprintf(cTagV,"UN%02d",iDet+2*kNdet);
461 gMC->Gsvolu(cTagV,"BOX ",idtmed[1305-1],parCha,kNparCha);
462 // Al layer (cooling devices)
463 parCha[2] = fgkCoThick/2.;
464 sprintf(cTagV,"UO%02d",iDet+2*kNdet);
465 gMC->Gsvolu(cTagV,"BOX ",idtmed[1301-1],parCha,kNparCha);
466 // Water layer (cooling)
467 parCha[2] = fgkWaThick/2;
468 sprintf(cTagV,"UP%02d",iDet+2*kNdet);
469 gMC->Gsvolu(cTagV,"BOX ",idtmed[1314-1],parCha,kNparCha);
472 // Position the layers in the chambers
476 // Rohacell layer (radiator)
478 sprintf(cTagV,"UH%02d",iDet);
479 sprintf(cTagM,"UC%02d",iDet);
480 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
481 // Mylar layer (entrance window + HV cathode)
483 sprintf(cTagV,"UI%02d",iDet);
484 sprintf(cTagM,"UC%02d",iDet);
485 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
486 // Xe/Isobutane layer (drift volume)
488 sprintf(cTagV,"UJ%02d",iDet);
489 sprintf(cTagM,"UC%02d",iDet);
490 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
492 // Xe/Isobutane layer (amplification volume)
494 sprintf(cTagV,"UK%02d",iDet);
495 sprintf(cTagM,"UE%02d",iDet);
496 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
498 // Cu layer (pad plane)
500 sprintf(cTagV,"UL%02d",iDet);
501 sprintf(cTagM,"UG%02d",iDet);
502 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
503 // G10 layer (support structure)
505 sprintf(cTagV,"UM%02d",iDet);
506 sprintf(cTagM,"UG%02d",iDet);
507 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
508 // Cu layer (FEE + signal lines)
510 sprintf(cTagV,"UN%02d",iDet);
511 sprintf(cTagM,"UG%02d",iDet);
512 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
513 // Al layer (cooling devices)
515 sprintf(cTagV,"UO%02d",iDet);
516 sprintf(cTagM,"UG%02d",iDet);
517 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
518 // Water layer (cooling)
520 sprintf(cTagV,"UP%02d",iDet);
521 sprintf(cTagM,"UG%02d",iDet);
522 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
523 if (fClengthPH[iplan][icham] > 0.0) {
525 // Rohacell layer (radiator)
527 sprintf(cTagV,"UH%02d",iDet+kNdet);
528 sprintf(cTagM,"UC%02d",iDet+kNdet);
529 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
530 // Mylar layer (entrance window + HV cathode)
532 sprintf(cTagV,"UI%02d",iDet+kNdet);
533 sprintf(cTagM,"UC%02d",iDet+kNdet);
534 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
535 // Xe/Isobutane layer (drift volume)
537 sprintf(cTagV,"UJ%02d",iDet+kNdet);
538 sprintf(cTagM,"UC%02d",iDet+kNdet);
539 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
541 // Xe/Isobutane layer (amplification volume)
543 sprintf(cTagV,"UK%02d",iDet+kNdet);
544 sprintf(cTagM,"UE%02d",iDet+kNdet);
545 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
547 // Cu layer (pad plane)
549 sprintf(cTagV,"UL%02d",iDet+kNdet);
550 sprintf(cTagM,"UG%02d",iDet+kNdet);
551 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
552 // G10 layer (support structure)
554 sprintf(cTagV,"UM%02d",iDet+kNdet);
555 sprintf(cTagM,"UG%02d",iDet+kNdet);
556 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
557 // Cu layer (FEE + signal lines)
559 sprintf(cTagV,"UN%02d",iDet+kNdet);
560 sprintf(cTagM,"UG%02d",iDet+kNdet);
561 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
562 // Al layer (cooling devices)
564 sprintf(cTagV,"UO%02d",iDet+kNdet);
565 sprintf(cTagM,"UG%02d",iDet+kNdet);
566 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
567 // Water layer (cooling)
569 sprintf(cTagV,"UP%02d",iDet+kNdet);
570 sprintf(cTagM,"UG%02d",iDet+kNdet);
571 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
573 if (fClengthRH[iplan][icham] > 0.0) {
575 // Rohacell layer (radiator)
577 sprintf(cTagV,"UH%02d",iDet+2*kNdet);
578 sprintf(cTagM,"UC%02d",iDet+2*kNdet);
579 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
580 // Mylar layer (entrance window + HV cathode)
582 sprintf(cTagV,"UI%02d",iDet+2*kNdet);
583 sprintf(cTagM,"UC%02d",iDet+2*kNdet);
584 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
585 // Xe/Isobutane layer (drift volume)
587 sprintf(cTagV,"UJ%02d",iDet+2*kNdet);
588 sprintf(cTagM,"UC%02d",iDet+2*kNdet);
589 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
591 // Xe/Isobutane layer (amplification volume)
593 sprintf(cTagV,"UK%02d",iDet+2*kNdet);
594 sprintf(cTagM,"UE%02d",iDet+2*kNdet);
595 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
597 // Cu layer (pad plane)
599 sprintf(cTagV,"UL%02d",iDet+2*kNdet);
600 sprintf(cTagM,"UG%02d",iDet+2*kNdet);
601 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
602 // G10 layer (support structure)
604 sprintf(cTagV,"UM%02d",iDet+2*kNdet);
605 sprintf(cTagM,"UG%02d",iDet+2*kNdet);
606 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
607 // Cu layer (FEE + signal lines)
609 sprintf(cTagV,"UN%02d",iDet+2*kNdet);
610 sprintf(cTagM,"UG%02d",iDet+2*kNdet);
611 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
612 // Al layer (cooling devices)
614 sprintf(cTagV,"UO%02d",iDet+2*kNdet);
615 sprintf(cTagM,"UG%02d",iDet+2*kNdet);
616 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
617 // Water layer (cooling)
619 sprintf(cTagV,"UP%02d",iDet+2*kNdet);
620 sprintf(cTagM,"UG%02d",iDet+2*kNdet);
621 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
624 // Position the inner volumes of the chambers in the frames
628 // The inside of the lower G10 frame
629 sprintf(cTagV,"UC%02d",iDet);
630 sprintf(cTagM,"UB%02d",iDet);
631 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
632 // The lower G10 frame inside the aluminum frame
633 sprintf(cTagV,"UB%02d",iDet);
634 sprintf(cTagM,"UA%02d",iDet);
635 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
636 // The inside of the upper G10 frame
637 sprintf(cTagV,"UE%02d",iDet);
638 sprintf(cTagM,"UD%02d",iDet);
639 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
640 // The inside of the upper aluminum frame
641 sprintf(cTagV,"UG%02d",iDet);
642 sprintf(cTagM,"UF%02d",iDet);
643 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
644 if (fClengthPH[iplan][icham] > 0.0) {
645 // The inside of the lower G10 frame
646 sprintf(cTagV,"UC%02d",iDet+kNdet);
647 sprintf(cTagM,"UB%02d",iDet+kNdet);
648 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
649 // The lower G10 frame inside the aluminum frame
650 sprintf(cTagV,"UB%02d",iDet+kNdet);
651 sprintf(cTagM,"UA%02d",iDet+kNdet);
652 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
653 // The inside of the upper G10 frame
654 sprintf(cTagV,"UE%02d",iDet+kNdet);
655 sprintf(cTagM,"UD%02d",iDet+kNdet);
656 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
657 // The inside of the upper aluminum frame
658 sprintf(cTagV,"UG%02d",iDet+kNdet);
659 sprintf(cTagM,"UF%02d",iDet+kNdet);
660 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");
681 // Position the frames of the chambers in the TRD mother volume
683 ypos = - fClength[iplan][0] - fClength[iplan][1] - fClength[iplan][2]/2.;
684 for (Int_t ic = 0; ic < icham; ic++) {
685 ypos += fClength[iplan][ic];
687 ypos += fClength[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);
691 gMC->Gspos(cTagV,1,"UTR1",xpos,ypos,zpos,0,"ONLY");
692 // The upper G10 frame, amplification region
693 sprintf(cTagV,"UD%02d",iDet);
694 zpos += fgkCamH/2. + fgkCraH/2. + fgkCdrH/2.;
695 gMC->Gspos(cTagV,1,"UTR1",xpos,ypos,zpos,0,"ONLY");
696 // The upper aluminum frame
697 sprintf(cTagV,"UF%02d",iDet);
698 zpos += fgkCroH/2. + fgkCamH/2.;
699 gMC->Gspos(cTagV,1,"UTR1",xpos,ypos,zpos,0,"ONLY");
700 if (fClengthPH[iplan][icham] > 0.0) {
702 ypos = - fgkSlenTR2/2.;
703 for (Int_t ic = 0; ic < icham; ic++) {
704 ypos += fClengthPH[iplan][ic];
706 ypos += fClengthPH[iplan][icham]/2.;
707 zpos = fgkCraH/2. + fgkCdrH/2. - fgkSheight/2. + iplan * (fgkCH + fgkVspace);
708 // The lower aluminum frame, radiator + drift region
709 sprintf(cTagV,"UA%02d",iDet+kNdet);
710 gMC->Gspos(cTagV,1,"UTR2",xpos,ypos,zpos,0,"ONLY");
711 // The upper G10 frame, amplification region
712 sprintf(cTagV,"UD%02d",iDet+kNdet);
713 zpos += fgkCamH/2. + fgkCraH/2. + fgkCdrH/2.;
714 gMC->Gspos(cTagV,1,"UTR2",xpos,ypos,zpos,0,"ONLY");
715 // The upper aluminum frame
716 sprintf(cTagV,"UF%02d",iDet+kNdet);
717 zpos += fgkCroH/2. + fgkCamH/2.;
718 gMC->Gspos(cTagV,1,"UTR2",xpos,ypos,zpos,0,"ONLY");
720 if (fClengthRH[iplan][icham] > 0.0) {
722 ypos = - fgkSlenTR3/2.;
723 for (Int_t ic = 0; ic < icham; ic++) {
724 ypos += fClengthRH[iplan][ic];
726 ypos += fClengthRH[iplan][icham]/2.;
727 zpos = fgkCraH/2. + fgkCdrH/2. - fgkSheight/2. + iplan * (fgkCH + fgkVspace);
728 // The lower aluminum frame, radiator + drift region
729 sprintf(cTagV,"UA%02d",iDet+2*kNdet);
730 gMC->Gspos(cTagV,1,"UTR3",xpos,ypos,zpos,0,"ONLY");
731 // The upper G10 frame, amplification region
732 sprintf(cTagV,"UD%02d",iDet+2*kNdet);
733 zpos += fgkCamH/2. + fgkCraH/2. + fgkCdrH/2.;
734 gMC->Gspos(cTagV,1,"UTR3",xpos,ypos,zpos,0,"ONLY");
735 // The upper aluminum frame
736 sprintf(cTagV,"UF%02d",iDet+2*kNdet);
737 zpos += fgkCroH/2. + fgkCamH/2.;
738 gMC->Gspos(cTagV,1,"UTR3",xpos,ypos,zpos,0,"ONLY");
747 gMC->Gspos("UTR1",1,"BTR1",xpos,ypos,zpos,0,"ONLY");
748 gMC->Gspos("UTR2",2,"BTR2",xpos,ypos,zpos,0,"ONLY");
749 gMC->Gspos("UTR3",3,"BTR3",xpos,ypos,zpos,0,"ONLY");