50 |
|
void usage(int passed=0 ) { |
51 |
|
std::cout << "USAGE : " << std::endl; |
52 |
|
std::cout << "You can use different options when running this program : " << std::endl; |
53 |
+ |
std::cout << "\033[1;34m inclusive (i)\033[0m \t\t Run the algorithm with the inclusive (all jets) selection" << std::endl; |
54 |
+ |
std::cout << "\033[1;34m exclusive (e)\033[0m \t\t Run the algorithm with the exclusive (b-jets only) selection" << 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_inclusive=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 |
+ |
{"inclusive", no_argument, &do_inclusive,1}, |
95 |
+ |
{"exclusive", no_argument, &do_inclusive,0}, |
96 |
|
/* The following options store values.*/ |
97 |
|
{"dir", required_argument, 0, 'd'}, |
98 |
|
{0, 0, 0, 0} |
99 |
|
}; |
100 |
|
int option_index = 0; |
101 |
< |
option_iterator = getopt_long(argc, argv, "d:",long_options, &option_index); |
101 |
> |
option_iterator = getopt_long(argc, argv, "d:ei",long_options, &option_index); |
102 |
|
if(option_iterator == -1) moreoptions=false; |
103 |
|
else { |
104 |
|
option_counter++; |
116 |
|
directory=(std::string)optarg; |
117 |
|
std::cout<<"Option directory was passed with argument " << optarg << std::endl; |
118 |
|
break; |
119 |
+ |
case 'e': |
120 |
+ |
do_inclusive=false; |
121 |
+ |
break; |
122 |
+ |
case 'i': |
123 |
+ |
do_inclusive=true; |
124 |
+ |
break; |
125 |
|
case '?': |
126 |
|
usage(option_iterator); |
127 |
|
break; |
136 |
|
|
137 |
|
PlottingSetup::publicmode=true; // suppressing the whole JZB header |
138 |
|
|
128 |
– |
|
139 |
|
///----------------------------------- BELOW THIS LINE: NO MORE OPTIONS BUT ACTUAL FUNCTION CALLS! --------------------------------------------------------- |
140 |
|
gROOT->SetStyle("Plain"); |
141 |
|
bool do_fat_line=false; // if you want to have HistLineWidth=1 and FuncWidth=1 as it was before instead of 2 |
152 |
|
write_warning(__FUNCTION__,"Where the hell are the b efficiency corrections?!"); |
153 |
|
define_samples(showList,allsamples,signalsamples,scansample,raresample,systsamples,qcdsamples,comparesamples); |
154 |
|
setlumi(luminosity); |
155 |
< |
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! |
155 |
> |
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! |
156 |
|
stringstream resultsummary; |
157 |
|
|
158 |
|
do_png(savepng); |
167 |
|
|
168 |
|
|
169 |
|
|
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 |
– |
|
170 |
|
write_warning(__FUNCTION__,"Everything missing so far goes here: "); |
171 |
|
cout << " Still need to carry out cross - checks" << endl; |
172 |
|
cout << " Still need to define errors in final plot " << endl; |
167 |
– |
cout << " Still need to make PU cut " << endl; |
173 |
|
|
174 |
|
|
175 |
< |
do_basic_ZB_analysis(); |
175 |
> |
do_basic_ZB_analysis(do_inclusive); |
176 |
|
return 0; |
177 |
|
} |
178 |
|
|