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.3 2000/06/08 18:32:58 cblume
19 Make code compliant to coding conventions
21 Revision 1.2 2000/05/08 16:17:27 cblume
24 Revision 1.1.4.2 2000/05/08 14:46:44 cblume
25 Include options SetPHOShole() and SetRICHhole()
27 Revision 1.1.4.1 2000/04/27 12:46:04 cblume
28 Corrected bug in full geometry
30 Revision 1.1 2000/02/28 19:01:15 cblume
35 ///////////////////////////////////////////////////////////////////////////////
37 // TRD geometry for the spaceframe without holes //
39 ///////////////////////////////////////////////////////////////////////////////
41 #include "AliTRDgeometryFull.h"
44 ClassImp(AliTRDgeometryFull)
46 //_____________________________________________________________________________
47 AliTRDgeometryFull::AliTRDgeometryFull():AliTRDgeometry()
50 // AliTRDgeometryFull default constructor
57 //_____________________________________________________________________________
58 AliTRDgeometryFull::~AliTRDgeometryFull()
61 // AliTRDgeometryFull destructor
66 //_____________________________________________________________________________
67 void AliTRDgeometryFull::Init()
70 // Initializes the geometry parameter
78 // The length of the inner chambers
79 for (iplan = 0; iplan < kNplan; iplan++)
80 fClengthI[iplan] = 110.0;
82 // The length of the middle chambers
83 fClengthM1[0] = 123.5;
84 fClengthM1[1] = 131.0;
85 fClengthM1[2] = 138.5;
86 fClengthM1[3] = 146.0;
87 fClengthM1[4] = 153.0;
88 fClengthM1[5] = 160.5;
90 fClengthM2[0] = 123.5 - 7.0;
91 fClengthM2[1] = 131.0 - 7.0;
92 fClengthM2[2] = 138.5 - 7.0;
93 fClengthM2[3] = 146.0 - 7.0;
94 fClengthM2[4] = 153.0 - 7.0;
95 fClengthM2[5] = 160.4 - 7.0;
97 // The length of the outer chambers
98 fClengthO1[0] = 123.5;
99 fClengthO1[1] = 131.0;
100 fClengthO1[2] = 134.5;
101 fClengthO1[3] = 142.0;
102 fClengthO1[4] = 142.0;
103 fClengthO1[5] = 134.5;
105 fClengthO2[0] = 123.5;
106 fClengthO2[1] = 131.0;
107 fClengthO2[2] = 134.5;
108 fClengthO2[3] = 142.0;
109 fClengthO2[4] = 142.0;
110 fClengthO2[5] = 134.5;
112 fClengthO3[0] = 86.5;
113 fClengthO3[1] = 101.5;
114 fClengthO3[2] = 112.5;
115 fClengthO3[3] = 127.5;
116 fClengthO3[4] = 134.5;
117 fClengthO3[5] = 134.5;
119 // The maximum number of pads
120 // and the position of pad 0,0,0
122 // chambers seen from the top:
123 // +----------------------------+
129 // +----------------------------+ +------>
131 // chambers seen from the side: ^
132 // +----------------------------+ time|
135 // +----------------------------+ +------>
139 // The pad row (z-direction)
140 for (iplan = 0; iplan < kNplan; iplan++) {
142 for (Int_t isect = 0; isect < kNsect; isect++) {
143 Float_t clengthI = fClengthI[iplan];
144 Float_t clengthM = fClengthM1[iplan];
145 Float_t clengthO = fClengthO1[iplan];
152 clengthM = fClengthM2[iplan];
153 clengthO = fClengthO2[iplan];
158 clengthO = fClengthO3[iplan];
161 fRowMax[iplan][0][isect] = 1 + TMath::Nint((clengthO - 2. * kCcthick)
162 / fRowPadSize - 0.5);
163 fRowMax[iplan][1][isect] = 1 + TMath::Nint((clengthM - 2. * kCcthick)
164 / fRowPadSize - 0.5);
165 fRowMax[iplan][2][isect] = 1 + TMath::Nint((clengthI - 2. * kCcthick)
166 / fRowPadSize - 0.5);
167 fRowMax[iplan][3][isect] = 1 + TMath::Nint((clengthM - 2. * kCcthick)
168 / fRowPadSize - 0.5);
169 fRowMax[iplan][4][isect] = 1 + TMath::Nint((clengthO - 2. * kCcthick)
170 / fRowPadSize - 0.5);
171 fRow0[iplan][0][isect] = -clengthI/2. - clengthM - clengthO + kCcthick;
172 fRow0[iplan][1][isect] = -clengthI/2. - clengthM + kCcthick;
173 fRow0[iplan][2][isect] = -clengthI/2. + kCcthick;
174 fRow0[iplan][3][isect] = clengthI/2. + kCcthick;
175 fRow0[iplan][4][isect] = clengthI/2. + clengthM + kCcthick;
182 //_____________________________________________________________________________
183 void AliTRDgeometryFull::CreateGeometry(Int_t *idtmed)
186 // Create the TRD geometry without hole
191 const Int_t kNparTrd = 4;
192 const Int_t kNparCha = 3;
194 Float_t parTrd[kNparTrd];
195 Float_t parCha[kNparCha];
197 Float_t xpos, ypos, zpos;
199 AliTRDgeometry::CreateGeometry(idtmed);
201 // The TRD mother volume for one sector (Air), full length in z-direction
202 parTrd[0] = kSwidth1/2.;
203 parTrd[1] = kSwidth2/2.;
204 parTrd[2] = kSlenTR1/2.;
205 parTrd[3] = kSheight/2.;
206 gMC->Gsvolu("TRD1","TRD1",idtmed[1302-1],parTrd,kNparTrd);
208 // The TRD mother volume for one sector (Air), leaving hole for PHOS
210 gMC->Gsvolu("TRD2","TRD1",idtmed[1302-1],parTrd,kNparTrd);
213 // The TRD mother volume for one sector (Air), leaving hole for RICH
215 gMC->Gsvolu("TRD3","TRD1",idtmed[1302-1],parTrd,kNparTrd);
218 // Position the chambers in the TRD mother volume
219 for (iplan = 1; iplan <= kNplan; iplan++) {
221 Float_t y1 = fClengthM1[iplan-1] - fClengthM2[iplan-1];
222 Float_t y2 = fClengthO1[iplan-1] - fClengthO3[iplan-1];
224 // The inner chambers ---------------------------------------------------------------
226 // the aluminum frame
227 parCha[0] = fCwidth[iplan-1]/2.;
228 parCha[1] = fClengthI[iplan-1]/2.;
229 parCha[2] = kCaframe/2.;
232 zpos = kCheight - kCaframe/2. - kSheight/2. + (iplan-1) * (kCheight + kCspace);
233 gMC->Gsposp("UAFI",iplan ,"TRD1",xpos,ypos,zpos,0,"MANY",parCha,kNparCha);
235 // the inner part of the aluminum frame
236 parCha[0] = fCwidth[iplan-1]/2. - kCathick;
237 parCha[1] = fClengthI[iplan-1]/2. - kCathick;
238 parCha[2] = kCaframe/2.;
241 zpos = kCheight - kCaframe/2. - kSheight/2. + (iplan-1) * (kCheight + kCspace);
242 gMC->Gsposp("UAII",iplan ,"TRD1",xpos,ypos,zpos,0,"ONLY",parCha,kNparCha);
245 parCha[0] = fCwidth[iplan-1]/2.;
246 parCha[1] = fClengthI[iplan-1]/2.;
247 parCha[2] = kCcframe/2.;
250 zpos = kCcframe/2. - kSheight/2. + (iplan-1) * (kCheight + kCspace);
251 gMC->Gsposp("UCFI",iplan ,"TRD1",xpos,ypos,zpos,0,"MANY",parCha,kNparCha);
253 // the inner part of the carbon frame
254 parCha[0] = fCwidth[iplan-1]/2. - kCcthick;
255 parCha[1] = fClengthI[iplan-1]/2. - kCcthick;
256 parCha[2] = kCcframe/2.;
259 zpos = kCcframe/2. - kSheight/2. + (iplan-1) * (kCheight + kCspace);
260 gMC->Gsposp("UCII",iplan ,"TRD1",xpos,ypos,zpos,0,"ONLY",parCha,kNparCha);
262 // The middle chambers --------------------------------------------------------------
264 // the aluminum frame
265 parCha[0] = fCwidth[iplan-1]/2.;
266 parCha[1] = fClengthM1[iplan-1]/2.;
267 parCha[2] = kCaframe/2.;
269 ypos = fClengthI[iplan-1]/2. + fClengthM1[iplan-1]/2.;
270 zpos = kCheight - kCaframe/2. - kSheight/2. + (iplan-1) * (kCheight + kCspace);
271 gMC->Gsposp("UAFM",iplan ,"TRD1",xpos, ypos,zpos,0,"MANY",parCha,kNparCha);
272 gMC->Gsposp("UAFM",iplan+ kNplan,"TRD1",xpos,-ypos,zpos,0,"MANY",parCha,kNparCha);
274 parCha[0] = fCwidth[iplan-1]/2.;
275 parCha[1] = fClengthM2[iplan-1]/2.;
276 parCha[2] = kCaframe/2.;
278 ypos = fClengthI[iplan-1]/2. + fClengthM2[iplan-1]/2. + y1;
279 zpos = kCheight - kCaframe/2. - kSheight/2. + (iplan-1) * (kCheight + kCspace);
280 gMC->Gsposp("UAFM",iplan+2*kNplan,"TRD2",xpos, ypos,zpos,0,"MANY",parCha,kNparCha);
281 gMC->Gsposp("UAFM",iplan+3*kNplan,"TRD2",xpos,-ypos,zpos,0,"MANY",parCha,kNparCha);
284 // the inner part of the aluminum frame
285 parCha[0] = fCwidth[iplan-1]/2. - kCathick;
286 parCha[1] = fClengthM1[iplan-1]/2. - kCathick;
287 parCha[2] = kCaframe/2.;
289 ypos = fClengthI[iplan-1]/2. + fClengthM1[iplan-1]/2.;
290 zpos = kCheight - kCaframe/2. - kSheight/2. + (iplan-1) * (kCheight + kCspace);
291 gMC->Gsposp("UAIM",iplan ,"TRD1",xpos, ypos,zpos,0,"ONLY",parCha,kNparCha);
292 gMC->Gsposp("UAIM",iplan+ kNplan,"TRD1",xpos,-ypos,zpos,0,"ONLY",parCha,kNparCha);
294 parCha[0] = fCwidth[iplan-1]/2. - kCathick;
295 parCha[1] = fClengthM2[iplan-1]/2. - kCathick;
296 parCha[2] = kCaframe/2.;
298 ypos = fClengthI[iplan-1]/2. + fClengthM2[iplan-1]/2. + y1;
299 zpos = kCheight - kCaframe/2. - kSheight/2. + (iplan-1) * (kCheight + kCspace);
300 gMC->Gsposp("UAIM",iplan+2*kNplan,"TRD2",xpos, ypos,zpos,0,"ONLY",parCha,kNparCha);
301 gMC->Gsposp("UAIM",iplan+3*kNplan,"TRD2",xpos,-ypos,zpos,0,"ONLY",parCha,kNparCha);
305 parCha[0] = fCwidth[iplan-1]/2.;
306 parCha[1] = fClengthM1[iplan-1]/2.;
307 parCha[2] = kCcframe/2.;
309 ypos = fClengthI[iplan-1]/2. + fClengthM1[iplan-1]/2.;
310 zpos = kCcframe/2. - kSheight/2. + (iplan-1) * (kCheight + kCspace);
311 gMC->Gsposp("UCFM",iplan ,"TRD1",xpos, ypos,zpos,0,"MANY",parCha,kNparCha);
312 gMC->Gsposp("UCFM",iplan+ kNplan,"TRD1",xpos,-ypos,zpos,0,"MANY",parCha,kNparCha);
314 parCha[0] = fCwidth[iplan-1]/2.;
315 parCha[1] = fClengthM2[iplan-1]/2.;
316 parCha[2] = kCcframe/2.;
318 ypos = fClengthI[iplan-1]/2. + fClengthM2[iplan-1]/2. + y1;
319 zpos = kCcframe/2. - kSheight/2. + (iplan-1) * (kCheight + kCspace);
320 gMC->Gsposp("UCFM",iplan+2*kNplan,"TRD2",xpos, ypos,zpos,0,"MANY",parCha,kNparCha);
321 gMC->Gsposp("UCFM",iplan+3*kNplan,"TRD2",xpos,-ypos,zpos,0,"MANY",parCha,kNparCha);
324 // the inner part of the carbon frame
325 parCha[0] = fCwidth[iplan-1]/2. - kCcthick;
326 parCha[1] = fClengthM1[iplan-1]/2. - kCcthick;
327 parCha[2] = kCcframe/2.;
329 ypos = fClengthI[iplan-1]/2. + fClengthM1[iplan-1]/2.;
330 zpos = kCcframe/2. - kSheight/2. + (iplan-1) * (kCheight + kCspace);
331 gMC->Gsposp("UCIM",iplan ,"TRD1",xpos, ypos,zpos,0,"ONLY",parCha,kNparCha);
332 gMC->Gsposp("UCIM",iplan+ kNplan,"TRD1",xpos,-ypos,zpos,0,"ONLY",parCha,kNparCha);
334 parCha[0] = fCwidth[iplan-1]/2. - kCcthick;
335 parCha[1] = fClengthM2[iplan-1]/2. - kCcthick;
336 parCha[2] = kCcframe/2.;
338 ypos = fClengthI[iplan-1]/2. + fClengthM2[iplan-1]/2. + y1;
339 zpos = kCcframe/2. - kSheight/2. + (iplan-1) * (kCheight + kCspace);
340 gMC->Gsposp("UCIM",iplan+2*kNplan,"TRD2",xpos, ypos,zpos,0,"ONLY",parCha,kNparCha);
341 gMC->Gsposp("UCIM",iplan+3*kNplan,"TRD2",xpos,-ypos,zpos,0,"ONLY",parCha,kNparCha);
344 // The outer chambers ---------------------------------------------------------------
346 // the aluminum frame
347 parCha[0] = fCwidth[iplan-1]/2.;
348 parCha[1] = fClengthO1[iplan-1]/2.;
349 parCha[2] = kCaframe/2.;
351 ypos = fClengthI[iplan-1]/2. + fClengthM1[iplan-1] + fClengthO1[iplan-1]/2.;
352 zpos = kCheight - kCaframe/2. - kSheight/2. + (iplan-1) * (kCheight + kCspace);
353 gMC->Gsposp("UAFO",iplan ,"TRD1",xpos, ypos,zpos,0,"MANY",parCha,kNparCha);
354 gMC->Gsposp("UAFO",iplan+ kNplan,"TRD1",xpos,-ypos,zpos,0,"MANY",parCha,kNparCha);
356 parCha[0] = fCwidth[iplan-1]/2.;
357 parCha[1] = fClengthO2[iplan-1]/2.;
358 parCha[2] = kCaframe/2.;
360 ypos = fClengthI[iplan-1]/2. + fClengthM1[iplan-1] + fClengthO2[iplan-1]/2.;
361 zpos = kCheight - kCaframe/2. - kSheight/2. + (iplan-1) * (kCheight + kCspace);
362 gMC->Gsposp("UAFO",iplan+2*kNplan,"TRD2",xpos, ypos,zpos,0,"MANY",parCha,kNparCha);
363 gMC->Gsposp("UAFO",iplan+3*kNplan,"TRD2",xpos,-ypos,zpos,0,"MANY",parCha,kNparCha);
366 parCha[0] = fCwidth[iplan-1]/2.;
367 parCha[1] = fClengthO3[iplan-1]/2.;
368 parCha[2] = kCaframe/2.;
370 ypos = fClengthI[iplan-1]/2. + fClengthM1[iplan-1] + fClengthO3[iplan-1]/2. + y2;
371 zpos = kCheight - kCaframe/2. - kSheight/2. + (iplan-1) * (kCheight + kCspace);
372 gMC->Gsposp("UAFO",iplan+4*kNplan,"TRD3",xpos, ypos,zpos,0,"MANY",parCha,kNparCha);
373 gMC->Gsposp("UAFO",iplan+5*kNplan,"TRD3",xpos,-ypos,zpos,0,"MANY",parCha,kNparCha);
376 // the inner part of the aluminum frame
377 parCha[0] = fCwidth[iplan-1]/2. - kCathick;
378 parCha[1] = fClengthO1[iplan-1]/2. - kCathick;
379 parCha[2] = kCaframe/2.;
381 ypos = fClengthI[iplan-1]/2. + fClengthM1[iplan-1] + fClengthO1[iplan-1]/2.;
382 zpos = kCheight - kCaframe/2. - kSheight/2. + (iplan-1) * (kCheight + kCspace);
383 gMC->Gsposp("UAIO",iplan ,"TRD1",xpos, ypos,zpos,0,"ONLY",parCha,kNparCha);
384 gMC->Gsposp("UAIO",iplan+ kNplan,"TRD1",xpos,-ypos,zpos,0,"ONLY",parCha,kNparCha);
386 parCha[0] = fCwidth[iplan-1]/2. - kCathick;
387 parCha[1] = fClengthO2[iplan-1]/2. - kCathick;
388 parCha[2] = kCaframe/2.;
390 ypos = fClengthI[iplan-1]/2. + fClengthM1[iplan-1] + fClengthO2[iplan-1]/2.;
391 zpos = kCheight - kCaframe/2. - kSheight/2. + (iplan-1) * (kCheight + kCspace);
392 gMC->Gsposp("UAIO",iplan+2*kNplan,"TRD2",xpos, ypos,zpos,0,"ONLY",parCha,kNparCha);
393 gMC->Gsposp("UAIO",iplan+3*kNplan,"TRD2",xpos,-ypos,zpos,0,"ONLY",parCha,kNparCha);
396 parCha[0] = fCwidth[iplan-1]/2. - kCathick;
397 parCha[1] = fClengthO3[iplan-1]/2. - kCathick;
398 parCha[2] = kCaframe/2.;
400 ypos = fClengthI[iplan-1]/2. + fClengthM1[iplan-1] + fClengthO3[iplan-1]/2. + y2;
401 zpos = kCheight - kCaframe/2. - kSheight/2. + (iplan-1) * (kCheight + kCspace);
402 gMC->Gsposp("UAIO",iplan+4*kNplan,"TRD3",xpos, ypos,zpos,0,"ONLY",parCha,kNparCha);
403 gMC->Gsposp("UAIO",iplan+5*kNplan,"TRD3",xpos,-ypos,zpos,0,"ONLY",parCha,kNparCha);
407 parCha[0] = fCwidth[iplan-1]/2.;
408 parCha[1] = fClengthO1[iplan-1]/2.;
409 parCha[2] = kCcframe/2.;
411 ypos = fClengthI[iplan-1]/2. + fClengthM1[iplan-1] + fClengthO1[iplan-1]/2.;
412 zpos = kCcframe/2. - kSheight/2. + (iplan-1) * (kCheight + kCspace);
413 gMC->Gsposp("UCFO",iplan, "TRD1",xpos, ypos,zpos,0,"MANY",parCha,kNparCha);
414 gMC->Gsposp("UCFO",iplan+ kNplan,"TRD1",xpos,-ypos,zpos,0,"MANY",parCha,kNparCha);
416 parCha[0] = fCwidth[iplan-1]/2.;
417 parCha[1] = fClengthO2[iplan-1]/2.;
418 parCha[2] = kCcframe/2.;
420 ypos = fClengthI[iplan-1]/2. + fClengthM1[iplan-1] + fClengthO2[iplan-1]/2.;
421 zpos = kCcframe/2. - kSheight/2. + (iplan-1) * (kCheight + kCspace);
422 gMC->Gsposp("UCFO",iplan+2*kNplan,"TRD2",xpos, ypos,zpos,0,"MANY",parCha,kNparCha);
423 gMC->Gsposp("UCFO",iplan+3*kNplan,"TRD2",xpos,-ypos,zpos,0,"MANY",parCha,kNparCha);
426 parCha[0] = fCwidth[iplan-1]/2.;
427 parCha[1] = fClengthO3[iplan-1]/2.;
428 parCha[2] = kCcframe/2.;
430 ypos = fClengthI[iplan-1]/2. + fClengthM1[iplan-1] + fClengthO3[iplan-1]/2. + y2;
431 zpos = kCcframe/2. - kSheight/2. + (iplan-1) * (kCheight + kCspace);
432 gMC->Gsposp("UCFO",iplan+4*kNplan,"TRD3",xpos, ypos,zpos,0,"MANY",parCha,kNparCha);
433 gMC->Gsposp("UCFO",iplan+5*kNplan,"TRD3",xpos,-ypos,zpos,0,"MANY",parCha,kNparCha);
436 // the inner part of the carbon frame
437 parCha[0] = fCwidth[iplan-1]/2. - kCcthick;
438 parCha[1] = fClengthO1[iplan-1]/2. - kCcthick;
439 parCha[2] = kCcframe/2.;
441 ypos = fClengthI[iplan-1]/2. + fClengthM1[iplan-1] + fClengthO1[iplan-1]/2.;
442 zpos = kCcframe/2. - kSheight/2. + (iplan-1) * (kCheight + kCspace);
443 gMC->Gsposp("UCIO",iplan ,"TRD1",xpos, ypos,zpos,0,"ONLY",parCha,kNparCha);
444 gMC->Gsposp("UCIO",iplan+ kNplan,"TRD1",xpos,-ypos,zpos,0,"ONLY",parCha,kNparCha);
446 parCha[0] = fCwidth[iplan-1]/2. - kCcthick;
447 parCha[1] = fClengthO2[iplan-1]/2. - kCcthick;
448 parCha[2] = kCcframe/2.;
450 ypos = fClengthI[iplan-1]/2. + fClengthM1[iplan-1] + fClengthO2[iplan-1]/2.;
451 zpos = kCcframe/2. - kSheight/2. + (iplan-1) * (kCheight + kCspace);
452 gMC->Gsposp("UCIO",iplan+2*kNplan,"TRD2",xpos, ypos,zpos,0,"ONLY",parCha,kNparCha);
453 gMC->Gsposp("UCIO",iplan+3*kNplan,"TRD2",xpos,-ypos,zpos,0,"ONLY",parCha,kNparCha);
456 parCha[0] = fCwidth[iplan-1]/2. - kCcthick;
457 parCha[1] = fClengthO3[iplan-1]/2. - kCcthick;
458 parCha[2] = kCcframe/2.;
460 ypos = fClengthI[iplan-1]/2. + fClengthM1[iplan-1] + fClengthO3[iplan-1]/2. + y2;
461 zpos = kCcframe/2. - kSheight/2. + (iplan-1) * (kCheight + kCspace);
462 gMC->Gsposp("UCIO",iplan+4*kNplan,"TRD3",xpos, ypos,zpos,0,"ONLY",parCha,kNparCha);
463 gMC->Gsposp("UCIO",iplan+5*kNplan,"TRD3",xpos,-ypos,zpos,0,"ONLY",parCha,kNparCha);
471 gMC->Gspos("TRD1",1,"BTR1",xpos,ypos,zpos,0,"ONLY");
473 gMC->Gspos("TRD2",2,"BTR2",xpos,ypos,zpos,0,"ONLY");
475 gMC->Gspos("TRD1",2,"BTR2",xpos,ypos,zpos,0,"ONLY");
477 gMC->Gspos("TRD3",3,"BTR3",xpos,ypos,zpos,0,"ONLY");
479 gMC->Gspos("TRD1",3,"BTR3",xpos,ypos,zpos,0,"ONLY");