3 #ifndef ALIL3HOUGHMAXFINDER_H
4 #define ALIL3HOUGHMAXFINDER_H
6 #include "AliL3RootTypes.h"
7 #include "AliL3StandardIncludes.h"
10 class AliL3TrackArray;
11 class AliL3HoughTrack;
14 struct AliL3AxisWindow
19 Int_t fWeight; // weight
22 class AliL3HoughMaxFinder {
25 AliL3HoughMaxFinder();
26 AliL3HoughMaxFinder(Char_t *histotype,Int_t nmax,AliL3Histogram *hist=0);
27 virtual ~AliL3HoughMaxFinder();
31 void WriteNtuppel(Char_t *filename);
33 //Simple maxima finders:
36 void FindMaxima(Int_t threshold=0);
37 void FindAdaptedPeaks(Int_t nkappawindow,Float_t cutratio);
38 //Peak finder for HoughTransformerRow
39 void FindAdaptedRowPeaks(Int_t kappawindow,Int_t xsize,Int_t ysize);
40 //More sophisticated peak finders:
41 void FindPeak(Int_t t1,Double_t t2,Int_t t3);
42 void FindPeak1(Int_t ywindow=2,Int_t xbinsides=1);
43 void SortPeaks(struct AliL3AxisWindow **a,Int_t first,Int_t last);
44 Int_t PeakCompare(struct AliL3AxisWindow *a,struct AliL3AxisWindow *b) const;
47 void SetGradient(Float_t x,Float_t y) {fGradX=x; fGradY=y;}
48 void SetThreshold(Int_t f) {fThreshold = f;}
49 void SetHistogram(AliL3Histogram *hist) {fCurrentHisto = hist;}
50 void SetEtaSlice(Int_t etaslice) {fCurrentEtaSlice = etaslice;}
53 Float_t GetXPeak(Int_t i) const;
54 Float_t GetYPeak(Int_t i) const;
55 Float_t GetXPeakSize(Int_t i) const;
56 Float_t GetYPeakSize(Int_t i) const;
57 Int_t GetWeight(Int_t i) const;
58 Int_t GetStartEta(Int_t i) const;
59 Int_t GetEndEta(Int_t i) const;
60 Int_t GetEntries() const {return fNPeaks;}
64 Int_t fThreshold; // Threshold for Peak Finder
65 Int_t fCurrentEtaSlice; // Current eta slice being processed
66 AliL3Histogram *fCurrentHisto; //!
68 Float_t fGradX; // Gradient threshold inside Peak Finder
69 Float_t fGradY; // Gradient threshold inside Peak Finder
72 Int_t *fSTARTXPeaks; //!
73 Int_t *fSTARTYPeaks; //!
74 Int_t *fENDXPeaks; //!
75 Int_t *fENDYPeaks; //!
76 Int_t *fSTARTETAPeaks; //!
77 Int_t *fENDETAPeaks; //!
79 Int_t fN1PeaksPrevEtaSlice; // Index of the first peak in the previous eta slice
80 Int_t fN2PeaksPrevEtaSlice; // Index of the last peak in the previous eta slice
81 Int_t fNPeaks; // Index of the last accumulated peak
82 Int_t fNMax; // Maximum allowed number of peaks
84 Char_t fHistoType; // Histogram type
87 TNtuple *fNtuppel; //!
90 ClassDef(AliL3HoughMaxFinder,1) //Maximum finder class
94 inline Float_t AliL3HoughMaxFinder::GetXPeak(Int_t i) const
98 STDCERR<<"AliL3HoughMaxFinder::GetXPeak : Invalid index "<<i<<STDENDL;
104 inline Float_t AliL3HoughMaxFinder::GetYPeak(Int_t i) const
108 STDCERR<<"AliL3HoughMaxFinder::GetYPeak : Invalid index "<<i<<STDENDL;
115 inline Int_t AliL3HoughMaxFinder::GetWeight(Int_t i) const
119 STDCERR<<"AliL3HoughMaxFinder::GetWeight : Invalid index "<<i<<STDENDL;
125 inline Int_t AliL3HoughMaxFinder::GetStartEta(Int_t i) const
129 STDCERR<<"AliL3HoughMaxFinder::GetStartEta : Invalid index "<<i<<STDENDL;
132 return fSTARTETAPeaks[i];
135 inline Int_t AliL3HoughMaxFinder::GetEndEta(Int_t i) const
139 STDCERR<<"AliL3HoughMaxFinder::GetStartEta : Invalid index "<<i<<STDENDL;
142 return fENDETAPeaks[i];