Added new base class
[u/mrichter/AliRoot.git] / HLT / hough / AliL3Hough.cxx
1 #include <string.h>
2 #include <TH2.h>
3
4 #include "AliL3Hough.h"
5 #include "AliL3HoughTransformer.h"
6 #include "AliL3HoughMaxFinder.h"
7
8 ClassImp(AliL3Hough)
9
10 AliL3Hough::AliL3Hough()
11 {
12
13
14
15 }
16
17
18 AliL3Hough::AliL3Hough(Char_t *rootfile,TH2F *hist)
19 {
20   
21   fParamSpace = hist;
22   strcpy(fInputFile,rootfile);
23   
24 }
25
26 AliL3Hough::AliL3Hough(Char_t *rootfile,Int_t xbin,Double_t *xrange,Int_t ybin,Double_t *yrange)
27 {
28
29   fParamSpace = new TH2F("fParamSpace","Parameter space",xbin,xrange[0],xrange[1],ybin,yrange[0],yrange[1]);
30   strcpy(fInputFile,rootfile);
31 }
32
33
34 AliL3Hough::~AliL3Hough()
35 {
36   
37   if(fHoughTransformer)
38     delete fHoughTransformer;
39 }
40
41
42
43 void AliL3Hough::ProcessSlice(Int_t slice)
44 {
45   
46
47 }
48
49 void AliL3Hough::ProcessPatch(Int_t patch)
50 {
51     
52
53 }
54
55 void AliL3Hough::ProcessEtaSlice(Int_t patch,Double_t *eta)
56 {
57   
58   fHoughTransformer = new AliL3HoughTransformer(2,patch,eta);
59   fHoughTransformer->GetPixels(fInputFile);
60   fParamSpace->Reset();
61   fHoughTransformer->InitTemplates(fParamSpace);
62   fHoughTransformer->Transform2Circle(fParamSpace,0);
63   
64 }