]> git.uio.no Git - u/mrichter/AliRoot.git/blob - TRD/AliTRDtrack.h
No effective C++ option for compilation of C files
[u/mrichter/AliRoot.git] / TRD / AliTRDtrack.h
1 #ifndef ALITRDTRACK_H
2 #define ALITRDTRACK_H
3
4 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5  * See cxx source for full Copyright notice                               */
6
7 /* $Id$ */
8
9 ///////////////////////////////////////////////////////////////////////////////
10 //                                                                           //
11 //  Represents a reconstructed TRD track                                     //
12 //                                                                           //
13 ///////////////////////////////////////////////////////////////////////////////
14
15 #include "AliKalmanTrack.h"
16
17 #include "AliTRDtracklet.h"
18
19 class AliESDtrack;
20 class AliTrackReference;
21
22 const unsigned kMAXCLUSTERSPERTRACK = 210; 
23
24 class AliTRDtrack : public AliKalmanTrack {
25
26  public:
27    
28   enum { kNdet      = 540
29        , kNstacks   =  90
30        , kNplane    =   6
31        , kNcham     =   5
32        , kNsect     =  18
33        , kNslice    =   3
34        , kNtimeBins =  22 };
35
36    AliTRDtrack();
37    AliTRDtrack(const AliTRDcluster *c, Int_t index, const Double_t xx[5]
38               ,const Double_t cc[15], Double_t xr, Double_t alpha);  
39    AliTRDtrack(const AliTRDtrack &t);    
40    AliTRDtrack(const AliESDtrack &t);
41    ~AliTRDtrack();
42    AliTRDtrack(const AliKalmanTrack &t, Double_t alpha); 
43
44            void     ResetClusters()                                         { SetChi2(0.0); 
45                                                                               SetNumberOfClusters(0);              }
46            Int_t    Compare(const TObject *o) const;
47            void     AddNWrong()                                             { fNWrong++;                           }  
48            void     IncCross()                                              { fNCross++; 
49                                                                               if (fBackupTrack) fBackupTrack->IncCross();  }
50
51            Int_t    GetSector() const;
52            Float_t  GetClusterdQdl(Int_t i) const                           { return fdQdl[i];                     }    
53            Double_t GetdEdx() const                                         { return fdEdx;                        }
54            Int_t    GetNdedx() const                                        { return fNdedx;                       }
55            Double_t GetPIDsignal() const                                    { return GetdEdx();                    }
56            Int_t    GetClusterIndex(Int_t i) const                          { return fIndex[i];                    }
57            Double_t GetC() const                                            { return AliExternalTrackParam::GetC(GetBz()); }
58            Double_t GetPredictedChi2(const AliTRDcluster *c, Double_t h01) const;
59            Float_t  GetPIDsignals(Int_t iPlane, Int_t iSlice) const         { return fdEdxPlane[iPlane][iSlice];   }
60            Int_t    GetPIDTimBin(Int_t i) const                             { return fTimBinPlane[i];              }
61            Double_t GetLikelihoodElectron() const                           { return fLhElectron;                  }
62            Int_t    GetSeedLabel() const                                    { return fSeedLab;                     }
63            Int_t   *GetBackupIndexes()                                      { return fIndexBackup;                 }
64            Int_t   *GetIndexes()                                            { return fIndex;                       }
65            Int_t    GetProlongation(Double_t xk, Double_t &y, Double_t &z);
66            Bool_t   GetStop() const                                         { return fStopped;                     }
67            Int_t    GetNRotate() const                                      { return fNRotate;                     }
68            Int_t    GetNWrong() const                                       { return fNWrong;                      }
69            Int_t    GetNCross() const                                       { return fNCross;                      }
70            Int_t    GetNExpected() const                                    { return fNExpected;                   }
71            Int_t    GetNLast() const                                        { return fNLast;                       }
72            Int_t    GetNExpectedLast() const                                { return fNExpectedLast;               }
73   AliTRDtracklet    GetTracklets(Int_t i) const                             { return fTracklets[i];                }
74            Float_t  GetBudget(Int_t i) const                                { return fBudget[i];                   }
75            Float_t  GetChi2Last() const                                     { return fChi2Last;                    }
76   AliTRDtrack      *GetBackupTrack()                                        { return fBackupTrack;                 }
77
78            void     SetdEdx(Double_t dedx)                                  { fdEdx                      = dedx;   }
79            void     SetStop(Bool_t stop)                                    { fStopped                   = stop;   }
80            void     SetPIDsignals(Float_t dedx, Int_t iPlane, Int_t iSlice) { fdEdxPlane[iPlane][iSlice] = dedx;   }
81            void     SetPIDTimBin(Int_t timbin, Int_t i)                     { fTimBinPlane[i]            = timbin; }
82            void     SetLikelihoodElectron(Float_t l)                        { fLhElectron                = l;      }
83            void     SetSampledEdx(Float_t q, Int_t i);
84            void     SetSampledEdx(Float_t q);
85            void     SetSeedLabel(Int_t lab)                                 { fSeedLab                   = lab;    }
86            void     SetNWrong(Int_t nwrong)                                 { fNWrong                    = nwrong; }
87            void     SetNCross(Int_t ncross)                                 { fNCross                    = ncross; }
88            void     SetNExpected(Int_t nexp)                                { fNExpected                 = nexp;   }
89            void     SetNLast(Int_t nlast)                                   { fNLast                     = nlast;  }
90            void     SetNExpectedLast(Int_t nexp)                            { fNExpectedLast             = nexp;   }
91            void     SetChi2Last(Float_t chi2)                               { fChi2Last                  = chi2;   }
92            void     SetTracklets(Int_t i, AliTRDtracklet t)                 { fTracklets[i]              = t;      }
93            void     SetBudget(Int_t i, Float_t budget)                      { fBudget[i]                 = budget; }
94
95            Int_t    PropagateToX(Double_t xr, Double_t step);
96            Int_t    PropagateToR(Double_t xr, Double_t step);
97            Int_t    UpdateMI(const AliTRDcluster *c, Double_t chi2, Int_t i, Double_t h01, Int_t plane);
98            void     MakeBackupTrack();
99            Bool_t   PropagateTo(Double_t xr, Double_t x0 = 8.72, Double_t rho = 5.86e-3);
100            Bool_t   Update(const AliTRDcluster *c, Double_t chi2, Int_t i, Double_t h01);
101            Bool_t   Rotate(Double_t angle, Bool_t absolute = kFALSE);
102            void     CookdEdx(Double_t low = 0.05, Double_t up = 0.7);   
103            Float_t  StatusForTOF();
104  
105  protected:
106
107   AliTRDtrack      &operator=(const AliTRDtrack &t);
108
109            Double_t GetBz() const;
110            Bool_t   Update(const AliCluster */*c*/, Double_t /*chi2*/, Int_t /*idx*/) { return 0;   }
111            Double_t GetPredictedChi2(const AliCluster* /*c*/) const                   { return 0.0; }
112
113            Int_t    fSeedLab;                           //  Track label taken from seeding  
114            Float_t  fdEdx;                              //  dE/dx (truncated mean)
115            Float_t  fDE;                                //  Integrated delta energy
116            Float_t  fdEdxPlane[kNplane][kNslice];       //  dE/dx from all 6 planes in 3 slices each
117            Int_t    fTimBinPlane[kNplane];              //  Time bin of Max cluster from all 6 planes
118
119            Bool_t   fStopped;                           //  Track stop indication
120            Int_t    fIndex[kMAXCLUSTERSPERTRACK];       //  Global indexes of clusters  
121            Int_t    fIndexBackup[kMAXCLUSTERSPERTRACK]; //  Backup indexes of clusters - used in iterations
122            Float_t  fdQdl[kMAXCLUSTERSPERTRACK];        //  Cluster amplitudes corrected for track angles    
123                            
124            Float_t  fLhElectron;                        //  Likelihood to be an electron    
125            Int_t    fNWrong;                            //  Number of wrong clusters
126            Int_t    fNRotate;                           //  Number of rotation
127            Int_t    fNCross;                            //  Number of the cross materials
128            Int_t    fNExpected;                         //  Expected number of cluster
129            Int_t    fNLast;                             //  Number of clusters in last 2 layers
130            Int_t    fNExpectedLast;                     //  Number of expected clusters on last 2 layers
131            Int_t    fNdedx;                             //  Number of clusters for dEdx measurment
132            Float_t  fChi2Last;                          //  Chi2 in the  last 2 layers
133    AliTRDtracklet   fTracklets[6];                      //  Tracklets
134            Float_t  fBudget[3];                         //  Integrated material budget
135    AliTRDtrack     *fBackupTrack;                       //! Backup track
136
137    ClassDef(AliTRDtrack,8)                              //  TRD reconstructed tracks
138
139 };                     
140
141 #endif