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.5 2001/02/14 18:22:26 cblume
19 Change in the geometry of the padplane
21 Revision 1.4 2000/11/01 14:53:21 cblume
22 Merge with TRD-develop
24 Revision 1.1.4.4 2000/10/15 23:40:01 cblume
27 Revision 1.1.4.3 2000/10/06 16:49:46 cblume
30 Revision 1.1.4.2 2000/10/04 16:34:58 cblume
31 Replace include files by forward declarations
33 Revision 1.1.4.1 2000/09/22 14:43:41 cblume
34 Allow the pad/timebin-dimensions to be changed after initialization
36 Revision 1.3 2000/10/02 21:28:19 fca
37 Removal of useless dependecies via forward declarations
39 Revision 1.2 2000/06/08 18:32:58 cblume
40 Make code compliant to coding conventions
42 Revision 1.1 2000/02/28 19:01:42 cblume
47 ///////////////////////////////////////////////////////////////////////////////
49 // TRD geometry with holes //
51 ///////////////////////////////////////////////////////////////////////////////
55 #include "AliTRDgeometryHole.h"
57 ClassImp(AliTRDgeometryHole)
59 //_____________________________________________________________________________
60 AliTRDgeometryHole::AliTRDgeometryHole():AliTRDgeometry()
63 // AliTRDgeometryHole default constructor
70 //_____________________________________________________________________________
71 AliTRDgeometryHole::~AliTRDgeometryHole()
74 // AliTRDgeometryHole destructor
79 //_____________________________________________________________________________
80 void AliTRDgeometryHole::Init()
83 // Initializes the geometry parameter
88 // The length of the inner chambers
89 for (iplan = 0; iplan < fgkNplan; iplan++)
90 fClengthI[iplan] = 110.0;
92 // The length of the middle chambers
93 fClengthM1[0] = 123.5;
94 fClengthM1[1] = 131.0;
95 fClengthM1[2] = 138.5;
96 fClengthM1[3] = 146.0;
97 fClengthM1[4] = 153.0;
98 fClengthM1[5] = 160.5;
100 fClengthM2[0] = 123.5 - 7.0;
101 fClengthM2[1] = 131.0 - 7.0;
102 fClengthM2[2] = 138.5 - 7.0;
103 fClengthM2[3] = 146.0 - 7.0;
104 fClengthM2[4] = 153.0 - 7.0;
105 fClengthM2[5] = 160.4 - 7.0;
107 // The length of the outer chambers
108 fClengthO1[0] = 123.5;
109 fClengthO1[1] = 131.0;
110 fClengthO1[2] = 134.5;
111 fClengthO1[3] = 142.0;
112 fClengthO1[4] = 142.0;
113 fClengthO1[5] = 134.5;
115 fClengthO2[0] = 123.5;
116 fClengthO2[1] = 131.0;
117 fClengthO2[2] = 134.5;
118 fClengthO2[3] = 142.0;
119 fClengthO2[4] = 142.0;
120 fClengthO2[5] = 134.5;
122 fClengthO3[0] = 86.5;
123 fClengthO3[1] = 101.5;
124 fClengthO3[2] = 112.5;
125 fClengthO3[3] = 127.5;
126 fClengthO3[4] = 134.5;
127 fClengthO3[5] = 134.5;
129 // The maximum number of pads
130 // and the position of pad 0,0,0
132 // chambers seen from the top:
133 // +----------------------------+
139 // +----------------------------+ +------>
141 // chambers seen from the side: ^
142 // +----------------------------+ time|
145 // +----------------------------+ +------>
149 // The pad row (z-direction)
154 //_____________________________________________________________________________
155 void AliTRDgeometryHole::SetNRowPad(const Int_t p, const Int_t c, const Int_t npad)
158 // Redefines the number of pads in raw direction for
159 // a given plane and chamber number
162 Float_t clengthI = fClengthI[p];
163 Float_t clengthM = fClengthM1[p];
164 Float_t clengthO = fClengthO1[p];
166 for (Int_t iSect = 0; iSect < fgkNsect; iSect++) {
168 fRowMax[p][c][iSect] = npad;
170 fRowPadSize[p][c][iSect] = (clengthI - 2. * fgkCcthick)
171 / fRowMax[p][c][iSect];
173 if ((c == 1) || (c == 3)) {
174 fRowPadSize[p][c][iSect] = (clengthM - 2. * fgkCcthick)
175 / fRowMax[p][c][iSect];
177 if ((c == 0) || (c == 4)) {
178 fRowPadSize[p][c][iSect] = (clengthO - 2. * fgkCcthick)
179 / fRowMax[p][c][iSect];
186 //_____________________________________________________________________________
187 void AliTRDgeometryHole::SetNRowPad()
190 // Defines the pad size in row direction
193 for (Int_t iPlan = 0; iPlan < fgkNplan; iPlan++) {
195 Float_t clengthI = fClengthI[iPlan];
196 Float_t clengthM = fClengthM1[iPlan];
197 Float_t clengthO = fClengthO1[iPlan];
199 for (Int_t iSect = 0; iSect < fgkNsect; iSect++) {
201 fRow0[iPlan][0][iSect] = -clengthI/2. - clengthM - clengthO + fgkCcthick;
202 fRow0[iPlan][1][iSect] = -clengthI/2. - clengthM + fgkCcthick;
203 fRow0[iPlan][2][iSect] = -clengthI/2. + fgkCcthick;
204 fRow0[iPlan][3][iSect] = clengthI/2. + fgkCcthick;
205 fRow0[iPlan][4][iSect] = clengthI/2. + clengthM + fgkCcthick;
207 for (Int_t iCham = 0; iCham < fgkNcham; iCham++) {
210 fRowMax[iPlan][iCham][iSect] = 18;
211 fRowPadSize[iPlan][iCham][iSect] = (clengthI - 2. * fgkCcthick)
212 / fRowMax[iPlan][iCham][iSect];
214 if ((iCham == 1) || (iCham == 3)) {
215 fRowMax[iPlan][iCham][iSect] = 24;
216 fRowPadSize[iPlan][iCham][iSect] = (clengthM - 2. * fgkCcthick)
217 / fRowMax[iPlan][iCham][iSect];
219 if ((iCham == 0) || (iCham == 4)) {
221 fRowMax[iPlan][iCham][iSect] = 24;
224 fRowMax[iPlan][iCham][iSect] = 22;
227 fRowMax[iPlan][iCham][iSect] = 20;
229 fRowPadSize[iPlan][iCham][iSect] = (clengthO - 2. * fgkCcthick)
230 / fRowMax[iPlan][iCham][iSect];
239 //_____________________________________________________________________________
240 void AliTRDgeometryHole::CreateGeometry(Int_t *idtmed)
243 // Create the TRD geometry with hole
248 const Int_t kNparTrd = 4;
249 const Int_t kNparCha = 3;
250 const Int_t kNplan = fgkNplan;
252 Float_t parTrd[kNparTrd];
253 Float_t parCha[kNparCha];
255 Float_t xpos, ypos, zpos;
257 AliTRDgeometry::CreateGeometry(idtmed);
259 // The TRD mother volume for one sector (Air) (dimensions identical to BTR1)
260 parTrd[0] = fgkSwidth1/2.;
261 parTrd[1] = fgkSwidth2/2.;
262 parTrd[2] = fgkSlenTR1/2.;
263 parTrd[3] = fgkSheight/2.;
264 gMC->Gsvolu("TRD1","TRD1",idtmed[1302-1],parTrd,kNparTrd);
266 // The TRD mother volume for one sector (Air) (dimensions identical to BTR2)
267 parTrd[0] = fgkSwidth1/2.;
268 parTrd[1] = fgkSwidth2/2.;
269 parTrd[2] = fgkSlenTR2/2.;
270 parTrd[3] = fgkSheight/2.;
271 gMC->Gsvolu("TRD2","TRD1",idtmed[1302-1],parTrd,kNparTrd);
273 // The TRD mother volume for one sector (Air) (dimensions identical to BTR3)
274 parTrd[0] = fgkSwidth1/2.;
275 parTrd[1] = fgkSwidth2/2.;
276 parTrd[2] = fgkSlenTR3/2.;
277 parTrd[3] = fgkSheight/2.;
278 gMC->Gsvolu("TRD3","TRD1",idtmed[1302-1],parTrd,kNparTrd);
280 // Position the chambers in the TRD mother volume
281 for (iplan = 1; iplan <= kNplan; iplan++) {
283 // The inner chambers ---------------------------------------------------------------
285 // the aluminum frame
286 parCha[0] = fCwidth[iplan-1]/2.;
287 parCha[1] = fClengthI[iplan-1]/2.;
288 parCha[2] = fgkCaframe/2.;
291 zpos = fgkCheight - fgkCaframe/2. - fgkSheight/2. + (iplan-1) * (fgkCheight + fgkCspace);
292 gMC->Gsposp("UAFI",iplan ,"TRD1",xpos,ypos,zpos,0,"MANY",parCha,kNparCha);
294 // the inner part of the aluminum frame
295 parCha[0] = fCwidth[iplan-1]/2. - fgkCathick;
296 parCha[1] = fClengthI[iplan-1]/2. - fgkCathick;
297 parCha[2] = fgkCaframe/2.;
300 zpos = fgkCheight - fgkCaframe/2. - fgkSheight/2. + (iplan-1) * (fgkCheight + fgkCspace);
301 gMC->Gsposp("UAII",iplan ,"TRD1",xpos,ypos,zpos,0,"ONLY",parCha,kNparCha);
304 parCha[0] = fCwidth[iplan-1]/2.;
305 parCha[1] = fClengthI[iplan-1]/2.;
306 parCha[2] = fgkCcframe/2.;
309 zpos = fgkCcframe/2. - fgkSheight/2. + (iplan-1) * (fgkCheight + fgkCspace);
310 gMC->Gsposp("UCFI",iplan ,"TRD1",xpos,ypos,zpos,0,"MANY",parCha,kNparCha);
312 // the inner part of the carbon frame
313 parCha[0] = fCwidth[iplan-1]/2. - fgkCcthick;
314 parCha[1] = fClengthI[iplan-1]/2. - fgkCcthick;
315 parCha[2] = fgkCcframe/2.;
318 zpos = fgkCcframe/2. - fgkSheight/2. + (iplan-1) * (fgkCheight + fgkCspace);
319 gMC->Gsposp("UCII",iplan ,"TRD1",xpos,ypos,zpos,0,"ONLY",parCha,kNparCha);
321 // The middle chambers --------------------------------------------------------------
323 // the aluminum frame
324 parCha[0] = fCwidth[iplan-1]/2.;
325 parCha[1] = fClengthM1[iplan-1]/2.;
326 parCha[2] = fgkCaframe/2.;
328 ypos = fClengthI[iplan-1]/2.+ fClengthM1[iplan-1]/2.;
329 zpos = fgkCheight - fgkCaframe/2. - fgkSheight/2. + (iplan-1) * (fgkCheight + fgkCspace);
330 gMC->Gsposp("UAFM",iplan ,"TRD1",xpos, ypos,zpos,0,"MANY",parCha,kNparCha);
331 gMC->Gsposp("UAFM",iplan+ kNplan,"TRD1",xpos,-ypos,zpos,0,"MANY",parCha,kNparCha);
332 parCha[0] = fCwidth[iplan-1]/2.;
333 parCha[1] = fClengthM2[iplan-1]/2.;
334 parCha[2] = fgkCaframe/2.;
336 ypos = fClengthM2[iplan-1]/2. - fgkSlenTR2/2.;
337 zpos = fgkCheight - fgkCaframe/2. - fgkSheight/2. + (iplan-1) * (fgkCheight + fgkCspace);
338 gMC->Gsposp("UAFM",iplan+2*kNplan,"TRD2",xpos, ypos,zpos,0,"MANY",parCha,kNparCha);
340 // the inner part of the aluminum frame
341 parCha[0] = fCwidth[iplan-1]/2. - fgkCathick;
342 parCha[1] = fClengthM1[iplan-1]/2. - fgkCathick;
343 parCha[2] = fgkCaframe/2.;
345 ypos = fClengthI[iplan-1]/2. + fClengthM1[iplan-1]/2.;
346 zpos = fgkCheight - fgkCaframe/2. - fgkSheight/2. + (iplan-1) * (fgkCheight + fgkCspace);
347 gMC->Gsposp("UAIM",iplan ,"TRD1",xpos, ypos,zpos,0,"ONLY",parCha,kNparCha);
348 gMC->Gsposp("UAIM",iplan+ kNplan,"TRD1",xpos,-ypos,zpos,0,"ONLY",parCha,kNparCha);
349 parCha[0] = fCwidth[iplan-1]/2. - fgkCathick;
350 parCha[1] = fClengthM2[iplan-1]/2. - fgkCathick;
351 parCha[2] = fgkCaframe/2.;
353 ypos = fClengthM2[iplan-1]/2. - fgkSlenTR2/2.;
354 zpos = fgkCheight - fgkCaframe/2. - fgkSheight/2. + (iplan-1) * (fgkCheight + fgkCspace);
355 gMC->Gsposp("UAIM",iplan+2*kNplan,"TRD2",xpos, ypos,zpos,0,"ONLY",parCha,kNparCha);
358 parCha[0] = fCwidth[iplan-1]/2.;
359 parCha[1] = fClengthM1[iplan-1]/2.;
360 parCha[2] = fgkCcframe/2.;
362 ypos = fClengthI[iplan-1]/2. + fClengthM1[iplan-1]/2.;
363 zpos = fgkCcframe/2. - fgkSheight/2. + (iplan-1) * (fgkCheight + fgkCspace);
364 gMC->Gsposp("UCFM",iplan ,"TRD1",xpos, ypos,zpos,0,"MANY",parCha,kNparCha);
365 gMC->Gsposp("UCFM",iplan+ kNplan,"TRD1",xpos,-ypos,zpos,0,"MANY",parCha,kNparCha);
366 parCha[0] = fCwidth[iplan-1]/2.;
367 parCha[1] = fClengthM2[iplan-1]/2.;
368 parCha[2] = fgkCcframe/2.;
370 ypos = fClengthM2[iplan-1]/2. - fgkSlenTR2/2.;
371 zpos = fgkCcframe/2. - fgkSheight/2. + (iplan-1) * (fgkCheight + fgkCspace);
372 gMC->Gsposp("UCFM",iplan+2*kNplan,"TRD2",xpos, ypos,zpos,0,"MANY",parCha,kNparCha);
374 // the inner part of the carbon frame
375 parCha[0] = fCwidth[iplan-1]/2. - fgkCcthick;
376 parCha[1] = fClengthM1[iplan-1]/2. - fgkCcthick;
377 parCha[2] = fgkCcframe/2.;
379 ypos = fClengthI[iplan-1]/2. + fClengthM1[iplan-1]/2.;
380 zpos = fgkCcframe/2. - fgkSheight/2. + (iplan-1) * (fgkCheight + fgkCspace);
381 gMC->Gsposp("UCIM",iplan ,"TRD1",xpos, ypos,zpos,0,"ONLY",parCha,kNparCha);
382 gMC->Gsposp("UCIM",iplan+ kNplan,"TRD1",xpos,-ypos,zpos,0,"ONLY",parCha,kNparCha);
383 parCha[0] = fCwidth[iplan-1]/2. - fgkCcthick;
384 parCha[1] = fClengthM2[iplan-1]/2. - fgkCcthick;
385 parCha[2] = fgkCcframe/2.;
387 ypos = fClengthM2[iplan-1]/2. - fgkSlenTR2/2.;
388 zpos = fgkCcframe/2. - fgkSheight/2. + (iplan-1) * (fgkCheight + fgkCspace);
389 gMC->Gsposp("UCIM",iplan+2*kNplan,"TRD2",xpos, ypos,zpos,0,"ONLY",parCha,kNparCha);
391 // The outer chambers ---------------------------------------------------------------
393 // the aluminum frame
394 parCha[0] = fCwidth[iplan-1]/2.;
395 parCha[1] = fClengthO1[iplan-1]/2.;
396 parCha[2] = fgkCaframe/2.;
398 ypos = fClengthI[iplan-1]/2. + fClengthM1[iplan-1] + fClengthO1[iplan-1]/2.;
399 zpos = fgkCheight - fgkCaframe/2. - fgkSheight/2. + (iplan-1) * (fgkCheight + fgkCspace);
400 gMC->Gsposp("UAFO",iplan ,"TRD1",xpos, ypos,zpos,0,"MANY",parCha,kNparCha);
401 gMC->Gsposp("UAFO",iplan+ kNplan,"TRD1",xpos,-ypos,zpos,0,"MANY",parCha,kNparCha);
402 parCha[0] = fCwidth[iplan-1]/2.;
403 parCha[1] = fClengthO2[iplan-1]/2.;
404 parCha[2] = fgkCaframe/2.;
406 ypos = fClengthM2[iplan-1] + fClengthO2[iplan-1]/2. - fgkSlenTR2/2.;
407 zpos = fgkCheight - fgkCaframe/2. - fgkSheight/2. + (iplan-1) * (fgkCheight + fgkCspace);
408 gMC->Gsposp("UAFO",iplan+2*kNplan,"TRD2",xpos, ypos,zpos,0,"MANY",parCha,kNparCha);
409 parCha[0] = fCwidth[iplan-1]/2.;
410 parCha[1] = fClengthO3[iplan-1]/2.;
411 parCha[2] = fgkCaframe/2.;
413 ypos = fClengthO3[iplan-1]/2. - fgkSlenTR3/2.;
414 zpos = fgkCheight - fgkCaframe/2. - fgkSheight/2. + (iplan-1) * (fgkCheight + fgkCspace);
415 gMC->Gsposp("UAFO",iplan+4*kNplan,"TRD3",xpos, ypos,zpos,0,"MANY",parCha,kNparCha);
417 // the inner part of the aluminum frame
418 parCha[0] = fCwidth[iplan-1]/2. - fgkCathick;
419 parCha[1] = fClengthO1[iplan-1]/2. - fgkCathick;
420 parCha[2] = fgkCaframe/2.;
422 ypos = fClengthI[iplan-1]/2. + fClengthM1[iplan-1] + fClengthO1[iplan-1]/2.;
423 zpos = fgkCheight - fgkCaframe/2. - fgkSheight/2. + (iplan-1) * (fgkCheight + fgkCspace);
424 gMC->Gsposp("UAIO",iplan ,"TRD1",xpos, ypos,zpos,0,"ONLY",parCha,kNparCha);
425 gMC->Gsposp("UAIO",iplan+ kNplan,"TRD1",xpos,-ypos,zpos,0,"ONLY",parCha,kNparCha);
426 parCha[0] = fCwidth[iplan-1]/2. - fgkCathick;
427 parCha[1] = fClengthO2[iplan-1]/2. - fgkCathick;
428 parCha[2] = fgkCaframe/2.;
430 ypos = fClengthM2[iplan-1] + fClengthO2[iplan-1]/2. - fgkSlenTR2/2.;
431 zpos = fgkCheight - fgkCaframe/2. - fgkSheight/2. + (iplan-1) * (fgkCheight + fgkCspace);
432 gMC->Gsposp("UAIO",iplan+2*kNplan,"TRD2",xpos, ypos,zpos,0,"ONLY",parCha,kNparCha);
433 parCha[0] = fCwidth[iplan-1]/2. - fgkCathick;
434 parCha[1] = fClengthO3[iplan-1]/2. - fgkCathick;
435 parCha[2] = fgkCaframe/2.;
437 ypos = fClengthO3[iplan-1]/2. - fgkSlenTR3/2.;
438 zpos = fgkCheight - fgkCaframe/2. - fgkSheight/2. + (iplan-1) * (fgkCheight + fgkCspace);
439 gMC->Gsposp("UAIO",iplan+4*kNplan,"TRD3",xpos, ypos,zpos,0,"ONLY",parCha,kNparCha);
442 parCha[0] = fCwidth[iplan-1]/2.;
443 parCha[1] = fClengthO1[iplan-1]/2.;
444 parCha[2] = fgkCcframe/2.;
446 ypos = fClengthI[iplan-1]/2. + fClengthM1[iplan-1] + fClengthO1[iplan-1]/2.;
447 zpos = fgkCcframe/2. - fgkSheight/2. + (iplan-1) * (fgkCheight + fgkCspace);
448 gMC->Gsposp("UCFO",iplan, "TRD1",xpos, ypos,zpos,0,"MANY",parCha,kNparCha);
449 gMC->Gsposp("UCFO",iplan+ kNplan,"TRD1",xpos,-ypos,zpos,0,"MANY",parCha,kNparCha);
450 parCha[0] = fCwidth[iplan-1]/2.;
451 parCha[1] = fClengthO2[iplan-1]/2.;
452 parCha[2] = fgkCcframe/2.;
454 ypos = fClengthM2[iplan-1] + fClengthO2[iplan-1]/2. - fgkSlenTR2/2.;
455 zpos = fgkCcframe/2. - fgkSheight/2. + (iplan-1) * (fgkCheight + fgkCspace);
456 gMC->Gsposp("UCFO",iplan+2*kNplan,"TRD2",xpos, ypos,zpos,0,"MANY",parCha,kNparCha);
457 parCha[0] = fCwidth[iplan-1]/2.;
458 parCha[1] = fClengthO3[iplan-1]/2.;
459 parCha[2] = fgkCcframe/2.;
461 ypos = fClengthO3[iplan-1]/2. - fgkSlenTR3/2.;
462 zpos = fgkCcframe/2. - fgkSheight/2. + (iplan-1) * (fgkCheight + fgkCspace);
463 gMC->Gsposp("UCFO",iplan+4*kNplan,"TRD3",xpos, ypos,zpos,0,"MANY",parCha,kNparCha);
465 // the inner part of the carbon frame
466 parCha[0] = fCwidth[iplan-1]/2. - fgkCcthick;
467 parCha[1] = fClengthO1[iplan-1]/2. - fgkCcthick;
468 parCha[2] = fgkCcframe/2.;
470 ypos = fClengthI[iplan-1]/2. + fClengthM1[iplan-1] + fClengthO1[iplan-1]/2.;
471 zpos = fgkCcframe/2. - fgkSheight/2. + (iplan-1) * (fgkCheight + fgkCspace);
472 gMC->Gsposp("UCIO",iplan ,"TRD1",xpos, ypos,zpos,0,"ONLY",parCha,kNparCha);
473 gMC->Gsposp("UCIO",iplan+ kNplan,"TRD1",xpos,-ypos,zpos,0,"ONLY",parCha,kNparCha);
474 parCha[0] = fCwidth[iplan-1]/2. - fgkCcthick;
475 parCha[1] = fClengthO2[iplan-1]/2. - fgkCcthick;
476 parCha[2] = fgkCcframe/2.;
478 ypos = fClengthM2[iplan-1] + fClengthO2[iplan-1]/2. - fgkSlenTR2/2.;
479 zpos = fgkCcframe/2. - fgkSheight/2. + (iplan-1) * (fgkCheight + fgkCspace);
480 gMC->Gsposp("UCIO",iplan+2*kNplan,"TRD2",xpos, ypos,zpos,0,"ONLY",parCha,kNparCha);
481 parCha[0] = fCwidth[iplan-1]/2. - fgkCcthick;
482 parCha[1] = fClengthO3[iplan-1]/2. - fgkCcthick;
483 parCha[2] = fgkCcframe/2.;
485 ypos = fClengthO3[iplan-1]/2. - fgkSlenTR3/2.;
486 zpos = fgkCcframe/2. - fgkSheight/2. + (iplan-1) * (fgkCheight + fgkCspace);
487 gMC->Gsposp("UCIO",iplan+4*kNplan,"TRD3",xpos, ypos,zpos,0,"ONLY",parCha,kNparCha);
494 gMC->Gspos("TRD1",1,"BTR1",xpos,ypos,zpos,0,"ONLY");
495 gMC->Gspos("TRD2",1,"BTR2",xpos,ypos,zpos,0,"ONLY");
496 gMC->Gspos("TRD3",1,"BTR3",xpos,ypos,zpos,0,"ONLY");