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