75 void plotMaker(TString histoName, TString typeOfplot,
76 vector<TString>
file, vector<TString>
type,
78 TString xtitle, Int_t
NBins, Double_t
min, Double_t
max);
84 ifstream
input(
"inputFiles");
86 TString typeOfplot =
"";
87 vector<TString> types;
88 vector<TString>
files;
91 if (input.is_open()) {
93 while (! input.eof()) {
94 getline(input, myline);
100 if (i==1) typeOfplot=
line;
106 int lineSize = (int) line.Length();
109 if(line[j] != empty) fname += line[
j];
114 if(line[j] != empty) ftype += line[
j];
115 else if(ftype.Length()==3)
break;
119 if(line[j] != empty) fw += line[
j];
120 else{
if(fw.Length()>0)
break;}
123 if (fname.Length() == 0)
break;
124 files.push_back(fname);
125 types.push_back(ftype);
126 double w = fw.Atof();
127 weights.push_back(w);
128 std::cout << fname <<
", " << ftype <<
", "<< w << std::endl;
135 std::cout <<
"File with name inputFile was not found" << std::endl;
140 if (typeOfplot ==
"wenu") {
141 cout <<
"wenu plot maker" << endl;
145 plotMaker(
"h_met", typeOfplot, files, types, weights,
"MET (GeV)", 100,0,100);
148 cout <<
"zee plot maker" << endl;
152 plotMaker(
"h_mee", typeOfplot, files, types, weights,
"M_{ee} (GeV)", 150,0,150);
161 vector<TString>
file, vector<TString>
type,
163 TString xtitle, Int_t
NBins, Double_t
min, Double_t
max)
166 gROOT->ProcessLine(
".L tdrstyle.C");
167 gROOT->ProcessLine(
"setTDRStyle()");
170 TH1F h_wenu(
"h_wenu",
"h_wenu", NBins, min, max);
171 int fmax = (int) file.size();
172 for (
int i=0;
i<fmax; ++
i) {
173 if (type[
i] ==
"sig" && weight[
i]>0) {
175 TH1F *
h = (TH1F*) f.Get(histoName);
176 h_wenu.Add(h, weight[i]);
182 TH1F h_qcd(
"h_qcd",
"h_qcd", NBins, min, max);
183 for (
int i=0;
i<fmax; ++
i) {
184 if (type[
i] ==
"qcd" && weight[
i]>0) {
186 TH1F *
h = (TH1F*) f.Get(histoName);
187 h_qcd.Add(h, weight[i]);
191 TH1F h_bce(
"h_bce",
"h_bce", NBins, min, max);
192 for (
int i=0;
i<fmax; ++
i) {
193 if (type[
i] ==
"bce" && weight[
i]>0) {
195 TH1F *
h = (TH1F*) f.Get(histoName);
196 h_bce.Add(h, weight[i]);
200 TH1F h_gj(
"h_gj",
"h_gj", NBins, min, max);
201 for (
int i=0;
i<fmax; ++
i) {
202 if (type[
i] ==
"gje" && weight[
i]>0) {
204 TH1F *
h = (TH1F*) f.Get(histoName);
205 h_gj.Add(h, weight[i]);
209 TH1F h_ewk(
"h_ewk",
"h_ewk", NBins, min, max);
210 for (
int i=0;
i<fmax; ++
i) {
211 if (type[
i] ==
"ewk" && weight[
i]>0) {
213 TH1F *
h = (TH1F*) f.Get(histoName);
214 h_ewk.Add(h, weight[i]);
220 h_ewk.SetFillColor(3);
224 h_gj.SetFillColor(1);
228 h_bce.SetFillColor(2);
230 TH1F h_tot(
"h_tot",
"h_tot", NBins, min, max);
233 h_wenu.SetLineColor(4); h_wenu.SetLineWidth(2);
236 h_tot.GetXaxis()->SetTitle(xtitle);
244 TLegend
leg(0.6,0.65,0.95,0.92);
245 if (wzsignal ==
"wenu")
246 leg.AddEntry(&h_wenu,
"W#rightarrow e#nu",
"l");
248 leg.AddEntry(&h_wenu,
"Z#rightarrow ee",
"l");
249 leg.AddEntry(&h_tot,
"Signal + Bkg",
"p");
250 leg.AddEntry(&h_bce,
"dijets",
"f");
251 leg.AddEntry(&h_gj,
"#gamma + jets",
"f");
252 leg.AddEntry(&h_ewk,
"EWK+t#bar t",
"f");
void plotMaker(TString histoName, TString typeOfplot, vector< TString > file, vector< TString > type, vector< double > weight, TString xtitle)
static std::string const input
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.