1 #ifndef ALIL3_HISTOGRAM
2 #define ALIL3_HISTOGRAM
5 #include "AliL3RootTypes.h"
11 class AliL3Histogram {
38 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);
39 virtual ~AliL3Histogram();
42 void Fill(Double_t x,Double_t y,Int_t weight=1);
43 Int_t FindBin(Double_t x,Double_t y);
44 Int_t FindXbin(Double_t x);
45 Int_t FindYbin(Double_t y);
46 Int_t GetBin(Int_t xbin,Int_t ybin);
47 Int_t GetBinContent(Int_t bin);
48 void SetBinContent(Int_t xbin,Int_t ybin,Int_t value);
49 void SetBinContent(Int_t bin,Int_t value);
50 void AddBinContent(Int_t xbin,Int_t ybin,Int_t weight);
51 void AddBinContent(Int_t bin,Int_t weight);
52 void Add(AliL3Histogram *h1,Double_t weight=1);
53 void SetThreshold(Int_t i) {fThreshold = i;}
54 void Draw(Char_t *option="hist");
55 void CreateRootHisto();
63 Double_t GetXmin() {return fXmin;}
64 Double_t GetXmax() {return fXmax;}
65 Double_t GetYmin() {return fYmin;}
66 Double_t GetYmax() {return fYmax;}
67 Double_t GetBinCenterX(Int_t xbin);
68 Double_t GetBinCenterY(Int_t ybin);
69 Int_t GetFirstXbin() {return fFirstXbin;}
70 Int_t GetLastXbin() {return fLastXbin;}
71 Int_t GetFirstYbin() {return fFirstYbin;}
72 Int_t GetLastYbin() {return fLastYbin;}
73 Int_t GetNbinsX() {return fNxbins;}
74 Int_t GetNbinsY() {return fNybins;}
75 Int_t GetNEntries() {return fEntries;}
78 ClassDef(AliL3Histogram,1) //2D histogram class
83 inline TH2F *AliL3Histogram::GetRootHisto()
87 cerr<<"AliL3Histogram::GetRootHisto() : You must first Draw histogram before accessing it"<<endl;
94 inline void *AliL3Histogram::GetRootHisto()
96 cerr<<"AliL3Histogram::GetRootHisto() : You must compile with ROOT in order to interface the ROOT histogram"<<endl;