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.11 2003/09/18 09:06:07 cblume
19 Geometry update, Removal of compiler warnings
21 Revision 1.9 2002/11/21 22:38:47 alibrary
22 Removing AliMC and AliMCProcess
24 Revision 1.8 2002/10/31 17:45:35 cblume
27 Revision 1.7 2002/02/11 14:21:16 cblume
28 Update of the geometry. Get rid of MANY
30 Revision 1.6 2001/05/11 07:56:12 hristov
31 Consistent declarations needed on Alpha
33 Revision 1.5 2001/02/14 18:22:26 cblume
34 Change in the geometry of the padplane
36 Revision 1.4 2000/11/01 14:53:21 cblume
37 Merge with TRD-develop
39 Revision 1.1.4.4 2000/10/15 23:40:01 cblume
42 Revision 1.1.4.3 2000/10/06 16:49:46 cblume
45 Revision 1.1.4.2 2000/10/04 16:34:58 cblume
46 Replace include files by forward declarations
48 Revision 1.1.4.1 2000/09/22 14:43:41 cblume
49 Allow the pad/timebin-dimensions to be changed after initialization
51 Revision 1.3 2000/10/02 21:28:19 fca
52 Removal of useless dependecies via forward declarations
54 Revision 1.2 2000/06/08 18:32:58 cblume
55 Make code compliant to coding conventions
57 Revision 1.1 2000/02/28 19:01:42 cblume
62 ///////////////////////////////////////////////////////////////////////////////
64 // TRD geometry with holes //
66 ///////////////////////////////////////////////////////////////////////////////
68 #include "TVirtualMC.h"
70 #include "AliTRDgeometryHole.h"
72 ClassImp(AliTRDgeometryHole)
74 //_____________________________________________________________________________
75 AliTRDgeometryHole::AliTRDgeometryHole():AliTRDgeometry()
78 // AliTRDgeometryHole default constructor
85 //_____________________________________________________________________________
86 AliTRDgeometryHole::~AliTRDgeometryHole()
89 // AliTRDgeometryHole destructor
94 Bool_t AliTRDgeometryHole::IsHole(Int_t iplan, Int_t icham, Int_t isec) const
96 // Position of Holes for PHOS (P) and RICH (R) starting at 6h
97 // P P P - - R R R - - - - - - - - P P
98 //Int_t cham[18] = {1, 1, 1, 0, 0, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1};
99 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?
101 if ((cham[17-isec]==1) && (fClengthPH[iplan][icham]<0.00001)) return kTRUE;
102 if ((cham[17-isec]==2) &&(fClengthRH[iplan][icham]<0.000001)) return kTRUE;
107 //_____________________________________________________________________________
108 void AliTRDgeometryHole::Init()
111 // Initializes the geometry parameter
117 // The outer lengths of the chambers for the sectors with holes for the PHOS
118 Float_t lengthPH[kNplan][kNcham] = { { 0.0, 0.0, 0.0, 117.0, 124.0 }
119 , { 0.0, 0.0, 0.0, 124.0, 131.0 }
120 , { 0.0, 0.0, 0.0, 131.0, 138.0 }
121 , { 0.0, 0.0, 0.0, 138.0, 145.0 }
122 , { 0.0, 0.0, 0.0, 140.0, 147.0 }
123 , { 0.0, 0.0, 0.0, 140.0, 147.0 } };
125 // The outer lengths of the chambers for the sectors with holes for the RICH
126 Float_t lengthRH[kNplan][kNcham] = { { 0.0, 0.0, 0.0, 0.0, 87.5 }
127 , { 0.0, 0.0, 0.0, 0.0, 101.5 }
128 , { 0.0, 0.0, 0.0, 0.0, 115.5 }
129 , { 0.0, 0.0, 0.0, 0.0, 129.5 }
130 , { 0.0, 0.0, 0.0, 0.0, 133.5 }
131 , { 0.0, 0.0, 0.0, 0.0, 133.5 } };
133 for (icham = 0; icham < kNcham; icham++) {
134 for (iplan = 0; iplan < kNplan; iplan++) {
135 fClengthPH[iplan][icham] = lengthPH[iplan][icham];
136 fClengthRH[iplan][icham] = lengthRH[iplan][icham];
142 //_____________________________________________________________________________
143 void AliTRDgeometryHole::CreateGeometry(Int_t *idtmed)
146 // Create the TRD geometry with holes
148 // Names of the TRD volumina (xx = detector number):
150 // Lower part of the readout chambers (gas volume + radiator)
152 // UAxx Aluminum frames (Al)
153 // UBxx G10 frames (C)
154 // UCxx Inner volumes (Air)
156 // Upper part of the readout chambers (readout plane + fee)
158 // UDxx G10 frames (C)
159 // UExx Inner volumes of the G10 (Air)
160 // UFxx Aluminum frames (Al)
161 // UGxx Inner volumes of the Al (Air)
163 // Inner material layers
165 // UHxx Radiator (Rohacell)
166 // UIxx Entrance window (Mylar)
167 // UJxx Drift volume (Xe/CO2)
168 // UKxx Amplification volume (Xe/CO2)
169 // ULxx Pad plane (Cu)
170 // UMxx Support structure (Rohacell)
171 // UNxx FEE + signal lines (Cu)
172 // UOxx Cooling device (Al)
173 // UPxx Cooling device (Water)
176 const Int_t kNdet = kNplan * kNcham;
178 const Int_t kNparTrd = 4;
179 const Int_t kNparCha = 3;
181 Float_t xpos, ypos, zpos;
183 Float_t parTrd[kNparTrd];
184 Float_t parCha[kNparCha];
189 AliTRDgeometry::CreateGeometry(idtmed);
191 // The TRD mother volume for one sector (Air), full length in z-direction
192 parTrd[0] = fgkSwidth1/2.;
193 parTrd[1] = fgkSwidth2/2.;
194 parTrd[2] = fgkSlenTR1/2.;
195 parTrd[3] = fgkSheight/2.;
196 gMC->Gsvolu("UTR1","TRD1",idtmed[1302-1],parTrd,kNparTrd);
198 // The TRD mother volume for one sector (Air), leaving hole for PHOS
199 parTrd[0] = fgkSwidth1/2.;
200 parTrd[1] = fgkSwidth2/2.;
201 parTrd[2] = fgkSlenTR2/2.;
202 parTrd[3] = fgkSheight/2.;
203 gMC->Gsvolu("UTR2","TRD1",idtmed[1302-1],parTrd,kNparTrd);
205 // The TRD mother volume for one sector (Air), leaving hole for RICH
206 parTrd[0] = fgkSwidth1/2.;
207 parTrd[1] = fgkSwidth2/2.;
208 parTrd[2] = fgkSlenTR3/2.;
209 parTrd[3] = fgkSheight/2.;
210 gMC->Gsvolu("UTR3","TRD1",idtmed[1302-1],parTrd,kNparTrd);
212 for (Int_t icham = 0; icham < kNcham; icham++) {
213 for (Int_t iplan = 0; iplan < kNplan; iplan++) {
215 Int_t iDet = GetDetectorSec(iplan,icham);
217 // The lower part of the readout chambers (gas volume + radiator)
218 // The aluminum frames
219 sprintf(cTagV,"UA%02d",iDet);
220 parCha[0] = fCwidth[iplan]/2.;
221 parCha[1] = fClength[iplan][icham]/2. - fgkHspace/2.;
222 parCha[2] = fgkCraH/2. + fgkCdrH/2.;
223 gMC->Gsvolu(cTagV,"BOX ",idtmed[1301-1],parCha,kNparCha);
225 sprintf(cTagV,"UB%02d",iDet);
226 parCha[0] = fCwidth[iplan]/2. - fgkCalT;
229 gMC->Gsvolu(cTagV,"BOX ",idtmed[1307-1],parCha,kNparCha);
230 // The inner part (air)
231 sprintf(cTagV,"UC%02d",iDet);
232 parCha[0] = fCwidth[iplan]/2. - fgkCalT - fgkCclsT;
233 parCha[1] = fClength[iplan][icham]/2. - fgkHspace/2.- fgkCclfT;
235 gMC->Gsvolu(cTagV,"BOX ",idtmed[1302-1],parCha,kNparCha);
236 if (fClengthPH[iplan][icham] > 0.0) {
237 // The aluminum frames
238 sprintf(cTagV,"UA%02d",iDet+kNdet);
239 parCha[0] = fCwidth[iplan]/2.;
240 parCha[1] = fClengthPH[iplan][icham]/2. - fgkHspace/2.;
241 parCha[2] = fgkCraH/2. + fgkCdrH/2.;
242 gMC->Gsvolu(cTagV,"BOX ",idtmed[1301-1],parCha,kNparCha);
244 sprintf(cTagV,"UB%02d",iDet+kNdet);
245 parCha[0] = fCwidth[iplan]/2. - fgkCalT;
248 gMC->Gsvolu(cTagV,"BOX ",idtmed[1307-1],parCha,kNparCha);
249 // The inner part (air)
250 sprintf(cTagV,"UC%02d",iDet+kNdet);
251 parCha[0] = fCwidth[iplan]/2. - fgkCalT - fgkCclsT;
252 parCha[1] = fClengthPH[iplan][icham]/2. - fgkHspace/2.- fgkCclfT;
254 gMC->Gsvolu(cTagV,"BOX ",idtmed[1302-1],parCha,kNparCha);
256 if (fClengthRH[iplan][icham] > 0.0) {
257 // The aluminum frames
258 sprintf(cTagV,"UA%02d",iDet+2*kNdet);
259 parCha[0] = fCwidth[iplan]/2.;
260 parCha[1] = fClengthRH[iplan][icham]/2. - fgkHspace/2.;
261 parCha[2] = fgkCraH/2. + fgkCdrH/2.;
262 gMC->Gsvolu(cTagV,"BOX ",idtmed[1301-1],parCha,kNparCha);
264 sprintf(cTagV,"UB%02d",iDet+2*kNdet);
265 parCha[0] = fCwidth[iplan]/2. - fgkCalT;
268 gMC->Gsvolu(cTagV,"BOX ",idtmed[1307-1],parCha,kNparCha);
269 // The inner part (air)
270 sprintf(cTagV,"UC%02d",iDet+2*kNdet);
271 parCha[0] = fCwidth[iplan]/2. - fgkCalT - fgkCclsT;
272 parCha[1] = fClengthRH[iplan][icham]/2. - fgkHspace/2.- fgkCclfT;
274 gMC->Gsvolu(cTagV,"BOX ",idtmed[1302-1],parCha,kNparCha);
277 // The upper part of the readout chambers (readout plane + fee)
279 sprintf(cTagV,"UD%02d",iDet);
280 parCha[0] = fCwidth[iplan]/2. + fgkCroW;
281 parCha[1] = fClength[iplan][icham]/2. - fgkHspace/2.;
282 parCha[2] = fgkCamH/2.;
283 gMC->Gsvolu(cTagV,"BOX ",idtmed[1307-1],parCha,kNparCha);
284 // The inner part of the G10 frame (air)
285 sprintf(cTagV,"UE%02d",iDet);
286 parCha[0] = fCwidth[iplan]/2. + fgkCroW - fgkCcuT;
287 parCha[1] = fClength[iplan][icham]/2. - fgkHspace/2.- fgkCcuT;
289 gMC->Gsvolu(cTagV,"BOX ",idtmed[1302-1],parCha,kNparCha);
290 // The aluminum frames
291 sprintf(cTagV,"UF%02d",iDet);
292 parCha[0] = fCwidth[iplan]/2. + fgkCroW;
293 parCha[1] = fClength[iplan][icham]/2. - fgkHspace/2.;
294 parCha[2] = fgkCroH/2.;
295 gMC->Gsvolu(cTagV,"BOX ",idtmed[1301-1],parCha,kNparCha);
296 // The inner part of the aluminum frames
297 sprintf(cTagV,"UG%02d",iDet);
298 parCha[0] = fCwidth[iplan]/2. + fgkCroW - fgkCauT;
299 parCha[1] = fClength[iplan][icham]/2. - fgkHspace/2.- fgkCauT;
301 gMC->Gsvolu(cTagV,"BOX ",idtmed[1302-1],parCha,kNparCha);
302 if (fClengthPH[iplan][icham] > 0.0) {
303 sprintf(cTagV,"UD%02d",iDet+kNdet);
304 parCha[0] = fCwidth[iplan]/2. + fgkCroW;
305 parCha[1] = fClengthPH[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+kNdet);
310 parCha[0] = fCwidth[iplan]/2. + fgkCroW - fgkCcuT;
311 parCha[1] = fClengthPH[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+kNdet);
316 parCha[0] = fCwidth[iplan]/2. + fgkCroW;
317 parCha[1] = fClengthPH[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+kNdet);
322 parCha[0] = fCwidth[iplan]/2. + fgkCroW - fgkCauT;
323 parCha[1] = fClengthPH[iplan][icham]/2. - fgkHspace/2.- fgkCauT;
325 gMC->Gsvolu(cTagV,"BOX ",idtmed[1302-1],parCha,kNparCha);
327 if (fClengthRH[iplan][icham] > 0.0) {
328 sprintf(cTagV,"UD%02d",iDet+2*kNdet);
329 parCha[0] = fCwidth[iplan]/2. + fgkCroW;
330 parCha[1] = fClengthRH[iplan][icham]/2. - fgkHspace/2.;
331 parCha[2] = fgkCamH/2.;
332 gMC->Gsvolu(cTagV,"BOX ",idtmed[1307-1],parCha,kNparCha);
333 // The inner part of the G10 frame (air)
334 sprintf(cTagV,"UE%02d",iDet+2*kNdet);
335 parCha[0] = fCwidth[iplan]/2. + fgkCroW - fgkCcuT;
336 parCha[1] = fClengthRH[iplan][icham]/2. - fgkHspace/2.- fgkCcuT;
338 gMC->Gsvolu(cTagV,"BOX ",idtmed[1302-1],parCha,kNparCha);
339 // The aluminum frames
340 sprintf(cTagV,"UF%02d",iDet+2*kNdet);
341 parCha[0] = fCwidth[iplan]/2. + fgkCroW;
342 parCha[1] = fClengthRH[iplan][icham]/2. - fgkHspace/2.;
343 parCha[2] = fgkCroH/2.;
344 gMC->Gsvolu(cTagV,"BOX ",idtmed[1301-1],parCha,kNparCha);
345 // The inner part of the aluminum frames
346 sprintf(cTagV,"UG%02d",iDet+2*kNdet);
347 parCha[0] = fCwidth[iplan]/2. + fgkCroW - fgkCauT;
348 parCha[1] = fClengthRH[iplan][icham]/2. - fgkHspace/2.- fgkCauT;
350 gMC->Gsvolu(cTagV,"BOX ",idtmed[1302-1],parCha,kNparCha);
353 // The material layers inside the chambers
356 // Rohacell layer (radiator)
357 parCha[2] = fgkRaThick/2;
358 sprintf(cTagV,"UH%02d",iDet);
359 gMC->Gsvolu(cTagV,"BOX ",idtmed[1315-1],parCha,kNparCha);
360 // Mylar layer (entrance window + HV cathode)
361 parCha[2] = fgkMyThick/2;
362 sprintf(cTagV,"UI%02d",iDet);
363 gMC->Gsvolu(cTagV,"BOX ",idtmed[1308-1],parCha,kNparCha);
364 // Xe/Isobutane layer (drift volume)
365 parCha[2] = fgkDrThick/2.;
366 sprintf(cTagV,"UJ%02d",iDet);
367 gMC->Gsvolu(cTagV,"BOX ",idtmed[1309-1],parCha,kNparCha);
368 // Xe/Isobutane layer (amplification volume)
369 parCha[2] = fgkAmThick/2.;
370 sprintf(cTagV,"UK%02d",iDet);
371 gMC->Gsvolu(cTagV,"BOX ",idtmed[1309-1],parCha,kNparCha);
372 // Cu layer (pad plane)
373 parCha[2] = fgkCuThick/2;
374 sprintf(cTagV,"UL%02d",iDet);
375 gMC->Gsvolu(cTagV,"BOX ",idtmed[1305-1],parCha,kNparCha);
376 // G10 layer (support structure / honeycomb)
377 parCha[2] = fgkSuThick/2;
378 sprintf(cTagV,"UM%02d",iDet);
379 gMC->Gsvolu(cTagV,"BOX ",idtmed[1313-1],parCha,kNparCha);
380 // Cu layer (FEE + signal lines)
381 parCha[2] = fgkFeThick/2;
382 sprintf(cTagV,"UN%02d",iDet);
383 gMC->Gsvolu(cTagV,"BOX ",idtmed[1305-1],parCha,kNparCha);
384 // Al layer (cooling devices)
385 parCha[2] = fgkCoThick/2;
386 sprintf(cTagV,"UO%02d",iDet);
387 gMC->Gsvolu(cTagV,"BOX ",idtmed[1301-1],parCha,kNparCha);
388 // Water layer (cooling)
389 parCha[2] = fgkWaThick/2;
390 sprintf(cTagV,"UP%02d",iDet);
391 gMC->Gsvolu(cTagV,"BOX ",idtmed[1314-1],parCha,kNparCha);
392 if (fClengthPH[iplan][icham] > 0.0) {
393 // Rohacell layer (radiator)
394 parCha[2] = fgkRaThick/2;
395 sprintf(cTagV,"UH%02d",iDet+kNdet);
396 gMC->Gsvolu(cTagV,"BOX ",idtmed[1315-1],parCha,kNparCha);
397 // Mylar layer (entrance window + HV cathode)
398 parCha[2] = fgkMyThick/2;
399 sprintf(cTagV,"UI%02d",iDet+kNdet);
400 gMC->Gsvolu(cTagV,"BOX ",idtmed[1308-1],parCha,kNparCha);
401 // Xe/Isobutane layer (drift volume)
402 parCha[2] = fgkDrThick/2.;
403 sprintf(cTagV,"UJ%02d",iDet+kNdet);
404 gMC->Gsvolu(cTagV,"BOX ",idtmed[1309-1],parCha,kNparCha);
405 // Xe/Isobutane layer (amplification volume)
406 parCha[2] = fgkAmThick/2.;
407 sprintf(cTagV,"UK%02d",iDet+kNdet);
408 gMC->Gsvolu(cTagV,"BOX ",idtmed[1309-1],parCha,kNparCha);
409 // Cu layer (pad plane)
410 parCha[2] = fgkCuThick/2;
411 sprintf(cTagV,"UL%02d",iDet+kNdet);
412 gMC->Gsvolu(cTagV,"BOX ",idtmed[1305-1],parCha,kNparCha);
413 // G10 layer (support structure / honeycomb)
414 parCha[2] = fgkSuThick/2;
415 sprintf(cTagV,"UM%02d",iDet+kNdet);
416 gMC->Gsvolu(cTagV,"BOX ",idtmed[1313-1],parCha,kNparCha);
417 // Cu layer (FEE + signal lines)
418 parCha[2] = fgkFeThick/2;
419 sprintf(cTagV,"UN%02d",iDet+kNdet);
420 gMC->Gsvolu(cTagV,"BOX ",idtmed[1305-1],parCha,kNparCha);
421 // Al layer (cooling devices)
422 parCha[2] = fgkCoThick/2;
423 sprintf(cTagV,"UO%02d",iDet+kNdet);
424 gMC->Gsvolu(cTagV,"BOX ",idtmed[1301-1],parCha,kNparCha);
425 // Water layer (cooling)
426 parCha[2] = fgkWaThick/2;
427 sprintf(cTagV,"UP%02d",iDet+kNdet);
428 gMC->Gsvolu(cTagV,"BOX ",idtmed[1314-1],parCha,kNparCha);
430 if (fClengthRH[iplan][icham] > 0.0) {
431 // Rohacell layer (radiator)
432 parCha[2] = fgkRaThick/2;
433 sprintf(cTagV,"UH%02d",iDet+2*kNdet);
434 gMC->Gsvolu(cTagV,"BOX ",idtmed[1315-1],parCha,kNparCha);
435 // Mylar layer (entrance window + HV cathode)
436 parCha[2] = fgkMyThick/2;
437 sprintf(cTagV,"UI%02d",iDet+2*kNdet);
438 gMC->Gsvolu(cTagV,"BOX ",idtmed[1308-1],parCha,kNparCha);
439 // Xe/Isobutane layer (drift volume)
440 parCha[2] = fgkDrThick/2.;
441 sprintf(cTagV,"UJ%02d",iDet+2*kNdet);
442 gMC->Gsvolu(cTagV,"BOX ",idtmed[1309-1],parCha,kNparCha);
443 // Xe/Isobutane layer (amplification volume)
444 parCha[2] = fgkAmThick/2.;
445 sprintf(cTagV,"UK%02d",iDet+2*kNdet);
446 gMC->Gsvolu(cTagV,"BOX ",idtmed[1309-1],parCha,kNparCha);
447 // Cu layer (pad plane)
448 parCha[2] = fgkCuThick/2;
449 sprintf(cTagV,"UL%02d",iDet+2*kNdet);
450 gMC->Gsvolu(cTagV,"BOX ",idtmed[1305-1],parCha,kNparCha);
451 // G10 layer (support structure / honeycomb)
452 parCha[2] = fgkSuThick/2;
453 sprintf(cTagV,"UM%02d",iDet+2*kNdet);
454 gMC->Gsvolu(cTagV,"BOX ",idtmed[1313-1],parCha,kNparCha);
455 // Cu layer (FEE + signal lines)
456 parCha[2] = fgkFeThick/2;
457 sprintf(cTagV,"UN%02d",iDet+2*kNdet);
458 gMC->Gsvolu(cTagV,"BOX ",idtmed[1305-1],parCha,kNparCha);
459 // Al layer (cooling devices)
460 parCha[2] = fgkCoThick/2.;
461 sprintf(cTagV,"UO%02d",iDet+2*kNdet);
462 gMC->Gsvolu(cTagV,"BOX ",idtmed[1301-1],parCha,kNparCha);
463 // Water layer (cooling)
464 parCha[2] = fgkWaThick/2;
465 sprintf(cTagV,"UP%02d",iDet+2*kNdet);
466 gMC->Gsvolu(cTagV,"BOX ",idtmed[1314-1],parCha,kNparCha);
469 // Position the layers in the chambers
473 // Rohacell layer (radiator)
475 sprintf(cTagV,"UH%02d",iDet);
476 sprintf(cTagM,"UC%02d",iDet);
477 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
478 // Mylar layer (entrance window + HV cathode)
480 sprintf(cTagV,"UI%02d",iDet);
481 sprintf(cTagM,"UC%02d",iDet);
482 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
483 // Xe/Isobutane layer (drift volume)
485 sprintf(cTagV,"UJ%02d",iDet);
486 sprintf(cTagM,"UC%02d",iDet);
487 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
489 // Xe/Isobutane layer (amplification volume)
491 sprintf(cTagV,"UK%02d",iDet);
492 sprintf(cTagM,"UE%02d",iDet);
493 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
495 // Cu layer (pad plane)
497 sprintf(cTagV,"UL%02d",iDet);
498 sprintf(cTagM,"UG%02d",iDet);
499 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
500 // G10 layer (support structure)
502 sprintf(cTagV,"UM%02d",iDet);
503 sprintf(cTagM,"UG%02d",iDet);
504 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
505 // Cu layer (FEE + signal lines)
507 sprintf(cTagV,"UN%02d",iDet);
508 sprintf(cTagM,"UG%02d",iDet);
509 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
510 // Al layer (cooling devices)
512 sprintf(cTagV,"UO%02d",iDet);
513 sprintf(cTagM,"UG%02d",iDet);
514 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
515 // Water layer (cooling)
517 sprintf(cTagV,"UP%02d",iDet);
518 sprintf(cTagM,"UG%02d",iDet);
519 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");
554 // Cu layer (FEE + signal lines)
556 sprintf(cTagV,"UN%02d",iDet+kNdet);
557 sprintf(cTagM,"UG%02d",iDet+kNdet);
558 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
559 // Al layer (cooling devices)
561 sprintf(cTagV,"UO%02d",iDet+kNdet);
562 sprintf(cTagM,"UG%02d",iDet+kNdet);
563 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
564 // Water layer (cooling)
566 sprintf(cTagV,"UP%02d",iDet+kNdet);
567 sprintf(cTagM,"UG%02d",iDet+kNdet);
568 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
570 if (fClengthRH[iplan][icham] > 0.0) {
572 // Rohacell layer (radiator)
574 sprintf(cTagV,"UH%02d",iDet+2*kNdet);
575 sprintf(cTagM,"UC%02d",iDet+2*kNdet);
576 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
577 // Mylar layer (entrance window + HV cathode)
579 sprintf(cTagV,"UI%02d",iDet+2*kNdet);
580 sprintf(cTagM,"UC%02d",iDet+2*kNdet);
581 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
582 // Xe/Isobutane layer (drift volume)
584 sprintf(cTagV,"UJ%02d",iDet+2*kNdet);
585 sprintf(cTagM,"UC%02d",iDet+2*kNdet);
586 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
588 // Xe/Isobutane layer (amplification volume)
590 sprintf(cTagV,"UK%02d",iDet+2*kNdet);
591 sprintf(cTagM,"UE%02d",iDet+2*kNdet);
592 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
594 // Cu layer (pad plane)
596 sprintf(cTagV,"UL%02d",iDet+2*kNdet);
597 sprintf(cTagM,"UG%02d",iDet+2*kNdet);
598 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
599 // G10 layer (support structure)
601 sprintf(cTagV,"UM%02d",iDet+2*kNdet);
602 sprintf(cTagM,"UG%02d",iDet+2*kNdet);
603 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
604 // Cu layer (FEE + signal lines)
606 sprintf(cTagV,"UN%02d",iDet+2*kNdet);
607 sprintf(cTagM,"UG%02d",iDet+2*kNdet);
608 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
609 // Al layer (cooling devices)
611 sprintf(cTagV,"UO%02d",iDet+2*kNdet);
612 sprintf(cTagM,"UG%02d",iDet+2*kNdet);
613 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
614 // Water layer (cooling)
616 sprintf(cTagV,"UP%02d",iDet+2*kNdet);
617 sprintf(cTagM,"UG%02d",iDet+2*kNdet);
618 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");
641 if (fClengthPH[iplan][icham] > 0.0) {
642 // The inside of the lower G10 frame
643 sprintf(cTagV,"UC%02d",iDet+kNdet);
644 sprintf(cTagM,"UB%02d",iDet+kNdet);
645 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
646 // The lower G10 frame inside the aluminum frame
647 sprintf(cTagV,"UB%02d",iDet+kNdet);
648 sprintf(cTagM,"UA%02d",iDet+kNdet);
649 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
650 // The inside of the upper G10 frame
651 sprintf(cTagV,"UE%02d",iDet+kNdet);
652 sprintf(cTagM,"UD%02d",iDet+kNdet);
653 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
654 // The inside of the upper aluminum frame
655 sprintf(cTagV,"UG%02d",iDet+kNdet);
656 sprintf(cTagM,"UF%02d",iDet+kNdet);
657 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
659 if (fClengthRH[iplan][icham] > 0.0) {
660 // The inside of the lower G10 frame
661 sprintf(cTagV,"UC%02d",iDet+2*kNdet);
662 sprintf(cTagM,"UB%02d",iDet+2*kNdet);
663 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
664 // The lower G10 frame inside the aluminum frame
665 sprintf(cTagV,"UB%02d",iDet+2*kNdet);
666 sprintf(cTagM,"UA%02d",iDet+2*kNdet);
667 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
668 // The inside of the upper G10 frame
669 sprintf(cTagV,"UE%02d",iDet+2*kNdet);
670 sprintf(cTagM,"UD%02d",iDet+2*kNdet);
671 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
672 // The inside of the upper aluminum frame
673 sprintf(cTagV,"UG%02d",iDet+2*kNdet);
674 sprintf(cTagM,"UF%02d",iDet+2*kNdet);
675 gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
678 // Position the frames of the chambers in the TRD mother volume
680 ypos = - fClength[iplan][0] - fClength[iplan][1] - fClength[iplan][2]/2.;
681 for (Int_t ic = 0; ic < icham; ic++) {
682 ypos += fClength[iplan][ic];
684 ypos += fClength[iplan][icham]/2.;
685 zpos = fgkCraH/2. + fgkCdrH/2. - fgkSheight/2. + iplan * (fgkCH + fgkVspace);
686 // The lower aluminum frame, radiator + drift region
687 sprintf(cTagV,"UA%02d",iDet);
688 gMC->Gspos(cTagV,1,"UTR1",xpos,ypos,zpos,0,"ONLY");
689 // The upper G10 frame, amplification region
690 sprintf(cTagV,"UD%02d",iDet);
691 zpos += fgkCamH/2. + fgkCraH/2. + fgkCdrH/2.;
692 gMC->Gspos(cTagV,1,"UTR1",xpos,ypos,zpos,0,"ONLY");
693 // The upper aluminum frame
694 sprintf(cTagV,"UF%02d",iDet);
695 zpos += fgkCroH/2. + fgkCamH/2.;
696 gMC->Gspos(cTagV,1,"UTR1",xpos,ypos,zpos,0,"ONLY");
697 if (fClengthPH[iplan][icham] > 0.0) {
699 ypos = - fgkSlenTR2/2.;
700 for (Int_t ic = 0; ic < icham; ic++) {
701 ypos += fClengthPH[iplan][ic];
703 ypos += fClengthPH[iplan][icham]/2.;
704 zpos = fgkCraH/2. + fgkCdrH/2. - fgkSheight/2. + iplan * (fgkCH + fgkVspace);
705 // The lower aluminum frame, radiator + drift region
706 sprintf(cTagV,"UA%02d",iDet+kNdet);
707 gMC->Gspos(cTagV,1,"UTR2",xpos,ypos,zpos,0,"ONLY");
708 // The upper G10 frame, amplification region
709 sprintf(cTagV,"UD%02d",iDet+kNdet);
710 zpos += fgkCamH/2. + fgkCraH/2. + fgkCdrH/2.;
711 gMC->Gspos(cTagV,1,"UTR2",xpos,ypos,zpos,0,"ONLY");
712 // The upper aluminum frame
713 sprintf(cTagV,"UF%02d",iDet+kNdet);
714 zpos += fgkCroH/2. + fgkCamH/2.;
715 gMC->Gspos(cTagV,1,"UTR2",xpos,ypos,zpos,0,"ONLY");
717 if (fClengthRH[iplan][icham] > 0.0) {
719 ypos = - fgkSlenTR3/2.;
720 for (Int_t ic = 0; ic < icham; ic++) {
721 ypos += fClengthRH[iplan][ic];
723 ypos += fClengthRH[iplan][icham]/2.;
724 zpos = fgkCraH/2. + fgkCdrH/2. - fgkSheight/2. + iplan * (fgkCH + fgkVspace);
725 // The lower aluminum frame, radiator + drift region
726 sprintf(cTagV,"UA%02d",iDet+2*kNdet);
727 gMC->Gspos(cTagV,1,"UTR3",xpos,ypos,zpos,0,"ONLY");
728 // The upper G10 frame, amplification region
729 sprintf(cTagV,"UD%02d",iDet+2*kNdet);
730 zpos += fgkCamH/2. + fgkCraH/2. + fgkCdrH/2.;
731 gMC->Gspos(cTagV,1,"UTR3",xpos,ypos,zpos,0,"ONLY");
732 // The upper aluminum frame
733 sprintf(cTagV,"UF%02d",iDet+2*kNdet);
734 zpos += fgkCroH/2. + fgkCamH/2.;
735 gMC->Gspos(cTagV,1,"UTR3",xpos,ypos,zpos,0,"ONLY");
744 gMC->Gspos("UTR1",1,"BTR1",xpos,ypos,zpos,0,"ONLY");
745 gMC->Gspos("UTR2",2,"BTR2",xpos,ypos,zpos,0,"ONLY");
746 gMC->Gspos("UTR3",3,"BTR3",xpos,ypos,zpos,0,"ONLY");
750 //_____________________________________________________________________________
751 void AliTRDgeometryHole::SetOldGeometry()
754 // Use the old chamber lengths
760 AliTRDgeometry::SetOldGeometry();
762 // The outer lengths of the chambers for the sectors with holes for the PHOS
763 Float_t lengthPH[kNplan][kNcham] = { { 0.0, 0.0, 0.0, 116.5, 123.5 }
764 , { 0.0, 0.0, 0.0, 124.0, 131.0 }
765 , { 0.0, 0.0, 0.0, 131.5, 134.5 }
766 , { 0.0, 0.0, 0.0, 139.0, 142.0 }
767 , { 0.0, 0.0, 0.0, 146.0, 142.0 }
768 , { 0.0, 0.0, 0.0, 153.5, 134.5 } };
770 // The outer lengths of the chambers for the sectors with holes for the RICH
771 Float_t lengthRH[kNplan][kNcham] = { { 0.0, 0.0, 0.0, 0.0, 86.5 }
772 , { 0.0, 0.0, 0.0, 0.0, 101.5 }
773 , { 0.0, 0.0, 0.0, 0.0, 112.5 }
774 , { 0.0, 0.0, 0.0, 0.0, 127.5 }
775 , { 0.0, 0.0, 0.0, 0.0, 134.5 }
776 , { 0.0, 0.0, 0.0, 0.0, 134.5 } };
778 for (icham = 0; icham < kNcham; icham++) {
779 for (iplan = 0; iplan < kNplan; iplan++) {
780 fClengthPH[iplan][icham] = lengthPH[iplan][icham];
781 fClengthRH[iplan][icham] = lengthRH[iplan][icham];