1 |
buchmann |
1.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 |
|
|
#include "../../Plotting/Modules/GeneralToolBox.C"
|
28 |
|
|
#include "../../Plotting/Modules/SampleClass.C"
|
29 |
|
|
#include "../../Plotting/Modules/Setup.C"
|
30 |
|
|
#include "../../Plotting/Modules/PeakFinder.C"
|
31 |
|
|
#include "../../Plotting/Modules/Poisson_Calculator.C"
|
32 |
|
|
#include "../../Plotting/Modules/setTDRStyle.C"
|
33 |
|
|
#include "../../Plotting/Modules/ActiveSamples.C"
|
34 |
|
|
#include "../../Plotting/Modules/UpperLimitsWithShape.C"
|
35 |
|
|
#include "../../Plotting/Modules/Plotting_Functions.C"
|
36 |
|
|
#include "../../Plotting/Modules/LimitCalculation.C"
|
37 |
|
|
#include "../../Plotting/Modules/ResultModule.C"
|
38 |
|
|
#include "../../Plotting/Modules/CrossSectionReader.C"
|
39 |
|
|
#include "../../Plotting/Modules/Systematics.C"
|
40 |
|
|
#include "../../Plotting/Modules/SugarCoating.C"
|
41 |
|
|
#include "../../Plotting/Modules/ExclusionPlot.C"
|
42 |
|
|
#include "../../Plotting/Modules/SUSYScan.C"
|
43 |
|
|
|
44 |
|
|
|
45 |
|
|
|
46 |
|
|
using namespace std;
|
47 |
|
|
|
48 |
|
|
int main(int nargs, char* args[]) {
|
49 |
|
|
if(nargs<2||nargs>3) {
|
50 |
|
|
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;
|
51 |
|
|
return -1;
|
52 |
|
|
}
|
53 |
|
|
string filename1=(string)args[1];
|
54 |
|
|
string filename2;
|
55 |
|
|
if(nargs==3) filename2=(string)args[2];
|
56 |
|
|
|
57 |
|
|
bool ignoretwo=false;
|
58 |
|
|
if(nargs==2) ignoretwo=true;
|
59 |
|
|
|
60 |
|
|
TFile *file1 = new TFile(filename1.c_str());
|
61 |
|
|
TFile *file2;
|
62 |
|
|
if(nargs==3) file2 = new TFile(filename2.c_str());
|
63 |
|
|
if(file1->IsZombie()) {
|
64 |
|
|
cout << "The first file you specified, " << filename1 << ", is invalid. Please check it." << endl;
|
65 |
|
|
return -1;
|
66 |
|
|
}
|
67 |
|
|
if(!ignoretwo && file2->IsZombie()) {
|
68 |
|
|
cout << "The second file you specified, " << filename2 << ", is invalid. Please check it." << endl;
|
69 |
|
|
cout << "Do you want to continue with only one file? (yes=yes, anyting else=no)" << endl;
|
70 |
|
|
string cont;
|
71 |
|
|
cin >> cont;
|
72 |
|
|
if(cont=="yes") ignoretwo=true;
|
73 |
|
|
else return -1;
|
74 |
|
|
}
|
75 |
|
|
|
76 |
|
|
if(!ignoretwo&&filename1==filename2) {
|
77 |
|
|
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;
|
78 |
|
|
}
|
79 |
|
|
|
80 |
|
|
if(nargs==2) cout << "You've provided the following file: " << filename1 << endl;
|
81 |
|
|
else cout << "You've provided the following two files: " << filename1 << " and " << filename2 << endl;
|
82 |
|
|
|
83 |
|
|
|
84 |
|
|
gROOT->SetStyle("Plain");
|
85 |
|
|
do_png(true);
|
86 |
|
|
do_pdf(true);
|
87 |
|
|
do_C(true);
|
88 |
|
|
bool do_fat_line=false; // if you want to have HistLineWidth=1 and FuncWidth=1 as it was before instead of 2
|
89 |
|
|
setTDRStyle(do_fat_line);
|
90 |
|
|
gStyle->SetTextFont(42);
|
91 |
|
|
set_directory("LimitsAndSystematics");
|
92 |
|
|
setlumi(PlottingSetup::luminosity);
|
93 |
|
|
|
94 |
|
|
Double_t stops[5] = { 0.00, 0.34, 0.61, 0.84, 1.00 };
|
95 |
|
|
Double_t red[5] = { 0.00, 0.00, 0.87, 1.00, 0.51 };
|
96 |
|
|
Double_t green[5] = { 0.00, 0.81, 1.00, 0.20, 0.00 };
|
97 |
|
|
Double_t blue[5] = { 0.51, 1.00, 0.12, 0.00, 0.00 };
|
98 |
|
|
TColor::CreateGradientColorTable(5, stops, red, green,blue, 255);
|
99 |
|
|
|
100 |
|
|
gStyle->SetTitleSize(0.02, "XYZ");
|
101 |
|
|
gStyle->SetTitleXOffset(1.3);
|
102 |
|
|
gStyle->SetTitleYOffset(1.5);
|
103 |
|
|
float stdmargin=gStyle->GetPadRightMargin();
|
104 |
|
|
gStyle->SetPadRightMargin(indentedmargin);
|
105 |
|
|
|
106 |
|
|
|
107 |
|
|
process_file(file1,stdmargin);
|
108 |
|
|
if(!ignoretwo) process_file(file2,stdmargin);
|
109 |
|
|
|
110 |
|
|
return 0;
|
111 |
|
|
}
|
112 |
|
|
|