#include <iostream>
#include <fstream>
#include <vector>
#include <string>
#include "TString.h"
#include "TROOT.h"
#include "TStyle.h"
#include "TH1F.h"
#include "TFile.h"
#include "TCanvas.h"
#include "TLegend.h"
Go to the source code of this file.
|
void | PlotCombiner () |
|
void | plotMaker (TString histoName, TString typeOfplot, vector< TString > file, vector< TString > type, vector< double > weight, TString xtitle, Int_t NBins, Double_t min, Double_t max) |
|
Definition at line 81 of file PlotCombiner.cc.
References trackerHits::c, gather_cfg::cout, relativeConstraints::empty, MainPageGenerator::files, alignmentValidation::fname, i, input, j, geometryCSVtoXML::line, plotMaker(), AlCaHLTBitMon_QueryRunRegistry::string, w, and create_public_pileup_plots::weights.
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();
115 else if(ftype.Length()==3)
break;
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);
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);
void plotMaker(TString histoName, TString typeOfplot, vector< TString > file, vector< TString > type, vector< double > weight, TString xtitle)
static std::string const input
void plotMaker |
( |
TString |
histoName, |
|
|
TString |
typeOfplot, |
|
|
vector< TString > |
file, |
|
|
vector< TString > |
type, |
|
|
vector< double > |
weight, |
|
|
TString |
xtitle, |
|
|
Int_t |
NBins, |
|
|
Double_t |
min, |
|
|
Double_t |
max |
|
) |
| |
Definition at line 160 of file PlotCombiner.cc.
References trackerHits::c, f, h, i, and create_public_lumi_plots::leg.
166 gROOT->ProcessLine(
".L tdrstyle.C");
167 gROOT->ProcessLine(
"setTDRStyle()");
171 int fmax = (int)
file.size();
172 for (
int i=0;
i<fmax; ++
i) {
175 TH1F *
h = (TH1F*)
f.Get(histoName);
183 for (
int i=0;
i<fmax; ++
i) {
186 TH1F *
h = (TH1F*)
f.Get(histoName);
192 for (
int i=0;
i<fmax; ++
i) {
195 TH1F *
h = (TH1F*)
f.Get(histoName);
201 for (
int i=0;
i<fmax; ++
i) {
204 TH1F *
h = (TH1F*)
f.Get(histoName);
210 for (
int i=0;
i<fmax; ++
i) {
213 TH1F *
h = (TH1F*)
f.Get(histoName);
220 h_ewk.SetFillColor(3);
224 h_gj.SetFillColor(1);
228 h_bce.SetFillColor(2);
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");
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.