]>
Commit | Line | Data |
---|---|---|
3e87ef69 | 1 | // @(#) $Id$ |
2 | ||
c52cf5d8 | 3 | #ifndef ALIL3_HOUGHBASETRANSFORMER |
4 | #define ALIL3_HOUGHBASETRANSFORMER | |
5 | ||
6 | #include "AliL3RootTypes.h" | |
7 | ||
1eef4efc | 8 | #ifdef do_mc |
0bd0c1ef | 9 | const UInt_t MaxTrack=100; |
1eef4efc | 10 | struct TrackIndex { |
11 | Int_t fLabel[MaxTrack]; | |
0bd0c1ef | 12 | #ifdef ROWHOUGH |
13 | UChar_t fNHits[MaxTrack]; | |
14 | UChar_t fCurrentRow[MaxTrack]; | |
15 | #else | |
1eef4efc | 16 | Int_t fNHits[MaxTrack]; |
0bd0c1ef | 17 | #endif |
1eef4efc | 18 | }; |
19 | typedef struct TrackIndex TrackIndex; | |
20 | #endif | |
21 | ||
c52cf5d8 | 22 | class AliL3DigitRowData; |
23 | class AliL3Histogram; | |
24 | ||
25 | class AliL3HoughBaseTransformer { | |
26 | ||
27 | private: | |
28 | ||
29 | Int_t fSlice; | |
30 | Int_t fPatch; | |
31 | Int_t fNEtaSegments; | |
32 | Double_t fEtaMin; | |
33 | Double_t fEtaMax; | |
3bb06991 | 34 | Int_t fLowerThreshold; |
35 | Int_t fUpperThreshold; | |
c52cf5d8 | 36 | |
37 | AliL3DigitRowData *fDigitRowData; //! | |
0bd0c1ef | 38 | |
39 | Float_t fZVertex; | |
40 | ||
c52cf5d8 | 41 | public: |
e06900d5 | 42 | |
c52cf5d8 | 43 | AliL3HoughBaseTransformer(); |
0bd0c1ef | 44 | AliL3HoughBaseTransformer(Int_t slice,Int_t patch,Int_t n_eta_segments,Float_t zvertex=0.0); |
c52cf5d8 | 45 | virtual ~AliL3HoughBaseTransformer(); |
46 | ||
47 | void SetInputData(UInt_t ndigits,AliL3DigitRowData *ptr) {fDigitRowData = ptr;} | |
48 | ||
1f1942b8 | 49 | //this is for adaptave histograms |
dd7d3870 | 50 | virtual void CreateHistograms(Float_t /*ptmin*/,Float_t /*ptmax*/,Float_t /*pres*/,Int_t /*nybin*/,Float_t /*psi*/) |
1f1942b8 | 51 | {STDCERR<<"Adaptive histograms are not supported for this Transformer!"<<STDENDL;} |
52 | ||
b2a02bce | 53 | virtual void CreateHistograms(Int_t nxbin,Float_t ptmin,Int_t nybin,Float_t phimin,Float_t phimax) = 0; |
54 | virtual void CreateHistograms(Int_t nxbin,Float_t xmin,Float_t xmax,Int_t nybin,Float_t ymin,Float_t ymax) = 0; | |
1f1942b8 | 55 | |
c52cf5d8 | 56 | virtual void Reset() = 0; |
1f1942b8 | 57 | virtual void TransformCircle() |
58 | {STDCERR<<"TransformCircle is not defined for this transformer!"<<STDENDL;} | |
dd7d3870 | 59 | virtual void TransformCircle(Int_t */*row_range*/,Int_t /*every*/) |
1f1942b8 | 60 | {STDCERR<<"TransformCircle is not defined for this transformer!"<<STDENDL;} |
dd7d3870 | 61 | virtual void TransformCircleC(Int_t */*row_range*/,Int_t /*every*/) |
1f1942b8 | 62 | {STDCERR<<"TransformCircleC is not defined for this transformer!"<<STDENDL;} |
dd7d3870 | 63 | virtual void TransformLine(Int_t */*rowrange*/=0,Float_t */*phirange*/=0) |
1f1942b8 | 64 | {STDCERR<<"TransformLine is not defined for this Transformer!"<<STDENDL;} |
dd7d3870 | 65 | virtual void TransformLineC(Int_t */*rowrange*/,Float_t */*phirange*/) |
1f1942b8 | 66 | {STDCERR<<"TransformLineC is not defined for this Transformer!"<<STDENDL;} |
67 | ||
c52cf5d8 | 68 | //Getters |
69 | Int_t GetSlice() {return fSlice;} | |
70 | Int_t GetPatch() {return fPatch;} | |
1eef4efc | 71 | Int_t GetNEtaSegments() {return fNEtaSegments;} |
3bb06991 | 72 | Int_t GetLowerThreshold() {return fLowerThreshold;} |
73 | Int_t GetUpperThreshold() {return fUpperThreshold;} | |
1eef4efc | 74 | Double_t GetEtaMin() {return fEtaMin;} |
75 | Double_t GetEtaMax() {return fEtaMax;} | |
0bd0c1ef | 76 | Float_t GetZVertex() {return fZVertex;} |
77 | ||
c52cf5d8 | 78 | AliL3DigitRowData *GetDataPointer() {return fDigitRowData;} |
79 | ||
80 | virtual Int_t GetEtaIndex(Double_t eta) = 0; | |
dd7d3870 | 81 | virtual void GetEtaIndexes(Double_t /*eta*/,Int_t */*indexes*/) |
1f1942b8 | 82 | {STDCERR<<"GetEtaIndexes not implemented for this Transformer class"<<STDENDL;} |
c52cf5d8 | 83 | virtual AliL3Histogram *GetHistogram(Int_t eta_index) = 0; |
afd8fed4 | 84 | virtual Double_t GetEta(Int_t eta_index,Int_t slice) = 0; |
1f1942b8 | 85 | |
dd7d3870 | 86 | virtual Int_t GetTrackID(Int_t /*eta_index*/,Double_t /*kappa*/,Double_t /*psi*/){ |
1f1942b8 | 87 | STDCERR<<"GetTrackID not implemented for this Transformer class"<<STDENDL; |
88 | return -1; | |
89 | } | |
1eef4efc | 90 | |
c52cf5d8 | 91 | //setters |
3e87ef69 | 92 | virtual void Init(Int_t slice=0,Int_t patch=0,Int_t n_eta_segments=100,Int_t n_segs=-1); |
3bb06991 | 93 | void SetLowerThreshold(Int_t i) {fLowerThreshold = i;} |
94 | void SetUpperThreshold(Int_t i) {fUpperThreshold = i;} | |
c52cf5d8 | 95 | |
65ca0c00 | 96 | virtual void Print(){}; |
97 | ||
c52cf5d8 | 98 | ClassDef(AliL3HoughBaseTransformer,1) //Hough transformation base class |
99 | ||
100 | }; | |
101 | ||
102 | ||
103 | #endif | |
65ca0c00 | 104 |