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.7 2004/11/05 07:20:08 decaro
19 TOF library splitting and conversion of some printout messages in AliLog schema (T.Kuhr)
21 Revision 1.6 2004/06/15 15:27:59 decaro
22 TOF raw data: preliminary implementation and style changes
24 Revision 1.5 2004/04/20 14:37:22 hristov
25 Using TMath::Abs instead of fabs, arrays of variable size created/deleted correctly (HP,Sun)
27 Revision 1.4 2004/04/13 09:42:51 decaro
28 Track reconstruction code for TOF: updating
30 Revision 1.3 2003/12/29 18:40:39 hristov
31 Copy/paste error corrected
33 Revision 1.2 2003/12/29 17:26:01 hristov
34 Using enum to initaialize static ints in the header file, the initialization of static floats moved to the implementation file
36 Revision 1.1 2003/12/29 15:18:03 decaro
37 TOF geometry updating (addition of AliTOFGeometry)
39 Revision 0.05 2004/6/11 A.De Caro
40 Implement Global method NpadXStrip
41 Insert four float constants (originally in AliTOF class)
42 Revision 0.04 2004/4/05 S.Arcelli
43 Implement Global methods IsInsideThePad
45 Revision 0.03 2003/12/14 S.Arcelli
46 Set Phi range [-180,180]->[0,360]
47 Revision 0.02 2003/12/10 S.Arcelli:
48 Implement Global methods GetPos & GetDetID
49 Revision 0.01 2003/12/04 S.Arcelli
53 #include <Riostream.h>
54 ///////////////////////////////////////////////////////////////////////////////
56 // TOF Geometry class //
58 ///////////////////////////////////////////////////////////////////////////////
62 #include "AliTOFGeometry.h"
64 ClassImp(AliTOFGeometry)
66 const Int_t AliTOFGeometry::fgkTimeDiff = 25000; // Min signal separation (ps)
68 const Float_t AliTOFGeometry::fgkxTOF = 371.; // Inner radius of the TOF for Reconstruction (cm)
69 const Float_t AliTOFGeometry::fgkRmin = 370.; // Inner radius of the TOF (cm)
70 const Float_t AliTOFGeometry::fgkRmax = 399; // Outer radius of the TOF (cm)
71 const Float_t AliTOFGeometry::fgkZlenA = 106.0; // length (cm) of the A module
72 const Float_t AliTOFGeometry::fgkZlenB = 141.0; // length (cm) of the B module
73 const Float_t AliTOFGeometry::fgkZlenC = 177.5; // length (cm) of the C module
74 const Float_t AliTOFGeometry::fgkXPad = 2.5; // Pad size in the x direction (cm)
75 const Float_t AliTOFGeometry::fgkZPad = 3.5; // Pad size in the z direction (cm)
76 const Float_t AliTOFGeometry::fgkMaxhZtof = 371.5; // Max half z-size of TOF (cm)
77 const Float_t AliTOFGeometry::fgkStripLength = 122.;// Strip Length (rho X phi direction) (cm)
78 const Float_t AliTOFGeometry::fgkDeadBndX = 1.0; // Dead Boundaries of a Strip along X direction (length) (cm)
79 const Float_t AliTOFGeometry::fgkDeadBndZ = 1.5; // Dead Boundaries of a Strip along Z direction (width) (cm)
80 const Float_t AliTOFGeometry::fgkOverSpc = 15.3; // Space available for sensitive layers in radial direction (cm)
83 const Float_t AliTOFGeometry::fgkSigmaForTail1= 2.;//Sig1 for simulation of TDC tails
84 const Float_t AliTOFGeometry::fgkSigmaForTail2= 0.5;//Sig2 for simulation of TDC tails
85 const Float_t AliTOFGeometry::fgkSpeedOfLight = 0.299792458;// c (10^9 m/s)
86 const Float_t AliTOFGeometry::fgkPionMass = 0.13957;// pion mass (Gev/c^2)
87 const Float_t AliTOFGeometry::fgkKaonMass = 0.49368;// kaon mass (Gev/c^2)
88 const Float_t AliTOFGeometry::fgkProtonMass = 0.93827;// proton mass (Gev/c^2)
89 const Float_t AliTOFGeometry::fgkElectronMass = 0.00051;// electron mass (Gev/c^2)
90 const Float_t AliTOFGeometry::fgkMuonMass = 0.10566;// muon mass (Gev/c^2)
93 const Float_t AliTOFGeometry::fgkDprecMin = 0.0000075;//num.prec.tolerance on Thmin
94 const Float_t AliTOFGeometry::fgkDprecMax = 0.0000100;//num.prec.tolerance on Thma
95 const Float_t AliTOFGeometry::fgkDprecCen = 0.0000005;//num.prec.tolerance on <Theta>
97 const Float_t AliTOFGeometry::fgkTdcBin = 24.4; // time-window for the TDC bins [ps]
99 //_____________________________________________________________________________
100 AliTOFGeometry::AliTOFGeometry()
103 // AliTOFGeometry default constructor
109 //_____________________________________________________________________________
110 AliTOFGeometry::~AliTOFGeometry()
113 // AliTOFGeometry destructor
117 //_____________________________________________________________________________
118 void AliTOFGeometry::Init()
121 // Initialize strip Tilt Angles and Heights
123 // Strips Tilt Angles
125 Float_t const kangles[kNPlates][kMaxNstrip] ={
127 {44.494, 43.725, 42.946, 42.156, 41.357, 40.548, 39.729, 38.899,
128 38.060, 37.211, 36.353, 35.484, 34.606, 33.719, 32.822, 31.916,
129 31.001, 30.077, 29.144, 28.202 },
131 {26.884, 25.922, 24.952, 23.975, 22.989, 22.320, 21.016, 20.309,
132 19.015, 18.270, 16.989, 16.205, 14.941, 14.117, 12.871, 12.008,
133 10.784, 9.8807, 8.681, 0.0 },
135 { 7.5835, 6.4124, 5.4058, 4.2809, 3.2448, 2.1424, 1.078, -0., -1.078,
136 -2.1424, -3.2448, -4.2809, -5.4058, -6.4124, -7.5835, 0.0, 0.0, 0.0,
139 {-8.681, -9.8807, -10.784, -12.008, -12.871, -14.117, -14.941, -16.205,
140 -16.989, -18.27, -19.015, -20.309, -21.016, -22.32, -22.989,
141 -23.975, -24.952, -25.922, -26.884, 0. },
143 {-28.202, -29.144, -30.077, -31.001, -31.916, -32.822, -33.719, -34.606,
144 -35.484, -36.353, -37.211, -38.06, -38.899, -39.729, -40.548,
145 -41.357, -42.156, -42.946, -43.725, -44.494 }};
150 Float_t const kheights[kNPlates][kMaxNstrip]= {
152 {-5.5, -5.5, -5.5, -5.5, -5.5, -5.5, -5.5, -5.5, -5.5, -5.5,
153 -5.5, -5.5, -5.5, -5.5, -5.5, -5.5, -5.5, -5.5, -5.5, -5.5 },
155 {-6.3, -7.1, -7.9, -8.7, -9.5, -3, -9.5, -3, -9.5, -3,
156 -9.5, -3.0, -9.5, -3.0, -9.5, -3, -9.5, -3, -9 , 0.},
158 { -3, -9, -4.5, -9, -4.5, -9, -4.5, -9, -4.5, -9,
159 -4.5, -9, -4.5, -9, -3, 0.0, 0.0, 0.0, 0.0, 0.0 },
161 { -9, -3, -9.5, -3, -9.5, -3, -9.5, -3, -9.5, -3, -9.5,
162 -3, -9.5, -3, -9.5, -8.7, -7.9, -7.1, -6.3, 0. },
164 {-5.5, -5.5, -5.5, -5.5, -5.5, -5.5, -5.5, -5.5, -5.5, -5.5,
165 -5.5, -5.5, -5.5, -5.5, -5.5, -5.5, -5.5, -5.5, -5.5, -5.5 }};
168 // Deposit in fAngles, fHeights
170 for (Int_t iplate = 0; iplate < kNPlates; iplate++) {
171 for (Int_t istrip = 0; istrip < kMaxNstrip; istrip++) {
172 fAngles[iplate][istrip] = kangles[iplate][istrip];
173 fHeights[iplate][istrip] = kheights[iplate][istrip];
177 fPhiSec = 360./kNSectors;
180 //_____________________________________________________________________________
181 Float_t AliTOFGeometry::DistanceToPad(Int_t *det, Float_t *pos)
184 // Returns distance of space point with coor pos (x,y,z) (cm) wrt
185 // pad with Detector Indices idet (iSect,iPlate,iStrip,iPadX,iPadZ)
188 //Transform pos into Sector Frame
194 Float_t radius = TMath::Sqrt(x*x+y*y);
195 Float_t phi=TMath::ATan2(y,x);
196 if(phi<0) phi=2.*TMath::Pi()+phi;
197 // Get the local angle in the sector philoc
198 Float_t angle = phi*kRaddeg-( Int_t (kRaddeg*phi/20.) + 0.5)*fPhiSec;
199 Float_t xs = radius*TMath::Cos(angle/kRaddeg);
200 Float_t ys = radius*TMath::Sin(angle/kRaddeg);
203 // Do the same for the selected pad
208 Float_t padRadius = TMath::Sqrt(g[0]*g[0]+g[1]*g[1]);
209 Float_t padPhi=TMath::ATan2(g[1],g[0]);
210 if(padPhi<0) padPhi=2.*TMath::Pi()+padPhi;
211 // Get the local angle in the sector philoc
212 Float_t padAngle = padPhi*kRaddeg-( Int_t (padPhi*kRaddeg/20.)+ 0.5) * fPhiSec;
213 Float_t padxs = padRadius*TMath::Cos(padAngle/kRaddeg);
214 Float_t padys = padRadius*TMath::Sin(padAngle/kRaddeg);
215 Float_t padzs = g[2];
217 //Now move to local pad coordinate frame. Translate:
219 Float_t xt = xs-padxs;
220 Float_t yt = ys-padys;
221 Float_t zt = zs-padzs;
224 Float_t alpha = GetAngles(det[1],det[2]);
225 Float_t xr = xt*TMath::Cos(alpha/kRaddeg)+zt*TMath::Sin(alpha/kRaddeg);
227 Float_t zr = -xt*TMath::Sin(alpha/kRaddeg)+zt*TMath::Cos(alpha/kRaddeg);
229 Float_t dist = TMath::Sqrt(xr*xr+yr*yr+zr*zr);
235 //_____________________________________________________________________________
236 Bool_t AliTOFGeometry::IsInsideThePad(Int_t *det, Float_t *pos)
239 // Returns true if space point with coor pos (x,y,z) (cm) falls
240 // inside pad with Detector Indices idet (iSect,iPlate,iStrip,iPadX,iPadZ)
243 Bool_t isInside=false;
246 //Transform pos into Sector Frame
252 Float_t radius = TMath::Sqrt(x*x+y*y);
253 Float_t phi=TMath::ATan2(y,x);
254 if(phi<0) phi=2.*TMath::Pi()+phi;
255 // Get the local angle in the sector philoc
256 Float_t angle = phi*kRaddeg-( Int_t (kRaddeg*phi/20.) + 0.5) *fPhiSec;
257 Float_t xs = radius*TMath::Cos(angle/kRaddeg);
258 Float_t ys = radius*TMath::Sin(angle/kRaddeg);
261 // Do the same for the selected pad
266 Float_t padRadius = TMath::Sqrt(g[0]*g[0]+g[1]*g[1]);
267 Float_t padPhi=TMath::ATan2(g[1],g[0]);
268 if(padPhi<0) padPhi=2.*TMath::Pi()+padPhi;
269 // Get the local angle in the sector philoc
270 Float_t padAngle = padPhi*kRaddeg-( Int_t (padPhi*kRaddeg/20.)+ 0.5) * fPhiSec;
271 Float_t padxs = padRadius*TMath::Cos(padAngle/kRaddeg);
272 Float_t padys = padRadius*TMath::Sin(padAngle/kRaddeg);
273 Float_t padzs = g[2];
275 //Now move to local pad coordinate frame. Translate:
277 Float_t xt = xs-padxs;
278 Float_t yt = ys-padys;
279 Float_t zt = zs-padzs;
282 Float_t alpha = GetAngles(det[1],det[2]);
283 Float_t xr = xt*TMath::Cos(alpha/kRaddeg)+zt*TMath::Sin(alpha/kRaddeg);
285 Float_t zr = -xt*TMath::Sin(alpha/kRaddeg)+zt*TMath::Cos(alpha/kRaddeg);
287 if(TMath::Abs(xr)<=0.75 && TMath::Abs(yr)<= (fgkXPad*0.5) && TMath::Abs(zr)<= (fgkZPad*0.5))
293 //_____________________________________________________________________________
294 void AliTOFGeometry::GetPos(Int_t *det, Float_t *pos)
297 // Returns space point coor (x,y,z) (cm) for Detector
298 // Indices (iSect,iPlate,iStrip,iPadX,iPadZ)
306 //_____________________________________________________________________________
307 void AliTOFGeometry::GetDetID( Float_t *pos, Int_t *det)
310 // Returns Detector Indices (iSect,iPlate,iStrip,iPadX,iPadZ)
311 // space point coor (x,y,z) (cm)
314 det[0]=GetSector(pos);
315 det[1]=GetPlate(pos);
316 det[2]=GetStrip(pos);
321 //_____________________________________________________________________________
322 Float_t AliTOFGeometry::GetX(Int_t *det)
325 // Returns X coordinate (cm)
328 Int_t isector = det[0];
329 Int_t iplate = det[1];
330 Int_t istrip = det[2];
331 Int_t ipadz = det[3];
332 Int_t ipadx = det[4];
334 // Find out distance d on the plane wrt median phi:
335 Float_t d = (ipadx+0.5)*fgkXPad-(kNpadX*fgkXPad)*0.5;
337 // The radius r in xy plane:
338 Float_t r = (fgkRmin+fgkRmax)/2.+fHeights[iplate][istrip]+
339 (ipadz-0.5)*fgkZPad*TMath::Sin(fAngles[iplate][istrip]/kRaddeg)-0.25;
341 // local azimuthal angle in the sector philoc
342 Float_t philoc = TMath:: ATan(d/r);
344 // azimuthal angle in the global frame phi
345 Float_t phi = philoc*kRaddeg+(isector+0.5 )*fPhiSec;
347 Float_t xCoor = r/TMath::Cos(philoc)*TMath::Cos(phi/kRaddeg);
351 //_____________________________________________________________________________
352 Float_t AliTOFGeometry::GetY(Int_t *det)
355 // Returns Y coordinate (cm)
358 Int_t isector = det[0];
359 Int_t iplate = det[1];
360 Int_t istrip = det[2];
361 Int_t ipadz = det[3];
362 Int_t ipadx = det[4];
364 // Find out distance d on the plane wrt median phi:
365 Float_t d = (ipadx+0.5)*fgkXPad-(kNpadX*fgkXPad)*0.5;
367 // The radius r in xy plane:
368 Float_t r = (fgkRmin+fgkRmax)/2.+fHeights[iplate][istrip]+
369 (ipadz-0.5)*fgkZPad*TMath::Sin(fAngles[iplate][istrip]/kRaddeg)-0.25;
371 // local azimuthal angle in the sector philoc
372 Float_t philoc = TMath:: ATan(d/r);
374 // azimuthal angle in the global frame phi
375 Float_t phi = philoc*kRaddeg+(isector+0.5 )*fPhiSec;
377 Float_t yCoor = r/TMath::Cos(philoc)*TMath::Sin(phi/kRaddeg);
382 //_____________________________________________________________________________
383 Float_t AliTOFGeometry::GetZ(Int_t *det)
386 // Returns Z coordinate (cm)
389 Int_t iplate = det[1];
390 Int_t istrip = det[2];
391 Int_t ipadz = det[3];
394 // The radius r in xy plane:
395 Float_t r = (fgkRmin+fgkRmax)/2.+fHeights[iplate][istrip];
397 Float_t zCoor = r*TMath::Tan(0.5*TMath::Pi()-GetStripTheta(iplate,istrip))-
398 (ipadz-0.5)*fgkZPad*TMath::Cos(fAngles[iplate][istrip]/kRaddeg);
402 //_____________________________________________________________________________
403 Int_t AliTOFGeometry::GetSector(Float_t *pos)
406 // Returns the Sector index
414 Float_t phi = TMath::ATan2(y,x);
415 if(phi<0.) phi=2.*TMath::Pi()+phi;
416 iSect = (Int_t) (phi*kRaddeg/fPhiSec);
421 //_____________________________________________________________________________
422 Int_t AliTOFGeometry::GetPadX(Float_t *pos)
425 // Returns the Pad index along X
434 Int_t isector = GetSector(pos);
436 AliError("Detector Index could not be determined");
438 Int_t iplate = GetPlate(pos);
440 AliError("Detector Index could not be determined");
442 Int_t istrip = GetStrip(pos);
444 AliError("Detector Index could not be determined");
448 Float_t rho=TMath::Sqrt(x*x+y*y);
449 Float_t phi = TMath::ATan2(y,x);
450 if(phi<0.) phi=2.*TMath::Pi()+phi;
452 // Get the local angle in the sector philoc
453 Float_t philoc = phi*kRaddeg-(isector+0.5)*fPhiSec;
454 philoc*=TMath::Pi()/180.;
455 // theta projected on the median of the sector
456 Float_t theta = TMath::ATan2(rho*TMath::Cos(philoc),z);
457 // The radius r in xy plane:
458 Float_t r = (fgkRmin+fgkRmax)/2.+fHeights[iplate][istrip]+
459 (theta-GetStripTheta(iplate, istrip))/
460 (GetMaxStripTheta(iplate, istrip)-GetMinStripTheta(iplate, istrip))
461 * 2.*fgkZPad*TMath::Sin(fAngles[iplate][istrip]/kRaddeg)-0.25;
463 // Find out distance projected onto the strip plane
464 Float_t d = (r*TMath::Tan(philoc)+(kNpadX*fgkXPad)*0.5);
466 iPadX = (Int_t) ( d/fgkXPad);
470 //_____________________________________________________________________________
471 Int_t AliTOFGeometry::GetPlate(Float_t *pos)
474 // Returns the Plate index
478 Int_t isector = GetSector(pos);
480 AliError("Detector Index could not be determined");
487 Float_t rho=TMath::Sqrt(x*x+y*y);
488 Float_t phi=TMath::ATan2(y,x);
489 if(phi<0) phi=2.*TMath::Pi()+phi;
490 // Get the local angle in the sector philoc
491 Float_t philoc = phi*kRaddeg-(isector+0.5)*fPhiSec;
492 philoc*=TMath::Pi()/180.;
493 // theta projected on the median of the sector
494 Float_t theta=TMath::ATan2(rho*TMath::Cos(philoc),z);
496 for (Int_t i=0; i<kNPlates; i++){
497 if ( GetMaxPlateTheta(i) >= theta &&
498 GetMinPlateTheta(i) <= theta)iPlate=i;
504 //_____________________________________________________________________________
505 Int_t AliTOFGeometry::GetStrip(Float_t *pos)
508 // Returns the Strip index
514 Int_t isector = GetSector(pos);
516 AliError("Detector Index could not be determined");
518 Int_t iplate = GetPlate(pos);
520 AliError("Detector Index could not be determined");
529 if(iplate==0 || iplate == 4)nstrips=kNStripC;
530 if(iplate==1 || iplate == 3)nstrips=kNStripB;
531 if(iplate==2) nstrips=kNStripA;
533 Float_t rho=TMath::Sqrt(x*x+y*y);
534 Float_t phi=TMath::ATan2(y,x);
535 if(phi<0) phi=2.*TMath::Pi()+phi;
536 // Get the local angle in the sector philoc
537 Float_t philoc = phi*kRaddeg-(isector+0.5)*fPhiSec;
538 philoc*=TMath::Pi()/180.;
539 // theta projected on the median of the sector
540 Float_t theta=TMath::ATan2(rho*TMath::Cos(philoc),z);
542 for (Int_t istrip=0; istrip<nstrips; istrip++){
545 GetMaxStripTheta(iplate,istrip) >= theta
547 GetMinStripTheta(iplate,istrip) <= theta ) iStrip = istrip;
553 //_____________________________________________________________________________
554 Int_t AliTOFGeometry::GetPadZ(Float_t *pos)
557 // Returns the Pad index along Z
561 Int_t isector = GetSector(pos);
563 AliError("Detector Index could not be determined");
565 Int_t iplate = GetPlate(pos);
567 AliError("Detector Index could not be determined");
569 Int_t istrip = GetStrip(pos);
571 AliError("Detector Index could not be determined");
579 Float_t rho=TMath::Sqrt(x*x+y*y);
580 Float_t phi=TMath::ATan2(y,x);
581 if(phi<0) phi=2.*TMath::Pi()+phi;
582 Float_t philoc = phi*kRaddeg-(isector+0.5)*fPhiSec;
583 philoc*=TMath::Pi()/180.;
584 Float_t theta=TMath::ATan2(rho*TMath::Cos(philoc),z);
586 if (theta >= GetStripTheta(iplate, istrip))iPadZ=1;
591 //_____________________________________________________________________________
592 Float_t AliTOFGeometry::GetMinPlateTheta(Int_t iPlate)
595 // Returns the minimum theta angle of a given plate iPlate (rad)
602 if(iPlate==0)delta = -1. ;
603 if(iPlate==1)delta = -0.5;
604 if(iPlate==3)delta = +0.5;
605 if(iPlate==4)delta = +1. ;
607 Float_t z=(fgkRmin+2.)*TMath::Tan(fAngles[iPlate][index]/kRaddeg)+delta;
608 Float_t r=(fgkRmin+fgkRmax)/2.+fHeights[iPlate][index];
609 z =z+fgkZPad*TMath::Cos(fAngles[iPlate][index]/kRaddeg);
610 r =r-fgkZPad*TMath::Sin(fAngles[iPlate][index]/kRaddeg);
612 Float_t thmin = 0.5*TMath::Pi()-TMath::ATan(z/r)-fgkDprecMin;
616 //_____________________________________________________________________________
617 Float_t AliTOFGeometry::GetMaxPlateTheta(Int_t iPlate)
620 // Returns the maximum theta angle of a given plate iPlate (rad)
623 if(iPlate==0 ||iPlate == 4)index=kNStripC-1;
624 if(iPlate==1 ||iPlate == 3)index=kNStripB-1;
625 if(iPlate==2) index=kNStripA-1;
628 if(iPlate==0)delta = -1. ;
629 if(iPlate==1)delta = -0.5;
630 if(iPlate==3)delta = +0.5;
631 if(iPlate==4)delta = +1. ;
633 Float_t z=(fgkRmin+2.)*TMath::Tan(fAngles[iPlate][index]/kRaddeg)+delta;
634 Float_t r=(fgkRmin+fgkRmax)/2.+fHeights[iPlate][index];
635 z =z-fgkZPad*TMath::Cos(fAngles[iPlate][index]/kRaddeg);
636 r= r+fgkZPad*TMath::Sin(fAngles[iPlate][index]/kRaddeg);
638 Float_t thmax = 0.5*TMath::Pi()-TMath::ATan(z/r)+fgkDprecMax;
642 //_____________________________________________________________________________
643 Float_t AliTOFGeometry::GetMaxStripTheta(Int_t iPlate, Int_t iStrip)
646 // Returns the maximum theta angle of a given strip iStrip (rad)
651 if(iPlate==0)delta = -1. ;
652 if(iPlate==1)delta = -0.5;
653 if(iPlate==3)delta = +0.5;
654 if(iPlate==4)delta = +1. ;
656 Float_t r =(fgkRmin+fgkRmax)/2.+fHeights[iPlate][iStrip];
657 Float_t z =(fgkRmin+2.)*TMath::Tan(fAngles[iPlate][iStrip]/kRaddeg)+delta;
658 z = z-fgkZPad*TMath::Cos(fAngles[iPlate][iStrip]/kRaddeg);
659 r = r+fgkZPad*TMath::Sin(fAngles[iPlate][iStrip]/kRaddeg);
660 Float_t thmax =0.5*TMath::Pi()-TMath::ATan(z/r)+fgkDprecMax;
665 //_____________________________________________________________________________
666 Float_t AliTOFGeometry::GetMinStripTheta(Int_t iPlate, Int_t iStrip)
669 // Returns the minimum theta angle of a given Strip iStrip (rad)
674 if(iPlate==0)delta = -1. ;
675 if(iPlate==1)delta = -0.5;
676 if(iPlate==3)delta = +0.5;
677 if(iPlate==4)delta = +1. ;
680 Float_t r =(fgkRmin+fgkRmax)/2.+fHeights[iPlate][iStrip];
681 Float_t z =(fgkRmin+2.)*TMath::Tan(fAngles[iPlate][iStrip]/kRaddeg)+delta;
682 z =z+fgkZPad*TMath::Cos(fAngles[iPlate][iStrip]/kRaddeg);
683 r =r-fgkZPad*TMath::Sin(fAngles[iPlate][iStrip]/kRaddeg);
684 Float_t thmin =0.5*TMath::Pi()-TMath::ATan(z/r)-fgkDprecMin;
691 //_____________________________________________________________________________
692 Float_t AliTOFGeometry::GetStripTheta(Int_t iPlate, Int_t iStrip)
695 // returns the median theta angle of a given strip iStrip (rad)
700 if(iPlate==0)delta = -1. ;
701 if(iPlate==1)delta = -0.5;
702 if(iPlate==3)delta = +0.5;
703 if(iPlate==4)delta = +1. ;
705 Float_t r =(fgkRmin+fgkRmax)/2.+fHeights[iPlate][iStrip];
706 Float_t z =(fgkRmin+2.)*TMath::Tan(fAngles[iPlate][iStrip]/kRaddeg)+delta;
707 Float_t theta =0.5*TMath::Pi()-TMath::ATan(z/r);
709 if(theta > 0.5*TMath::Pi() )theta+=fgkDprecCen;
710 if(theta < 0.5*TMath::Pi() )theta-=fgkDprecCen;