1 |
#include <iostream>
|
2 |
#include <vector>
|
3 |
#include <sys/stat.h>
|
4 |
#include <sstream>
|
5 |
|
6 |
#include <TCut.h>
|
7 |
#include <TLatex.h>
|
8 |
#include <TROOT.h>
|
9 |
#include <TCanvas.h>
|
10 |
#include <TPad.h>
|
11 |
#include <TFile.h>
|
12 |
#include <TTree.h>
|
13 |
#include <TString.h>
|
14 |
#include <TMath.h>
|
15 |
#include <stdio.h>
|
16 |
#include <stdlib.h>
|
17 |
#include <TH2.h>
|
18 |
#include <TColor.h>
|
19 |
#include <TStyle.h>
|
20 |
#include <TText.h>
|
21 |
#include <TKey.h>
|
22 |
#include <TPaletteAxis.h>
|
23 |
#include <TGraph.h>
|
24 |
#include <TLegend.h>
|
25 |
#include <TLegendEntry.h>
|
26 |
|
27 |
|
28 |
#include "../../Plotting/Modules/GeneralToolBox.C"
|
29 |
#include "../../Plotting/Modules/SampleClass.C"
|
30 |
#include "../../Plotting/Modules/Setup.C"
|
31 |
#include "../../Plotting/Modules/setTDRStyle.C"
|
32 |
#include "../../Plotting/Modules/ExclusionPlot.C"
|
33 |
//#include "../../Plotting/Modules/external/ExclusionPlot/Functions.C"
|
34 |
|
35 |
|
36 |
using namespace std;
|
37 |
|
38 |
int main(int nargs, char* args[]) {
|
39 |
if(nargs<2||nargs>3) {
|
40 |
cout << "One or two (at most two!) arguments are required: The file with all limits and the file containing the systematics&efficiencies OR one file containing them all." << endl;
|
41 |
return -1;
|
42 |
}
|
43 |
string filename1=(string)args[1];
|
44 |
string filename2;
|
45 |
if(nargs==3) filename2=(string)args[2];
|
46 |
|
47 |
bool ignoretwo=false;
|
48 |
if(nargs==2) ignoretwo=true;
|
49 |
|
50 |
TFile *file1 = new TFile(filename1.c_str());
|
51 |
TFile *file2;
|
52 |
if(nargs==3) file2 = new TFile(filename2.c_str());
|
53 |
if(file1->IsZombie()) {
|
54 |
cout << "The first file you specified, " << filename1 << ", is invalid. Please check it." << endl;
|
55 |
return -1;
|
56 |
}
|
57 |
if(!ignoretwo && file2->IsZombie()) {
|
58 |
cout << "The second file you specified, " << filename2 << ", is invalid. Please check it." << endl;
|
59 |
cout << "Do you want to continue with only one file? (yes=yes, anyting else=no)" << endl;
|
60 |
string cont;
|
61 |
cin >> cont;
|
62 |
if(cont=="yes") ignoretwo=true;
|
63 |
else return -1;
|
64 |
}
|
65 |
|
66 |
if(!ignoretwo&&filename1==filename2) {
|
67 |
cout << "You've provided the same file twice ... that doesn't make much sense, you're supposed to provide a limits and a systematics file!" << endl;
|
68 |
}
|
69 |
|
70 |
if(nargs==2) cout << "You've provided the following file: " << filename1 << endl;
|
71 |
else cout << "You've provided the following two files: " << filename1 << " and " << filename2 << endl;
|
72 |
|
73 |
|
74 |
gROOT->SetStyle("Plain");
|
75 |
do_png(true);
|
76 |
do_pdf(true);
|
77 |
do_root(true);
|
78 |
bool do_fat_line=true; // if you want to have HistLineWidth=1 and FuncWidth=1 as it was before instead of 2
|
79 |
setTDRStyle(do_fat_line);
|
80 |
gStyle->SetTextFont(62);
|
81 |
set_directory("LimitsAndSystematics");
|
82 |
setlumi(PlottingSetup::luminosity);
|
83 |
|
84 |
Double_t stops[5] = { 0.00, 0.34, 0.61, 0.84, 1.00 };
|
85 |
Double_t red[5] = { 0.00, 0.00, 0.87, 1.00, 0.51 };
|
86 |
Double_t green[5] = { 0.00, 0.81, 1.00, 0.20, 0.00 };
|
87 |
Double_t blue[5] = { 0.51, 1.00, 0.12, 0.00, 0.00 };
|
88 |
TColor::CreateGradientColorTable(5, stops, red, green,blue, 255);
|
89 |
|
90 |
gStyle->SetTitleSize(0.02, "XYZ");
|
91 |
gStyle->SetTitleXOffset(1.3);
|
92 |
gStyle->SetTitleYOffset(1.5);
|
93 |
float stdmargin=gStyle->GetPadRightMargin();
|
94 |
gStyle->SetPadRightMargin(indentedmargin);
|
95 |
|
96 |
|
97 |
process_file(file1,stdmargin);
|
98 |
if(!ignoretwo) process_file(file2,stdmargin);
|
99 |
|
100 |
return 0;
|
101 |
}
|
102 |
|