Added LUT transformer and new function to set parameter for VHDL transformer.
[u/mrichter/AliRoot.git] / HLT / hough / AliL3Hough.h
CommitLineData
f000f8a5 1#ifndef ALIL3_HOUGH
2#define ALIL3_HOUGH
3
4#include "AliL3RootTypes.h"
5
6class AliL3HoughMaxFinder;
237d3f5c 7class AliL3HoughBaseTransformer;
f80b98cb 8class AliL3Histogram;
95a00d93 9class AliL3MemHandler;
f80b98cb 10class AliL3FileHandler;
11class AliL3HoughEval;
f80b98cb 12class AliL3TrackArray;
b1886074 13class AliL3HoughMerger;
14class AliL3HoughIntMerger;
1c404dd5 15class AliL3HoughGlobalMerger;
f000f8a5 16
b1886074 17class AliL3Hough {
f000f8a5 18
19 private:
f80b98cb 20 Char_t fPath[256];
4fc9a6a4 21 Bool_t fBinary;
a6008206 22 Bool_t fAddHistograms;
b1886074 23 Bool_t fDoIterative;
a6008206 24 Bool_t fWriteDigits;
d96f6a4a 25 Bool_t fUse8bits;
f80b98cb 26 Int_t fNEtaSegments;
1c404dd5 27 Int_t fNPatches;
636080ea 28 Int_t fVersion; //which HoughTransformer to use
3bb06991 29 Int_t fCurrentSlice;
6dbc57b4 30
31 Float_t fLowPt;
32 Float_t fPhi;
33 Int_t fNBinX;
34 Int_t fNBinY;
35 Int_t fThreshold;
636080ea 36 Int_t fNSaveIterations; //for HoughtransformerVhld
37
95a00d93 38 AliL3MemHandler **fMemHandler; //!
237d3f5c 39 AliL3HoughBaseTransformer **fHoughTransformer; //!
a6008206 40 AliL3HoughEval **fEval; //!
41 AliL3HoughMaxFinder *fPeakFinder; //!
b1886074 42 AliL3TrackArray **fTracks; //!
43 AliL3HoughMerger *fMerger; //!
44 AliL3HoughIntMerger *fInterMerger; //!
1c404dd5 45 AliL3HoughGlobalMerger *fGlobalMerger; //!
46
b1886074 47 void CleanUp();
0309a5ee 48 Double_t GetCpuTime();
4fc9a6a4 49
f000f8a5 50 public:
4fc9a6a4 51
f000f8a5 52 AliL3Hough();
6dbc57b4 53 AliL3Hough(Char_t *path,Bool_t binary,Int_t n_eta_segments=100,Bool_t bit8=kFALSE,Int_t tv=0);
f000f8a5 54 virtual ~AliL3Hough();
55
aa641eb8 56 void Init(Char_t *path,Bool_t binary,Int_t n_eta_segments=100,Bool_t bit8=kFALSE,Int_t tv=0);
6dbc57b4 57 void Init(Bool_t doit=kFALSE, Bool_t addhists=kFALSE);
58
a6008206 59 void Process(Int_t minslice,Int_t maxslice);
208b54c5 60 void ReadData(Int_t slice,Int_t eventnr=0);
237d3f5c 61 void Transform(Int_t row_range = -1);
b1886074 62 void ProcessSliceIter();
63 void ProcessPatchIter(Int_t patch);
64 void MergePatches();
65 void MergeInternally();
3fe49b5b 66
a6008206 67 void FindTrackCandidates();
a6008206 68 void AddAllHistograms();
0309a5ee 69 Int_t Evaluate(Int_t road_width=1,Int_t nrowstomiss=1);
a4639de2 70 void EvaluatePatch(Int_t i,Int_t road_width,Int_t nrowstomiss);
b1886074 71 void EvaluateWithEta();
3fe49b5b 72 void WriteTracks(Int_t slice,Char_t *path="./");
a6008206 73 void WriteDigits(Char_t *outfile="output_digits.root");
3fe49b5b 74 void InitEvaluate();
75
4fc9a6a4 76 //Setters
77 void SetNEtaSegments(Int_t i) {fNEtaSegments = i;}
a6008206 78 void SetAddHistograms() {fAddHistograms = kTRUE;}
b1886074 79 void DoIterative() {fDoIterative = kTRUE;}
a6008206 80 void SetWriteDigits() {fWriteDigits = kTRUE;}
6dbc57b4 81 void SetTransformerParams(Int_t nx=64, Int_t ny=64,Float_t lpt=0.1,Float_t phi=30) {fNBinX=nx;fNBinY=ny;fLowPt=lpt;fPhi=phi;}
82 void SetThreshold(Int_t t=3) {fThreshold=t;}
636080ea 83 void SetNSaveIterations(Int_t t=10) {fNSaveIterations=t;}
6dbc57b4 84
4fc9a6a4 85 //Getters
237d3f5c 86 AliL3HoughBaseTransformer *GetTransformer(Int_t i) {if(!fHoughTransformer[i]) return 0; return fHoughTransformer[i];}
b1886074 87 AliL3TrackArray *GetTracks(Int_t i) {if(!fTracks[i]) return 0; return fTracks[i];}
88 AliL3HoughEval *GetEval(Int_t i) {if(!fEval[i]) return 0; return fEval[i];}
89 AliL3HoughMerger *GetMerger() {if(!fMerger) return 0; return fMerger;}
90 AliL3HoughIntMerger *GetInterMerger() {if(!fInterMerger) return 0; return fInterMerger;}
95a00d93 91 AliL3MemHandler *GetMemHandler(Int_t i) {if(!fMemHandler[i]) return 0; return fMemHandler[i];}
208b54c5 92 AliL3HoughMaxFinder *GetMaxFinder() {return fPeakFinder;}
f000f8a5 93
b1886074 94 ClassDef(AliL3Hough,1) //Hough transform base class
f000f8a5 95};
96
97#endif
6dbc57b4 98
99
100
101
102
103
104