]> git.uio.no Git - u/mrichter/AliRoot.git/blame - TOF/AliTOFtrack.h
Canges to comply with CDB (C.Oppedisano)
[u/mrichter/AliRoot.git] / TOF / AliTOFtrack.h
CommitLineData
74ea065c 1#ifndef ALITOFTRACK_H
2#define ALITOFTRACK_H
2c770f53 3// Description: class for handling ESD extracted tracks for TOF matching.
74ea065c 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
12class AliESDtrack;
13class AliTOFtrack : public AliKalmanTrack {
14
74ea065c 15public:
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;}
2c770f53 27 void GetCovariance(Double_t cov[15]) const; // track covariance
74ea065c 28 Double_t GetEta() const {return fE;}
29
2c770f53 30 void GetExternalCovariance(Double_t cov[15]) const ;// track covariance
31 void GetExternalParameters(Double_t& xr, Double_t x[5]) const ;//track parameters
74ea065c 32 Double_t GetSigmaY2() const {return fCyy;}
33 Double_t GetSigmaZ2() const {return fCzz;}
34
c84a5e9e 35 Double_t Get1Pt() const {
36 return (TMath::Sign(1e-9,fC) + fC)*GetLocalConvConst();
37 }
74ea065c 38 Double_t GetP() const {
39 return TMath::Abs(GetPt())*sqrt(1.+GetTgl()*GetTgl());
40 }
41 Double_t GetPt() const {return 1./Get1Pt();}
42 void GetPxPyPz(Double_t &px, Double_t &py, Double_t &pz) const ;
43 void GetGlobalXYZ(Double_t &x, Double_t &y, Double_t &z) const ;
44 Int_t GetSeedLabel() const { return fSeedLab; }
45 Int_t GetSeedIndex() const { return fSeedInd; }
46 void SetSeedLabel(Int_t lab) { fSeedLab=lab; }
47 void SetSeedIndex(Int_t ind) { fSeedInd=ind; }
48 Double_t GetSnp() const {return fX*fC - fE;}
49 Double_t GetTgl() const {return fT;}
50 Double_t GetX() const {return fX;}
51 Double_t GetY() const {return fY;}
52 Double_t GetZ() const {return fZ;}
53
54 Int_t Compare(const TObject *o) const;
55
56
d3c7bfac 57 Double_t GetYat(Double_t xk, Bool_t & skip) const;
74ea065c 58 Int_t PropagateTo(Double_t xr, Double_t x0=8.72, Double_t rho=5.86e-3);
59 Int_t PropagateToInnerTOF(Bool_t holes);
60 void ResetCovariance();
61 void ResetCovariance(Float_t mult);
62 Int_t Rotate(Double_t angle);
63
74ea065c 64protected:
c84a5e9e 65 void GetXYZ(Float_t r[3]) const;
74ea065c 66
c84a5e9e 67 Int_t Update(const AliCluster */*c*/, Double_t /*chi2*/, UInt_t /*idx*/) {
68 return 0;
69 }
70 Double_t GetPredictedChi2(const AliCluster */*c*/) const {return 0.;}
71
74ea065c 72 Int_t fSeedInd; // ESD seed track index
73 Int_t fSeedLab; // track label taken from seeding
74 Double_t fAlpha; // rotation angle
75 Double_t fX; // running local X-coordinate of the track (time bin)
76
77 Double_t fY; // Y-coordinate of the track
78 Double_t fZ; // Z-coordinate of the track
79 Double_t fE; // C*x0
80 Double_t fT; // tangent of the track momentum dip angle
81 Double_t fC; // track curvature
82
83 Double_t fCyy; // covariance
84 Double_t fCzy, fCzz; // matrix
85 Double_t fCey, fCez, fCee; // of the
86 Double_t fCty, fCtz, fCte, fCtt; // track
87 Double_t fCcy, fCcz, fCce, fCct, fCcc; // parameters
88
d3c7bfac 89 AliTOFGeometry *fTOFgeometry; // pointer to the TOF geometry
90
74ea065c 91 private:
92
93 void GetPropagationParameters(Bool_t holes, Double_t *param);
94
95 ClassDef(AliTOFtrack,0) // TOF reconstructed tracks
96
97};
98
c84a5e9e 99inline void AliTOFtrack::GetXYZ(Float_t r[3]) const {
100 //---------------------------------------------------------------------
101 // Returns the position of the track in the global coord. system
102 //---------------------------------------------------------------------
103 Double_t cs=TMath::Cos(fAlpha), sn=TMath::Sin(fAlpha);
104 r[0]=fX*cs - fY*sn; r[1]=fX*sn + fY*cs; r[2]=fZ;
105}
106
2c770f53 107#endif