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