3 #ifndef ALIL3_HOUGH_MaxFinder
4 #define ALIL3_HOUGH_MaxFinder
6 #include "AliL3RootTypes.h"
7 #include "AliL3StandardIncludes.h"
10 class AliL3TrackArray;
11 class AliL3HoughTrack;
22 class AliL3HoughMaxFinder {
27 Int_t fCurrentEtaSlice;
28 AliL3Histogram *fCurrentHisto; //!
34 Int_t *fSTARTXPeaks; //!
35 Int_t *fSTARTYPeaks; //!
36 Int_t *fENDXPeaks; //!
37 Int_t *fENDYPeaks; //!
38 Int_t *fSTARTETAPeaks; //!
39 Int_t *fENDETAPeaks; //!
41 Int_t fN1PeaksPrevEtaSlice;
42 Int_t fN2PeaksPrevEtaSlice;
49 TNtuple *fNtuppel; //!
53 AliL3HoughMaxFinder();
54 AliL3HoughMaxFinder(Char_t *histotype,Int_t nmax,AliL3Histogram *hist=0);
55 virtual ~AliL3HoughMaxFinder();
59 void WriteNtuppel(Char_t *filename);
61 //Simple maxima finders:
64 void FindMaxima(Int_t threshold=0);
65 void FindAdaptedPeaks(Int_t nkappawindow,Float_t cut_ratio);
66 //Peak finder for HoughTransformerRow
67 void FindAdaptedRowPeaks(Int_t kappawindow,Int_t xsize,Int_t ysize);
68 //More sophisticated peak finders:
69 void FindPeak(Int_t t1,Double_t t2,Int_t t3);
70 void FindPeak1(Int_t y_window=2,Int_t x_bin_sides=1);
71 void SortPeaks(struct AxisWindow **a,Int_t first,Int_t last);
72 Int_t PeakCompare(struct AxisWindow *a,struct AxisWindow *b);
75 void SetGradient(Float_t x,Float_t y) {fGradX=x; fGradY=y;}
76 void SetThreshold(Int_t f) {fThreshold = f;}
77 void SetHistogram(AliL3Histogram *hist) {fCurrentHisto = hist;}
78 void SetEtaSlice(Int_t etaslice) {fCurrentEtaSlice = etaslice;}
81 Float_t GetXPeak(Int_t i);
82 Float_t GetYPeak(Int_t i);
83 Float_t GetXPeakSize(Int_t i);
84 Float_t GetYPeakSize(Int_t i);
85 Int_t GetWeight(Int_t i);
86 Int_t GetStartEta(Int_t i);
87 Int_t GetEndEta(Int_t i);
88 Int_t GetEntries() {return fNPeaks;}
90 ClassDef(AliL3HoughMaxFinder,1) //Maximum finder class
94 inline Float_t AliL3HoughMaxFinder::GetXPeak(Int_t i)
98 STDCERR<<"AliL3HoughMaxFinder::GetXPeak : Invalid index "<<i<<STDENDL;
104 inline Float_t AliL3HoughMaxFinder::GetYPeak(Int_t i)
108 STDCERR<<"AliL3HoughMaxFinder::GetYPeak : Invalid index "<<i<<STDENDL;
115 inline Int_t AliL3HoughMaxFinder::GetWeight(Int_t i)
119 STDCERR<<"AliL3HoughMaxFinder::GetWeight : Invalid index "<<i<<STDENDL;
125 inline Int_t AliL3HoughMaxFinder::GetStartEta(Int_t i)
129 STDCERR<<"AliL3HoughMaxFinder::GetStartEta : Invalid index "<<i<<STDENDL;
132 return fSTARTETAPeaks[i];
135 inline Int_t AliL3HoughMaxFinder::GetEndEta(Int_t i)
139 STDCERR<<"AliL3HoughMaxFinder::GetStartEta : Invalid index "<<i<<STDENDL;
142 return fENDETAPeaks[i];