#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) |
|
◆ PlotCombiner()
Definition at line 81 of file PlotCombiner.cc.
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;
125 types.push_back(ftype);
126 double w =
fw.Atof();
135 std::cout <<
"File with name inputFile was not found" << std::endl;
140 if (typeOfplot ==
"wenu") {
141 cout <<
"wenu plot maker" << endl;
148 cout <<
"zee plot maker" << endl;
References HltBtagPostValidation_cff::c, gather_cfg::cout, relativeConstraints::empty, MainPageGenerator::files, alignmentValidation::fname, mps_fire::i, input, createfilelist::int, dqmiolumiharvest::j, mps_splice::line, plotMaker(), AlCaHLTBitMon_QueryRunRegistry::string, w, and HLT_2018_cff::weights.
◆ plotMaker()
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.
166 gROOT->ProcessLine(
".L tdrstyle.C");
167 gROOT->ProcessLine(
"setTDRStyle()");
172 for (
int i=0;
i<fmax; ++
i) {
183 for (
int i=0;
i<fmax; ++
i) {
192 for (
int i=0;
i<fmax; ++
i) {
201 for (
int i=0;
i<fmax; ++
i) {
210 for (
int i=0;
i<fmax; ++
i) {
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");
References HltBtagPostValidation_cff::c, f, FrontierConditions_GlobalTag_cff::file, HltBtagPostValidation_cff::histoName, mps_fire::i, createfilelist::int, SiStripPI::max, min(), SiStripSourceConfigP5_cff::NBins, and hgcalPlots::xtitle.
void plotMaker(TString histoName, TString typeOfplot, vector< TString > file, vector< TString > type, vector< double > weight, TString xtitle)