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