25 |
|
#include "TColor.h" |
26 |
|
#include "TStyle.h" |
27 |
|
#include "TROOT.h" |
28 |
+ |
#include "TSystem.h" |
29 |
|
#include "DataFormats/FWLite/interface/Handle.h" |
30 |
|
#include "DataFormats/FWLite/interface/Event.h" |
31 |
|
#if !defined(__CINT__) && !defined(__MAKECINT__) |
33 |
|
#endif |
34 |
|
#include "DataFormats/Math/interface/deltaR.h" |
35 |
|
#include "TFile.h" |
36 |
+ |
#include "TGraphAsymmErrors.h" |
37 |
+ |
#include "TF2.h" |
38 |
+ |
#include "TStopwatch.h" |
39 |
+ |
#include "TPostScript.h" |
40 |
|
|
41 |
|
using namespace std; |
42 |
|
|
46 |
|
|
47 |
|
private: |
48 |
|
|
49 |
< |
map< string, TCanvas* > canvases_; |
50 |
< |
map< string, TCanvas* > pads_; |
49 |
> |
map< string, TCanvas* > canvases_; |
50 |
> |
map< string, TCanvas* > pads_; |
51 |
|
|
52 |
< |
void setCanvas(TCanvas* thisCanvas); |
53 |
< |
void setStats(TCanvas* thisCanvas, TPaveStats* thisStatsBox, TH1* thisHist, int counter); |
54 |
< |
void setColor(TH1* thisHist, int counter); |
55 |
< |
void setMathLabels(TH1* thisHist); |
56 |
< |
void setPalette(TCanvas* thisCanvas, TPaletteAxis* palette); |
57 |
< |
void setHistMax(TCanvas* thisCanvas, double maxEntry); |
58 |
< |
void setLegend(TCanvas* thisCanvas, TLegend* thisLeg, int counter); |
59 |
< |
void createColors(); |
52 |
> |
void setCanvas(TCanvas* thisCanvas); |
53 |
> |
void setStats(TCanvas* thisCanvas, TPaveStats* thisStatsBox, TH1* thisHist, |
54 |
> |
int counter); |
55 |
> |
void setColor(TH1* thisHist, int counter); |
56 |
> |
void setMathLabels(TH1* thisHist); |
57 |
> |
void setPalette(TCanvas* thisCanvas, TPaletteAxis* palette); |
58 |
> |
void setHistMax(TCanvas* thisCanvas, double maxEntry); |
59 |
> |
void setLegend(TCanvas* thisCanvas, TLegend* thisLeg, int counter); |
60 |
> |
void createColors(); |
61 |
|
|
62 |
|
public: |
63 |
|
|
64 |
< |
PlotTool(); |
65 |
< |
~PlotTool(){}; |
64 |
> |
PlotTool(); |
65 |
> |
~PlotTool() { |
66 |
> |
} |
67 |
> |
; |
68 |
> |
|
69 |
> |
int init(string fileName = "", |
70 |
> |
string dirPath = "/scratch/hh/current/cms/user/schum/", |
71 |
> |
string treeName = "Events", string fileLabel=""); |
72 |
> |
int plot(int chainIndex, string histName, string cutName= "", |
73 |
> |
int nEntries= -1, string drwOpt = ""); |
74 |
> |
int loop(vector<string> _histName, vector<string> _cutName, |
75 |
> |
int nEntries= -1, string drwOpt = "", bool correspond = false); |
76 |
> |
int loop(vector<string> _histName, string cutName= "", int nEntries= -1, |
77 |
> |
string drwOpt = ""); |
78 |
> |
int loop(string histName, vector<string> _cutName, int nEntries= -1, |
79 |
> |
string drwOpt = ""); |
80 |
> |
int loop(string histName, string cutName = "", int nEntries= -1, |
81 |
> |
string drwOpt = ""); |
82 |
> |
|
83 |
> |
int plotEff(int chainIndex, string histName, string cutName, int nEntries, double fitXmin = 30, double fitXmax = 130, string fitFormula="expo"); |
84 |
> |
|
85 |
> |
bool samePad_trees, samePad_vars, samePad_cuts, sameCanv_trees, |
86 |
> |
sameCanv_vars, sameCanv_cuts; |
87 |
> |
bool showLegend, logY, addTrackJets, verbose; |
88 |
> |
float* TrackJetKT; |
89 |
> |
vector<string> fileNames; |
90 |
> |
|
91 |
> |
int saveCanvases(string name="test", |
92 |
> |
string path="/afs/naf.desy.de/group/cms/scratch/schum/"); |
93 |
> |
int updatePads(); |
94 |
> |
int fillCanvases(); |
95 |
|
|
96 |
+ |
void showChainInfo(); |
97 |
|
|
62 |
– |
int init(string fileName = "", string dirPath = "/scratch/hh/current/cms/user/schum/", string treeName = "Events"); |
63 |
– |
int plot(int chainIndex, string histName, string cutName= "", int nEntries= -1, string drwOpt = ""); |
64 |
– |
int loop(vector<string> _histName, vector<string> _cutName, int nEntries= -1, string drwOpt = "", bool correspond = false); |
65 |
– |
int loop(vector<string> _histName, string cutName= "", int nEntries= -1, string drwOpt = ""); |
66 |
– |
int loop(string histName, vector<string> _cutName, int nEntries= -1, string drwOpt = ""); |
67 |
– |
int loop(string histName, string cutName, int nEntries= -1, string drwOpt = ""); |
98 |
|
|
99 |
< |
bool samePad_trees, samePad_vars, samePad_cuts, sameCanv_trees, sameCanv_vars, sameCanv_cuts; |
70 |
< |
bool showLegend, logY; |
71 |
< |
float* TrackJetKT; |
72 |
< |
vector<string> fileNames; |
99 |
> |
ClassDef(PlotTool,4) |
100 |
|
|
74 |
– |
int saveCanvases(string type=".ps", string path="/afs/naf.desy.de/group/cms/scratch/schum/"); |
75 |
– |
int updatePads(); |
76 |
– |
int fillCanvases(); |
77 |
– |
|
78 |
– |
|
79 |
– |
ClassDef(PlotTool,4) |
101 |
|
|
102 |
|
}; |
103 |
|
|