]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HLT/hough/AliL3Histogram.h
MixWith method has been corrected: only one event per file is in the folder
[u/mrichter/AliRoot.git] / HLT / hough / AliL3Histogram.h
1 #ifndef ALIL3_HISTOGRAM
2 #define ALIL3_HISTOGRAM
3
4 #include "AliL3RootTypes.h"
5 #include <TH2.h>
6
7
8 class AliL3Histogram : public TObject {
9   
10  private:
11   
12   Double_t *fContent; //!
13   Char_t fName[100];
14   Int_t fNxbins;
15   Int_t fNybins;
16   Int_t fNcells;
17   Int_t fEntries;
18   Int_t fFirstXbin;
19   Int_t fFirstYbin;
20   Int_t fLastXbin;
21   Int_t fLastYbin;
22
23   Double_t fXmin;
24   Double_t fYmin;
25   Double_t fXmax;
26   Double_t fYmax;
27   
28   TH2F *fRootHisto;
29   
30  public:
31   AliL3Histogram();
32   AliL3Histogram(Char_t *name,Char_t *id,Int_t nxbin,Double_t xmin,Double_t xmax,Int_t nybin,Double_t ymin,Double_t ymax);
33   virtual ~AliL3Histogram();
34   
35   void Reset();
36   void Fill(Double_t x,Double_t y,Int_t weight);
37   Int_t FindBin(Double_t x,Double_t y);
38   Int_t FindXbin(Double_t x);
39   Int_t FindYbin(Double_t y);
40   Int_t GetBin(Int_t xbin,Int_t ybin);
41   Double_t GetBinContent(Int_t bin);
42   void SetBinContent(Int_t xbin,Int_t ybin);
43   void SetBinContent(Int_t bin);
44   void AddBinContent(Int_t xbin,Int_t ybin,Int_t weight);
45   void AddBinContent(Int_t bin,Int_t weight);
46   void Draw(Char_t *option="hist");
47
48   TH2F *GetRootHisto() {return fRootHisto;}
49   Double_t GetXmin() {return fXmin;}
50   Double_t GetXmax() {return fXmax;}
51   Double_t GetYmin() {return fYmin;}
52   Double_t GetYmax() {return fXmax;}
53   Double_t GetBinCenterX(Int_t xbin);
54   Double_t GetBinCenterY(Int_t ybin);
55   Int_t GetFirstXbin() {return fFirstXbin;}
56   Int_t GetLastXbin() {return fLastXbin;}
57   Int_t GetFirstYbin() {return fFirstYbin;}
58   Int_t GetLastYbin() {return fLastYbin;}
59   Int_t GetNbinsX() {return fNxbins;}
60   Int_t GetNbinsY() {return fNybins;}
61   Int_t GetNEntries() {return fEntries;}
62
63   ClassDef(AliL3Histogram,1)
64     
65 };
66
67 #endif