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.4 2000/11/01 14:53:21 cblume
19 Merge with TRD-develop
21 Revision 1.1.4.4 2000/10/15 23:40:01 cblume
24 Revision 1.1.4.3 2000/10/06 16:49:46 cblume
27 Revision 1.1.4.2 2000/10/04 16:34:58 cblume
28 Replace include files by forward declarations
30 Revision 1.1.4.1 2000/09/22 14:43:41 cblume
31 Allow the pad/timebin-dimensions to be changed after initialization
33 Revision 1.3 2000/10/02 21:28:19 fca
34 Removal of useless dependecies via forward declarations
36 Revision 1.2 2000/06/08 18:32:58 cblume
37 Make code compliant to coding conventions
39 Revision 1.1 2000/02/28 19:01:42 cblume
44 ///////////////////////////////////////////////////////////////////////////////
46 // TRD geometry with holes //
48 ///////////////////////////////////////////////////////////////////////////////
52 #include "AliTRDgeometryHole.h"
54 ClassImp(AliTRDgeometryHole)
56 //_____________________________________________________________________________
57 AliTRDgeometryHole::AliTRDgeometryHole():AliTRDgeometry()
60 // AliTRDgeometryHole default constructor
67 //_____________________________________________________________________________
68 AliTRDgeometryHole::~AliTRDgeometryHole()
71 // AliTRDgeometryHole destructor
76 //_____________________________________________________________________________
77 void AliTRDgeometryHole::Init()
80 // Initializes the geometry parameter
85 // The length of the inner chambers
86 for (iplan = 0; iplan < fgkNplan; iplan++)
87 fClengthI[iplan] = 110.0;
89 // The length of the middle chambers
90 fClengthM1[0] = 123.5;
91 fClengthM1[1] = 131.0;
92 fClengthM1[2] = 138.5;
93 fClengthM1[3] = 146.0;
94 fClengthM1[4] = 153.0;
95 fClengthM1[5] = 160.5;
97 fClengthM2[0] = 123.5 - 7.0;
98 fClengthM2[1] = 131.0 - 7.0;
99 fClengthM2[2] = 138.5 - 7.0;
100 fClengthM2[3] = 146.0 - 7.0;
101 fClengthM2[4] = 153.0 - 7.0;
102 fClengthM2[5] = 160.4 - 7.0;
104 // The length of the outer chambers
105 fClengthO1[0] = 123.5;
106 fClengthO1[1] = 131.0;
107 fClengthO1[2] = 134.5;
108 fClengthO1[3] = 142.0;
109 fClengthO1[4] = 142.0;
110 fClengthO1[5] = 134.5;
112 fClengthO2[0] = 123.5;
113 fClengthO2[1] = 131.0;
114 fClengthO2[2] = 134.5;
115 fClengthO2[3] = 142.0;
116 fClengthO2[4] = 142.0;
117 fClengthO2[5] = 134.5;
119 fClengthO3[0] = 86.5;
120 fClengthO3[1] = 101.5;
121 fClengthO3[2] = 112.5;
122 fClengthO3[3] = 127.5;
123 fClengthO3[4] = 134.5;
124 fClengthO3[5] = 134.5;
126 // The maximum number of pads
127 // and the position of pad 0,0,0
129 // chambers seen from the top:
130 // +----------------------------+
136 // +----------------------------+ +------>
138 // chambers seen from the side: ^
139 // +----------------------------+ time|
142 // +----------------------------+ +------>
146 // The pad row (z-direction)
151 //_____________________________________________________________________________
152 void AliTRDgeometryHole::SetNRowPad(Int_t p, Int_t c, Int_t npad)
155 // Redefines the number of pads in raw direction for
156 // a given plane and chamber number
159 Float_t clengthI = fClengthI[p];
160 Float_t clengthM = fClengthM1[p];
161 Float_t clengthO = fClengthO1[p];
163 for (Int_t iSect = 0; iSect < fgkNsect; iSect++) {
165 fRowMax[p][c][iSect] = npad;
167 fRowPadSize[p][c][iSect] = (clengthI - 2. * fgkCcthick)
168 / fRowMax[p][c][iSect];
170 if ((c == 1) || (c == 3)) {
171 fRowPadSize[p][c][iSect] = (clengthM - 2. * fgkCcthick)
172 / fRowMax[p][c][iSect];
174 if ((c == 0) || (c == 4)) {
175 fRowPadSize[p][c][iSect] = (clengthO - 2. * fgkCcthick)
176 / fRowMax[p][c][iSect];
183 //_____________________________________________________________________________
184 void AliTRDgeometryHole::SetNRowPad()
187 // Defines the pad size in row direction
190 for (Int_t iPlan = 0; iPlan < fgkNplan; iPlan++) {
192 Float_t clengthI = fClengthI[iPlan];
193 Float_t clengthM = fClengthM1[iPlan];
194 Float_t clengthO = fClengthO1[iPlan];
196 for (Int_t iSect = 0; iSect < fgkNsect; iSect++) {
198 fRow0[iPlan][0][iSect] = -clengthI/2. - clengthM - clengthO + fgkCcthick;
199 fRow0[iPlan][1][iSect] = -clengthI/2. - clengthM + fgkCcthick;
200 fRow0[iPlan][2][iSect] = -clengthI/2. + fgkCcthick;
201 fRow0[iPlan][3][iSect] = clengthI/2. + fgkCcthick;
202 fRow0[iPlan][4][iSect] = clengthI/2. + clengthM + fgkCcthick;
204 for (Int_t iCham = 0; iCham < fgkNcham; iCham++) {
207 fRowMax[iPlan][iCham][iSect] = 18;
208 fRowPadSize[iPlan][iCham][iSect] = (clengthI - 2. * fgkCcthick)
209 / fRowMax[iPlan][iCham][iSect];
211 if ((iCham == 1) || (iCham == 3)) {
212 fRowMax[iPlan][iCham][iSect] = 24;
213 fRowPadSize[iPlan][iCham][iSect] = (clengthM - 2. * fgkCcthick)
214 / fRowMax[iPlan][iCham][iSect];
216 if ((iCham == 0) || (iCham == 4)) {
218 fRowMax[iPlan][iCham][iSect] = 24;
221 fRowMax[iPlan][iCham][iSect] = 22;
224 fRowMax[iPlan][iCham][iSect] = 20;
226 fRowPadSize[iPlan][iCham][iSect] = (clengthO - 2. * fgkCcthick)
227 / fRowMax[iPlan][iCham][iSect];
236 //_____________________________________________________________________________
237 void AliTRDgeometryHole::CreateGeometry(Int_t *idtmed)
240 // Create the TRD geometry with hole
245 const Int_t kNparTrd = 4;
246 const Int_t kNparCha = 3;
247 const Int_t kNplan = fgkNplan;
249 Float_t parTrd[kNparTrd];
250 Float_t parCha[kNparCha];
252 Float_t xpos, ypos, zpos;
254 AliTRDgeometry::CreateGeometry(idtmed);
256 // The TRD mother volume for one sector (Air) (dimensions identical to BTR1)
257 parTrd[0] = fgkSwidth1/2.;
258 parTrd[1] = fgkSwidth2/2.;
259 parTrd[2] = fgkSlenTR1/2.;
260 parTrd[3] = fgkSheight/2.;
261 gMC->Gsvolu("TRD1","TRD1",idtmed[1302-1],parTrd,kNparTrd);
263 // The TRD mother volume for one sector (Air) (dimensions identical to BTR2)
264 parTrd[0] = fgkSwidth1/2.;
265 parTrd[1] = fgkSwidth2/2.;
266 parTrd[2] = fgkSlenTR2/2.;
267 parTrd[3] = fgkSheight/2.;
268 gMC->Gsvolu("TRD2","TRD1",idtmed[1302-1],parTrd,kNparTrd);
270 // The TRD mother volume for one sector (Air) (dimensions identical to BTR3)
271 parTrd[0] = fgkSwidth1/2.;
272 parTrd[1] = fgkSwidth2/2.;
273 parTrd[2] = fgkSlenTR3/2.;
274 parTrd[3] = fgkSheight/2.;
275 gMC->Gsvolu("TRD3","TRD1",idtmed[1302-1],parTrd,kNparTrd);
277 // Position the chambers in the TRD mother volume
278 for (iplan = 1; iplan <= kNplan; iplan++) {
280 // The inner chambers ---------------------------------------------------------------
282 // the aluminum frame
283 parCha[0] = fCwidth[iplan-1]/2.;
284 parCha[1] = fClengthI[iplan-1]/2.;
285 parCha[2] = fgkCaframe/2.;
288 zpos = fgkCheight - fgkCaframe/2. - fgkSheight/2. + (iplan-1) * (fgkCheight + fgkCspace);
289 gMC->Gsposp("UAFI",iplan ,"TRD1",xpos,ypos,zpos,0,"MANY",parCha,kNparCha);
291 // the inner part of the aluminum frame
292 parCha[0] = fCwidth[iplan-1]/2. - fgkCathick;
293 parCha[1] = fClengthI[iplan-1]/2. - fgkCathick;
294 parCha[2] = fgkCaframe/2.;
297 zpos = fgkCheight - fgkCaframe/2. - fgkSheight/2. + (iplan-1) * (fgkCheight + fgkCspace);
298 gMC->Gsposp("UAII",iplan ,"TRD1",xpos,ypos,zpos,0,"ONLY",parCha,kNparCha);
301 parCha[0] = fCwidth[iplan-1]/2.;
302 parCha[1] = fClengthI[iplan-1]/2.;
303 parCha[2] = fgkCcframe/2.;
306 zpos = fgkCcframe/2. - fgkSheight/2. + (iplan-1) * (fgkCheight + fgkCspace);
307 gMC->Gsposp("UCFI",iplan ,"TRD1",xpos,ypos,zpos,0,"MANY",parCha,kNparCha);
309 // the inner part of the carbon frame
310 parCha[0] = fCwidth[iplan-1]/2. - fgkCcthick;
311 parCha[1] = fClengthI[iplan-1]/2. - fgkCcthick;
312 parCha[2] = fgkCcframe/2.;
315 zpos = fgkCcframe/2. - fgkSheight/2. + (iplan-1) * (fgkCheight + fgkCspace);
316 gMC->Gsposp("UCII",iplan ,"TRD1",xpos,ypos,zpos,0,"ONLY",parCha,kNparCha);
318 // The middle chambers --------------------------------------------------------------
320 // the aluminum frame
321 parCha[0] = fCwidth[iplan-1]/2.;
322 parCha[1] = fClengthM1[iplan-1]/2.;
323 parCha[2] = fgkCaframe/2.;
325 ypos = fClengthI[iplan-1]/2.+ fClengthM1[iplan-1]/2.;
326 zpos = fgkCheight - fgkCaframe/2. - fgkSheight/2. + (iplan-1) * (fgkCheight + fgkCspace);
327 gMC->Gsposp("UAFM",iplan ,"TRD1",xpos, ypos,zpos,0,"MANY",parCha,kNparCha);
328 gMC->Gsposp("UAFM",iplan+ kNplan,"TRD1",xpos,-ypos,zpos,0,"MANY",parCha,kNparCha);
329 parCha[0] = fCwidth[iplan-1]/2.;
330 parCha[1] = fClengthM2[iplan-1]/2.;
331 parCha[2] = fgkCaframe/2.;
333 ypos = fClengthM2[iplan-1]/2. - fgkSlenTR2/2.;
334 zpos = fgkCheight - fgkCaframe/2. - fgkSheight/2. + (iplan-1) * (fgkCheight + fgkCspace);
335 gMC->Gsposp("UAFM",iplan+2*kNplan,"TRD2",xpos, ypos,zpos,0,"MANY",parCha,kNparCha);
337 // the inner part of the aluminum frame
338 parCha[0] = fCwidth[iplan-1]/2. - fgkCathick;
339 parCha[1] = fClengthM1[iplan-1]/2. - fgkCathick;
340 parCha[2] = fgkCaframe/2.;
342 ypos = fClengthI[iplan-1]/2. + fClengthM1[iplan-1]/2.;
343 zpos = fgkCheight - fgkCaframe/2. - fgkSheight/2. + (iplan-1) * (fgkCheight + fgkCspace);
344 gMC->Gsposp("UAIM",iplan ,"TRD1",xpos, ypos,zpos,0,"ONLY",parCha,kNparCha);
345 gMC->Gsposp("UAIM",iplan+ kNplan,"TRD1",xpos,-ypos,zpos,0,"ONLY",parCha,kNparCha);
346 parCha[0] = fCwidth[iplan-1]/2. - fgkCathick;
347 parCha[1] = fClengthM2[iplan-1]/2. - fgkCathick;
348 parCha[2] = fgkCaframe/2.;
350 ypos = fClengthM2[iplan-1]/2. - fgkSlenTR2/2.;
351 zpos = fgkCheight - fgkCaframe/2. - fgkSheight/2. + (iplan-1) * (fgkCheight + fgkCspace);
352 gMC->Gsposp("UAIM",iplan+2*kNplan,"TRD2",xpos, ypos,zpos,0,"ONLY",parCha,kNparCha);
355 parCha[0] = fCwidth[iplan-1]/2.;
356 parCha[1] = fClengthM1[iplan-1]/2.;
357 parCha[2] = fgkCcframe/2.;
359 ypos = fClengthI[iplan-1]/2. + fClengthM1[iplan-1]/2.;
360 zpos = fgkCcframe/2. - fgkSheight/2. + (iplan-1) * (fgkCheight + fgkCspace);
361 gMC->Gsposp("UCFM",iplan ,"TRD1",xpos, ypos,zpos,0,"MANY",parCha,kNparCha);
362 gMC->Gsposp("UCFM",iplan+ kNplan,"TRD1",xpos,-ypos,zpos,0,"MANY",parCha,kNparCha);
363 parCha[0] = fCwidth[iplan-1]/2.;
364 parCha[1] = fClengthM2[iplan-1]/2.;
365 parCha[2] = fgkCcframe/2.;
367 ypos = fClengthM2[iplan-1]/2. - fgkSlenTR2/2.;
368 zpos = fgkCcframe/2. - fgkSheight/2. + (iplan-1) * (fgkCheight + fgkCspace);
369 gMC->Gsposp("UCFM",iplan+2*kNplan,"TRD2",xpos, ypos,zpos,0,"MANY",parCha,kNparCha);
371 // the inner part of the carbon frame
372 parCha[0] = fCwidth[iplan-1]/2. - fgkCcthick;
373 parCha[1] = fClengthM1[iplan-1]/2. - fgkCcthick;
374 parCha[2] = fgkCcframe/2.;
376 ypos = fClengthI[iplan-1]/2. + fClengthM1[iplan-1]/2.;
377 zpos = fgkCcframe/2. - fgkSheight/2. + (iplan-1) * (fgkCheight + fgkCspace);
378 gMC->Gsposp("UCIM",iplan ,"TRD1",xpos, ypos,zpos,0,"ONLY",parCha,kNparCha);
379 gMC->Gsposp("UCIM",iplan+ kNplan,"TRD1",xpos,-ypos,zpos,0,"ONLY",parCha,kNparCha);
380 parCha[0] = fCwidth[iplan-1]/2. - fgkCcthick;
381 parCha[1] = fClengthM2[iplan-1]/2. - fgkCcthick;
382 parCha[2] = fgkCcframe/2.;
384 ypos = fClengthM2[iplan-1]/2. - fgkSlenTR2/2.;
385 zpos = fgkCcframe/2. - fgkSheight/2. + (iplan-1) * (fgkCheight + fgkCspace);
386 gMC->Gsposp("UCIM",iplan+2*kNplan,"TRD2",xpos, ypos,zpos,0,"ONLY",parCha,kNparCha);
388 // The outer chambers ---------------------------------------------------------------
390 // the aluminum frame
391 parCha[0] = fCwidth[iplan-1]/2.;
392 parCha[1] = fClengthO1[iplan-1]/2.;
393 parCha[2] = fgkCaframe/2.;
395 ypos = fClengthI[iplan-1]/2. + fClengthM1[iplan-1] + fClengthO1[iplan-1]/2.;
396 zpos = fgkCheight - fgkCaframe/2. - fgkSheight/2. + (iplan-1) * (fgkCheight + fgkCspace);
397 gMC->Gsposp("UAFO",iplan ,"TRD1",xpos, ypos,zpos,0,"MANY",parCha,kNparCha);
398 gMC->Gsposp("UAFO",iplan+ kNplan,"TRD1",xpos,-ypos,zpos,0,"MANY",parCha,kNparCha);
399 parCha[0] = fCwidth[iplan-1]/2.;
400 parCha[1] = fClengthO2[iplan-1]/2.;
401 parCha[2] = fgkCaframe/2.;
403 ypos = fClengthM2[iplan-1] + fClengthO2[iplan-1]/2. - fgkSlenTR2/2.;
404 zpos = fgkCheight - fgkCaframe/2. - fgkSheight/2. + (iplan-1) * (fgkCheight + fgkCspace);
405 gMC->Gsposp("UAFO",iplan+2*kNplan,"TRD2",xpos, ypos,zpos,0,"MANY",parCha,kNparCha);
406 parCha[0] = fCwidth[iplan-1]/2.;
407 parCha[1] = fClengthO3[iplan-1]/2.;
408 parCha[2] = fgkCaframe/2.;
410 ypos = fClengthO3[iplan-1]/2. - fgkSlenTR3/2.;
411 zpos = fgkCheight - fgkCaframe/2. - fgkSheight/2. + (iplan-1) * (fgkCheight + fgkCspace);
412 gMC->Gsposp("UAFO",iplan+4*kNplan,"TRD3",xpos, ypos,zpos,0,"MANY",parCha,kNparCha);
414 // the inner part of the aluminum frame
415 parCha[0] = fCwidth[iplan-1]/2. - fgkCathick;
416 parCha[1] = fClengthO1[iplan-1]/2. - fgkCathick;
417 parCha[2] = fgkCaframe/2.;
419 ypos = fClengthI[iplan-1]/2. + fClengthM1[iplan-1] + fClengthO1[iplan-1]/2.;
420 zpos = fgkCheight - fgkCaframe/2. - fgkSheight/2. + (iplan-1) * (fgkCheight + fgkCspace);
421 gMC->Gsposp("UAIO",iplan ,"TRD1",xpos, ypos,zpos,0,"ONLY",parCha,kNparCha);
422 gMC->Gsposp("UAIO",iplan+ kNplan,"TRD1",xpos,-ypos,zpos,0,"ONLY",parCha,kNparCha);
423 parCha[0] = fCwidth[iplan-1]/2. - fgkCathick;
424 parCha[1] = fClengthO2[iplan-1]/2. - fgkCathick;
425 parCha[2] = fgkCaframe/2.;
427 ypos = fClengthM2[iplan-1] + fClengthO2[iplan-1]/2. - fgkSlenTR2/2.;
428 zpos = fgkCheight - fgkCaframe/2. - fgkSheight/2. + (iplan-1) * (fgkCheight + fgkCspace);
429 gMC->Gsposp("UAIO",iplan+2*kNplan,"TRD2",xpos, ypos,zpos,0,"ONLY",parCha,kNparCha);
430 parCha[0] = fCwidth[iplan-1]/2. - fgkCathick;
431 parCha[1] = fClengthO3[iplan-1]/2. - fgkCathick;
432 parCha[2] = fgkCaframe/2.;
434 ypos = fClengthO3[iplan-1]/2. - fgkSlenTR3/2.;
435 zpos = fgkCheight - fgkCaframe/2. - fgkSheight/2. + (iplan-1) * (fgkCheight + fgkCspace);
436 gMC->Gsposp("UAIO",iplan+4*kNplan,"TRD3",xpos, ypos,zpos,0,"ONLY",parCha,kNparCha);
439 parCha[0] = fCwidth[iplan-1]/2.;
440 parCha[1] = fClengthO1[iplan-1]/2.;
441 parCha[2] = fgkCcframe/2.;
443 ypos = fClengthI[iplan-1]/2. + fClengthM1[iplan-1] + fClengthO1[iplan-1]/2.;
444 zpos = fgkCcframe/2. - fgkSheight/2. + (iplan-1) * (fgkCheight + fgkCspace);
445 gMC->Gsposp("UCFO",iplan, "TRD1",xpos, ypos,zpos,0,"MANY",parCha,kNparCha);
446 gMC->Gsposp("UCFO",iplan+ kNplan,"TRD1",xpos,-ypos,zpos,0,"MANY",parCha,kNparCha);
447 parCha[0] = fCwidth[iplan-1]/2.;
448 parCha[1] = fClengthO2[iplan-1]/2.;
449 parCha[2] = fgkCcframe/2.;
451 ypos = fClengthM2[iplan-1] + fClengthO2[iplan-1]/2. - fgkSlenTR2/2.;
452 zpos = fgkCcframe/2. - fgkSheight/2. + (iplan-1) * (fgkCheight + fgkCspace);
453 gMC->Gsposp("UCFO",iplan+2*kNplan,"TRD2",xpos, ypos,zpos,0,"MANY",parCha,kNparCha);
454 parCha[0] = fCwidth[iplan-1]/2.;
455 parCha[1] = fClengthO3[iplan-1]/2.;
456 parCha[2] = fgkCcframe/2.;
458 ypos = fClengthO3[iplan-1]/2. - fgkSlenTR3/2.;
459 zpos = fgkCcframe/2. - fgkSheight/2. + (iplan-1) * (fgkCheight + fgkCspace);
460 gMC->Gsposp("UCFO",iplan+4*kNplan,"TRD3",xpos, ypos,zpos,0,"MANY",parCha,kNparCha);
462 // the inner part of the carbon frame
463 parCha[0] = fCwidth[iplan-1]/2. - fgkCcthick;
464 parCha[1] = fClengthO1[iplan-1]/2. - fgkCcthick;
465 parCha[2] = fgkCcframe/2.;
467 ypos = fClengthI[iplan-1]/2. + fClengthM1[iplan-1] + fClengthO1[iplan-1]/2.;
468 zpos = fgkCcframe/2. - fgkSheight/2. + (iplan-1) * (fgkCheight + fgkCspace);
469 gMC->Gsposp("UCIO",iplan ,"TRD1",xpos, ypos,zpos,0,"ONLY",parCha,kNparCha);
470 gMC->Gsposp("UCIO",iplan+ kNplan,"TRD1",xpos,-ypos,zpos,0,"ONLY",parCha,kNparCha);
471 parCha[0] = fCwidth[iplan-1]/2. - fgkCcthick;
472 parCha[1] = fClengthO2[iplan-1]/2. - fgkCcthick;
473 parCha[2] = fgkCcframe/2.;
475 ypos = fClengthM2[iplan-1] + fClengthO2[iplan-1]/2. - fgkSlenTR2/2.;
476 zpos = fgkCcframe/2. - fgkSheight/2. + (iplan-1) * (fgkCheight + fgkCspace);
477 gMC->Gsposp("UCIO",iplan+2*kNplan,"TRD2",xpos, ypos,zpos,0,"ONLY",parCha,kNparCha);
478 parCha[0] = fCwidth[iplan-1]/2. - fgkCcthick;
479 parCha[1] = fClengthO3[iplan-1]/2. - fgkCcthick;
480 parCha[2] = fgkCcframe/2.;
482 ypos = fClengthO3[iplan-1]/2. - fgkSlenTR3/2.;
483 zpos = fgkCcframe/2. - fgkSheight/2. + (iplan-1) * (fgkCheight + fgkCspace);
484 gMC->Gsposp("UCIO",iplan+4*kNplan,"TRD3",xpos, ypos,zpos,0,"ONLY",parCha,kNparCha);
491 gMC->Gspos("TRD1",1,"BTR1",xpos,ypos,zpos,0,"ONLY");
492 gMC->Gspos("TRD2",1,"BTR2",xpos,ypos,zpos,0,"ONLY");
493 gMC->Gspos("TRD3",1,"BTR3",xpos,ypos,zpos,0,"ONLY");