]> git.uio.no Git - u/mrichter/AliRoot.git/blame - TRD/AliTRDtrackV1.h
Take out the XML parser for the time being
[u/mrichter/AliRoot.git] / TRD / AliTRDtrackV1.h
CommitLineData
d9950a5a 1#ifndef ALITRDTRACKV1_H
2#define ALITRDTRACKV1_H
3/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
5
6/* $Id$ */
7
0906e73e 8///////////////////////////////////////////////////////////////////////////////
9// //
10// Represents a reconstructed TRD track //
11// //
12///////////////////////////////////////////////////////////////////////////////
d9950a5a 13
3b57a3f7 14#ifndef ALIKALMANTRACK_H
15#include "AliKalmanTrack.h"
d9950a5a 16#endif
17
3b57a3f7 18#ifndef ALIESDTRACK_H
19#include "AliESDtrack.h"
20#endif
21
22#ifndef ALITRDSEEDV1_H
23#include "AliTRDseedV1.h"
24#endif
d9950a5a 25
3b57a3f7 26class AliTRDcluster;
27class AliESDtrack;
28class AliTRDtrackV1 : public AliKalmanTrack
d9950a5a 29{
3b57a3f7 30public:
31 enum { kMAXCLUSTERSPERTRACK = 210 };
32
33 enum { kNdet = 540
34 , kNstacks = 90
35 , kNplane = AliESDtrack::kTRDnPlanes
36 , kNcham = 5
37 , kNsect = 18
38 , kNslice = 3
39 , kNMLPslice = 8 };
40
41 enum AliTRDPIDMethod {
42 kNN = 0
43 , kLQ = 1 };
0906e73e 44
3b57a3f7 45 AliTRDtrackV1();
46 AliTRDtrackV1(AliTRDseedV1 *trklts, const Double_t p[5], const Double_t cov[15], Double_t x, Double_t alpha);
47 AliTRDtrackV1(const AliESDtrack &ref);
48 AliTRDtrackV1(const AliTRDtrackV1 &ref);
49 virtual ~AliTRDtrackV1();
50 AliTRDtrackV1 &operator=(const AliTRDtrackV1 &ref) { *(new(this) AliTRDtrackV1(ref)); return *this; }
51
52 Bool_t CookPID();
53 Bool_t CookLabel(Float_t wrong);
54 AliTRDtrackV1* GetBackupTrack() const {return fBackupTrack;}
55 Double_t GetBudget(Int_t i) const { return fBudget[i];}
56 Double_t GetC() const { return AliExternalTrackParam::GetC(GetBz());}
57 Int_t GetClusterIndex(Int_t id) const;
58 Float_t GetEdep() const {return fDE;}
59 inline Float_t GetMomentum(Int_t plane) const;
60 inline Int_t GetNCross();
82180ec1 61 inline Int_t GetNumberOfTracklets() const;
3b57a3f7 62 Double_t GetPIDsignal() const {return 0.;}
63 Double_t GetPID(Int_t is) const { return (is >=0 && is < AliPID::kSPECIES) ? fPID[is] : -1.;}
64 Double_t GetPredictedChi2(const AliTRDseedV1 *tracklet) const;
65 Double_t GetPredictedChi2(const AliCluster* /*c*/) const { return 0.0; }
66 Int_t GetProlongation(Double_t xk, Double_t &y, Double_t &z);
67 AliTRDseedV1* GetTracklet(Int_t plane) const {return plane >=0 && plane <kNplane ? fTracklet[plane] : 0x0;}
68 Int_t GetTrackletIndex(Int_t plane) const { return (plane>=0 && plane<kNplane) ? fTrackletIndex[plane] : -1;}
69 UShort_t* GetTrackletIndexes() {return &fTrackletIndex[0];}
70
71 Bool_t IsOwner() const {return TestBit(1);};
72 Bool_t IsStopped() const {return TestBit(2);};
73
87a7fa94 74 void MakeBackupTrack();
3b57a3f7 75 Bool_t PropagateTo(Double_t xr, Double_t x0 = 8.72, Double_t rho = 5.86e-3);
76 Int_t PropagateToR(Double_t xr, Double_t step);
77 Bool_t Rotate(Double_t angle, Bool_t absolute = kFALSE);
78 void SetBudget(Int_t i, Double_t b) {if(i>=0 && i<3) fBudget[i] = b;}
79 void SetNumberOfClusters();
80 void SetOwner();
81 void SetStopped(Bool_t stop) {SetBit(2, stop);}
82 void SetTracklet(AliTRDseedV1 *trklt, Int_t index);
83 inline Float_t StatusForTOF();
84 Bool_t Update(AliTRDseedV1 *tracklet, Double_t chi2);
85 //Bool_t Update(const AliTRDcluster *c, Double_t chi2, Int_t index, Double_t h01){ return AliTRDtrack::Update(c,chi2,index,h01); };
86 Bool_t Update(const AliCluster *, Double_t, Int_t) { return kFALSE; };
87 void UpdateESDtrack(AliESDtrack *t);
88
89protected:
90 Double_t GetBz() const;
91
92private:
93 UChar_t fPIDquality; // No of planes used for PID calculation
94 UShort_t fTrackletIndex[kNplane];// Tracklets index in the tracker list
95 Double32_t fPID[AliPID::kSPECIES];// PID probabilities
96 Double32_t fBudget[3]; // Integrated material budget
97 Double32_t fDE; // Integrated delta energy
98 AliTRDseedV1 *fTracklet[kNplane]; // Tracklets array defining the track
99 AliTRDtrackV1 *fBackupTrack; // Backup track
d9950a5a 100
0906e73e 101
3b57a3f7 102 ClassDef(AliTRDtrackV1, 2) // new TRD track
d9950a5a 103};
104
3b57a3f7 105//____________________________________________________
106inline Float_t AliTRDtrackV1::GetMomentum(Int_t plane) const
107{
108 return plane >=0 && plane < kNplane && fTrackletIndex[plane] != 0xff ? fTracklet[plane]->GetMomentum() : -1.;
109}
110
111//____________________________________________________
112inline Int_t AliTRDtrackV1::GetNCross()
113{
114 Int_t ncross = 0;
115 for(Int_t ip=0; ip<kNplane; ip++){
116 if(!fTracklet[ip]) continue;
117 ncross += fTracklet[ip]->IsRowCross();
118 }
119 return ncross;
120}
121
82180ec1 122//____________________________________________________
123inline Int_t AliTRDtrackV1::GetNumberOfTracklets() const
124{
125 Int_t n = 0;
126 for(Int_t ip=0; ip<kNplane; ip++){
127 if(!fTracklet[ip]) continue;
128 n++;
129 }
130 return n;
131}
132
3b57a3f7 133//____________________________________________________________________________
134inline Float_t AliTRDtrackV1::StatusForTOF()
135{
136 //
137 // Defines the status of the TOF extrapolation
138 //
139
140 if(!fTracklet[5]) return 0.;
141
142 // Definition of res ????
143 Float_t res = /*(0.2 + 0.8 * (fN / (fNExpected + 5.0))) **/ (0.4 + 0.6 * fTracklet[5]->GetN() / 20.0);
144 res *= (0.25 + 0.8 * 40.0 / (40.0 + fBudget[2]));
145 return res;
146}
d9950a5a 147
148#endif
149
150