]>
Commit | Line | Data |
---|---|---|
18856a77 | 1 | #ifndef ALIITSTRACKERV2_H |
2 | #define ALIITSTRACKERV2_H | |
006b5f7f | 3 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * |
4 | * See cxx source for full Copyright notice */ | |
5 | ||
6 | //------------------------------------------------------------------------- | |
7 | // ITS tracker | |
00a7cc50 | 8 | // reads AliITSRecPoint clusters and creates AliITStrackV2 tracks |
18856a77 | 9 | // Origin: Iouri Belikov, CERN, Jouri.Belikov@cern.ch |
006b5f7f | 10 | //------------------------------------------------------------------------- |
11 | #include "AliTracker.h" | |
12 | #include "AliITSrecoV2.h" | |
13 | #include "AliITStrackV2.h" | |
14 | ||
00a7cc50 | 15 | class AliITSRecPoint; |
c630aafd | 16 | class AliESD; |
006b5f7f | 17 | class AliITSgeom; |
c630aafd | 18 | class TTree; |
006b5f7f | 19 | |
20 | ||
21 | //------------------------------------------------------------------------- | |
22 | class AliITStrackerV2 : public AliTracker { | |
23 | public: | |
24 | AliITStrackerV2():AliTracker(){} | |
c630aafd | 25 | AliITStrackerV2(const AliITSgeom *geom); |
c219fd63 | 26 | ~AliITStrackerV2(){} |
006b5f7f | 27 | AliCluster *GetCluster(Int_t index) const; |
00a7cc50 | 28 | AliITSRecPoint *GetCluster(Int_t l, Int_t c) const { |
c219fd63 | 29 | return fgLayers[l].GetCluster(c); |
30 | } | |
31 | Int_t GetNumberOfClustersLayer(Int_t n) const { | |
32 | return fgLayers[n].GetNumberOfClusters(); | |
33 | } | |
c630aafd | 34 | Int_t LoadClusters(TTree *cf); |
61ab8ea8 | 35 | void UnloadClusters(); |
c630aafd | 36 | Int_t Clusters2Tracks(AliESD *event); |
c630aafd | 37 | Int_t PropagateBack(AliESD *event); |
c630aafd | 38 | Int_t RefitInward(AliESD *event); |
ef7253ac | 39 | Bool_t RefitAt(Double_t x, AliITStrackV2 *seed, |
40 | const AliITStrackV2 *t, Bool_t extra=kFALSE); | |
7f6ddf58 | 41 | void SetupFirstPass(Int_t *flags, Double_t *cuts=0); |
42 | void SetupSecondPass(Int_t *flags, Double_t *cuts=0); | |
43 | ||
c0dd5278 | 44 | void SetLastLayerToTrackTo(Int_t l=0) {fLastLayerToTrackTo=l;} |
45 | void SetLayersNotToSkip(Int_t *l); | |
46 | ||
b87bd7cd | 47 | void UseClusters(const AliKalmanTrack *t, Int_t from=0) const; |
48 | ||
15dd636f | 49 | class AliITSdetector { |
7f6ddf58 | 50 | public: |
51 | AliITSdetector(){} | |
52 | AliITSdetector(Double_t r,Double_t phi) {fR=r; fPhi=phi;} | |
7f6ddf58 | 53 | Double_t GetR() const {return fR;} |
54 | Double_t GetPhi() const {return fPhi;} | |
55 | private: | |
56 | Double_t fR; // polar coordinates | |
57 | Double_t fPhi; // of this detector | |
58 | }; | |
59 | ||
60 | class AliITSlayer { | |
61 | public: | |
c219fd63 | 62 | enum {kNsector=5, kMaxClusterPerSector=kMaxClusterPerLayer/kNsector}; |
7f6ddf58 | 63 | AliITSlayer(); |
64 | AliITSlayer(Double_t r, Double_t p, Double_t z, Int_t nl, Int_t nd); | |
65 | ~AliITSlayer(); | |
00a7cc50 | 66 | Int_t InsertCluster(AliITSRecPoint *c); |
61ab8ea8 | 67 | void ResetClusters(); |
c219fd63 | 68 | Int_t SelectClusters(Float_t zmi, Float_t zma, Float_t ymi, Float_t yma); |
00a7cc50 | 69 | const AliITSRecPoint *GetNextCluster(Int_t &ci); |
b87bd7cd | 70 | void ResetRoad(); |
71 | Double_t GetRoad() const {return fRoad;} | |
7f6ddf58 | 72 | Double_t GetR() const {return fR;} |
00a7cc50 | 73 | AliITSRecPoint *GetCluster(Int_t i) const { return fClusters[i]; } |
7f6ddf58 | 74 | AliITSdetector &GetDetector(Int_t n) const { return fDetectors[n]; } |
75 | Int_t FindDetectorIndex(Double_t phi, Double_t z) const; | |
61ab8ea8 | 76 | Double_t GetThickness(Double_t y, Double_t z, Double_t &x0) const; |
61ab8ea8 | 77 | Int_t GetNladders() const {return fNladders;} |
78 | Int_t GetNdetectors() const {return fNdetectors;} | |
c219fd63 | 79 | Int_t GetNumberOfClusters() const; |
235b705f | 80 | protected: |
7f6ddf58 | 81 | Double_t fR; // mean radius of this layer |
82 | Double_t fPhiOffset; // offset of the first detector in Phi | |
83 | Int_t fNladders; // number of ladders | |
84 | Double_t fZOffset; // offset of the first detector in Z | |
85 | Int_t fNdetectors; // detectors/ladder | |
86 | AliITSdetector *fDetectors; // array of detectors | |
c219fd63 | 87 | |
00a7cc50 | 88 | AliITSRecPoint *fClusters[kMaxClusterPerLayer]; // pointers to clusters |
c219fd63 | 89 | Int_t fN[kNsector]; // numbers of clusters sector by sector |
90 | ||
91 | Int_t fIndex[kMaxClusterPerLayer]; // indexes of selected clusters | |
92 | Int_t fNsel; // number of selected clusters | |
93 | ||
94 | Double_t fRoad; // road defined by the cluster density | |
95 | Int_t FindClusterIndex(Float_t z, Int_t s) const; | |
7f6ddf58 | 96 | }; |
15dd636f | 97 | |
235b705f | 98 | protected: |
7f6ddf58 | 99 | void CookLabel(AliKalmanTrack *t,Float_t wrong) const; |
a9a2d814 | 100 | Double_t GetEffectiveThickness(Double_t y, Double_t z) const; |
006b5f7f | 101 | void FollowProlongation(); |
102 | Int_t TakeNextProlongation(); | |
006b5f7f | 103 | void ResetBestTrack() { |
104 | fBestTrack.~AliITStrackV2(); | |
105 | new(&fBestTrack) AliITStrackV2(fTrackToFollow); | |
106 | } | |
006b5f7f | 107 | void ResetTrackToFollow(const AliITStrackV2 &t) { |
108 | fTrackToFollow.~AliITStrackV2(); | |
109 | new(&fTrackToFollow) AliITStrackV2(t); | |
110 | } | |
7f6ddf58 | 111 | Int_t fI; // index of the current layer |
18856a77 | 112 | static AliITSlayer fgLayers[kMaxLayer];// ITS layers |
7f6ddf58 | 113 | AliITStrackV2 fTracks[kMaxLayer]; // track estimations at the ITS layers |
114 | AliITStrackV2 fBestTrack; // "best" track | |
115 | AliITStrackV2 fTrackToFollow; // followed track | |
116 | Int_t fPass; // current pass through the data | |
117 | Int_t fConstraint[2]; // constraint flags | |
8676d691 | 118 | |
c0dd5278 | 119 | Int_t fLayersNotToSkip[kMaxLayer]; // layer masks |
120 | Int_t fLastLayerToTrackTo; // the innermost layer to track to | |
15dd636f | 121 | |
c630aafd | 122 | ClassDef(AliITStrackerV2,1) //ITS tracker V2 |
006b5f7f | 123 | }; |
124 | ||
125 | ||
7f6ddf58 | 126 | inline void AliITStrackerV2::SetupFirstPass(Int_t *flags, Double_t *cuts) { |
127 | // This function sets up flags and cuts for the first tracking pass | |
128 | // | |
129 | // flags[0] - vertex constaint flag | |
130 | // negative means "skip the pass" | |
131 | // 0 means "no constraint" | |
132 | // positive means "normal constraint" | |
133 | ||
134 | fConstraint[0]=flags[0]; | |
135 | if (cuts==0) return; | |
136 | } | |
137 | ||
138 | inline void AliITStrackerV2::SetupSecondPass(Int_t *flags, Double_t *cuts) { | |
139 | // This function sets up flags and cuts for the second tracking pass | |
140 | // | |
141 | // flags[0] - vertex constaint flag | |
142 | // negative means "skip the pass" | |
143 | // 0 means "no constraint" | |
144 | // positive means "normal constraint" | |
145 | ||
146 | fConstraint[1]=flags[0]; | |
147 | if (cuts==0) return; | |
148 | } | |
149 | ||
150 | inline void AliITStrackerV2::CookLabel(AliKalmanTrack *t,Float_t wrong) const { | |
151 | //-------------------------------------------------------------------- | |
152 | //This function "cooks" a track label. If label<0, this track is fake. | |
153 | //-------------------------------------------------------------------- | |
154 | Int_t tpcLabel=t->GetLabel(); | |
155 | if (tpcLabel<0) return; | |
156 | AliTracker::CookLabel(t,wrong); | |
15dd636f | 157 | if (tpcLabel != t->GetLabel()) t->SetLabel(-tpcLabel); |
7f6ddf58 | 158 | } |
006b5f7f | 159 | |
160 | #endif |