2 // Original: AliHLTConfMapper.h,v 1.11 2004/07/05 09:03:11 loizides
4 #ifndef ALIHLTTPCCONFMAPPER_H
5 #define ALIHLTTPCCONFMAPPER_H
6 //* This file is property of and copyright by the ALICE HLT Project *
7 //* ALICE Experiment at CERN, All rights reserved. *
8 //* See cxx source for full Copyright notice *
10 /** @file AliHLTAltroEncoder.h
11 @author Anders Vestbo, Matthias Richter
12 @date Conformal mapping base class.
18 class AliHLTTPCConfMapPoint;
19 class AliHLTTPCConfMapTrack;
20 class AliHLTTPCVertex;
21 class AliHLTTPCTrackArray;
22 class AliHLTTPCSpacePointData;
26 * @class AliHLTTPCConfMapper
27 * Conformal mapping base class.
29 class AliHLTTPCConfMapper {
33 AliHLTTPCConfMapper();
34 // AliHLTTPCConfMapper(AliTPCParam *param,AliHLTTPCVertex *vertex,Bool_t bench=(Bool_t)false);
36 virtual ~AliHLTTPCConfMapper();
39 * Init and calculate bounds for the internal arrays.
44 * Reset internal arrays and free memory.
48 void InitSector(Int_t sector,Int_t *rowrange=0,Float_t *etarange=0);
49 void SetVertex(AliHLTTPCVertex *vertex){fVertex = vertex;}
50 void MainVertexTrackingA();
51 void MainVertexTrackingB();
52 void MainVertexTracking();
53 void NonVertexTracking();
54 void MainVertexSettings(Int_t trackletlength, Int_t tracklength,
55 Int_t rowscopetracklet, Int_t rowscopetrack,Double_t maxphi=0.1,Double_t maxeta=0.1);
56 void NonVertexSettings(Int_t trackletlength, Int_t tracklength,
57 Int_t rowscopetracklet, Int_t rowscopetrack);
60 * Read an array of space point data.
61 * @param count array size
63 * @return kTRUE if success.
65 Bool_t ReadHits(UInt_t count, AliHLTTPCSpacePointData* hits );
67 void CreateTrack(AliHLTTPCConfMapPoint *hit);
68 AliHLTTPCConfMapPoint *GetNextNeighbor(AliHLTTPCConfMapPoint *start_hit,AliHLTTPCConfMapTrack *track=NULL);
69 Int_t EvaluateHit(AliHLTTPCConfMapPoint *start_hit,AliHLTTPCConfMapPoint *hit,AliHLTTPCConfMapTrack *track);
71 Double_t CalcDistance(const AliHLTTPCConfMapPoint *hit1,const AliHLTTPCConfMapPoint *hit2) const;
72 Double_t TrackletAngle(AliHLTTPCConfMapTrack *track,Int_t n=3) const;
73 Bool_t VerifyRange(const AliHLTTPCConfMapPoint *hit1,const AliHLTTPCConfMapPoint *hit2) const;
77 Int_t GetNumberOfTracks() const {return fNTracks;}
78 AliHLTTPCTrackArray *GetTracks() const {return fTrack;}
79 Double_t GetMaxDca() const {return fMaxDca;}
80 AliHLTTPCVertex* GetVertex() const {return fVertex;}
84 void SetTrackCuts(Double_t hitChi2Cut, Double_t goodHitChi2, Double_t trackChi2Cut, Int_t maxdist,Bool_t vertexconstraint);
85 void SetTrackletCuts(Double_t maxangle,Double_t goodDist,Bool_t vc); //Set cut of tracklet for the given vertex_constraint
86 void SetNSegments(Int_t f,Int_t g) {fNumPhiSegment=f,fNumEtaSegment=g;} //Set number of subvolumes (#segments in (phi,eta)
87 void SetMaxDca(Double_t f) {fMaxDca = f;}
90 void SetMinPoints(Int_t f,Bool_t vconstraint) {fMinPoints[(Int_t)vconstraint] = f; }
91 void SetVertexConstraint(Bool_t f) {fVertexConstraint =f;}
93 void SetHitChi2Cut(Double_t f,Bool_t vert) {fHitChi2Cut[(Int_t)vert]=f;}
94 void SetGoodHitChi2(Double_t f,Bool_t vert) {fGoodHitChi2[(Int_t)vert]=f;}
95 void SetTrackChi2Cut(Double_t f,Bool_t vert) {fTrackChi2Cut[(Int_t)vert]=f;}
96 void SetMaxDist(Int_t f,Bool_t vert) {fMaxDist[(Int_t)vert]=f;}
97 void SetTrackletLength(Int_t f,Bool_t vert) {fTrackletLength[(Int_t)vert]=f;}
98 void SetRowScopeTrack(Int_t f, Bool_t vc){fRowScopeTrack[(Int_t)vc] = f;}
99 void SetRowScopeTracklet(Int_t f, Bool_t vc){fRowScopeTracklet[(Int_t)vc] = f;}
100 void SetMaxAngleTracklet(Double_t f, Bool_t vc){fMaxAngleTracklet[(Int_t)vc] = f;}
103 void SetParamDone(Bool_t vconstraint) {fParamSet[(Int_t)vconstraint] = kTRUE;}
106 /** copy constructor prohibited */
107 AliHLTTPCConfMapper(const AliHLTTPCConfMapper&);
108 /** assignment operator prohibited */
109 AliHLTTPCConfMapper& operator=(const AliHLTTPCConfMapper&);
111 struct AliHLTTPCConfMapContainer
113 void *first; // first track
114 void *last; // last track
117 Bool_t fBench; //run-time measurements
118 Int_t fNTracks; //number of tracks build.
120 AliHLTTPCVertex *fVertex; //!
121 Bool_t fParamSet[2]; //!
122 Bool_t fVertexFinder; //Include vertexfinding or not
123 //(latter case vertex=(0,0,0))
125 /** the list of hits */
126 vector<AliHLTTPCConfMapPoint> fHit; //!
127 AliHLTTPCTrackArray *fTrack; //!
128 Double_t fMaxDca; //cut value for momentum fit
130 AliHLTTPCConfMapContainer *fVolume; //! Segment volume
131 AliHLTTPCConfMapContainer *fRow; //! Row volume
133 //Number of cells (segments)
134 Int_t fNumRowSegment; // Total number of padrows
135 Int_t fNumPhiSegment; // number of phi segments
136 Int_t fNumEtaSegment; // number of eta segments
137 Int_t fNumRowSegmentPlusOne; // row+1
138 Int_t fNumPhiSegmentPlusOne; // phi+1
139 Int_t fNumEtaSegmentPlusOne; // eta+1
140 Int_t fNumPhiEtaSegmentPlusOne;// phieta+1
141 Int_t fBounds; // bounds
142 Int_t fPhiHitsOutOfRange; // phi hits out of range
143 Int_t fEtaHitsOutOfRange; // eta hits out of range
146 Float_t fPhiMin; //MinPhi angle to consider
147 Float_t fPhiMax; //MaxPhi angle to consider
148 Float_t fEtaMin; //MinEta to consider
149 Float_t fEtaMax; //MaxEta to consider
150 Int_t fRowMin; //Minimum row to consider
151 Int_t fRowMax; //Maximum row to consider
153 Bool_t fVertexConstraint; //vertex constraint (true or false)
154 Int_t fTrackletLength[2]; //minimal length of tracks
155 Int_t fRowScopeTracklet[2]; //number of row segments to look for the next point of a tracklet
156 Int_t fRowScopeTrack[2]; //number of row segments to look for the next point of a track
157 Int_t fMinPoints[2]; //minimum number of points on one track
160 Double_t fMaxAngleTracklet[2]; //limit of angle between to pieces of a tracklet
161 Int_t fMaxDist[2]; //maximum distance between two hits
162 Double_t fHitChi2Cut[2]; //Maximum hit chi2
163 Double_t fGoodHitChi2[2]; //Chi2 to stop looking for next hit
164 Double_t fTrackChi2Cut[2]; //Maximum track chi2
165 Double_t fGoodDist; //In segment building, distance consider good enough
166 Double_t fMaxPhi; //Maximum phi
167 Double_t fMaxEta; //Maximum eta
169 // Tracking informtion
170 Int_t fMainVertexTracks; //number of tracks coming from the main vertex
171 Int_t fClustersUnused; //number of unused clusters
173 ClassDef(AliHLTTPCConfMapper,1) //Base class for conformal mapping tracking