1 |
auterman |
1.1 |
#ifndef HANDLEHISTS
|
2 |
|
|
#define HANDLEHISTS
|
3 |
|
|
|
4 |
|
|
#include <string>
|
5 |
|
|
#include <vector>
|
6 |
|
|
#include <map>
|
7 |
|
|
|
8 |
|
|
class TH1;
|
9 |
|
|
class TGraph;
|
10 |
|
|
class ConfigFile;
|
11 |
|
|
|
12 |
|
|
class handleHists
|
13 |
|
|
{
|
14 |
|
|
public:
|
15 |
|
|
handleHists( ConfigFile* );
|
16 |
|
|
~handleHists();
|
17 |
|
|
|
18 |
|
|
void PlotStackedBackground(const std::string out);
|
19 |
|
|
void PlotAllSystematics(const std::string out);
|
20 |
|
|
void PlotHistograms(const std::string out);
|
21 |
|
|
void Print();
|
22 |
|
|
|
23 |
|
|
private:
|
24 |
|
|
TH1 * GetHist(const std::string file, const std::string hist, const std::string treename="", const std::string uncertainty="", const std::string direction="");
|
25 |
|
|
TH1 * GetSyst(const std::string, const TH1*h1, const TH1*h2=0, const TH1*h3=0);
|
26 |
|
|
TGraph * MakeBand(const TH1*h1, const TH1*h2);
|
27 |
|
|
|
28 |
|
|
std::vector<TH1*> _qcd_hists;
|
29 |
|
|
std::vector<TH1*> _ttbar_hists;
|
30 |
|
|
std::vector<TH1*> _znunu_hists;
|
31 |
|
|
std::vector<TH1*> _signal_hists;
|
32 |
|
|
std::vector<TH1*> _data_hists;
|
33 |
|
|
|
34 |
|
|
std::map<const TH1*, std::vector<TH1*> > _syst_up_corr; //uncertainties for the
|
35 |
|
|
std::map<const TH1*, std::vector<TH1*> > _syst_dn_corr; //histogram "key", e.g.
|
36 |
|
|
std::map<const TH1*, std::vector<TH1*> > _syst_up_uncorr; //_backgd_hists[0]
|
37 |
|
|
std::map<const TH1*, std::vector<TH1*> > _syst_dn_uncorr;
|
38 |
|
|
|
39 |
|
|
std::string ndata, nsignal, nznunu, nttbar, nqcd;
|
40 |
|
|
std::vector<std::string> vars, corr_unc, uncorr_unc;
|
41 |
|
|
int _plotindex; //internal counter to make internal hist names unique
|
42 |
|
|
|
43 |
|
|
bool _plotSystematics; //switch to plot all systematic uncertainties
|
44 |
|
|
bool _showSignalBand; //switch to show the signal uncert
|
45 |
|
|
bool _showDiff;
|
46 |
|
|
double _SumOfDiffs;
|
47 |
|
|
};
|
48 |
|
|
|
49 |
|
|
#endif
|