]> git.uio.no Git - u/mrichter/AliRoot.git/blame - TRD/AliTRDtrackV1.h
Correction to find clusters in high detector occupancy (central Hijing) is introduced.
[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;
181c7f7e 28class AliTRDReconstructor;
3b57a3f7 29class AliTRDtrackV1 : public AliKalmanTrack
d9950a5a 30{
3b57a3f7 31public:
32 enum { kMAXCLUSTERSPERTRACK = 210 };
33
34 enum { kNdet = 540
35 , kNstacks = 90
36 , kNplane = AliESDtrack::kTRDnPlanes
37 , kNcham = 5
38 , kNsect = 18
39 , kNslice = 3
40 , kNMLPslice = 8 };
41
2e2915e7 42 // bits from 0-13 are reserved by ROOT (see TObject.h)
e44586fb 43 enum AliTRDtrackStatus {
2e2915e7 44 kOwner = BIT(14)
45 , kStopped = BIT(15)
e44586fb 46 };
0906e73e 47
3b57a3f7 48 AliTRDtrackV1();
49 AliTRDtrackV1(AliTRDseedV1 *trklts, const Double_t p[5], const Double_t cov[15], Double_t x, Double_t alpha);
50 AliTRDtrackV1(const AliESDtrack &ref);
51 AliTRDtrackV1(const AliTRDtrackV1 &ref);
52 virtual ~AliTRDtrackV1();
53 AliTRDtrackV1 &operator=(const AliTRDtrackV1 &ref) { *(new(this) AliTRDtrackV1(ref)); return *this; }
54
55 Bool_t CookPID();
56 Bool_t CookLabel(Float_t wrong);
57 AliTRDtrackV1* GetBackupTrack() const {return fBackupTrack;}
58 Double_t GetBudget(Int_t i) const { return fBudget[i];}
27fbeba8 59 Double_t GetBz() const;
0349cc67 60 AliTRDcluster* GetCluster(Int_t id);
3b57a3f7 61 Int_t GetClusterIndex(Int_t id) const;
62 Float_t GetEdep() const {return fDE;}
63 inline Float_t GetMomentum(Int_t plane) const;
64 inline Int_t GetNCross();
82180ec1 65 inline Int_t GetNumberOfTracklets() const;
1128e139 66 Double_t GetPIDsignal() const { return 0.;}
3b57a3f7 67 Double_t GetPID(Int_t is) const { return (is >=0 && is < AliPID::kSPECIES) ? fPID[is] : -1.;}
1128e139 68 UChar_t GetPIDquality() const { return fPIDquality;}
3b57a3f7 69 Double_t GetPredictedChi2(const AliTRDseedV1 *tracklet) const;
70 Double_t GetPredictedChi2(const AliCluster* /*c*/) const { return 0.0; }
71 Int_t GetProlongation(Double_t xk, Double_t &y, Double_t &z);
72 AliTRDseedV1* GetTracklet(Int_t plane) const {return plane >=0 && plane <kNplane ? fTracklet[plane] : 0x0;}
73 Int_t GetTrackletIndex(Int_t plane) const { return (plane>=0 && plane<kNplane) ? fTrackletIndex[plane] : -1;}
74 UShort_t* GetTrackletIndexes() {return &fTrackletIndex[0];}
75
203967fc 76 Bool_t IsEqual(const TObject *inTrack) const;
e44586fb 77 Bool_t IsOwner() const {return TestBit(kOwner);};
78 Bool_t IsStopped() const {return TestBit(kStopped);};
22a4ab0c 79 Bool_t IsElectron() const;
3b57a3f7 80
87a7fa94 81 void MakeBackupTrack();
203967fc 82 void Print(Option_t *o="") const;
83
3b57a3f7 84 Bool_t PropagateTo(Double_t xr, Double_t x0 = 8.72, Double_t rho = 5.86e-3);
85 Int_t PropagateToR(Double_t xr, Double_t step);
86 Bool_t Rotate(Double_t angle, Bool_t absolute = kFALSE);
87 void SetBudget(Int_t i, Double_t b) {if(i>=0 && i<3) fBudget[i] = b;}
bee2b41e 88 void SetEdep(Double32_t inDE){fDE = inDE;};
3b57a3f7 89 void SetNumberOfClusters();
90 void SetOwner();
bee2b41e 91 void SetPID(Short_t is, Double_t inPID){if (is >=0 && is < AliPID::kSPECIES) fPID[is]=inPID;};
92 void SetPIDquality(UChar_t inPIDquality){fPIDquality = inPIDquality;};
e44586fb 93 void SetStopped(Bool_t stop) {SetBit(kStopped, stop);}
3b57a3f7 94 void SetTracklet(AliTRDseedV1 *trklt, Int_t index);
181c7f7e 95 inline void SetReconstructor(const AliTRDReconstructor *rec);
3b57a3f7 96 inline Float_t StatusForTOF();
181d2c97 97 void UnsetTracklet(Int_t plane);
3b57a3f7 98 Bool_t Update(AliTRDseedV1 *tracklet, Double_t chi2);
99 //Bool_t Update(const AliTRDcluster *c, Double_t chi2, Int_t index, Double_t h01){ return AliTRDtrack::Update(c,chi2,index,h01); };
100 Bool_t Update(const AliCluster *, Double_t, Int_t) { return kFALSE; };
101 void UpdateESDtrack(AliESDtrack *t);
3b57a3f7 102
103private:
104 UChar_t fPIDquality; // No of planes used for PID calculation
105 UShort_t fTrackletIndex[kNplane];// Tracklets index in the tracker list
106 Double32_t fPID[AliPID::kSPECIES];// PID probabilities
107 Double32_t fBudget[3]; // Integrated material budget
108 Double32_t fDE; // Integrated delta energy
215f7116 109 const AliTRDReconstructor *fReconstructor;//! reconstructor link
3b57a3f7 110 AliTRDseedV1 *fTracklet[kNplane]; // Tracklets array defining the track
111 AliTRDtrackV1 *fBackupTrack; // Backup track
d9950a5a 112
0906e73e 113
215f7116 114 ClassDef(AliTRDtrackV1, 3) // new TRD track
d9950a5a 115};
116
3b57a3f7 117//____________________________________________________
118inline Float_t AliTRDtrackV1::GetMomentum(Int_t plane) const
119{
120 return plane >=0 && plane < kNplane && fTrackletIndex[plane] != 0xff ? fTracklet[plane]->GetMomentum() : -1.;
121}
122
123//____________________________________________________
124inline Int_t AliTRDtrackV1::GetNCross()
125{
126 Int_t ncross = 0;
127 for(Int_t ip=0; ip<kNplane; ip++){
128 if(!fTracklet[ip]) continue;
129 ncross += fTracklet[ip]->IsRowCross();
130 }
131 return ncross;
132}
133
82180ec1 134//____________________________________________________
135inline Int_t AliTRDtrackV1::GetNumberOfTracklets() const
136{
137 Int_t n = 0;
138 for(Int_t ip=0; ip<kNplane; ip++){
139 if(!fTracklet[ip]) continue;
140 n++;
141 }
142 return n;
143}
144
181c7f7e 145
146//____________________________________________________
147inline void AliTRDtrackV1::SetReconstructor(const AliTRDReconstructor *rec)
148{
149 for(Int_t ip=0; ip<kNplane; ip++){
150 if(!fTracklet[ip]) continue;
151 fTracklet[ip]->SetReconstructor(rec);
152 }
215f7116 153 fReconstructor = rec;
181c7f7e 154}
155
156
3b57a3f7 157//____________________________________________________________________________
158inline Float_t AliTRDtrackV1::StatusForTOF()
159{
160 //
161 // Defines the status of the TOF extrapolation
162 //
163
164 if(!fTracklet[5]) return 0.;
165
166 // Definition of res ????
167 Float_t res = /*(0.2 + 0.8 * (fN / (fNExpected + 5.0))) **/ (0.4 + 0.6 * fTracklet[5]->GetN() / 20.0);
168 res *= (0.25 + 0.8 * 40.0 / (40.0 + fBudget[2]));
169 return res;
170}
d9950a5a 171
172#endif
173
174
6e49cfdb 175