]>
Commit | Line | Data |
---|---|---|
46d29e70 | 1 | #ifndef ALITRDTRACKER_H |
2 | #define ALITRDTRACKER_H | |
3 | ||
4 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
5 | * See cxx source for full Copyright notice */ | |
6 | ||
ad670fba | 7 | /* $Id$ */ |
8 | ||
9 | //////////////////////////////////////////////////////////////////////////// | |
10 | // // | |
11 | // The TRD tracker // | |
12 | // // | |
13 | //////////////////////////////////////////////////////////////////////////// | |
14 | ||
e4f2f73d | 15 | #ifndef ROOT_TObjArray |
e24ea474 | 16 | #include "TObjArray.h" |
e4f2f73d | 17 | #endif |
46d29e70 | 18 | |
e4f2f73d | 19 | #ifndef ALITRACKER_H |
0c349049 | 20 | #include "AliTracker.h" |
e4f2f73d | 21 | #endif |
22 | ||
23 | #ifndef ALITRDPROPAGATIONLAYER_H | |
24 | #include "AliTRDpropagationLayer.h" | |
25 | #endif | |
0c349049 | 26 | |
46d29e70 | 27 | class TFile; |
c630aafd | 28 | class TTree; |
7e448bcc | 29 | class TH1D; |
30 | class TH2D; | |
ad670fba | 31 | class TParticle; |
32 | class TParticlePDG; | |
0c349049 | 33 | class TTreeSRedirector; |
46d29e70 | 34 | |
35 | class AliTRDgeometry; | |
46d29e70 | 36 | class AliTRDtrack; |
7ad19338 | 37 | class AliTRDtracklet; |
5443e65e | 38 | class AliTRDcluster; |
75bd7f81 | 39 | class AliTRDseed; |
af885e0f | 40 | class AliESDEvent; |
e4f2f73d | 41 | class AliTRDpropagationLayer; |
3a039a31 | 42 | class AliTRDReconstructor; |
46d29e70 | 43 | |
75bd7f81 | 44 | /////////////////////////////////////////////////////////////////////////////// |
45 | // // | |
46 | // The standard TRD tracker // | |
47 | // Based on Kalman filltering approach // | |
48 | // // | |
49 | /////////////////////////////////////////////////////////////////////////////// | |
7ad19338 | 50 | |
c630aafd | 51 | class AliTRDtracker : public AliTracker { |
46d29e70 | 52 | |
0c349049 | 53 | public: |
54 | ||
7e448bcc | 55 | void InitLogHists(); |
56 | void SaveLogHists(); | |
57 | ||
75bd7f81 | 58 | enum { kMaxLayersPerSector = 1000 |
af26ce80 | 59 | , kMaxTimeBinIndex = 216 |
af26ce80 | 60 | , kTrackingSectors = 18 }; |
7e448bcc | 61 | |
3a039a31 | 62 | AliTRDtracker(AliTRDReconstructor *rec = 0x0); |
ad670fba | 63 | AliTRDtracker(const AliTRDtracker &t); |
3a039a31 | 64 | AliTRDtracker(const TFile *in, AliTRDReconstructor *rec = 0x0); |
ad670fba | 65 | virtual ~AliTRDtracker(); |
af26ce80 | 66 | AliTRDtracker &operator=(const AliTRDtracker &/*t*/) { return *this; } |
7e448bcc | 67 | |
3a039a31 | 68 | void SetReconstructor(AliTRDReconstructor *rec) {fReconstructor = rec;} |
af26ce80 | 69 | void SetAddTRDseeds() { fAddTRDseeds = kTRUE; } |
70 | void SetNoTilt() { fNoTilt = kTRUE; } | |
7e448bcc | 71 | |
af26ce80 | 72 | Int_t GetTimeBinsPerPlane() const { return fTimeBinsPerPlane; } |
73 | Double_t GetMaxChi2() const { return fgkMaxChi2; } | |
74 | Float_t GetLabelFraction() const { return fgkLabelFraction; } | |
75 | Float_t GetMinClustersInTrack() const { return fgkMinClustersInTrack; } | |
76 | Int_t GetLastPlane(AliTRDtrack *track); | |
77 | Double_t GetTiltFactor(const AliTRDcluster *c); | |
0906e73e | 78 | virtual Bool_t GetTrackPoint(Int_t index, AliTrackPoint& p) const; |
af26ce80 | 79 | Double_t GetX(Int_t sec, Int_t plane, Int_t localTB) const; |
80 | Double_t GetX(Int_t sec, Int_t pl) const | |
81 | { return fTrSec[sec]->GetLayer(pl)->GetX(); } | |
82 | Int_t GetGlobalTimeBin(Int_t sec, Int_t plane, Int_t localTB) const | |
83 | { return fTrSec[sec]->CookTimeBinIndex(plane,localTB); } | |
84 | Double_t GetLayerNumber(Int_t sec, Double_t x) const | |
85 | { return fTrSec[sec]->GetLayerNumber(x); } | |
86 | AliCluster *GetCluster(Int_t index) const { if (index >= fNclusters) return NULL; | |
87 | return (AliCluster *) fClusters->UncheckedAt(index); } | |
7e448bcc | 88 | |
af26ce80 | 89 | static Int_t Freq(Int_t n, const Int_t *inlist, Int_t *outlist, Bool_t down); |
90 | Int_t Clusters2Tracks(AliESDEvent *event); | |
91 | Int_t PropagateBack(AliESDEvent *event); | |
92 | Int_t RefitInward(AliESDEvent *event); | |
7e448bcc | 93 | |
ad670fba | 94 | virtual void CookLabel(AliKalmanTrack *t, Float_t wrong) const; |
7e448bcc | 95 | |
af26ce80 | 96 | Int_t LocalToGlobalID(Int_t lid); |
97 | Int_t GlobalToLocalID(Int_t gid); | |
5443e65e | 98 | |
af26ce80 | 99 | Int_t LoadClusters(TTree *cTree); |
100 | void UnloadClusters(); | |
ad670fba | 101 | virtual void UseClusters(const AliKalmanTrack *t, Int_t from = 0) const; |
af26ce80 | 102 | Int_t ReadClusters(TObjArray *array, TTree *in) const; |
103 | AliTRDcluster *GetCluster(AliTRDtrack *track, Int_t plane, Int_t timebin, UInt_t &index); | |
104 | Int_t FindClusters(Int_t sector, Int_t t0, Int_t t1, AliTRDtrack *track | |
e4f2f73d | 105 | , Int_t *clusters, AliTRDtracklet &tracklet); |
7e448bcc | 106 | |
75bd7f81 | 107 | protected: |
af26ce80 | 108 | |
e4f2f73d | 109 | Bool_t AdjustSector(AliTRDtrack *track); |
110 | AliTRDtrack *RegisterSeed(AliTRDseed *seeds, Double_t *params); | |
111 | Int_t FollowBackProlongation(AliTRDtrack &t); | |
112 | //void MakeSeedsMI(Int_t inner, Int_t outer, AliESDEvent *esd = 0); | |
7e448bcc | 113 | |
e4f2f73d | 114 | protected: |
115 | ||
0c349049 | 116 | //__________________________________________________________________________________________________ |
75bd7f81 | 117 | class AliTRDtrackingSector { |
7e448bcc | 118 | |
5443e65e | 119 | public: |
7e448bcc | 120 | |
121 | AliTRDtrackingSector(AliTRDgeometry* geo, Int_t gs); | |
122 | AliTRDtrackingSector(const AliTRDtrackingSector &/*t*/); | |
0c349049 | 123 | ~AliTRDtrackingSector(); |
7e448bcc | 124 | |
0c349049 | 125 | AliTRDtrackingSector &operator=(const AliTRDtrackingSector &/*t*/) { return *this; } |
7e448bcc | 126 | |
0c349049 | 127 | Int_t GetNumberOfLayers() const { return fN; } |
7e448bcc | 128 | Int_t GetNumberOfTimeBins() const; |
129 | Int_t GetLayerNumber(Double_t x) const; | |
130 | Int_t GetInnerTimeBin() const; | |
131 | Int_t GetOuterTimeBin() const; | |
0c349049 | 132 | Int_t GetLayerNumber(Int_t tb) const { return fTimeBinIndex[tb]; } |
133 | Double_t GetX(Int_t pl) const { return fLayers[pl]->GetX(); } | |
134 | AliTRDpropagationLayer* GetLayer(Int_t i) { return fLayers[i]; } | |
e4f2f73d | 135 | Int_t GetSector() const {return fGeomSector;} |
7e448bcc | 136 | |
137 | void MapTimeBinLayers(); | |
138 | Int_t Find(Double_t x) const; | |
139 | void InsertLayer(AliTRDpropagationLayer *pl); | |
140 | Int_t CookTimeBinIndex(Int_t plane, Int_t localTB) const; | |
141 | ||
0c349049 | 142 | private: |
7e448bcc | 143 | |
144 | Int_t fN; // Total number of layers | |
145 | AliTRDgeometry *fGeom; // Geometry | |
146 | AliTRDpropagationLayer *fLayers[kMaxLayersPerSector]; // Layers | |
147 | Int_t fTimeBinIndex[kMaxTimeBinIndex]; // Time bin index | |
148 | Int_t fGeomSector; // Sector# in AliTRDgeometry | |
149 | ||
75bd7f81 | 150 | }; |
9c9d2487 | 151 | |
e4f2f73d | 152 | protected: |
3a039a31 | 153 | AliTRDReconstructor *fReconstructor; |
7e448bcc | 154 | AliTRDgeometry *fGeom; // Pointer to TRD geometry |
155 | AliTRDtrackingSector *fTrSec[kTrackingSectors]; // Array of tracking sectors; | |
156 | Int_t fNclusters; // Number of clusters in TRD | |
157 | TObjArray *fClusters; // List of clusters for all sectors | |
158 | Int_t fNseeds; // Number of track seeds | |
159 | TObjArray *fSeeds; // List of track seeds | |
160 | Int_t fNtracks; // Number of reconstructed tracks | |
161 | TObjArray *fTracks; // List of reconstructed tracks | |
162 | Int_t fTimeBinsPerPlane; // Timebins per plane in track prolongation | |
163 | ||
164 | static const Double_t fgkMaxChi2; // Max increment in track chi2 | |
165 | static const Float_t fgkMinClustersInTrack; // Min number of clusters in track | |
166 | static const Float_t fgkLabelFraction; // Min fraction of same label | |
167 | static const Double_t fgkMaxSnp; // Maximal snp for tracking | |
168 | static const Double_t fgkMaxStep; // Maximal step for tracking | |
169 | ||
170 | Bool_t fAddTRDseeds; // Something else | |
171 | Bool_t fNoTilt; // No tilt, or what? | |
a4cf6278 | 172 | |
173 | // Histograms | |
174 | TH1D *fHBackfit; // QA histogram | |
175 | TH1D *fHClSearch; // QA histogram | |
176 | TH1D *fHRefit; // QA histogram | |
177 | TH1D *fHX; // QA histogram | |
178 | TH1D *fHNCl; // QA histogram | |
179 | TH1D *fHNClTrack; // QA histogram | |
180 | TH1D *fHFindCl[4]; // QA histogram | |
181 | TH1D *fHMinYPos; // QA histogram | |
182 | TH1D *fHMinYNeg; // QA histogram | |
183 | TH1D *fHMinZ; // QA histogram | |
184 | TH2D *fHMinD; // QA histogram | |
185 | TH1D *fHDeltaX; // QA histogram | |
186 | TH1D *fHXCl; // QA histogram | |
e4f2f73d | 187 | |
0906e73e | 188 | protected: |
e4f2f73d | 189 | |
190 | Int_t FollowProlongation(AliTRDtrack &t); | |
191 | Int_t PropagateToX(AliTRDtrack &t, Double_t xToGo, Double_t maxStep); | |
192 | Double_t ExpectedSigmaY2(Double_t r, Double_t tgl, Double_t pt) const; | |
193 | Double_t ExpectedSigmaZ2(Double_t r, Double_t tgl) const; | |
194 | ||
e4f2f73d | 195 | |
7e448bcc | 196 | TTreeSRedirector *fDebugStreamer; //!Debug streamer |
197 | ||
e4f2f73d | 198 | ClassDef(AliTRDtracker, 4) // TRD tracker |
7e448bcc | 199 | |
0c349049 | 200 | }; |
e4f2f73d | 201 | |
202 | ||
46d29e70 | 203 | #endif |