]>
Commit | Line | Data |
---|---|---|
1 | // @(#) $Id$ | |
2 | ||
3 | #ifndef ALIL3_ConfMapper | |
4 | #define ALIL3_ConfMapper | |
5 | ||
6 | #include "AliL3RootTypes.h" | |
7 | #include "AliL3SpacePointData.h" | |
8 | ||
9 | class AliL3ConfMapPoint; | |
10 | class AliL3ConfMapTrack; | |
11 | class AliL3Vertex; | |
12 | class AliL3TrackArray; | |
13 | ||
14 | struct AliL3ConfMapContainer | |
15 | { | |
16 | void *first; | |
17 | void *last; | |
18 | }; | |
19 | ||
20 | // | |
21 | //Conformal mapping base class | |
22 | ||
23 | class AliL3ConfMapper { | |
24 | ||
25 | private: | |
26 | ||
27 | Bool_t fBench; //run-time measurements | |
28 | ||
29 | Int_t nTracks; //number of tracks build. | |
30 | ||
31 | // AliTPCParam *fParam; | |
32 | AliL3Vertex *fVertex; //! | |
33 | Bool_t fParamSet; | |
34 | Bool_t fVertexFinder; //Include vertexfinding or not (latter case vertex=(0,0,0)) | |
35 | ||
36 | AliL3ConfMapPoint *fHit; //! | |
37 | AliL3TrackArray *fTrack; //! | |
38 | Double_t fMaxDca; //cut value for momentum fit | |
39 | ||
40 | AliL3ConfMapContainer *fVolume; //! Segment volume | |
41 | AliL3ConfMapContainer *fRow; //! Row volume | |
42 | ||
43 | //Number of cells (segments) | |
44 | Int_t fNumRowSegment; // Total number of padrows | |
45 | Int_t fNumPhiSegment; // number of phi segments | |
46 | Int_t fNumEtaSegment; // number of eta segments | |
47 | Int_t fNumRowSegmentPlusOne; | |
48 | Int_t fNumPhiSegmentPlusOne; | |
49 | Int_t fNumEtaSegmentPlusOne; | |
50 | Int_t fNumPhiEtaSegmentPlusOne; | |
51 | Int_t fBounds; | |
52 | Int_t fPhiHitsOutOfRange; | |
53 | Int_t fEtaHitsOutOfRange; | |
54 | ||
55 | //tracking range: | |
56 | Float_t fPhiMin; //MinPhi angle to consider | |
57 | Float_t fPhiMax; //MaxPhi angle to consider | |
58 | Float_t fEtaMin; //MinEta to consider | |
59 | Float_t fEtaMax; //MaxEta to consider | |
60 | Int_t fRowMin; //Minimum row to consider | |
61 | Int_t fRowMax; //Maximum row to consider | |
62 | ||
63 | Bool_t fVertexConstraint; //vertex constraint (true or false) | |
64 | Int_t fTrackletLength[2]; //minimal length of tracks | |
65 | Int_t fRowScopeTracklet[2]; //number of row segments to look for the next point of a tracklet | |
66 | Int_t fRowScopeTrack[2]; //number of row segments to look for the next point of a track | |
67 | Int_t fMinPoints[2]; //minimum number of points on one track | |
68 | ||
69 | // Cuts | |
70 | Double_t fMaxAngleTracklet[2]; //limit of angle between to pieces of a tracklet | |
71 | Int_t fMaxDist[2]; //maximum distance between two hits | |
72 | Double_t fHitChi2Cut[2]; //Maximum hit chi2 | |
73 | Double_t fGoodHitChi2[2]; //Chi2 to stop looking for next hit | |
74 | Double_t fTrackChi2Cut[2]; //Maximum track chi2 | |
75 | Double_t fGoodDist; //In segment building, distance consider good enough | |
76 | Double_t fMaxPhi; | |
77 | Double_t fMaxEta; | |
78 | ||
79 | // Tracking informtion | |
80 | Int_t fMainVertexTracks; //number of tracks coming from the main vertex | |
81 | Int_t fClustersUnused; //number of unused clusters | |
82 | ||
83 | static Double_t todeg; | |
84 | static Double_t pi; | |
85 | static Double_t twopi; | |
86 | ||
87 | //setter: | |
88 | void SetMinPoints(Int_t f,Bool_t vertex_constraint) {fMinPoints[(Int_t)vertex_constraint] = f; } | |
89 | void SetVertexConstraint(Bool_t f) {fVertexConstraint =f;} | |
90 | ||
91 | void SetHitChi2Cut(Double_t f,Bool_t vert) {fHitChi2Cut[(Int_t)vert]=f;} | |
92 | void SetGoodHitChi2(Double_t f,Bool_t vert) {fGoodHitChi2[(Int_t)vert]=f;} | |
93 | void SetTrackChi2Cut(Double_t f,Bool_t vert) {fTrackChi2Cut[(Int_t)vert]=f;} | |
94 | void SetMaxDist(Int_t f,Bool_t vert) {fMaxDist[(Int_t)vert]=f;} | |
95 | void SetTrackletLength(Int_t f,Bool_t vert) {fTrackletLength[(Int_t)vert]=f;} | |
96 | void SetRowScopeTrack(Int_t f, Bool_t vertex_constraint) { fRowScopeTrack[(Int_t)vertex_constraint] = f; } // sets one row scope for tracks | |
97 | void SetRowScopeTracklet(Int_t f, Bool_t vertex_constraint) { fRowScopeTracklet[(Int_t)vertex_constraint] = f; } // sets one row scope for tracklets | |
98 | void SetMaxAngleTracklet(Double_t f, Bool_t vertex_constraint) { fMaxAngleTracklet[(Int_t)vertex_constraint] = f; } // sets one angle cut | |
99 | ||
100 | void SetPointers(); | |
101 | Double_t CpuTime(); | |
102 | ||
103 | public: | |
104 | ||
105 | AliL3ConfMapper(); | |
106 | // AliL3ConfMapper(AliTPCParam *param,AliL3Vertex *vertex,Bool_t bench=(Bool_t)false); | |
107 | virtual ~AliL3ConfMapper(); | |
108 | ||
109 | void InitVolumes(); | |
110 | void InitSector(Int_t sector,Int_t *rowrange=0,Float_t *etarange=0); | |
111 | void SetVertex(AliL3Vertex *vertex){fVertex = vertex;} | |
112 | void MainVertexTracking_a(); | |
113 | void MainVertexTracking_b(); | |
114 | void MainVertexTracking(); | |
115 | void NonVertexTracking(); | |
116 | void MainVertexSettings(Int_t trackletlength, Int_t tracklength, | |
117 | Int_t rowscopetracklet, Int_t rowscopetrack,Double_t maxphi=0.1,Double_t maxeta=0.1); | |
118 | void NonVertexSettings(Int_t trackletlength, Int_t tracklength, | |
119 | Int_t rowscopetracklet, Int_t rowscopetrack); | |
120 | Bool_t ReadHits(UInt_t count, AliL3SpacePointData* hits ); | |
121 | void ClusterLoop(); | |
122 | void CreateTrack(AliL3ConfMapPoint *hit); | |
123 | AliL3ConfMapPoint *GetNextNeighbor(AliL3ConfMapPoint *start_hit,AliL3ConfMapTrack *track=NULL); | |
124 | Int_t EvaluateHit(AliL3ConfMapPoint *start_hit,AliL3ConfMapPoint *hit,AliL3ConfMapTrack *track); | |
125 | ||
126 | Double_t CalcDistance(const AliL3ConfMapPoint *hit1,const AliL3ConfMapPoint *hit2) const; | |
127 | Double_t TrackletAngle(AliL3ConfMapTrack *track,Int_t n=3) const; | |
128 | Bool_t VerifyRange(const AliL3ConfMapPoint *hit1,const AliL3ConfMapPoint *hit2) const; | |
129 | Int_t FillTracks(); | |
130 | ||
131 | //getters | |
132 | Int_t GetNumberOfTracks() {return nTracks;} | |
133 | AliL3TrackArray *GetTracks() {return fTrack;} | |
134 | Double_t GetMaxDca() const {return fMaxDca;} | |
135 | AliL3Vertex* GetVertex() const {return fVertex;} | |
136 | ||
137 | //setters | |
138 | void SetTrackCuts(Double_t hitChi2Cut, Double_t goodHitChi2, Double_t trackChi2Cut, Int_t maxdist,Bool_t vertexconstraint); | |
139 | void SetTrackletCuts(Double_t maxangle,Double_t goodDist,Bool_t vertex_constraint); //Set cut of tracklet for the given vertex_constraint | |
140 | void SetNSegments(Int_t f,Int_t g) {fNumPhiSegment=f,fNumEtaSegment=g;} //Set number of subvolumes (#segments in (phi,eta) | |
141 | void SetParamDone(Bool_t f) {fParamSet = (Bool_t)f;} | |
142 | void SetMaxDca(Double_t f) {fMaxDca = f;} | |
143 | ||
144 | ClassDef(AliL3ConfMapper,1) //Base class for conformal mapping tracking | |
145 | }; | |
146 | ||
147 | #endif |