]>
Commit | Line | Data |
---|---|---|
18758be6 | 1 | #ifndef ALIL3_HISTOGRAM |
2 | #define ALIL3_HISTOGRAM | |
4de874d1 | 3 | |
4 | #include "AliL3RootTypes.h" | |
18758be6 | 5 | #include <TH2.h> |
4de874d1 | 6 | |
18758be6 | 7 | class AliL3Histogram : public TH2F { |
4de874d1 | 8 | |
9 | private: | |
18758be6 | 10 | |
11 | Double_t *fContent; //! | |
12 | Char_t fName[100]; | |
13 | Int_t fNxbins; | |
14 | Int_t fNybins; | |
15 | Int_t fNcells; | |
16 | Int_t fEntries; | |
17 | ||
18 | Double_t fXmin; | |
19 | Double_t fYmin; | |
20 | Double_t fXmax; | |
21 | Double_t fYmax; | |
22 | ||
4de874d1 | 23 | |
24 | public: | |
25 | AliL3Histogram(); | |
18758be6 | 26 | 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); |
27 | virtual ~AliL3Histogram(); | |
4de874d1 | 28 | |
18758be6 | 29 | void Reset(); |
30 | void Fill(Double_t x,Double_t y,Int_t weight); | |
31 | Int_t FindBin(Double_t x,Double_t y); | |
32 | void AddBinContent(Int_t xbin,Int_t ybin,Int_t weight); | |
33 | void AddBinContent(Int_t bin,Int_t weight); | |
34 | void Draw(); | |
4de874d1 | 35 | |
18758be6 | 36 | Double_t GetXmin() {return fXmin;} |
37 | Double_t GetXmax() {return fXmax;} | |
38 | Double_t GetYmin() {return fYmin;} | |
39 | Double_t GetYmax() {return fXmax;} | |
40 | Double_t GetXBinCenter(Int_t xbin); | |
41 | Double_t GetYBinCenter(Int_t ybin); | |
42 | Int_t GetFirstXbin() {return 1 + (Int_t)(fNxbins*(fXmin-fXmin)/(fXmax-fXmin));} | |
43 | Int_t GetLastXbin() {return 1 + (Int_t)(fNxbins*(fXmax-fXmin)/(fXmax-fXmin));} | |
44 | Int_t GetFirstYbin() {return 1 + (Int_t)(fNxbins*(fXmin-fXmin)/(fXmax-fXmin));} | |
45 | Int_t GetLastYbin() {return 1 + (Int_t)(fNybins*(fYmax-fYmin)/(fYmax-fYmin));} | |
46 | Int_t GetNEntries() {return fEntries;} | |
4de874d1 | 47 | |
18758be6 | 48 | ClassDef(AliL3Histogram,1) |
49 | ||
4de874d1 | 50 | }; |
51 | ||
52 | #endif |