1 |
|
#ifndef PlotTool_h |
2 |
|
#define PlotTool_h |
3 |
|
|
4 |
– |
#ifndef ROOT_TClonesArray |
4 |
|
#include "TClonesArray.h" |
5 |
< |
#endif |
6 |
< |
|
7 |
< |
#include <string> |
8 |
< |
#include <map> |
9 |
< |
#include <iostream> |
10 |
< |
#include <fstream> |
11 |
< |
#include <sstream> |
13 |
< |
#include <vector> |
14 |
< |
|
5 |
> |
#include "TFile.h" |
6 |
> |
#include "TGraphAsymmErrors.h" |
7 |
> |
#include "TF2.h" |
8 |
> |
#include "TStopwatch.h" |
9 |
> |
#include "TPostScript.h" |
10 |
> |
#include "TLeafElement.h" |
11 |
> |
#include "TMethod.h" |
12 |
|
#include "TChain.h" |
13 |
|
#include "TSystemDirectory.h" |
14 |
|
#include "TList.h" |
21 |
|
#include "TLegendEntry.h" |
22 |
|
#include "TColor.h" |
23 |
|
#include "TStyle.h" |
24 |
< |
#include "TROOT.h" |
24 |
> |
#include "TROOT.h" |
25 |
> |
#include "TSystem.h" |
26 |
> |
|
27 |
> |
#include <TLorentzVector.h> |
28 |
> |
|
29 |
> |
#include <string> |
30 |
> |
#include <map> |
31 |
> |
#include <iostream> |
32 |
> |
#include <fstream> |
33 |
> |
#include <sstream> |
34 |
> |
#include <vector> |
35 |
> |
|
36 |
> |
#include "FWliteVariables.h" |
37 |
> |
|
38 |
|
|
39 |
|
using namespace std; |
40 |
|
|
44 |
|
|
45 |
|
private: |
46 |
|
|
47 |
< |
map< string, TCanvas* > canvases_; |
48 |
< |
map< string, TCanvas* > pads_; |
47 |
> |
map< string, TCanvas* > canvases_; |
48 |
> |
map< string, TCanvas* > pads_; |
49 |
|
|
50 |
< |
void setCanvas(TCanvas* thisCanvas); |
51 |
< |
void setStats(TCanvas* thisCanvas, TPaveStats* thisStatsBox, TH1* thisHist, int counter); |
52 |
< |
void setColor(TH1* thisHist, int counter); |
53 |
< |
void setMathLabels(TH1* thisHist); |
54 |
< |
void setPalette(TCanvas* thisCanvas, TPaletteAxis* palette); |
55 |
< |
void setHistMax(TCanvas* thisCanvas, double maxEntry); |
56 |
< |
void setLegend(TCanvas* thisCanvas, TLegend* thisLeg, int counter); |
57 |
< |
void createColors(); |
50 |
> |
void setCanvas(TCanvas* thisCanvas); |
51 |
> |
void setStats(TCanvas* thisCanvas, TPaveStats* thisStatsBox, TH1* thisHist, |
52 |
> |
int counter); |
53 |
> |
void setColor(TH1* thisHist, int counter); |
54 |
> |
void setMathLabels(TH1* thisHist); |
55 |
> |
void setPalette(TCanvas* thisCanvas, TPaletteAxis* palette); |
56 |
> |
void setHistMax(TCanvas* thisCanvas, double maxEntry); |
57 |
> |
void setLegend(TCanvas* thisCanvas, TLegend* thisLeg, int counter); |
58 |
> |
void createColors(); |
59 |
|
|
60 |
|
public: |
61 |
|
|
62 |
< |
PlotTool(); |
63 |
< |
~PlotTool(){}; |
64 |
< |
|
62 |
> |
PlotTool(); |
63 |
> |
~PlotTool() { |
64 |
> |
} |
65 |
> |
; |
66 |
> |
|
67 |
> |
int init(string fileName = "", |
68 |
> |
string dirPath = "/scratch/hh/current/cms/user/schum/", |
69 |
> |
string treeName = "Events", string fileLabel=""); |
70 |
> |
|
71 |
> |
int plot(int chainIndex, string histName, string cutName= "", |
72 |
> |
int nEntries= -1, string drwOpt = ""); |
73 |
> |
int loop(vector<string> _histName, vector<string> _cutName, |
74 |
> |
int nEntries= -1, string drwOpt = "", bool correspond = false); |
75 |
> |
int loop(vector<string> _histName, string cutName= "", int nEntries= -1, |
76 |
> |
string drwOpt = ""); |
77 |
> |
int loop(string histName, vector<string> _cutName, int nEntries= -1, |
78 |
> |
string drwOpt = ""); |
79 |
> |
int loop(string histName, string cutName = "", int nEntries= -1, |
80 |
> |
string drwOpt = ""); |
81 |
> |
|
82 |
> |
bool samePad_trees, samePad_vars, samePad_cuts, sameCanv_trees, sameCanv_vars, sameCanv_cuts; |
83 |
> |
|
84 |
> |
bool showLegend, logY, verbose, recreateTree; |
85 |
> |
|
86 |
> |
vector<string> fileNames; |
87 |
> |
|
88 |
> |
string globalCuts, varBlockNames; |
89 |
> |
|
90 |
> |
int saveCanvases(string name="test", |
91 |
> |
string path="/afs/naf.desy.de/group/cms/scratch/schum/"); |
92 |
> |
int clearCanvases(); |
93 |
> |
int updatePads(); |
94 |
> |
int fillCanvases(); |
95 |
|
|
96 |
< |
int init(string fileName = "", string dirPath = "/scratch/hh/current/cms/user/schum/", string treeName = "Events"); |
56 |
< |
int plot(int chainIndex, string histName, string cutName= "", int nEntries= -1, string drwOpt = ""); |
57 |
< |
int loop(vector<string> _histName, vector<string> _cutName, int nEntries= -1, string drwOpt = "", bool correspond = false); |
58 |
< |
int loop(vector<string> _histName, string cutName= "", int nEntries= -1, string drwOpt = ""); |
59 |
< |
int loop(string histName, vector<string> _cutName, int nEntries= -1, string drwOpt = ""); |
60 |
< |
int loop(string histName, string cutName, int nEntries= -1, string drwOpt = ""); |
96 |
> |
int setVariables(string label=""); |
97 |
|
|
98 |
< |
bool samePad_trees, samePad_vars, samePad_cuts, sameCanv_trees, sameCanv_vars, sameCanv_cuts; |
63 |
< |
bool showLegend, logY; |
98 |
> |
vector<string> autoVars; |
99 |
|
|
65 |
– |
int saveCanvases(string type=".ps", string path="/afs/naf.desy.de/group/cms/scratch/schum/"); |
66 |
– |
int updatePads(); |
67 |
– |
int fillCanvases(); |
100 |
|
|
101 |
+ |
ClassDef(PlotTool,4) |
102 |
|
|
70 |
– |
ClassDef(PlotTool,4) |
103 |
|
|
104 |
|
}; |
105 |
|
|