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 2004/04/20 14:37:22 hristov
19 Using TMath::Abs instead of fabs, arrays of variable size created/deleted correctly (HP,Sun)
21 Revision 1.4 2004/04/13 09:42:51 decaro
22 Track reconstruction code for TOF: updating
24 Revision 1.3 2003/12/29 18:40:39 hristov
25 Copy/paste error corrected
27 Revision 1.2 2003/12/29 17:26:01 hristov
28 Using enum to initaialize static ints in the header file, the initialization of static floats moved to the implementation file
30 Revision 1.1 2003/12/29 15:18:03 decaro
31 TOF geometry updating (addition of AliTOFGeometry)
33 Revision 0.05 2004/6/11 A.De Caro
34 Implement Global method NpadXStrip
35 Insert four float constants (originally in AliTOF class)
36 Revision 0.04 2004/4/05 S.Arcelli
37 Implement Global methods IsInsideThePad
39 Revision 0.03 2003/12/14 S.Arcelli
40 Set Phi range [-180,180]->[0,360]
41 Revision 0.02 2003/12/10 S.Arcelli:
42 Implement Global methods GetPos & GetDetID
43 Revision 0.01 2003/12/04 S.Arcelli
47 #include <Riostream.h>
48 ///////////////////////////////////////////////////////////////////////////////
50 // TOF Geometry class //
52 ///////////////////////////////////////////////////////////////////////////////
55 #include "AliTOFGeometry.h"
57 ClassImp(AliTOFGeometry)
59 const Int_t AliTOFGeometry::fgkTimeDiff = 25000; // Min signal separation (ps)
61 const Float_t AliTOFGeometry::fgkxTOF = 371.; // Inner radius of the TOF for Reconstruction (cm)
62 const Float_t AliTOFGeometry::fgkRmin = 370.; // Inner radius of the TOF (cm)
63 const Float_t AliTOFGeometry::fgkRmax = 399; // Outer radius of the TOF (cm)
64 const Float_t AliTOFGeometry::fgkZlenA = 106.0; // length (cm) of the A module
65 const Float_t AliTOFGeometry::fgkZlenB = 141.0; // length (cm) of the B module
66 const Float_t AliTOFGeometry::fgkZlenC = 177.5; // length (cm) of the C module
67 const Float_t AliTOFGeometry::fgkXPad = 2.5; // Pad size in the x direction (cm)
68 const Float_t AliTOFGeometry::fgkZPad = 3.5; // Pad size in the z direction (cm)
69 const Float_t AliTOFGeometry::fgkMaxhZtof = 371.5; // Max half z-size of TOF (cm)
70 const Float_t AliTOFGeometry::fgkStripLength = 122.;// Strip Length (rho X phi direction) (cm)
71 const Float_t AliTOFGeometry::fgkDeadBndX = 1.0; // Dead Boundaries of a Strip along X direction (length) (cm)
72 const Float_t AliTOFGeometry::fgkDeadBndZ = 1.5; // Dead Boundaries of a Strip along Z direction (width) (cm)
73 const Float_t AliTOFGeometry::fgkOverSpc = 15.3; // Space available for sensitive layers in radial direction (cm)
76 const Float_t AliTOFGeometry::fgkSigmaForTail1= 2.;//Sig1 for simulation of TDC tails
77 const Float_t AliTOFGeometry::fgkSigmaForTail2= 0.5;//Sig2 for simulation of TDC tails
78 const Float_t AliTOFGeometry::fgkSpeedOfLight = 0.299792458;// c (10^9 m/s)
79 const Float_t AliTOFGeometry::fgkPionMass = 0.13957;// pion mass (Gev/c^2)
80 const Float_t AliTOFGeometry::fgkKaonMass = 0.49368;// kaon mass (Gev/c^2)
81 const Float_t AliTOFGeometry::fgkProtonMass = 0.93827;// proton mass (Gev/c^2)
82 const Float_t AliTOFGeometry::fgkElectronMass = 0.00051;// electron mass (Gev/c^2)
83 const Float_t AliTOFGeometry::fgkMuonMass = 0.10566;// muon mass (Gev/c^2)
86 const Float_t AliTOFGeometry::fgkDprecMin = 0.0000075;//num.prec.tolerance on Thmin
87 const Float_t AliTOFGeometry::fgkDprecMax = 0.0000100;//num.prec.tolerance on Thma
88 const Float_t AliTOFGeometry::fgkDprecCen = 0.0000005;//num.prec.tolerance on <Theta>
90 //_____________________________________________________________________________
91 AliTOFGeometry::AliTOFGeometry()
94 // AliTOFGeometry default constructor
100 //_____________________________________________________________________________
101 AliTOFGeometry::~AliTOFGeometry()
104 // AliTOFGeometry destructor
108 //_____________________________________________________________________________
109 void AliTOFGeometry::Init()
112 // Initialize strip Tilt Angles and Heights
114 // Strips Tilt Angles
116 Float_t const kangles[kNPlates][kMaxNstrip] ={
118 {44.494, 43.725, 42.946, 42.156, 41.357, 40.548, 39.729, 38.899,
119 38.060, 37.211, 36.353, 35.484, 34.606, 33.719, 32.822, 31.916,
120 31.001, 30.077, 29.144, 28.202 },
122 {26.884, 25.922, 24.952, 23.975, 22.989, 22.320, 21.016, 20.309,
123 19.015, 18.270, 16.989, 16.205, 14.941, 14.117, 12.871, 12.008,
124 10.784, 9.8807, 8.681, 0.0 },
126 { 7.5835, 6.4124, 5.4058, 4.2809, 3.2448, 2.1424, 1.078, -0., -1.078,
127 -2.1424, -3.2448, -4.2809, -5.4058, -6.4124, -7.5835, 0.0, 0.0, 0.0,
130 {-8.681, -9.8807, -10.784, -12.008, -12.871, -14.117, -14.941, -16.205,
131 -16.989, -18.27, -19.015, -20.309, -21.016, -22.32, -22.989,
132 -23.975, -24.952, -25.922, -26.884, 0. },
134 {-28.202, -29.144, -30.077, -31.001, -31.916, -32.822, -33.719, -34.606,
135 -35.484, -36.353, -37.211, -38.06, -38.899, -39.729, -40.548,
136 -41.357, -42.156, -42.946, -43.725, -44.494 }};
141 Float_t const kheights[kNPlates][kMaxNstrip]= {
143 {-5.5, -5.5, -5.5, -5.5, -5.5, -5.5, -5.5, -5.5, -5.5, -5.5,
144 -5.5, -5.5, -5.5, -5.5, -5.5, -5.5, -5.5, -5.5, -5.5, -5.5 },
146 {-6.3, -7.1, -7.9, -8.7, -9.5, -3, -9.5, -3, -9.5, -3,
147 -9.5, -3.0, -9.5, -3.0, -9.5, -3, -9.5, -3, -9 , 0.},
149 { -3, -9, -4.5, -9, -4.5, -9, -4.5, -9, -4.5, -9,
150 -4.5, -9, -4.5, -9, -3, 0.0, 0.0, 0.0, 0.0, 0.0 },
152 { -9, -3, -9.5, -3, -9.5, -3, -9.5, -3, -9.5, -3, -9.5,
153 -3, -9.5, -3, -9.5, -8.7, -7.9, -7.1, -6.3, 0. },
155 {-5.5, -5.5, -5.5, -5.5, -5.5, -5.5, -5.5, -5.5, -5.5, -5.5,
156 -5.5, -5.5, -5.5, -5.5, -5.5, -5.5, -5.5, -5.5, -5.5, -5.5 }};
159 // Deposit in fAngles, fHeights
161 for (Int_t iplate = 0; iplate < kNPlates; iplate++) {
162 for (Int_t istrip = 0; istrip < kMaxNstrip; istrip++) {
163 fAngles[iplate][istrip] = kangles[iplate][istrip];
164 fHeights[iplate][istrip] = kheights[iplate][istrip];
168 fPhiSec = 360./kNSectors;
171 //_____________________________________________________________________________
172 Float_t AliTOFGeometry::DistanceToPad(Int_t *det, Float_t *pos)
175 // Returns distance of space point with coor pos (x,y,z) (cm) wrt
176 // pad with Detector Indices idet (iSect,iPlate,iStrip,iPadX,iPadZ)
179 //Transform pos into Sector Frame
185 Float_t radius = TMath::Sqrt(x*x+y*y);
186 Float_t phi=TMath::ATan2(y,x);
187 if(phi<0) phi=2.*TMath::Pi()+phi;
188 // Get the local angle in the sector philoc
189 Float_t angle = phi*kRaddeg-( Int_t (kRaddeg*phi/20.) + 0.5)*fPhiSec;
190 Float_t xs = radius*TMath::Cos(angle/kRaddeg);
191 Float_t ys = radius*TMath::Sin(angle/kRaddeg);
194 // Do the same for the selected pad
199 Float_t padRadius = TMath::Sqrt(g[0]*g[0]+g[1]*g[1]);
200 Float_t padPhi=TMath::ATan2(g[1],g[0]);
201 if(padPhi<0) padPhi=2.*TMath::Pi()+padPhi;
202 // Get the local angle in the sector philoc
203 Float_t padAngle = padPhi*kRaddeg-( Int_t (padPhi*kRaddeg/20.)+ 0.5) * fPhiSec;
204 Float_t padxs = padRadius*TMath::Cos(padAngle/kRaddeg);
205 Float_t padys = padRadius*TMath::Sin(padAngle/kRaddeg);
206 Float_t padzs = g[2];
208 //Now move to local pad coordinate frame. Translate:
210 Float_t xt = xs-padxs;
211 Float_t yt = ys-padys;
212 Float_t zt = zs-padzs;
215 Float_t alpha = GetAngles(det[1],det[2]);
216 Float_t xr = xt*TMath::Cos(alpha/kRaddeg)+zt*TMath::Sin(alpha/kRaddeg);
218 Float_t zr = -xt*TMath::Sin(alpha/kRaddeg)+zt*TMath::Cos(alpha/kRaddeg);
220 Float_t dist = TMath::Sqrt(xr*xr+yr*yr+zr*zr);
226 //_____________________________________________________________________________
227 Bool_t AliTOFGeometry::IsInsideThePad(Int_t *det, Float_t *pos)
230 // Returns true if space point with coor pos (x,y,z) (cm) falls
231 // inside pad with Detector Indices idet (iSect,iPlate,iStrip,iPadX,iPadZ)
234 Bool_t isInside=false;
237 //Transform pos into Sector Frame
243 Float_t radius = TMath::Sqrt(x*x+y*y);
244 Float_t phi=TMath::ATan2(y,x);
245 if(phi<0) phi=2.*TMath::Pi()+phi;
246 // Get the local angle in the sector philoc
247 Float_t angle = phi*kRaddeg-( Int_t (kRaddeg*phi/20.) + 0.5) *fPhiSec;
248 Float_t xs = radius*TMath::Cos(angle/kRaddeg);
249 Float_t ys = radius*TMath::Sin(angle/kRaddeg);
252 // Do the same for the selected pad
257 Float_t padRadius = TMath::Sqrt(g[0]*g[0]+g[1]*g[1]);
258 Float_t padPhi=TMath::ATan2(g[1],g[0]);
259 if(padPhi<0) padPhi=2.*TMath::Pi()+padPhi;
260 // Get the local angle in the sector philoc
261 Float_t padAngle = padPhi*kRaddeg-( Int_t (padPhi*kRaddeg/20.)+ 0.5) * fPhiSec;
262 Float_t padxs = padRadius*TMath::Cos(padAngle/kRaddeg);
263 Float_t padys = padRadius*TMath::Sin(padAngle/kRaddeg);
264 Float_t padzs = g[2];
266 //Now move to local pad coordinate frame. Translate:
268 Float_t xt = xs-padxs;
269 Float_t yt = ys-padys;
270 Float_t zt = zs-padzs;
273 Float_t alpha = GetAngles(det[1],det[2]);
274 Float_t xr = xt*TMath::Cos(alpha/kRaddeg)+zt*TMath::Sin(alpha/kRaddeg);
276 Float_t zr = -xt*TMath::Sin(alpha/kRaddeg)+zt*TMath::Cos(alpha/kRaddeg);
278 if(TMath::Abs(xr)<=0.75 && TMath::Abs(yr)<= (fgkXPad*0.5) && TMath::Abs(zr)<= (fgkZPad*0.5))
284 //_____________________________________________________________________________
285 void AliTOFGeometry::GetPos(Int_t *det, Float_t *pos)
288 // Returns space point coor (x,y,z) (cm) for Detector
289 // Indices (iSect,iPlate,iStrip,iPadX,iPadZ)
297 //_____________________________________________________________________________
298 void AliTOFGeometry::GetDetID( Float_t *pos, Int_t *det)
301 // Returns Detector Indices (iSect,iPlate,iStrip,iPadX,iPadZ)
302 // space point coor (x,y,z) (cm)
305 det[0]=GetSector(pos);
306 det[1]=GetPlate(pos);
307 det[2]=GetStrip(pos);
312 //_____________________________________________________________________________
313 Float_t AliTOFGeometry::GetX(Int_t *det)
316 // Returns X coordinate (cm)
319 Int_t isector = det[0];
320 Int_t iplate = det[1];
321 Int_t istrip = det[2];
322 Int_t ipadz = det[3];
323 Int_t ipadx = det[4];
325 // Find out distance d on the plane wrt median phi:
326 Float_t d = (ipadx+0.5)*fgkXPad-(kNpadX*fgkXPad)*0.5;
328 // The radius r in xy plane:
329 Float_t r = (fgkRmin+fgkRmax)/2.+fHeights[iplate][istrip]+
330 (ipadz-0.5)*fgkZPad*TMath::Sin(fAngles[iplate][istrip]/kRaddeg)-0.25;
332 // local azimuthal angle in the sector philoc
333 Float_t philoc = TMath:: ATan(d/r);
335 // azimuthal angle in the global frame phi
336 Float_t phi = philoc*kRaddeg+(isector+0.5 )*fPhiSec;
338 Float_t xCoor = r/TMath::Cos(philoc)*TMath::Cos(phi/kRaddeg);
342 //_____________________________________________________________________________
343 Float_t AliTOFGeometry::GetY(Int_t *det)
346 // Returns Y coordinate (cm)
349 Int_t isector = det[0];
350 Int_t iplate = det[1];
351 Int_t istrip = det[2];
352 Int_t ipadz = det[3];
353 Int_t ipadx = det[4];
355 // Find out distance d on the plane wrt median phi:
356 Float_t d = (ipadx+0.5)*fgkXPad-(kNpadX*fgkXPad)*0.5;
358 // The radius r in xy plane:
359 Float_t r = (fgkRmin+fgkRmax)/2.+fHeights[iplate][istrip]+
360 (ipadz-0.5)*fgkZPad*TMath::Sin(fAngles[iplate][istrip]/kRaddeg)-0.25;
362 // local azimuthal angle in the sector philoc
363 Float_t philoc = TMath:: ATan(d/r);
365 // azimuthal angle in the global frame phi
366 Float_t phi = philoc*kRaddeg+(isector+0.5 )*fPhiSec;
368 Float_t yCoor = r/TMath::Cos(philoc)*TMath::Sin(phi/kRaddeg);
373 //_____________________________________________________________________________
374 Float_t AliTOFGeometry::GetZ(Int_t *det)
377 // Returns Z coordinate (cm)
380 Int_t iplate = det[1];
381 Int_t istrip = det[2];
382 Int_t ipadz = det[3];
385 // The radius r in xy plane:
386 Float_t r = (fgkRmin+fgkRmax)/2.+fHeights[iplate][istrip];
388 Float_t zCoor = r*TMath::Tan(0.5*TMath::Pi()-GetStripTheta(iplate,istrip))-
389 (ipadz-0.5)*fgkZPad*TMath::Cos(fAngles[iplate][istrip]/kRaddeg);
393 //_____________________________________________________________________________
394 Int_t AliTOFGeometry::GetSector(Float_t *pos)
397 // Returns the Sector index
405 Float_t phi = TMath::ATan2(y,x);
406 if(phi<0.) phi=2.*TMath::Pi()+phi;
407 iSect = (Int_t) (phi*kRaddeg/fPhiSec);
412 //_____________________________________________________________________________
413 Int_t AliTOFGeometry::GetPadX(Float_t *pos)
416 // Returns the Pad index along X
425 Int_t isector = GetSector(pos);
427 cout << "Detector Index could not be determined" << endl;
429 Int_t iplate = GetPlate(pos);
431 cout << "Detector Index could not be determined" << endl;
433 Int_t istrip = GetStrip(pos);
435 cout << "Detector Index could not be determined" << endl;
439 Float_t rho=TMath::Sqrt(x*x+y*y);
440 Float_t phi = TMath::ATan2(y,x);
441 if(phi<0.) phi=2.*TMath::Pi()+phi;
443 // Get the local angle in the sector philoc
444 Float_t philoc = phi*kRaddeg-(isector+0.5)*fPhiSec;
445 philoc*=TMath::Pi()/180.;
446 // theta projected on the median of the sector
447 Float_t theta = TMath::ATan2(rho*TMath::Cos(philoc),z);
448 // The radius r in xy plane:
449 Float_t r = (fgkRmin+fgkRmax)/2.+fHeights[iplate][istrip]+
450 (theta-GetStripTheta(iplate, istrip))/
451 (GetMaxStripTheta(iplate, istrip)-GetMinStripTheta(iplate, istrip))
452 * 2.*fgkZPad*TMath::Sin(fAngles[iplate][istrip]/kRaddeg)-0.25;
454 // Find out distance projected onto the strip plane
455 Float_t d = (r*TMath::Tan(philoc)+(kNpadX*fgkXPad)*0.5);
457 iPadX = (Int_t) ( d/fgkXPad);
461 //_____________________________________________________________________________
462 Int_t AliTOFGeometry::GetPlate(Float_t *pos)
465 // Returns the Plate index
469 Int_t isector = GetSector(pos);
471 cout << "Detector Index could not be determined" << endl;
478 Float_t rho=TMath::Sqrt(x*x+y*y);
479 Float_t phi=TMath::ATan2(y,x);
480 if(phi<0) phi=2.*TMath::Pi()+phi;
481 // Get the local angle in the sector philoc
482 Float_t philoc = phi*kRaddeg-(isector+0.5)*fPhiSec;
483 philoc*=TMath::Pi()/180.;
484 // theta projected on the median of the sector
485 Float_t theta=TMath::ATan2(rho*TMath::Cos(philoc),z);
487 for (Int_t i=0; i<kNPlates; i++){
488 if ( GetMaxPlateTheta(i) >= theta &&
489 GetMinPlateTheta(i) <= theta)iPlate=i;
495 //_____________________________________________________________________________
496 Int_t AliTOFGeometry::GetStrip(Float_t *pos)
499 // Returns the Strip index
505 Int_t isector = GetSector(pos);
507 cout << "Detector Index could not be determined" << endl;
509 Int_t iplate = GetPlate(pos);
511 cout << "Detector Index could not be determined" << endl;
520 if(iplate==0 || iplate == 4)nstrips=kNStripC;
521 if(iplate==1 || iplate == 3)nstrips=kNStripB;
522 if(iplate==2) nstrips=kNStripA;
524 Float_t rho=TMath::Sqrt(x*x+y*y);
525 Float_t phi=TMath::ATan2(y,x);
526 if(phi<0) phi=2.*TMath::Pi()+phi;
527 // Get the local angle in the sector philoc
528 Float_t philoc = phi*kRaddeg-(isector+0.5)*fPhiSec;
529 philoc*=TMath::Pi()/180.;
530 // theta projected on the median of the sector
531 Float_t theta=TMath::ATan2(rho*TMath::Cos(philoc),z);
533 for (Int_t istrip=0; istrip<nstrips; istrip++){
536 GetMaxStripTheta(iplate,istrip) >= theta
538 GetMinStripTheta(iplate,istrip) <= theta ) iStrip = istrip;
544 //_____________________________________________________________________________
545 Int_t AliTOFGeometry::GetPadZ(Float_t *pos)
548 // Returns the Pad index along Z
552 Int_t isector = GetSector(pos);
554 cout << "Detector Index could not be determined" << endl;
556 Int_t iplate = GetPlate(pos);
558 cout << "Detector Index could not be determined" << endl;
560 Int_t istrip = GetStrip(pos);
562 cout << "Detector Index could not be determined" << endl;
570 Float_t rho=TMath::Sqrt(x*x+y*y);
571 Float_t phi=TMath::ATan2(y,x);
572 if(phi<0) phi=2.*TMath::Pi()+phi;
573 Float_t philoc = phi*kRaddeg-(isector+0.5)*fPhiSec;
574 philoc*=TMath::Pi()/180.;
575 Float_t theta=TMath::ATan2(rho*TMath::Cos(philoc),z);
577 if (theta >= GetStripTheta(iplate, istrip))iPadZ=1;
582 //_____________________________________________________________________________
583 Float_t AliTOFGeometry::GetMinPlateTheta(Int_t iPlate)
586 // Returns the minimum theta angle of a given plate iPlate (rad)
593 if(iPlate==0)delta = -1. ;
594 if(iPlate==1)delta = -0.5;
595 if(iPlate==3)delta = +0.5;
596 if(iPlate==4)delta = +1. ;
598 Float_t z=(fgkRmin+2.)*TMath::Tan(fAngles[iPlate][index]/kRaddeg)+delta;
599 Float_t r=(fgkRmin+fgkRmax)/2.+fHeights[iPlate][index];
600 z =z+fgkZPad*TMath::Cos(fAngles[iPlate][index]/kRaddeg);
601 r =r-fgkZPad*TMath::Sin(fAngles[iPlate][index]/kRaddeg);
603 Float_t thmin = 0.5*TMath::Pi()-TMath::ATan(z/r)-fgkDprecMin;
607 //_____________________________________________________________________________
608 Float_t AliTOFGeometry::GetMaxPlateTheta(Int_t iPlate)
611 // Returns the maximum theta angle of a given plate iPlate (rad)
614 if(iPlate==0 ||iPlate == 4)index=kNStripC-1;
615 if(iPlate==1 ||iPlate == 3)index=kNStripB-1;
616 if(iPlate==2) index=kNStripA-1;
619 if(iPlate==0)delta = -1. ;
620 if(iPlate==1)delta = -0.5;
621 if(iPlate==3)delta = +0.5;
622 if(iPlate==4)delta = +1. ;
624 Float_t z=(fgkRmin+2.)*TMath::Tan(fAngles[iPlate][index]/kRaddeg)+delta;
625 Float_t r=(fgkRmin+fgkRmax)/2.+fHeights[iPlate][index];
626 z =z-fgkZPad*TMath::Cos(fAngles[iPlate][index]/kRaddeg);
627 r= r+fgkZPad*TMath::Sin(fAngles[iPlate][index]/kRaddeg);
629 Float_t thmax = 0.5*TMath::Pi()-TMath::ATan(z/r)+fgkDprecMax;
633 //_____________________________________________________________________________
634 Float_t AliTOFGeometry::GetMaxStripTheta(Int_t iPlate, Int_t iStrip)
637 // Returns the maximum theta angle of a given strip iStrip (rad)
642 if(iPlate==0)delta = -1. ;
643 if(iPlate==1)delta = -0.5;
644 if(iPlate==3)delta = +0.5;
645 if(iPlate==4)delta = +1. ;
647 Float_t r =(fgkRmin+fgkRmax)/2.+fHeights[iPlate][iStrip];
648 Float_t z =(fgkRmin+2.)*TMath::Tan(fAngles[iPlate][iStrip]/kRaddeg)+delta;
649 z = z-fgkZPad*TMath::Cos(fAngles[iPlate][iStrip]/kRaddeg);
650 r = r+fgkZPad*TMath::Sin(fAngles[iPlate][iStrip]/kRaddeg);
651 Float_t thmax =0.5*TMath::Pi()-TMath::ATan(z/r)+fgkDprecMax;
656 //_____________________________________________________________________________
657 Float_t AliTOFGeometry::GetMinStripTheta(Int_t iPlate, Int_t iStrip)
660 // Returns the minimum theta angle of a given Strip iStrip (rad)
665 if(iPlate==0)delta = -1. ;
666 if(iPlate==1)delta = -0.5;
667 if(iPlate==3)delta = +0.5;
668 if(iPlate==4)delta = +1. ;
671 Float_t r =(fgkRmin+fgkRmax)/2.+fHeights[iPlate][iStrip];
672 Float_t z =(fgkRmin+2.)*TMath::Tan(fAngles[iPlate][iStrip]/kRaddeg)+delta;
673 z =z+fgkZPad*TMath::Cos(fAngles[iPlate][iStrip]/kRaddeg);
674 r =r-fgkZPad*TMath::Sin(fAngles[iPlate][iStrip]/kRaddeg);
675 Float_t thmin =0.5*TMath::Pi()-TMath::ATan(z/r)-fgkDprecMin;
682 //_____________________________________________________________________________
683 Float_t AliTOFGeometry::GetStripTheta(Int_t iPlate, Int_t iStrip)
686 // returns the median theta angle of a given strip iStrip (rad)
691 if(iPlate==0)delta = -1. ;
692 if(iPlate==1)delta = -0.5;
693 if(iPlate==3)delta = +0.5;
694 if(iPlate==4)delta = +1. ;
696 Float_t r =(fgkRmin+fgkRmax)/2.+fHeights[iPlate][iStrip];
697 Float_t z =(fgkRmin+2.)*TMath::Tan(fAngles[iPlate][iStrip]/kRaddeg)+delta;
698 Float_t theta =0.5*TMath::Pi()-TMath::ATan(z/r);
700 if(theta > 0.5*TMath::Pi() )theta+=fgkDprecCen;
701 if(theta < 0.5*TMath::Pi() )theta-=fgkDprecCen;