9 |
|
#include "Modules/setTDRStyle.C" |
10 |
|
#include "Modules/Setup.C" |
11 |
|
//#include "Modules/Poisson_Calculator.C" |
12 |
+ |
#include "Modules/JSON/JSONSampleLoader.C" |
13 |
|
#include "Modules/ActiveSamples.C" |
14 |
|
//#include "Modules/PeakFinder.C" |
15 |
|
//#include "Modules/UpperLimitsWithShape.C" |
51 |
|
void usage(int passed=0 ) { |
52 |
|
std::cout << "USAGE : " << std::endl; |
53 |
|
std::cout << "You can use different options when running this program : " << std::endl; |
54 |
+ |
std::cout << "\033[1;34m Full (f)\033[0m \t\t Run the FULL analysis including all systematics etc. " << std::endl; |
55 |
|
std::cout << std::endl; |
56 |
|
std::cout << "\033[1;34m all\033[0m \t\t All processes of the standard workflow" << std::endl; |
57 |
|
std::cout << "\033[1;34m png\033[0m \t\t Save all plots as pngs (also available: --pdf, --root, --eps, --C) standard: png&pdf" << std::endl; |
72 |
|
int saveRoot=true; |
73 |
|
int savepng=true; |
74 |
|
int saveeps=false; |
75 |
+ |
int do_Full=false; |
76 |
|
|
77 |
|
std::string directory=""; |
78 |
|
int option_iterator; |
91 |
|
{"pdf", no_argument, &savepdf,1}, |
92 |
|
{"root", no_argument, &saveRoot,1}, |
93 |
|
{"C", no_argument, &saveC,1}, |
94 |
+ |
{"full", no_argument, &do_Full,1}, |
95 |
|
/* The following options store values.*/ |
96 |
|
{"dir", required_argument, 0, 'd'}, |
97 |
|
{0, 0, 0, 0} |
98 |
|
}; |
99 |
|
int option_index = 0; |
100 |
< |
option_iterator = getopt_long(argc, argv, "d:",long_options, &option_index); |
100 |
> |
option_iterator = getopt_long(argc, argv, "d:f",long_options, &option_index); |
101 |
|
if(option_iterator == -1) moreoptions=false; |
102 |
|
else { |
103 |
|
option_counter++; |
115 |
|
directory=(std::string)optarg; |
116 |
|
std::cout<<"Option directory was passed with argument " << optarg << std::endl; |
117 |
|
break; |
118 |
+ |
case 'f': |
119 |
+ |
do_Full=true; |
120 |
+ |
break; |
121 |
|
case '?': |
122 |
|
usage(option_iterator); |
123 |
|
break; |
132 |
|
|
133 |
|
PlottingSetup::publicmode=true; // suppressing the whole JZB header |
134 |
|
|
128 |
– |
|
135 |
|
///----------------------------------- BELOW THIS LINE: NO MORE OPTIONS BUT ACTUAL FUNCTION CALLS! --------------------------------------------------------- |
136 |
|
gROOT->SetStyle("Plain"); |
137 |
|
bool do_fat_line=false; // if you want to have HistLineWidth=1 and FuncWidth=1 as it was before instead of 2 |
144 |
|
PlottingSetup::RestrictToMassPeak=true; |
145 |
|
|
146 |
|
//define_Zb_samples(showList,allsamples,signalsamples,scansample,raresample,systsamples,qcdsamples); |
147 |
+ |
IsZbAnalysis=true; |
148 |
+ |
IsWZAnalysis=false; |
149 |
+ |
IsJZBAnalysis=false; |
150 |
|
write_warning(__FUNCTION__,"Need to adapt sample collection!"); |
142 |
– |
write_warning(__FUNCTION__,"Where the hell are the b efficiency corrections?!"); |
151 |
|
define_samples(showList,allsamples,signalsamples,scansample,raresample,systsamples,qcdsamples,comparesamples); |
152 |
|
setlumi(luminosity); |
153 |
< |
setessentialcut(essential);//this sets the essential cut; this one is used in the draw command so it is AUTOMATICALLY applied everywhere. IMPORTANT: Do NOT store weights here! |
153 |
> |
setessentialcut(essential&&TCut("id1==id2"));//this sets the essential cut; this one is used in the draw command so it is AUTOMATICALLY applied everywhere. IMPORTANT: Do NOT store weights here! |
154 |
|
stringstream resultsummary; |
155 |
|
|
156 |
|
do_png(savepng); |
165 |
|
|
166 |
|
|
167 |
|
|
160 |
– |
TCut bTagWeight=TCut("((EventFlavor!=5&&EventFlavor!=4)+(EventFlavor==5||EventFlavor==4)*(((Zb30_bTagProbCSVBP[0]>0.15&&Zb30_bTagProbCSVBP[0]<0.95)*(-0.113472343605*Zb30_bTagProbCSVBP[0] + 1.04926963159)) + ((Zb30_bTagProbCSVBP[0]>1.2&&Zb30_bTagProbCSVBP[0]<20.0)*(0.00066342906116*Zb30_bTagProbCSVBP[0] + 0.93334455507)) + (Zb30_bTagProbCSVBP[0]<0.15||Zb30_bTagProbCSVBP[0]>20) + (Zb30_bTagProbCSVBP[0]>0.95&&Zb30_bTagProbCSVBP[0]<1.2)))"); |
161 |
– |
|
162 |
– |
cutWeight=TCut("(weight*(weight<1000)*(is_data+(!is_data)*((id1==id2&&id1==0)*0.95+(id1==id2&&id1==1)*0.88+(id1!=id2)*0.92)))"*bTagWeight); |
163 |
– |
|
168 |
|
write_warning(__FUNCTION__,"Everything missing so far goes here: "); |
169 |
|
cout << " Still need to carry out cross - checks" << endl; |
170 |
|
cout << " Still need to define errors in final plot " << endl; |
167 |
– |
cout << " Still need to make PU cut " << endl; |
171 |
|
|
172 |
|
|
173 |
< |
do_basic_ZB_analysis(); |
173 |
> |
do_basic_ZB_analysis(do_Full); |
174 |
|
return 0; |
175 |
|
} |
176 |
|
|