]>
Commit | Line | Data |
---|---|---|
3e87ef69 | 1 | // @(#) $Id$ |
2 | ||
c62b480b | 3 | #ifndef ALIL3HOUGHBASETRANSFORMER_H |
4 | #define ALIL3HOUGHBASETRANSFORMER_H | |
c52cf5d8 | 5 | |
fc79823f | 6 | //------------------------------------------------------------------------- |
4aa41877 | 7 | // Class AliHLTHoughBaseTransformer |
fc79823f | 8 | // This is the base class for all the Hough Transformer tracking |
9 | // algorithms for HLT. | |
10 | //------------------------------------------------------------------------- | |
11 | ||
4aa41877 | 12 | #include "AliHLTRootTypes.h" |
c52cf5d8 | 13 | |
1eef4efc | 14 | #ifdef do_mc |
e81ffe36 | 15 | const UInt_t MaxTrack=120; |
4aa41877 | 16 | struct AliHLTTrackIndex { |
c62b480b | 17 | Int_t fLabel[MaxTrack];//MC label |
18 | UChar_t fNHits[MaxTrack];//Number of different mc labels | |
19 | UChar_t fCurrentRow[MaxTrack];//Index of the current row while filling Hough space | |
1eef4efc | 20 | }; |
4aa41877 | 21 | typedef struct AliHLTTrackIndex AliHLTTrackIndex; |
1eef4efc | 22 | #endif |
23 | ||
4aa41877 | 24 | class AliHLTDigitRowData; |
25 | class AliHLTHistogram; | |
c52cf5d8 | 26 | |
fc79823f | 27 | #include "AliTPCRawStream.h" |
a8ffd46b | 28 | |
4aa41877 | 29 | class AliHLTHoughBaseTransformer { |
0bd0c1ef | 30 | |
c52cf5d8 | 31 | public: |
e06900d5 | 32 | |
4aa41877 | 33 | AliHLTHoughBaseTransformer(); |
34 | AliHLTHoughBaseTransformer(Int_t slice,Int_t patch,Int_t netasegments,Float_t zvertex=0.0); | |
35 | virtual ~AliHLTHoughBaseTransformer(); | |
c52cf5d8 | 36 | |
4aa41877 | 37 | void SetInputData(UInt_t /*ndigits*/,AliHLTDigitRowData *ptr) {fDigitRowData = ptr;} |
c52cf5d8 | 38 | |
1f1942b8 | 39 | //this is for adaptave histograms |
eb016424 | 40 | virtual void CreateHistograms(Float_t /*ptmin*/,Float_t /*ptmax*/,Float_t /*pres*/,Int_t /*nybin*/,Float_t /*psi*/) |
1f1942b8 | 41 | {STDCERR<<"Adaptive histograms are not supported for this Transformer!"<<STDENDL;} |
42 | ||
b2a02bce | 43 | virtual void CreateHistograms(Int_t nxbin,Float_t ptmin,Int_t nybin,Float_t phimin,Float_t phimax) = 0; |
44 | virtual void CreateHistograms(Int_t nxbin,Float_t xmin,Float_t xmax,Int_t nybin,Float_t ymin,Float_t ymax) = 0; | |
1f1942b8 | 45 | |
c52cf5d8 | 46 | virtual void Reset() = 0; |
eb016424 | 47 | virtual void TransformCircle() |
1f1942b8 | 48 | {STDCERR<<"TransformCircle is not defined for this transformer!"<<STDENDL;} |
eb016424 | 49 | virtual void TransformCircle(Int_t */*row_range*/,Int_t /*every*/) |
1f1942b8 | 50 | {STDCERR<<"TransformCircle is not defined for this transformer!"<<STDENDL;} |
eb016424 | 51 | virtual void TransformCircleC(Int_t */*row_range*/,Int_t /*every*/) |
1f1942b8 | 52 | {STDCERR<<"TransformCircleC is not defined for this transformer!"<<STDENDL;} |
eb016424 | 53 | virtual void TransformLine(Int_t */*rowrange*/=0,Float_t */*phirange*/=0) |
1f1942b8 | 54 | {STDCERR<<"TransformLine is not defined for this Transformer!"<<STDENDL;} |
eb016424 | 55 | virtual void TransformLineC(Int_t */*rowrange*/,Float_t */*phirange*/) |
1f1942b8 | 56 | {STDCERR<<"TransformLineC is not defined for this Transformer!"<<STDENDL;} |
57 | ||
c52cf5d8 | 58 | //Getters |
974fb714 | 59 | Int_t GetSlice() const {return fSlice;} |
60 | Int_t GetPatch() const {return fPatch;} | |
a8ffd46b | 61 | Int_t GetLastPatch() const {return fLastPatch;} |
4aa41877 | 62 | AliHLTHoughBaseTransformer *GetLastTransfromer() const {return fLastTransformer;} |
974fb714 | 63 | Int_t GetNEtaSegments() const {return fNEtaSegments;} |
64 | Int_t GetLowerThreshold() const {return fLowerThreshold;} | |
65 | Int_t GetUpperThreshold() const {return fUpperThreshold;} | |
66 | Double_t GetEtaMin() const {return fEtaMin;} | |
67 | Double_t GetEtaMax() const {return fEtaMax;} | |
68 | Float_t GetZVertex() const {return fZVertex;} | |
0bd0c1ef | 69 | |
4aa41877 | 70 | AliHLTDigitRowData *GetDataPointer() {return fDigitRowData;} |
c52cf5d8 | 71 | |
bd2f8772 | 72 | virtual Int_t GetEtaIndex(Double_t eta) const = 0; |
c62b480b | 73 | virtual void GetEtaIndexes(Double_t /*eta*/,Int_t */*indexes*/) const |
1f1942b8 | 74 | {STDCERR<<"GetEtaIndexes not implemented for this Transformer class"<<STDENDL;} |
4aa41877 | 75 | virtual AliHLTHistogram *GetHistogram(Int_t etaindex) = 0; |
c62b480b | 76 | virtual Double_t GetEta(Int_t etaindex,Int_t slice) const = 0; |
1f1942b8 | 77 | |
c62b480b | 78 | virtual Int_t GetTrackID(Int_t /*etaindex*/,Double_t /*kappa*/,Double_t /*psi*/) const { |
1f1942b8 | 79 | STDCERR<<"GetTrackID not implemented for this Transformer class"<<STDENDL; |
80 | return -1; | |
81 | } | |
1eef4efc | 82 | |
c52cf5d8 | 83 | //setters |
c62b480b | 84 | virtual void Init(Int_t slice=0,Int_t patch=0,Int_t netasegments=100,Int_t nsegs=-1); |
3bb06991 | 85 | void SetLowerThreshold(Int_t i) {fLowerThreshold = i;} |
86 | void SetUpperThreshold(Int_t i) {fUpperThreshold = i;} | |
a8ffd46b | 87 | void SetLastPatch(Int_t i) {fLastPatch = i;} |
4aa41877 | 88 | void SetLastTransformer(AliHLTHoughBaseTransformer *transformer) {fLastTransformer = transformer;} |
a8ffd46b | 89 | |
90 | virtual void SetTPCRawStream(AliTPCRawStream */*rawstream*/){}; | |
c52cf5d8 | 91 | |
65ca0c00 | 92 | virtual void Print(){}; |
a8ffd46b | 93 | |
94 | protected: | |
95 | ||
4aa41877 | 96 | AliHLTHoughBaseTransformer *fLastTransformer;//Pointer to the previous hough transformer |
c62b480b | 97 | |
98 | private: | |
99 | ||
100 | Int_t fSlice;//Index of the current slice being processed | |
101 | Int_t fPatch;//Index of the current patch being processed | |
a8ffd46b | 102 | Int_t fLastPatch;//Index of the last processed patch |
c62b480b | 103 | Int_t fNEtaSegments;//Number of eta slices |
104 | Double_t fEtaMin;//Minimum allowed eta | |
105 | Double_t fEtaMax;//Maximum allowed eta | |
106 | Int_t fLowerThreshold;//Lower threshold for digits amplitude | |
107 | Int_t fUpperThreshold;//Upper threshold for digits amplitude | |
108 | ||
4aa41877 | 109 | AliHLTDigitRowData *fDigitRowData; //! |
c62b480b | 110 | |
111 | Float_t fZVertex;//Z position of the primary vertex | |
65ca0c00 | 112 | |
4aa41877 | 113 | ClassDef(AliHLTHoughBaseTransformer,1) //Hough transformation base class |
c52cf5d8 | 114 | |
115 | }; | |
116 | ||
4aa41877 | 117 | typedef AliHLTHoughBaseTransformer AliL3HoughBaseTransformer; // for backward comapatibility |
c52cf5d8 | 118 | |
119 | #endif | |
65ca0c00 | 120 |