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