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