ra4_macros  bede988c286599a3a84b77a4d788ac0a971e89f9
Classes | Namespaces | Enumerations | Functions
utilities_macros.hpp File Reference
#include <vector>
#include "TString.h"
#include "TH1D.h"
#include "TRandom3.h"
#include "TChain.h"
#include "small_tree_full.hpp"

Go to the source code of this file.

Classes

struct  pfeats
 
class  hfeats
 
class  sfeats
 
class  sysfeats
 

Namespaces

 ra4
 
 dps
 

Enumerations

enum  {
  ra4::c_t1tttt = 2, ra4::c_tt_1l = 2000, ra4::c_tt_2l = 2006, ra4::c_wjets = 2001,
  ra4::c_singlet = kGreen+3, ra4::c_ttv = 2002, ra4::c_other = kBlue+4
}
 
enum  {
  dps::c_tt_1l = 2012, dps::c_tt_2l = 2011, dps::c_wjets = 2018, dps::c_singlet = 2015,
  dps::c_qcd = 2020, dps::c_other = 2019
}
 

Functions

void calc_chi2_diff (TH1D *histo1, TH1D *histo2, float &chi2, int &ndof, float &pvalue, float *average)
 
void calc_chi2 (TH1D *histo, float &chi2, int &ndof, float &pvalue, float &average)
 
void dump_event (small_tree_full &tree, int entry)
 
long getYieldErr (TChain &tree, TString cut, double &yield, double &uncertainty)
 
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)
 
void plot_2D_distributions (std::vector< sfeats > Samples, std::vector< hfeats > vars, TString luminosity, TString filetype, TString namestyle, TString dir)
 
TString cuts2title (TString title)
 
TString invertcut (TString cut)
 
TString format_tag (TString tag)
 
double gsl_ran_gamma (const double a, const double b, TRandom3 &rand)
 
double intGaus (double mean, double sigma, double minX, double maxX)
 
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)
 

Function Documentation

void calc_chi2 ( TH1D *  histo,
float &  chi2,
int &  ndof,
float &  pvalue,
float &  average 
)

Definition at line 922 of file utilities_macros.cpp.

void calc_chi2_diff ( TH1D *  histo1,
TH1D *  histo2,
float &  chi2,
int &  ndof,
float &  pvalue,
float *  average 
)

Definition at line 946 of file utilities_macros.cpp.

Referenced by main().

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 
)

Definition at line 1070 of file utilities_macros.cpp.

Referenced by GammaToLogN13(), GammaToLogN2(), and main().

TString cuts2title ( TString  title)
void dump_event ( small_tree_full tree,
int  entry 
)

Definition at line 988 of file utilities_macros.cpp.

float Efficiency ( float  den,
float  num,
float &  errup,
float &  errdown 
)

Definition at line 1174 of file utilities_macros.cpp.

TString format_tag ( TString  tag)
long getYieldErr ( TChain &  tree,
TString  cut,
double &  yield,
double &  uncertainty 
)

Definition at line 979 of file utilities_macros.cpp.

Referenced by GetNEvents(), main(), and YieldsCut().

double gsl_ran_gamma ( const double  a,
const double  b,
TRandom3 &  rand 
)

Definition at line 1036 of file utilities_macros.cpp.

Referenced by calcKappaRelUnc().

double intGaus ( double  mean,
double  sigma,
double  minX,
double  maxX 
)

Definition at line 1029 of file utilities_macros.cpp.

Referenced by calcKappaRelUnc().

TString invertcut ( TString  cut)

Definition at line 712 of file utilities_macros.cpp.

Referenced by main(), MakeGraph(), and MakeGraphs().

void plot_2D_distributions ( std::vector< sfeats Samples,
std::vector< hfeats vars,
TString  luminosity,
TString  filetype,
TString  namestyle,
TString  dir 
)

Definition at line 539 of file utilities_macros.cpp.

Referenced by main().

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 
)