3 #ifndef ALIHLTTPCCATRACKER_H
4 #define ALIHLTTPCCATRACKER_H
11 //*-- Copyright © ALICE HLT Group
15 class AliHLTTPCTrackSegmentData;
16 class AliHLTTPCConfMapPoint;
17 class AliHLTTPCConfMapTrack;
18 class AliHLTTPCVertex;
19 class AliHLTTPCTrackArray;
20 class AliHLTTPCSpacePointData;
29 class AliHLTTPCCATracker {
34 AliHLTTPCCATracker( const AliHLTTPCCATracker &x );
35 AliHLTTPCCATracker &operator=( const AliHLTTPCCATracker &x );
37 virtual ~AliHLTTPCCATracker();
39 Bool_t ReadHits(UInt_t count, AliHLTTPCSpacePointData* hits );
43 Int_t GetNumberOfTracks() const {return fNTracks;}
44 AliHLTTPCTrackArray *GetTracks() const {return fTrack;}
45 Double_t GetMaxDca() const {return fMaxDca;}
46 AliHLTTPCVertex* GetVertex() const {return fVertex;}
52 void SetNSegments(Int_t f,Int_t g) {fNumPhiSegment=f,fNumEtaSegment=g;} //Set number of subvolumes (#segments in (phi,eta)
53 void SetMaxDca(Double_t f) {fMaxDca = f;}
56 void SetMinPoints(Int_t f,Bool_t vconstraint) {fMinPoints[(Int_t)vconstraint] = f; }
57 void SetVertexConstraint(Bool_t f) {fVertexConstraint =f;}
59 void SetHitChi2Cut(Double_t f,Bool_t vert) {fHitChi2Cut[(Int_t)vert]=f;}
60 void SetGoodHitChi2(Double_t f,Bool_t vert) {fGoodHitChi2[(Int_t)vert]=f;}
61 void SetTrackChi2Cut(Double_t f,Bool_t vert) {fTrackChi2Cut[(Int_t)vert]=f;}
62 void SetMaxDist(Int_t f,Bool_t vert) {fMaxDist[(Int_t)vert]=f;}
63 void SetTrackletLength(Int_t f,Bool_t vert) {fTrackletLength[(Int_t)vert]=f;}
64 void SetRowScopeTrack(Int_t f, Bool_t vc){fRowScopeTrack[(Int_t)vc] = f;}
65 void SetRowScopeTracklet(Int_t f, Bool_t vc){fRowScopeTracklet[(Int_t)vc] = f;}
66 void SetMaxAngleTracklet(Double_t f, Bool_t vc){fMaxAngleTracklet[(Int_t)vc] = f;}
69 void CACreateHistos() ;
73 void CAReadPatchHits(Int_t patch, UInt_t count, AliHLTTPCSpacePointData* hits );
74 void CAFindPatchTracks(Int_t patch);
75 void CAFindSliceTracks();
79 void SetOutPtr( AliHLTTPCTrackSegmentData* tr ){fOutputPtr = tr;}
80 UInt_t GetOutputSize() const { return fOutputSize; }
81 UInt_t GetOutputNTracks() const { return fOutputNTracks; }
86 AliHLTTPCTrackSegmentData* fOutputPtr; //!
87 UInt_t fOutputNTracks; //!
88 UInt_t fOutputSize; //!
90 struct AliHLTTPCCAHit{
91 Double_t fX, fY, fZ; // position
92 Double_t fErrx, fErry, fErrz; // position errors
93 Int_t fIndex, fCounter; // addidtional
96 std::vector<AliHLTTPCCAHit> fVecHits; //!
97 Int_t fPatchFirstHitInd, fPatchLastHitInd; // indices of the first and the last hits in the current patch
99 struct AliHLTTPCCATrack{
100 Int_t fPatch, fNhits, fNdf, fGood, fUsed, fNext; // flags
101 Double_t fX, fY, fZ, fTy, fTz;//parameters
102 Double_t fCovy, fCovty, fCovyty, fCovz, fCovtz, fCovztz, fChi2;//cov matrix
103 std::vector<Int_t> fVecIHits;//indices of hits
106 std::vector<AliHLTTPCCATrack> fVecPatchTracks; //!
107 Int_t fPatchFirstTrackInd, fPatchLastTrackInd; // indices of the first and the last tracks in the current patch
108 std::vector<AliHLTTPCCATrack> fVecSliceTracks; // tracks
110 static bool CompareCATracks(const AliHLTTPCCATrack &a, const AliHLTTPCCATrack &b){
111 if (a.fPatch != b.fPatch) return (a.fPatch < b.fPatch);
112 else return (a.fNhits > b.fNhits);
115 static bool CompareCAHitsX(const Int_t &i, const Int_t &j){
119 Bool_t fBench; //run-time measurements
120 Int_t fNTracks; //number of tracks build.
122 AliHLTTPCVertex *fVertex; //!
123 Bool_t fParamSet[2]; //!
124 Bool_t fVertexFinder; //Include vertexfinding or not
125 //(latter case vertex=(0,0,0))
127 AliHLTTPCConfMapPoint *fHit; //!
128 AliHLTTPCTrackArray *fTrack; //!
129 Double_t fMaxDca; //cut value for momentum fit
131 //Number of cells (segments)
132 Int_t fNumRowSegment; // Total number of padrows
133 Int_t fNumPhiSegment; // number of phi segments
134 Int_t fNumEtaSegment; // number of eta segments
135 Int_t fNumRowSegmentPlusOne; // row+1
136 Int_t fNumPhiSegmentPlusOne; // phi+1
137 Int_t fNumEtaSegmentPlusOne; // eta+1
138 Int_t fNumPhiEtaSegmentPlusOne;// phieta+1
139 Int_t fBounds; // bounds
140 Int_t fPhiHitsOutOfRange; // phi hits out of range
141 Int_t fEtaHitsOutOfRange; // eta hits out of range
144 Float_t fPhiMin; //MinPhi angle to consider
145 Float_t fPhiMax; //MaxPhi angle to consider
146 Float_t fEtaMin; //MinEta to consider
147 Float_t fEtaMax; //MaxEta to consider
148 Int_t fRowMin; //Minimum row to consider
149 Int_t fRowMax; //Maximum row to consider
151 Bool_t fVertexConstraint; //vertex constraint (true or false)
152 Int_t fTrackletLength[2]; //minimal length of tracks
153 Int_t fRowScopeTracklet[2]; //number of row segments to look for the next point of a tracklet
154 Int_t fRowScopeTrack[2]; //number of row segments to look for the next point of a track
155 Int_t fMinPoints[2]; //minimum number of points on one track
158 Double_t fMaxAngleTracklet[2]; //limit of angle between to pieces of a tracklet
159 Int_t fMaxDist[2]; //maximum distance between two hits
160 Double_t fHitChi2Cut[2]; //Maximum hit chi2
161 Double_t fGoodHitChi2[2]; //Chi2 to stop looking for next hit
162 Double_t fTrackChi2Cut[2]; //Maximum track chi2
163 Double_t fGoodDist; //In segment building, distance consider good enough
164 Double_t fMaxPhi; //Maximum phi
165 Double_t fMaxEta; //Maximum eta
167 // Tracking informtion
168 Int_t fMainVertexTracks; //number of tracks coming from the main vertex
169 Int_t fClustersUnused; //number of unused clusters
171 Int_t fHistEvent; //!
175 TApplication *fMyapp; //!
176 TCanvas *fYX, *fZX; //!
178 TList *fListHisto; //!
179 TH1F *fHistNClusters; //!
180 TH2F *fHistClustersXY[10];//!
183 ClassDef(AliHLTTPCCATracker,1) //class for cellular automaton tracking