1 |
#include "TH1F.h"
|
2 |
#include "TH2.h"
|
3 |
#include "TLegend.h"
|
4 |
#include "THStack.h"
|
5 |
#include "TCanvas.h"
|
6 |
#include "TGraphErrors.h"
|
7 |
#include <vector>
|
8 |
|
9 |
namespace hist {
|
10 |
|
11 |
/* void plotHistos(vector<TH1F*> h, vector<char*> c, */
|
12 |
/* char* title,char* xtitle, float min = 0., */
|
13 |
/* bool drawLeg = false, bool log = false, bool norm = false) */
|
14 |
|
15 |
void plotHistos(TH1F* h1, TH1F* h2,TH1F* h3,
|
16 |
char* c1, char* c2, char* c3,
|
17 |
char* title,char* xtitle, float min = 0.,
|
18 |
bool drawLeg = false, bool log = false, bool norm = false);
|
19 |
|
20 |
TGraphErrors* getTGraphFromTH2(TH2* h,vector<float> xbins, int method=0);
|
21 |
TH2* suppressHist(TH2* hist,int iclone,float xmin,float xmax);
|
22 |
void add(const char* outHistName, const char* patORpfx0, const char* patORpfx1, const char* patORpfx2 = 0, const char* patORpfx3 = 0, const char* patORpfx4 = 0, const char* patORpfx5 = 0, const char* patORpfx6 = 0, const char* patORpfx7 = 0, const char* patORpfx8 = 0, const char* patORpfx9 = 0);
|
23 |
void add(const char* outHistName, const char* patORpfx);
|
24 |
void color(const char* patORpfx, Color_t color);
|
25 |
void invertx(const char* patORpfx);
|
26 |
void colors(TCanvas* canvas, Color_t color = 1);
|
27 |
void colors(THStack* stack, Color_t color = 1);
|
28 |
void drawsame(const char* canvasName, const char* patORpfx, Bool_t addColor = kFALSE, Bool_t addStyle = kFALSE, Option_t* drawOption = "");
|
29 |
TLegend* legend(const char* canvasName, Option_t* option = "lpf", Bool_t addColor = kFALSE, Int_t token = -1, Float_t xmin = 0.75, Float_t ymin = 0.75, Float_t xmax = 0.99, Float_t ymax = 0.99);
|
30 |
TLegend* legend(TCanvas* canvas, Option_t* option = "lpf", Bool_t addColor = kFALSE, Int_t token = -1, Float_t xmin = 0.75, Float_t ymin = 0.75, Float_t xmax = 0.99, Float_t ymax = 0.99);
|
31 |
TLegend* legend(THStack* stack, Option_t* option = "lpf", Bool_t addColor = kFALSE, Int_t token = -1, Float_t xmin = 0.75, Float_t ymin = 0.75, Float_t xmax = 0.99, Float_t ymax = 0.99);
|
32 |
void normalize(const char* patORpfx);
|
33 |
void scale(const char* patORpfx, Double_t scale);
|
34 |
void scalebins(const char* patORpfx, Double_t scale);
|
35 |
void setrangey(const char* canvasName, Double_t maxy = -999999, Double_t miny = 999999);
|
36 |
void setrangey(TCanvas* canvas, Double_t maxy = -999999, Double_t miny = 999999);
|
37 |
void stack(const char* stackHistName, const char* patORpfx, Bool_t addColor = kFALSE, Option_t* drawOption = "");
|
38 |
void style(const char* patORpfx, Style_t style = 20);
|
39 |
void styles(TCanvas* canvas, Style_t style = 20);
|
40 |
void styles(THStack* stack, Style_t style = 20);
|
41 |
void xaxis(const char* patORpfx, const char* title);
|
42 |
void yaxis(const char* patORpfx, const char* title);
|
43 |
}
|
44 |
TH1F* eff(TH1F* h1, TH1F* h2, const char* name="eff");
|
45 |
TH1F* eff(const char* name1, const char* name2, const char* name="eff");
|
46 |
TH1F* eff_bg(TH1F* h1, TH1F* h2, TH1F* h3, TH1F* h4, const char* name="eff");
|
47 |
void deleteHistos();
|
48 |
void saveHist(const char* filename, const char* pat="*");
|
49 |
void loadHist(const char* filename, const char* directory = 0, const char* pfx=0, const char* pat="*", Bool_t doAdd=kFALSE);
|