ra4_macros  bede988c286599a3a84b77a4d788ac0a971e89f9
Namespaces | Functions
utilities_macros.cpp File Reference
#include "utilities_macros.hpp"
#include <cmath>
#include <vector>
#include <iostream>
#include <string>
#include <stdexcept>
#include <unistd.h>
#include "TChain.h"
#include "TH1D.h"
#include "TH2D.h"
#include "TCanvas.h"
#include "TLegend.h"
#include "TLatex.h"
#include "TLine.h"
#include "TString.h"
#include "TColor.h"
#include "TMath.h"
#include "TRandom3.h"
#include "TStyle.h"
#include "TEfficiency.h"
#include "TSystem.h"
#include "TDirectory.h"
#include "TROOT.h"
#include "styles.hpp"
#include "utilities.hpp"

Go to the source code of this file.

Namespaces

 ra4
 
 dps
 

Functions

void plot_distributions (vector< sfeats > Samples, vector< hfeats > vars, TString luminosity, TString filetype, TString namestyle, TString dir, bool doRatio, bool showcuts)
 
void plot_2D_distributions (vector< sfeats > Samples, vector< hfeats > vars, TString luminosity, TString filetype, TString namestyle, TString dir)
 
TString cuts2title (TString title)
 
TString invertcut (TString cut)
 
TString format_tag (TString tag)
 
void calc_chi2 (TH1D *histo, float &chi2, int &ndof, float &pvalue, float &average)
 
void calc_chi2_diff (TH1D *histo1, TH1D *histo2, float &chi2, int &ndof, float &pvalue, float *average)
 
long getYieldErr (TChain &tree, TString cut, double &yield, double &uncertainty)
 
void dump_event (small_tree_full &tree, int entry)
 
TColor ra4::ucsb_blue (2000, 1/255., 57/255., 166/255.)
 
TColor ra4::ucsb_gold (2001, 255/255., 200/255., 47/255)
 
TColor ra4::penn_red (2002, 149/255., 0/255., 26/255.)
 
TColor ra4::uf_orange (2003, 255/255., 74/255., 0/255.)
 
TColor ra4::uo_green (2004, 0/255., 79/255., 39/255.)
 
TColor ra4::tcu_purple (2005, 52/255., 42/255., 123/255.)
 
TColor ra4::tar_heel_blue (2006, 86/255., 160/255., 211/255.)
 
TColor ra4::sig_teal (2007, 96/255., 159/255., 128/255.)
 
TColor ra4::sig_gold (2008, 215/255., 162/255., 50/255.)
 
TColor ra4::seal_brown (2010, 89/255., 38/255., 11/255.)
 
TColor dps::light_blue (2011, 153/255., 220/255., 255/255.)
 
TColor dps::med_blue (2012, 1/255., 148/255., 218/255.)
 
TColor dps::red (2015, 250/255., 96/255., 1/255.)
 
TColor dps::skype_green (2018, 9/255., 186/255., 1/255.)
 
TColor dps::purple (2019, 183/255., 66/255., 176/255.)
 
TColor dps::ucsb_gold (2020, 255/255., 200/255., 47/255)
 
double intGaus (double mean, double sigma, double minX, double maxX)
 
double gsl_ran_gamma (const double a, const double b, TRandom3 &rand)
 
double calcKappa (vector< vector< float > > &entries, vector< vector< float > > &weights, vector< float > &powers, float &mSigma, float &pSigma, bool do_data, bool verbose, bool do_plot, int nrep)
 
float Efficiency (float num, float den, 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.

double calcKappa ( vector< vector< float > > &  entries,
vector< vector< float > > &  weights,
vector< float > &  powers,
float &  mSigma,
float &  pSigma,
bool  do_data,
bool  verbose,
bool  do_plot,
int  nrep 
)
TString cuts2title ( TString  title)

Definition at line 640 of file utilities_macros.cpp.

Referenced by plot_2D_distributions(), and plot_distributions().

void dump_event ( small_tree_full tree,
int  entry 
)
float Efficiency ( float  num,
float  den,
float &  errup,
float &  errdown 
)

Definition at line 1174 of file utilities_macros.cpp.

TString format_tag ( TString  tag)

Definition at line 870 of file utilities_macros.cpp.

References hfeats::tag.

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

Definition at line 979 of file utilities_macros.cpp.

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

Definition at line 1036 of file utilities_macros.cpp.

References efficiency_map::c.

Referenced by calcKappa().

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

Definition at line 1029 of file utilities_macros.cpp.

Referenced by calcKappa().

TString invertcut ( TString  cut)

Definition at line 712 of file utilities_macros.cpp.

void plot_2D_distributions ( vector< sfeats Samples,
vector< hfeats vars,
TString  luminosity,
TString  filetype,
TString  namestyle,
TString  dir 
)
void plot_distributions ( vector< sfeats Samples,
vector< hfeats vars,
TString  luminosity,
TString  filetype,
TString  namestyle,
TString  dir,
bool  doRatio,
bool  showcuts 
)