]> git.uio.no Git - u/mrichter/AliRoot.git/blob - TOF/AliTOFtrack.h
Rearranged conditions for faster execution
[u/mrichter/AliRoot.git] / TOF / AliTOFtrack.h
1 #ifndef ALITOFTRACK_H
2 #define ALITOFTRACK_H
3 // Description: class for handling ESD extracted tracks for TOF matching.
4 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5  * See cxx source for full Copyright notice                               */
6
7 #include <AliKalmanTrack.h>
8 #include <TMath.h>
9 #include "AliTOFGeometry.h"
10 #include "TVector2.h"
11
12 class AliESDtrack;
13 class AliTOFtrack : public AliKalmanTrack {
14
15 public:
16
17    AliTOFtrack():AliKalmanTrack(){}
18    AliTOFtrack(const AliTOFtrack& t);    
19    AliTOFtrack(const AliESDtrack& t);    
20
21
22    Double_t GetAlpha() const {return fAlpha;}
23    Int_t    GetSector() const {
24      return Int_t(TVector2::Phi_0_2pi(fAlpha)/AliTOFGeometry::GetAlpha())%AliTOFGeometry::NSectors();}
25
26    Double_t GetC()     const {return fC;}
27    void     GetCovariance(Double_t cov[15]) const; // track covariance
28    Double_t GetEta()   const {return fE;}
29
30    void     GetExternalCovariance(Double_t cov[15]) const ;// track covariance
31    void     GetExternalParameters(Double_t& xr, Double_t x[5]) const ;//track parameters
32    Double_t GetSigmaY2() const {return fCyy;}
33    Double_t GetSigmaZ2() const {return fCzz;}
34
35    Double_t Get1Pt()   const {return (1e-9*TMath::Abs(fC)/fC + fC)*GetConvConst();} 
36    Double_t GetP()     const {  
37      return TMath::Abs(GetPt())*sqrt(1.+GetTgl()*GetTgl());
38    }
39    Double_t GetPt()    const {return 1./Get1Pt();}   
40    void     GetPxPyPz(Double_t &px, Double_t &py, Double_t &pz) const ;
41    void     GetGlobalXYZ(Double_t &x, Double_t &y, Double_t &z) const ;
42    Int_t    GetSeedLabel() const { return fSeedLab; }
43    Int_t    GetSeedIndex() const { return fSeedInd; }
44    void     SetSeedLabel(Int_t lab) { fSeedLab=lab; }
45    void     SetSeedIndex(Int_t ind) { fSeedInd=ind; }
46    Double_t GetSnp()  const {return fX*fC - fE;}
47    Double_t GetTgl()  const {return fT;}
48    Double_t GetX()    const {return fX;}
49    Double_t GetY()    const {return fY;}
50    Double_t GetZ()    const {return fZ;}
51   
52    Int_t Compare(const TObject *o) const;
53
54
55    Double_t GetYat(Double_t xk, Bool_t skip) const;      
56    Int_t    PropagateTo(Double_t xr, Double_t x0=8.72, Double_t rho=5.86e-3);
57    Int_t    PropagateToInnerTOF(Bool_t holes);
58    void     ResetCovariance();   
59    void     ResetCovariance(Float_t mult);   
60    Int_t    Rotate(Double_t angle);
61
62
63
64 protected:
65
66   
67    Int_t    fSeedInd;     // ESD seed track index  
68    Int_t    fSeedLab;     // track label taken from seeding  
69    Double_t fAlpha;       // rotation angle
70    Double_t fX;           // running local X-coordinate of the track (time bin)
71   
72    Double_t fY;             // Y-coordinate of the track
73    Double_t fZ;             // Z-coordinate of the track
74    Double_t fE;             // C*x0
75    Double_t fT;             // tangent of the track momentum dip angle
76    Double_t fC;             // track curvature
77
78    Double_t fCyy;                         // covariance
79    Double_t fCzy, fCzz;                   // matrix
80    Double_t fCey, fCez, fCee;             // of the
81    Double_t fCty, fCtz, fCte, fCtt;       // track
82    Double_t fCcy, fCcz, fCce, fCct, fCcc; // parameters   
83
84  private:
85
86    void GetPropagationParameters(Bool_t holes, Double_t *param);
87    
88    ClassDef(AliTOFtrack,0) // TOF reconstructed tracks
89
90 };                     
91
92 #endif