ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/FGolf/tcmet/histtools.h
Revision: 1.1
Committed: Sat Dec 5 02:59:03 2009 UTC (15 years, 5 months ago) by fgolf
Content type: text/plain
Branch: MAIN
Log Message:
looper for studying tcMET in CMSSW_3_1_2

File Contents

# User Rev Content
1 fgolf 1.1 #include "TH1F.h"
2     #include "TLegend.h"
3     #include "THStack.h"
4     #include "TCanvas.h"
5    
6     namespace hist {
7     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);
8     void add(const char* outHistName, const char* patORpfx);
9     void color(const char* patORpfx, Color_t color);
10     void invertx(const char* patORpfx);
11     void colors(TCanvas* canvas, Color_t color = 1);
12     void colors(THStack* stack, Color_t color = 1);
13     void drawsame(const char* canvasName, const char* patORpfx, Bool_t addColor = kFALSE, Bool_t addStyle = kFALSE, Option_t* drawOption = "");
14     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);
15     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);
16     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);
17     void normalize(const char* patORpfx);
18     void scale(const char* patORpfx, Double_t scale);
19     void scalebins(const char* patORpfx, Double_t scale);
20     void setrangey(const char* canvasName, Double_t maxy = -999999, Double_t miny = 999999);
21     void setrangey(TCanvas* canvas, Double_t maxy = -999999, Double_t miny = 999999);
22     void stack(const char* stackHistName, const char* patORpfx, Bool_t addColor = kFALSE, Option_t* drawOption = "");
23     void style(const char* patORpfx, Style_t style = 20);
24     void styles(TCanvas* canvas, Style_t style = 20);
25     void styles(THStack* stack, Style_t style = 20);
26     void xaxis(const char* patORpfx, const char* title);
27     void yaxis(const char* patORpfx, const char* title);
28     }
29     TH1F* eff(TH1F* h1, TH1F* h2, const char* name="eff");
30     TH1F* eff(const char* name1, const char* name2, const char* name="eff");
31     TH1F* eff_bg(TH1F* h1, TH1F* h2, TH1F* h3, TH1F* h4, const char* name="eff");
32     void deleteHistos();
33     void saveHist(const char* filename, const char* pat="*");
34     void loadHist(const char* filename, const char* directory = 0, const char* pfx=0, const char* pat="*", Bool_t doAdd=kFALSE);