5 #ifndef H_UTILITIES_MACROS_ROHAN 6 #define H_UTILITIES_MACROS_ROHAN 45 pfeats(
const std::vector<int> &isamples,
const TString &icut =
"1",
const TString &itagname=
"");
47 std::vector<int> samples;
53 hfeats(TString ivarname,
int inbins,
float iminx,
float imaxx, std::vector<int> isamples,
54 TString ititle=
"", TString icuts=
"1",
float icut=-1, TString itagname=
"",
bool iskiplog=
false,
55 std::vector<double> inevents= std::vector<double>(1,-1.));
56 hfeats(TString ivarname,
int inbins,
float* ibinning, std::vector<int> isamples,
57 TString ititle=
"", TString icuts=
"1",
float icut=-1, TString itagname=
"",
bool iskiplog=
false,
58 std::vector<double> inevents= std::vector<double>(1,-1.));
59 hfeats(TString ivarnamex, TString ivarnamey,
int inbinsx,
float iminx,
float imaxx,
int inbinsy,
float iminy,
float imaxy, std::vector<int> isamples,
60 TString ititlex, TString ititley, TString icuts,
float icutx,
float icuty, TString itagname);
61 TString title, titlex, titley, varname, varnamex, varnamey,
tag, cuts, unit;
62 int nbins, nbinsx, nbinsy;
64 float minx, maxx, miny, maxy, cut, cutx, cuty, maxYaxis, maxRatio,
hline;
65 std::vector<int> samples;
68 std::vector<double> nevents;
78 sfeats(std::vector<TString> ifile, TString ilabel,
int icolor=1,
int istyle=1, TString icut=
"1",
79 TString samVariable=
"noPlot");
80 std::vector<TString>
file;
81 TString label, cut, factor,
tag;
83 bool isSig, doStack, isData, mcerr;
89 sysfeats(TString iname, TString ititle);
92 std::vector<TString> bincuts;
93 std::vector<double> weights;
94 void push_back(TString bincut,
double weight);
95 TString bincut(
unsigned i);
96 double weight(
unsigned i);
101 void calc_chi2_diff(TH1D *histo1, TH1D *histo2,
float &chi2,
int &ndof,
float &pvalue,
float *average);
102 void calc_chi2(TH1D *histo,
float &chi2,
int &ndof,
float &pvalue,
float &average);
104 long getYieldErr(TChain& tree, TString cut,
double& yield,
double& uncertainty);
107 TString filetype=
".eps", TString namestyle=
"LargeLabels", TString dir =
"1d",
bool doRatio=
false);
109 TString filetype, TString namestyle, TString dir);
113 double gsl_ran_gamma (
const double a,
const double b, TRandom3 &rand);
114 double intGaus(
double mean,
double sigma,
double minX,
double maxX);
118 double calcKappa(std::vector<std::vector<float> > &entries, std::vector<std::vector<float> > &weights,
119 std::vector<float> &powers,
float &mSigma,
float &pSigma,
bool do_data=
false,
120 bool verbose=
false,
bool do_plot=
false,
int nrep=100000);
121 float Efficiency(
float den,
float num,
float &errup,
float &errdown);
TString invertcut(TString cut)
void calc_chi2(TH1D *histo, float &chi2, int &ndof, float &pvalue, float &average)
double gsl_ran_gamma(const double a, const double b, TRandom3 &rand)
void dump_event(small_tree_full &tree, int entry)
long getYieldErr(TChain &tree, TString cut, double &yield, double &uncertainty)
TString format_tag(TString tag)
TString cuts2title(TString title)
double calcKappa(std::vector< std::vector< float > > &entries, std::vector< std::vector< float > > &weights, std::vector< float > &powers, float &mSigma, float &pSigma, bool do_data=false, bool verbose=false, bool do_plot=false, int nrep=100000)
float Efficiency(float den, float num, float &errup, float &errdown)
double intGaus(double mean, double sigma, double minX, double maxX)
void plot_2D_distributions(std::vector< sfeats > Samples, std::vector< hfeats > vars, TString luminosity, TString filetype, TString namestyle, TString dir)
void calc_chi2_diff(TH1D *histo1, TH1D *histo2, float &chi2, int &ndof, float &pvalue, float *average)
void plot_distributions(std::vector< sfeats > Samples, std::vector< hfeats > vars, TString luminosity="10", TString filetype=".eps", TString namestyle="LargeLabels", TString dir="1d", bool doRatio=false)