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 |
+ |
#include "TLeafElement.h" |
41 |
+ |
#include "TMethod.h" |
42 |
|
|
43 |
|
using namespace std; |
44 |
|
|
48 |
|
|
49 |
|
private: |
50 |
|
|
51 |
< |
map< string, TCanvas* > canvases_; |
52 |
< |
map< string, TCanvas* > pads_; |
51 |
> |
map< string, TCanvas* > canvases_; |
52 |
> |
map< string, TCanvas* > pads_; |
53 |
|
|
54 |
< |
void setCanvas(TCanvas* thisCanvas); |
55 |
< |
void setStats(TCanvas* thisCanvas, TPaveStats* thisStatsBox, TH1* thisHist, int counter); |
56 |
< |
void setColor(TH1* thisHist, int counter); |
57 |
< |
void setMathLabels(TH1* thisHist); |
58 |
< |
void setPalette(TCanvas* thisCanvas, TPaletteAxis* palette); |
59 |
< |
void setHistMax(TCanvas* thisCanvas, double maxEntry); |
60 |
< |
void setLegend(TCanvas* thisCanvas, TLegend* thisLeg, int counter); |
61 |
< |
void createColors(); |
54 |
> |
void setCanvas(TCanvas* thisCanvas); |
55 |
> |
void setStats(TCanvas* thisCanvas, TPaveStats* thisStatsBox, TH1* thisHist, |
56 |
> |
int counter); |
57 |
> |
void setColor(TH1* thisHist, int counter); |
58 |
> |
void setMathLabels(TH1* thisHist); |
59 |
> |
void setPalette(TCanvas* thisCanvas, TPaletteAxis* palette); |
60 |
> |
void setHistMax(TCanvas* thisCanvas, double maxEntry); |
61 |
> |
void setLegend(TCanvas* thisCanvas, TLegend* thisLeg, int counter); |
62 |
> |
void createColors(); |
63 |
|
|
64 |
|
public: |
65 |
|
|
66 |
< |
PlotTool(); |
67 |
< |
~PlotTool(){}; |
66 |
> |
PlotTool(); |
67 |
> |
~PlotTool() { |
68 |
> |
} |
69 |
> |
; |
70 |
> |
|
71 |
> |
int init(string fileName = "", |
72 |
> |
string dirPath = "/scratch/hh/current/cms/user/schum/", |
73 |
> |
string treeName = "Events", string fileLabel=""); |
74 |
> |
int plot(int chainIndex, string histName, string cutName= "", |
75 |
> |
int nEntries= -1, string drwOpt = ""); |
76 |
> |
int loop(vector<string> _histName, vector<string> _cutName, |
77 |
> |
int nEntries= -1, string drwOpt = "", bool correspond = false); |
78 |
> |
int loop(vector<string> _histName, string cutName= "", int nEntries= -1, |
79 |
> |
string drwOpt = ""); |
80 |
> |
int loop(string histName, vector<string> _cutName, int nEntries= -1, |
81 |
> |
string drwOpt = ""); |
82 |
> |
int loop(string histName, string cutName = "", int nEntries= -1, |
83 |
> |
string drwOpt = ""); |
84 |
> |
|
85 |
> |
int plotEff(int chainIndex, string histName, string cutName, int nEntries, double fitXmin = 30, double fitXmax = 130, string fitFormula="expo"); |
86 |
> |
|
87 |
> |
bool samePad_trees, samePad_vars, samePad_cuts, sameCanv_trees, |
88 |
> |
sameCanv_vars, sameCanv_cuts; |
89 |
> |
bool showLegend, logY, addTrackJets, verbose; |
90 |
> |
|
91 |
> |
string globalCuts; |
92 |
> |
|
93 |
> |
float* TrackJetKT; |
94 |
> |
vector<string> fileNames; |
95 |
> |
|
96 |
> |
int saveCanvases(string name="test", |
97 |
> |
string path="/afs/naf.desy.de/group/cms/scratch/schum/"); |
98 |
> |
int clearCanvases(); |
99 |
> |
int updatePads(); |
100 |
> |
int fillCanvases(); |
101 |
|
|
102 |
+ |
int setVariables(string label=""); |
103 |
|
|
104 |
< |
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 = ""); |
104 |
> |
vector<string> autoVars; |
105 |
|
|
69 |
– |
bool samePad_trees, samePad_vars, samePad_cuts, sameCanv_trees, sameCanv_vars, sameCanv_cuts; |
70 |
– |
bool showLegend, logY; |
71 |
– |
float* TrackJetKT; |
72 |
– |
vector<string> fileNames; |
106 |
|
|
107 |
< |
int saveCanvases(string type=".ps", string path="/afs/naf.desy.de/group/cms/scratch/schum/"); |
75 |
< |
int updatePads(); |
76 |
< |
int fillCanvases(); |
107 |
> |
ClassDef(PlotTool,4) |
108 |
|
|
109 |
|
|
79 |
– |
ClassDef(PlotTool,4) |
80 |
– |
|
110 |
|
}; |
111 |
|
|
112 |
|
#endif |