1 | #ifndef MARS_MH
|
---|
2 | #define MARS_MH
|
---|
3 |
|
---|
4 | #ifndef MARS_MParContainer
|
---|
5 | #include "MParContainer.h"
|
---|
6 | #endif
|
---|
7 |
|
---|
8 | class TH1;
|
---|
9 | class TH2;
|
---|
10 | class TH3;
|
---|
11 | class TAxis;
|
---|
12 | class TArrayD;
|
---|
13 | class TCanvas;
|
---|
14 |
|
---|
15 | class MBinning;
|
---|
16 | class MParList;
|
---|
17 |
|
---|
18 | class MH : public MParContainer
|
---|
19 | {
|
---|
20 | public:
|
---|
21 | MH(const char *name=NULL, const char *title=NULL);
|
---|
22 |
|
---|
23 | virtual Bool_t SetupFill(const MParList *pList) { return kTRUE; }
|
---|
24 | virtual Bool_t Fill(const MParContainer *par);
|
---|
25 | virtual Bool_t Finalize() { return kTRUE; }
|
---|
26 |
|
---|
27 | virtual TString GetDataMember() const { return ""; }
|
---|
28 |
|
---|
29 | virtual TH1 *GetHistByName(const TString name);
|
---|
30 |
|
---|
31 | static TCanvas *MakeDefCanvas(TString name="", const char *title="",
|
---|
32 | const UInt_t w=580, const UInt_t h=435);
|
---|
33 | static TCanvas *MakeDefCanvas(const TObject *obj,
|
---|
34 | const UInt_t w=580, const UInt_t h=435);
|
---|
35 |
|
---|
36 | static void SetBinning(TH1 *h, const MBinning *binsx);
|
---|
37 | static void SetBinning(TH2 *h, const MBinning *binsx, const MBinning *binsy);
|
---|
38 | static void SetBinning(TH3 *h, const MBinning *binsx, const MBinning *binsy, const MBinning *binsz);
|
---|
39 |
|
---|
40 | static void SetBinning(TH1 *h, const TArrayD &binsx);
|
---|
41 | static void SetBinning(TH2 *h, const TArrayD &binsx, const TArrayD &binsy);
|
---|
42 | static void SetBinning(TH3 *h, const TArrayD &binsx, const TArrayD &binsy, const TArrayD &binsz);
|
---|
43 |
|
---|
44 | static void SetBinning(TH1 *h, const TAxis *binsx);
|
---|
45 | static void SetBinning(TH2 *h, const TAxis *binsx, const TAxis *binsy);
|
---|
46 | static void SetBinning(TH3 *h, const TAxis *binsx, const TAxis *binsy, const TAxis *binsz);
|
---|
47 |
|
---|
48 | static void SetBinning(TH1 *h, const TH1 *x);
|
---|
49 |
|
---|
50 | static Bool_t ApplyBinning(const MParList &plist, TString name, TH1 *h);
|
---|
51 |
|
---|
52 | static void ScaleArray(TArrayD &bins, Double_t f);
|
---|
53 | static TArrayD ScaleAxis(TAxis &axe, Double_t f);
|
---|
54 | static void ScaleAxis(TH1 *bins, Double_t fx=1, Double_t fy=1, Double_t fz=1);
|
---|
55 |
|
---|
56 | static Double_t GetBinCenterLog(const TAxis &axe, Int_t nbin);
|
---|
57 |
|
---|
58 | static void DrawCopy(const TH1 &hist1, const TH1 &hist2, const TString title);
|
---|
59 | static void Draw(TH1 &hist1, TH1 &hist2, const TString title);
|
---|
60 |
|
---|
61 | static void FindGoodLimits(Int_t nbins, Int_t &newbins, Double_t &xmin, Double_t &xmax, Bool_t isInteger);
|
---|
62 | static Double_t GetMinimumGT(const TH1 &h, Double_t gt=0);
|
---|
63 |
|
---|
64 | ClassDef(MH, 1) //A histogram base class for Mars histograms
|
---|
65 | };
|
---|
66 |
|
---|
67 | #endif
|
---|
68 |
|
---|