29-jun-2001 NvE TrackCopy mode introduced in AliJet.
[u/mrichter/AliRoot.git] / HLT / hough / AliL3Histogram.h
... / ...
CommitLineData
1#ifndef ALIL3_HISTOGRAM
2#define ALIL3_HISTOGRAM
3
4#include "AliL3RootTypes.h"
5#include <TH2.h>
6
7class AliL3Histogram : public TH2F {
8
9 private:
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
23
24 public:
25 AliL3Histogram();
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();
28
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();
35
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;}
47
48 ClassDef(AliL3Histogram,1)
49
50};
51
52#endif