]>
Commit | Line | Data |
---|---|---|
d2ef7687 | 1 | // @(#) $Id$ |
a0cef3e1 | 2 | // origin hough/AliL3HoughBaseTransformer.h,v 1.22 Tue Mar 22 13:11:58 2005 UTC by cvetan |
3 | ||
4 | #ifndef ALIHLTTPCHOUGHBASETRANSFORMER_H | |
5 | #define ALIHLTTPCHOUGHBASETRANSFORMER_H | |
6 | ||
0f2fc60b | 7 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * |
8 | * See cxx source for full Copyright notice */ | |
9 | ||
10 | /** @file AliHLTTPCHoughTransformer.h | |
11 | @author Anders Vestbo | |
12 | @date | |
13 | @brief Base class for TPC hough tracking algorithms | |
14 | */ | |
15 | ||
a0cef3e1 | 16 | //------------------------------------------------------------------------- |
17 | // Class AliHLTTPCHoughTransformer | |
18 | // This is the base class for all the Hough Transformer tracking | |
19 | // algorithms for HLT. | |
20 | //------------------------------------------------------------------------- | |
21 | ||
d2ef7687 | 22 | #include "AliHLTStdIncludes.h" |
23 | #include "AliHLTTPCRootTypes.h" | |
a0cef3e1 | 24 | |
25 | #ifdef do_mc | |
26 | const UInt_t MaxTrack=120; | |
27 | struct AliHLTTrackIndex { | |
28 | Int_t fLabel[MaxTrack];//MC label | |
29 | UChar_t fNHits[MaxTrack];//Number of different mc labels | |
30 | UChar_t fCurrentRow[MaxTrack];//Index of the current row while filling Hough space | |
31 | }; | |
32 | typedef struct AliHLTTrackIndex AliHLTTrackIndex; | |
33 | #endif | |
34 | ||
d2ef7687 | 35 | class AliHLTTPCDigitRowData; |
36 | class AliHLTTPCHistogram; | |
0f2fc60b | 37 | class AliTPCRawStream; |
a0cef3e1 | 38 | |
0f2fc60b | 39 | /** |
40 | * @class AliHLTTPCHoughTransformer | |
41 | * Base class for TPC hough tracking transfomers. | |
42 | */ | |
a0cef3e1 | 43 | class AliHLTTPCHoughTransformer { |
44 | ||
45 | public: | |
46 | ||
0f2fc60b | 47 | /** standard constructor */ |
48 | AliHLTTPCHoughTransformer(); | |
49 | /** constructor */ | |
a0cef3e1 | 50 | AliHLTTPCHoughTransformer(Int_t slice,Int_t patch,Int_t netasegments,Float_t zvertex=0.0); |
0f2fc60b | 51 | /** not a valid copy constructor, defined according to effective C++ style */ |
52 | AliHLTTPCHoughTransformer(const AliHLTTPCHoughTransformer&); | |
53 | /** not a valid assignment op, but defined according to effective C++ style */ | |
54 | AliHLTTPCHoughTransformer& operator=(const AliHLTTPCHoughTransformer&); | |
55 | /** standard destructor */ | |
a0cef3e1 | 56 | virtual ~AliHLTTPCHoughTransformer(); |
57 | ||
d2ef7687 | 58 | void SetInputData(UInt_t /*ndigits*/,AliHLTTPCDigitRowData *ptr) {fDigitRowData = ptr;} |
a0cef3e1 | 59 | |
60 | //this is for adaptave histograms | |
61 | virtual void CreateHistograms(Float_t /*ptmin*/,Float_t /*ptmax*/,Float_t /*pres*/,Int_t /*nybin*/,Float_t /*psi*/) | |
62 | {STDCERR<<"Adaptive histograms are not supported for this Transformer!"<<STDENDL;} | |
63 | ||
64 | virtual void CreateHistograms(Int_t nxbin,Float_t ptmin,Int_t nybin,Float_t phimin,Float_t phimax) = 0; | |
65 | virtual void CreateHistograms(Int_t nxbin,Float_t xmin,Float_t xmax,Int_t nybin,Float_t ymin,Float_t ymax) = 0; | |
66 | ||
67 | virtual void Reset() = 0; | |
68 | virtual void TransformCircle() | |
69 | {STDCERR<<"TransformCircle is not defined for this transformer!"<<STDENDL;} | |
0f2fc60b | 70 | virtual void TransformCircle(Int_t */*rowRange*/,Int_t /*every*/) |
a0cef3e1 | 71 | {STDCERR<<"TransformCircle is not defined for this transformer!"<<STDENDL;} |
0f2fc60b | 72 | virtual void TransformCircleC(Int_t */*rowRange*/,Int_t /*every*/) |
a0cef3e1 | 73 | {STDCERR<<"TransformCircleC is not defined for this transformer!"<<STDENDL;} |
74 | virtual void TransformLine(Int_t */*rowrange*/=0,Float_t */*phirange*/=0) | |
75 | {STDCERR<<"TransformLine is not defined for this Transformer!"<<STDENDL;} | |
76 | virtual void TransformLineC(Int_t */*rowrange*/,Float_t */*phirange*/) | |
77 | {STDCERR<<"TransformLineC is not defined for this Transformer!"<<STDENDL;} | |
78 | ||
79 | //Getters | |
80 | Int_t GetSlice() const {return fSlice;} | |
81 | Int_t GetPatch() const {return fPatch;} | |
82 | Int_t GetLastPatch() const {return fLastPatch;} | |
83 | AliHLTTPCHoughTransformer *GetLastTransfromer() const {return fLastTransformer;} | |
84 | Int_t GetNEtaSegments() const {return fNEtaSegments;} | |
85 | Int_t GetLowerThreshold() const {return fLowerThreshold;} | |
86 | Int_t GetUpperThreshold() const {return fUpperThreshold;} | |
87 | Double_t GetEtaMin() const {return fEtaMin;} | |
88 | Double_t GetEtaMax() const {return fEtaMax;} | |
89 | Float_t GetZVertex() const {return fZVertex;} | |
90 | ||
d2ef7687 | 91 | AliHLTTPCDigitRowData *GetDataPointer() {return fDigitRowData;} |
a0cef3e1 | 92 | |
93 | virtual Int_t GetEtaIndex(Double_t eta) const = 0; | |
94 | virtual void GetEtaIndexes(Double_t /*eta*/,Int_t */*indexes*/) const | |
95 | {STDCERR<<"GetEtaIndexes not implemented for this Transformer class"<<STDENDL;} | |
d2ef7687 | 96 | virtual AliHLTTPCHistogram *GetHistogram(Int_t etaindex) = 0; |
a0cef3e1 | 97 | virtual Double_t GetEta(Int_t etaindex,Int_t slice) const = 0; |
98 | ||
99 | virtual Int_t GetTrackID(Int_t /*etaindex*/,Double_t /*kappa*/,Double_t /*psi*/) const { | |
100 | STDCERR<<"GetTrackID not implemented for this Transformer class"<<STDENDL; | |
101 | return -1; | |
102 | } | |
103 | ||
104 | //setters | |
105 | virtual void Init(Int_t slice=0,Int_t patch=0,Int_t netasegments=100,Int_t nsegs=-1); | |
106 | void SetLowerThreshold(Int_t i) {fLowerThreshold = i;} | |
107 | void SetUpperThreshold(Int_t i) {fUpperThreshold = i;} | |
108 | void SetLastPatch(Int_t i) {fLastPatch = i;} | |
109 | void SetLastTransformer(AliHLTTPCHoughTransformer *transformer) {fLastTransformer = transformer;} | |
110 | ||
111 | virtual void SetTPCRawStream(AliTPCRawStream */*rawstream*/){}; | |
112 | ||
113 | virtual void Print(){}; | |
114 | ||
115 | protected: | |
116 | ||
117 | AliHLTTPCHoughTransformer *fLastTransformer;//Pointer to the previous hough transformer | |
118 | ||
119 | private: | |
120 | ||
121 | Int_t fSlice;//Index of the current slice being processed | |
122 | Int_t fPatch;//Index of the current patch being processed | |
123 | Int_t fLastPatch;//Index of the last processed patch | |
124 | Int_t fNEtaSegments;//Number of eta slices | |
125 | Double_t fEtaMin;//Minimum allowed eta | |
126 | Double_t fEtaMax;//Maximum allowed eta | |
127 | Int_t fLowerThreshold;//Lower threshold for digits amplitude | |
128 | Int_t fUpperThreshold;//Upper threshold for digits amplitude | |
129 | ||
d2ef7687 | 130 | AliHLTTPCDigitRowData *fDigitRowData; //! |
a0cef3e1 | 131 | |
132 | Float_t fZVertex;//Z position of the primary vertex | |
133 | ||
134 | ClassDef(AliHLTTPCHoughTransformer,1) //Hough transformation base class | |
135 | ||
136 | }; | |
137 | ||
138 | #endif | |
139 |