5 #ifndef H_UTILITIES_MACROS 6 #define H_UTILITIES_MACROS 44 pfeats(
const std::vector<int> &isamples,
const TString &icut =
"1",
const TString &itagname=
"");
52 hfeats(TString ivarname,
int inbins,
float iminx,
float imaxx, std::vector<int> isamples,
53 TString ititle=
"", TString icuts=
"1",
float icut=-1, TString itagname=
"",
bool iskiplog=
false,
54 std::vector<double> inevents= std::vector<double>(1,-1.));
55 hfeats(TString ivarname,
int inbins,
float* ibinning, std::vector<int> isamples,
56 TString ititle=
"", TString icuts=
"1",
float icut=-1, TString itagname=
"",
bool iskiplog=
false,
57 std::vector<double> inevents= std::vector<double>(1,-1.));
58 hfeats(TString ivarnamex, TString ivarnamey,
int inbinsx,
float iminx,
float imaxx,
int inbinsy,
float iminy,
float imaxy, std::vector<int> isamples,
59 TString ititlex, TString ititley, TString icuts,
float icutx,
float icuty, TString itagname);
60 TString title, titlex, titley, varname, varnamex,
varnamey,
tag, cuts, unit;
63 float minx, maxx,
miny, maxy, cut, cutx, cuty, maxYaxis, maxRatio;
79 sfeats(std::vector<TString> ifile, TString ilabel,
int icolor=1,
int istyle=1, TString icut=
"1",
80 TString samVariable=
"noPlot");
82 TString label, cut, factor,
tag;
84 bool isSig, doStack, isData,
mcerr, doBand;
90 sysfeats(TString iname, TString ititle);
95 void push_back(TString bincut,
double weight);
96 TString bincut(
unsigned i);
97 double weight(
unsigned i);
102 void calc_chi2_diff(TH1D *histo1, TH1D *histo2,
float &chi2,
int &ndof,
float &pvalue,
float *average);
103 void calc_chi2(TH1D *histo,
float &chi2,
int &ndof,
float &pvalue,
float &average);
105 long getYieldErr(TChain& tree, TString cut,
double& yield,
double& uncertainty);
108 TString filetype=
".eps", TString namestyle=
"LargeLabels", TString dir =
"1d",
109 bool doRatio=
false,
bool showcuts=
false);
111 TString filetype, TString namestyle, TString dir);
115 double gsl_ran_gamma (
const double a,
const double b, TRandom3 &rand);
116 double intGaus(
double mean,
double sigma,
double minX,
double maxX);
120 double calcKappa(std::vector<std::vector<float> > &entries, std::vector<std::vector<float> > &weights,
121 std::vector<float> &powers,
float &mSigma,
float &pSigma,
bool do_data=
false,
122 bool verbose=
false,
bool do_plot=
false,
int nrep=100000);
123 float Efficiency(
float den,
float num,
float &errup,
float &errdown);
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, bool showcuts=false)
std::vector< double > weights
long getYieldErr(TChain &tree, TString cut, double &yield, double &uncertainty)
std::vector< double > nevents
void dump_event(small_tree_full &tree, int entry)
TString cuts2title(TString title)
double intGaus(double mean, double sigma, double minX, double maxX)
TString format_tag(TString tag)
std::vector< int > samples
std::vector< TString > file
std::vector< int > samples
void calc_chi2(TH1D *histo, float &chi2, int &ndof, float &pvalue, float &average)
std::vector< TString > bincuts
float Efficiency(float den, float num, float &errup, float &errdown)
void calc_chi2_diff(TH1D *histo1, TH1D *histo2, float &chi2, int &ndof, float &pvalue, float *average)
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)
TString invertcut(TString cut)
void plot_2D_distributions(std::vector< sfeats > Samples, std::vector< hfeats > vars, TString luminosity, TString filetype, TString namestyle, TString dir)
double gsl_ran_gamma(const double a, const double b, TRandom3 &rand)