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.6 2004/06/15 15:27:59 decaro
19 TOF raw data: preliminary implementation and style changes
21 Revision 1.5 2004/04/20 14:37:22 hristov
22 Using TMath::Abs instead of fabs, arrays of variable size created/deleted correctly (HP,Sun)
24 Revision 1.4 2004/04/13 09:42:51 decaro
25 Track reconstruction code for TOF: updating
27 Revision 1.3 2003/12/29 18:40:39 hristov
28 Copy/paste error corrected
30 Revision 1.2 2003/12/29 17:26:01 hristov
31 Using enum to initaialize static ints in the header file, the initialization of static floats moved to the implementation file
33 Revision 1.1 2003/12/29 15:18:03 decaro
34 TOF geometry updating (addition of AliTOFGeometry)
36 Revision 0.05 2004/6/11 A.De Caro
37 Implement Global method NpadXStrip
38 Insert four float constants (originally in AliTOF class)
39 Revision 0.04 2004/4/05 S.Arcelli
40 Implement Global methods IsInsideThePad
42 Revision 0.03 2003/12/14 S.Arcelli
43 Set Phi range [-180,180]->[0,360]
44 Revision 0.02 2003/12/10 S.Arcelli:
45 Implement Global methods GetPos & GetDetID
46 Revision 0.01 2003/12/04 S.Arcelli
50 #include <Riostream.h>
51 ///////////////////////////////////////////////////////////////////////////////
53 // TOF Geometry class //
55 ///////////////////////////////////////////////////////////////////////////////
59 #include "AliTOFGeometry.h"
61 ClassImp(AliTOFGeometry)
63 const Int_t AliTOFGeometry::fgkTimeDiff = 25000; // Min signal separation (ps)
65 const Float_t AliTOFGeometry::fgkxTOF = 371.; // Inner radius of the TOF for Reconstruction (cm)
66 const Float_t AliTOFGeometry::fgkRmin = 370.; // Inner radius of the TOF (cm)
67 const Float_t AliTOFGeometry::fgkRmax = 399; // Outer radius of the TOF (cm)
68 const Float_t AliTOFGeometry::fgkZlenA = 106.0; // length (cm) of the A module
69 const Float_t AliTOFGeometry::fgkZlenB = 141.0; // length (cm) of the B module
70 const Float_t AliTOFGeometry::fgkZlenC = 177.5; // length (cm) of the C module
71 const Float_t AliTOFGeometry::fgkXPad = 2.5; // Pad size in the x direction (cm)
72 const Float_t AliTOFGeometry::fgkZPad = 3.5; // Pad size in the z direction (cm)
73 const Float_t AliTOFGeometry::fgkMaxhZtof = 371.5; // Max half z-size of TOF (cm)
74 const Float_t AliTOFGeometry::fgkStripLength = 122.;// Strip Length (rho X phi direction) (cm)
75 const Float_t AliTOFGeometry::fgkDeadBndX = 1.0; // Dead Boundaries of a Strip along X direction (length) (cm)
76 const Float_t AliTOFGeometry::fgkDeadBndZ = 1.5; // Dead Boundaries of a Strip along Z direction (width) (cm)
77 const Float_t AliTOFGeometry::fgkOverSpc = 15.3; // Space available for sensitive layers in radial direction (cm)
80 const Float_t AliTOFGeometry::fgkSigmaForTail1= 2.;//Sig1 for simulation of TDC tails
81 const Float_t AliTOFGeometry::fgkSigmaForTail2= 0.5;//Sig2 for simulation of TDC tails
82 const Float_t AliTOFGeometry::fgkSpeedOfLight = 0.299792458;// c (10^9 m/s)
83 const Float_t AliTOFGeometry::fgkPionMass = 0.13957;// pion mass (Gev/c^2)
84 const Float_t AliTOFGeometry::fgkKaonMass = 0.49368;// kaon mass (Gev/c^2)
85 const Float_t AliTOFGeometry::fgkProtonMass = 0.93827;// proton mass (Gev/c^2)
86 const Float_t AliTOFGeometry::fgkElectronMass = 0.00051;// electron mass (Gev/c^2)
87 const Float_t AliTOFGeometry::fgkMuonMass = 0.10566;// muon mass (Gev/c^2)
90 const Float_t AliTOFGeometry::fgkDprecMin = 0.0000075;//num.prec.tolerance on Thmin
91 const Float_t AliTOFGeometry::fgkDprecMax = 0.0000100;//num.prec.tolerance on Thma
92 const Float_t AliTOFGeometry::fgkDprecCen = 0.0000005;//num.prec.tolerance on <Theta>
94 //_____________________________________________________________________________
95 AliTOFGeometry::AliTOFGeometry()
98 // AliTOFGeometry default constructor
104 //_____________________________________________________________________________
105 AliTOFGeometry::~AliTOFGeometry()
108 // AliTOFGeometry destructor
112 //_____________________________________________________________________________
113 void AliTOFGeometry::Init()
116 // Initialize strip Tilt Angles and Heights
118 // Strips Tilt Angles
120 Float_t const kangles[kNPlates][kMaxNstrip] ={
122 {44.494, 43.725, 42.946, 42.156, 41.357, 40.548, 39.729, 38.899,
123 38.060, 37.211, 36.353, 35.484, 34.606, 33.719, 32.822, 31.916,
124 31.001, 30.077, 29.144, 28.202 },
126 {26.884, 25.922, 24.952, 23.975, 22.989, 22.320, 21.016, 20.309,
127 19.015, 18.270, 16.989, 16.205, 14.941, 14.117, 12.871, 12.008,
128 10.784, 9.8807, 8.681, 0.0 },
130 { 7.5835, 6.4124, 5.4058, 4.2809, 3.2448, 2.1424, 1.078, -0., -1.078,
131 -2.1424, -3.2448, -4.2809, -5.4058, -6.4124, -7.5835, 0.0, 0.0, 0.0,
134 {-8.681, -9.8807, -10.784, -12.008, -12.871, -14.117, -14.941, -16.205,
135 -16.989, -18.27, -19.015, -20.309, -21.016, -22.32, -22.989,
136 -23.975, -24.952, -25.922, -26.884, 0. },
138 {-28.202, -29.144, -30.077, -31.001, -31.916, -32.822, -33.719, -34.606,
139 -35.484, -36.353, -37.211, -38.06, -38.899, -39.729, -40.548,
140 -41.357, -42.156, -42.946, -43.725, -44.494 }};
145 Float_t const kheights[kNPlates][kMaxNstrip]= {
147 {-5.5, -5.5, -5.5, -5.5, -5.5, -5.5, -5.5, -5.5, -5.5, -5.5,
148 -5.5, -5.5, -5.5, -5.5, -5.5, -5.5, -5.5, -5.5, -5.5, -5.5 },
150 {-6.3, -7.1, -7.9, -8.7, -9.5, -3, -9.5, -3, -9.5, -3,
151 -9.5, -3.0, -9.5, -3.0, -9.5, -3, -9.5, -3, -9 , 0.},
153 { -3, -9, -4.5, -9, -4.5, -9, -4.5, -9, -4.5, -9,
154 -4.5, -9, -4.5, -9, -3, 0.0, 0.0, 0.0, 0.0, 0.0 },
156 { -9, -3, -9.5, -3, -9.5, -3, -9.5, -3, -9.5, -3, -9.5,
157 -3, -9.5, -3, -9.5, -8.7, -7.9, -7.1, -6.3, 0. },
159 {-5.5, -5.5, -5.5, -5.5, -5.5, -5.5, -5.5, -5.5, -5.5, -5.5,
160 -5.5, -5.5, -5.5, -5.5, -5.5, -5.5, -5.5, -5.5, -5.5, -5.5 }};
163 // Deposit in fAngles, fHeights
165 for (Int_t iplate = 0; iplate < kNPlates; iplate++) {
166 for (Int_t istrip = 0; istrip < kMaxNstrip; istrip++) {
167 fAngles[iplate][istrip] = kangles[iplate][istrip];
168 fHeights[iplate][istrip] = kheights[iplate][istrip];
172 fPhiSec = 360./kNSectors;
175 //_____________________________________________________________________________
176 Float_t AliTOFGeometry::DistanceToPad(Int_t *det, Float_t *pos)
179 // Returns distance of space point with coor pos (x,y,z) (cm) wrt
180 // pad with Detector Indices idet (iSect,iPlate,iStrip,iPadX,iPadZ)
183 //Transform pos into Sector Frame
189 Float_t radius = TMath::Sqrt(x*x+y*y);
190 Float_t phi=TMath::ATan2(y,x);
191 if(phi<0) phi=2.*TMath::Pi()+phi;
192 // Get the local angle in the sector philoc
193 Float_t angle = phi*kRaddeg-( Int_t (kRaddeg*phi/20.) + 0.5)*fPhiSec;
194 Float_t xs = radius*TMath::Cos(angle/kRaddeg);
195 Float_t ys = radius*TMath::Sin(angle/kRaddeg);
198 // Do the same for the selected pad
203 Float_t padRadius = TMath::Sqrt(g[0]*g[0]+g[1]*g[1]);
204 Float_t padPhi=TMath::ATan2(g[1],g[0]);
205 if(padPhi<0) padPhi=2.*TMath::Pi()+padPhi;
206 // Get the local angle in the sector philoc
207 Float_t padAngle = padPhi*kRaddeg-( Int_t (padPhi*kRaddeg/20.)+ 0.5) * fPhiSec;
208 Float_t padxs = padRadius*TMath::Cos(padAngle/kRaddeg);
209 Float_t padys = padRadius*TMath::Sin(padAngle/kRaddeg);
210 Float_t padzs = g[2];
212 //Now move to local pad coordinate frame. Translate:
214 Float_t xt = xs-padxs;
215 Float_t yt = ys-padys;
216 Float_t zt = zs-padzs;
219 Float_t alpha = GetAngles(det[1],det[2]);
220 Float_t xr = xt*TMath::Cos(alpha/kRaddeg)+zt*TMath::Sin(alpha/kRaddeg);
222 Float_t zr = -xt*TMath::Sin(alpha/kRaddeg)+zt*TMath::Cos(alpha/kRaddeg);
224 Float_t dist = TMath::Sqrt(xr*xr+yr*yr+zr*zr);
230 //_____________________________________________________________________________
231 Bool_t AliTOFGeometry::IsInsideThePad(Int_t *det, Float_t *pos)
234 // Returns true if space point with coor pos (x,y,z) (cm) falls
235 // inside pad with Detector Indices idet (iSect,iPlate,iStrip,iPadX,iPadZ)
238 Bool_t isInside=false;
241 //Transform pos into Sector Frame
247 Float_t radius = TMath::Sqrt(x*x+y*y);
248 Float_t phi=TMath::ATan2(y,x);
249 if(phi<0) phi=2.*TMath::Pi()+phi;
250 // Get the local angle in the sector philoc
251 Float_t angle = phi*kRaddeg-( Int_t (kRaddeg*phi/20.) + 0.5) *fPhiSec;
252 Float_t xs = radius*TMath::Cos(angle/kRaddeg);
253 Float_t ys = radius*TMath::Sin(angle/kRaddeg);
256 // Do the same for the selected pad
261 Float_t padRadius = TMath::Sqrt(g[0]*g[0]+g[1]*g[1]);
262 Float_t padPhi=TMath::ATan2(g[1],g[0]);
263 if(padPhi<0) padPhi=2.*TMath::Pi()+padPhi;
264 // Get the local angle in the sector philoc
265 Float_t padAngle = padPhi*kRaddeg-( Int_t (padPhi*kRaddeg/20.)+ 0.5) * fPhiSec;
266 Float_t padxs = padRadius*TMath::Cos(padAngle/kRaddeg);
267 Float_t padys = padRadius*TMath::Sin(padAngle/kRaddeg);
268 Float_t padzs = g[2];
270 //Now move to local pad coordinate frame. Translate:
272 Float_t xt = xs-padxs;
273 Float_t yt = ys-padys;
274 Float_t zt = zs-padzs;
277 Float_t alpha = GetAngles(det[1],det[2]);
278 Float_t xr = xt*TMath::Cos(alpha/kRaddeg)+zt*TMath::Sin(alpha/kRaddeg);
280 Float_t zr = -xt*TMath::Sin(alpha/kRaddeg)+zt*TMath::Cos(alpha/kRaddeg);
282 if(TMath::Abs(xr)<=0.75 && TMath::Abs(yr)<= (fgkXPad*0.5) && TMath::Abs(zr)<= (fgkZPad*0.5))
288 //_____________________________________________________________________________
289 void AliTOFGeometry::GetPos(Int_t *det, Float_t *pos)
292 // Returns space point coor (x,y,z) (cm) for Detector
293 // Indices (iSect,iPlate,iStrip,iPadX,iPadZ)
301 //_____________________________________________________________________________
302 void AliTOFGeometry::GetDetID( Float_t *pos, Int_t *det)
305 // Returns Detector Indices (iSect,iPlate,iStrip,iPadX,iPadZ)
306 // space point coor (x,y,z) (cm)
309 det[0]=GetSector(pos);
310 det[1]=GetPlate(pos);
311 det[2]=GetStrip(pos);
316 //_____________________________________________________________________________
317 Float_t AliTOFGeometry::GetX(Int_t *det)
320 // Returns X coordinate (cm)
323 Int_t isector = det[0];
324 Int_t iplate = det[1];
325 Int_t istrip = det[2];
326 Int_t ipadz = det[3];
327 Int_t ipadx = det[4];
329 // Find out distance d on the plane wrt median phi:
330 Float_t d = (ipadx+0.5)*fgkXPad-(kNpadX*fgkXPad)*0.5;
332 // The radius r in xy plane:
333 Float_t r = (fgkRmin+fgkRmax)/2.+fHeights[iplate][istrip]+
334 (ipadz-0.5)*fgkZPad*TMath::Sin(fAngles[iplate][istrip]/kRaddeg)-0.25;
336 // local azimuthal angle in the sector philoc
337 Float_t philoc = TMath:: ATan(d/r);
339 // azimuthal angle in the global frame phi
340 Float_t phi = philoc*kRaddeg+(isector+0.5 )*fPhiSec;
342 Float_t xCoor = r/TMath::Cos(philoc)*TMath::Cos(phi/kRaddeg);
346 //_____________________________________________________________________________
347 Float_t AliTOFGeometry::GetY(Int_t *det)
350 // Returns Y coordinate (cm)
353 Int_t isector = det[0];
354 Int_t iplate = det[1];
355 Int_t istrip = det[2];
356 Int_t ipadz = det[3];
357 Int_t ipadx = det[4];
359 // Find out distance d on the plane wrt median phi:
360 Float_t d = (ipadx+0.5)*fgkXPad-(kNpadX*fgkXPad)*0.5;
362 // The radius r in xy plane:
363 Float_t r = (fgkRmin+fgkRmax)/2.+fHeights[iplate][istrip]+
364 (ipadz-0.5)*fgkZPad*TMath::Sin(fAngles[iplate][istrip]/kRaddeg)-0.25;
366 // local azimuthal angle in the sector philoc
367 Float_t philoc = TMath:: ATan(d/r);
369 // azimuthal angle in the global frame phi
370 Float_t phi = philoc*kRaddeg+(isector+0.5 )*fPhiSec;
372 Float_t yCoor = r/TMath::Cos(philoc)*TMath::Sin(phi/kRaddeg);
377 //_____________________________________________________________________________
378 Float_t AliTOFGeometry::GetZ(Int_t *det)
381 // Returns Z coordinate (cm)
384 Int_t iplate = det[1];
385 Int_t istrip = det[2];
386 Int_t ipadz = det[3];
389 // The radius r in xy plane:
390 Float_t r = (fgkRmin+fgkRmax)/2.+fHeights[iplate][istrip];
392 Float_t zCoor = r*TMath::Tan(0.5*TMath::Pi()-GetStripTheta(iplate,istrip))-
393 (ipadz-0.5)*fgkZPad*TMath::Cos(fAngles[iplate][istrip]/kRaddeg);
397 //_____________________________________________________________________________
398 Int_t AliTOFGeometry::GetSector(Float_t *pos)
401 // Returns the Sector index
409 Float_t phi = TMath::ATan2(y,x);
410 if(phi<0.) phi=2.*TMath::Pi()+phi;
411 iSect = (Int_t) (phi*kRaddeg/fPhiSec);
416 //_____________________________________________________________________________
417 Int_t AliTOFGeometry::GetPadX(Float_t *pos)
420 // Returns the Pad index along X
429 Int_t isector = GetSector(pos);
431 AliError("Detector Index could not be determined");
433 Int_t iplate = GetPlate(pos);
435 AliError("Detector Index could not be determined");
437 Int_t istrip = GetStrip(pos);
439 AliError("Detector Index could not be determined");
443 Float_t rho=TMath::Sqrt(x*x+y*y);
444 Float_t phi = TMath::ATan2(y,x);
445 if(phi<0.) phi=2.*TMath::Pi()+phi;
447 // Get the local angle in the sector philoc
448 Float_t philoc = phi*kRaddeg-(isector+0.5)*fPhiSec;
449 philoc*=TMath::Pi()/180.;
450 // theta projected on the median of the sector
451 Float_t theta = TMath::ATan2(rho*TMath::Cos(philoc),z);
452 // The radius r in xy plane:
453 Float_t r = (fgkRmin+fgkRmax)/2.+fHeights[iplate][istrip]+
454 (theta-GetStripTheta(iplate, istrip))/
455 (GetMaxStripTheta(iplate, istrip)-GetMinStripTheta(iplate, istrip))
456 * 2.*fgkZPad*TMath::Sin(fAngles[iplate][istrip]/kRaddeg)-0.25;
458 // Find out distance projected onto the strip plane
459 Float_t d = (r*TMath::Tan(philoc)+(kNpadX*fgkXPad)*0.5);
461 iPadX = (Int_t) ( d/fgkXPad);
465 //_____________________________________________________________________________
466 Int_t AliTOFGeometry::GetPlate(Float_t *pos)
469 // Returns the Plate index
473 Int_t isector = GetSector(pos);
475 AliError("Detector Index could not be determined");
482 Float_t rho=TMath::Sqrt(x*x+y*y);
483 Float_t phi=TMath::ATan2(y,x);
484 if(phi<0) phi=2.*TMath::Pi()+phi;
485 // Get the local angle in the sector philoc
486 Float_t philoc = phi*kRaddeg-(isector+0.5)*fPhiSec;
487 philoc*=TMath::Pi()/180.;
488 // theta projected on the median of the sector
489 Float_t theta=TMath::ATan2(rho*TMath::Cos(philoc),z);
491 for (Int_t i=0; i<kNPlates; i++){
492 if ( GetMaxPlateTheta(i) >= theta &&
493 GetMinPlateTheta(i) <= theta)iPlate=i;
499 //_____________________________________________________________________________
500 Int_t AliTOFGeometry::GetStrip(Float_t *pos)
503 // Returns the Strip index
509 Int_t isector = GetSector(pos);
511 AliError("Detector Index could not be determined");
513 Int_t iplate = GetPlate(pos);
515 AliError("Detector Index could not be determined");
524 if(iplate==0 || iplate == 4)nstrips=kNStripC;
525 if(iplate==1 || iplate == 3)nstrips=kNStripB;
526 if(iplate==2) nstrips=kNStripA;
528 Float_t rho=TMath::Sqrt(x*x+y*y);
529 Float_t phi=TMath::ATan2(y,x);
530 if(phi<0) phi=2.*TMath::Pi()+phi;
531 // Get the local angle in the sector philoc
532 Float_t philoc = phi*kRaddeg-(isector+0.5)*fPhiSec;
533 philoc*=TMath::Pi()/180.;
534 // theta projected on the median of the sector
535 Float_t theta=TMath::ATan2(rho*TMath::Cos(philoc),z);
537 for (Int_t istrip=0; istrip<nstrips; istrip++){
540 GetMaxStripTheta(iplate,istrip) >= theta
542 GetMinStripTheta(iplate,istrip) <= theta ) iStrip = istrip;
548 //_____________________________________________________________________________
549 Int_t AliTOFGeometry::GetPadZ(Float_t *pos)
552 // Returns the Pad index along Z
556 Int_t isector = GetSector(pos);
558 AliError("Detector Index could not be determined");
560 Int_t iplate = GetPlate(pos);
562 AliError("Detector Index could not be determined");
564 Int_t istrip = GetStrip(pos);
566 AliError("Detector Index could not be determined");
574 Float_t rho=TMath::Sqrt(x*x+y*y);
575 Float_t phi=TMath::ATan2(y,x);
576 if(phi<0) phi=2.*TMath::Pi()+phi;
577 Float_t philoc = phi*kRaddeg-(isector+0.5)*fPhiSec;
578 philoc*=TMath::Pi()/180.;
579 Float_t theta=TMath::ATan2(rho*TMath::Cos(philoc),z);
581 if (theta >= GetStripTheta(iplate, istrip))iPadZ=1;
586 //_____________________________________________________________________________
587 Float_t AliTOFGeometry::GetMinPlateTheta(Int_t iPlate)
590 // Returns the minimum theta angle of a given plate iPlate (rad)
597 if(iPlate==0)delta = -1. ;
598 if(iPlate==1)delta = -0.5;
599 if(iPlate==3)delta = +0.5;
600 if(iPlate==4)delta = +1. ;
602 Float_t z=(fgkRmin+2.)*TMath::Tan(fAngles[iPlate][index]/kRaddeg)+delta;
603 Float_t r=(fgkRmin+fgkRmax)/2.+fHeights[iPlate][index];
604 z =z+fgkZPad*TMath::Cos(fAngles[iPlate][index]/kRaddeg);
605 r =r-fgkZPad*TMath::Sin(fAngles[iPlate][index]/kRaddeg);
607 Float_t thmin = 0.5*TMath::Pi()-TMath::ATan(z/r)-fgkDprecMin;
611 //_____________________________________________________________________________
612 Float_t AliTOFGeometry::GetMaxPlateTheta(Int_t iPlate)
615 // Returns the maximum theta angle of a given plate iPlate (rad)
618 if(iPlate==0 ||iPlate == 4)index=kNStripC-1;
619 if(iPlate==1 ||iPlate == 3)index=kNStripB-1;
620 if(iPlate==2) index=kNStripA-1;
623 if(iPlate==0)delta = -1. ;
624 if(iPlate==1)delta = -0.5;
625 if(iPlate==3)delta = +0.5;
626 if(iPlate==4)delta = +1. ;
628 Float_t z=(fgkRmin+2.)*TMath::Tan(fAngles[iPlate][index]/kRaddeg)+delta;
629 Float_t r=(fgkRmin+fgkRmax)/2.+fHeights[iPlate][index];
630 z =z-fgkZPad*TMath::Cos(fAngles[iPlate][index]/kRaddeg);
631 r= r+fgkZPad*TMath::Sin(fAngles[iPlate][index]/kRaddeg);
633 Float_t thmax = 0.5*TMath::Pi()-TMath::ATan(z/r)+fgkDprecMax;
637 //_____________________________________________________________________________
638 Float_t AliTOFGeometry::GetMaxStripTheta(Int_t iPlate, Int_t iStrip)
641 // Returns the maximum theta angle of a given strip iStrip (rad)
646 if(iPlate==0)delta = -1. ;
647 if(iPlate==1)delta = -0.5;
648 if(iPlate==3)delta = +0.5;
649 if(iPlate==4)delta = +1. ;
651 Float_t r =(fgkRmin+fgkRmax)/2.+fHeights[iPlate][iStrip];
652 Float_t z =(fgkRmin+2.)*TMath::Tan(fAngles[iPlate][iStrip]/kRaddeg)+delta;
653 z = z-fgkZPad*TMath::Cos(fAngles[iPlate][iStrip]/kRaddeg);
654 r = r+fgkZPad*TMath::Sin(fAngles[iPlate][iStrip]/kRaddeg);
655 Float_t thmax =0.5*TMath::Pi()-TMath::ATan(z/r)+fgkDprecMax;
660 //_____________________________________________________________________________
661 Float_t AliTOFGeometry::GetMinStripTheta(Int_t iPlate, Int_t iStrip)
664 // Returns the minimum theta angle of a given Strip iStrip (rad)
669 if(iPlate==0)delta = -1. ;
670 if(iPlate==1)delta = -0.5;
671 if(iPlate==3)delta = +0.5;
672 if(iPlate==4)delta = +1. ;
675 Float_t r =(fgkRmin+fgkRmax)/2.+fHeights[iPlate][iStrip];
676 Float_t z =(fgkRmin+2.)*TMath::Tan(fAngles[iPlate][iStrip]/kRaddeg)+delta;
677 z =z+fgkZPad*TMath::Cos(fAngles[iPlate][iStrip]/kRaddeg);
678 r =r-fgkZPad*TMath::Sin(fAngles[iPlate][iStrip]/kRaddeg);
679 Float_t thmin =0.5*TMath::Pi()-TMath::ATan(z/r)-fgkDprecMin;
686 //_____________________________________________________________________________
687 Float_t AliTOFGeometry::GetStripTheta(Int_t iPlate, Int_t iStrip)
690 // returns the median theta angle of a given strip iStrip (rad)
695 if(iPlate==0)delta = -1. ;
696 if(iPlate==1)delta = -0.5;
697 if(iPlate==3)delta = +0.5;
698 if(iPlate==4)delta = +1. ;
700 Float_t r =(fgkRmin+fgkRmax)/2.+fHeights[iPlate][iStrip];
701 Float_t z =(fgkRmin+2.)*TMath::Tan(fAngles[iPlate][iStrip]/kRaddeg)+delta;
702 Float_t theta =0.5*TMath::Pi()-TMath::ATan(z/r);
704 if(theta > 0.5*TMath::Pi() )theta+=fgkDprecCen;
705 if(theta < 0.5*TMath::Pi() )theta-=fgkDprecCen;