ra4_macros
bede988c286599a3a84b77a4d788ac0a971e89f9
|
#include "utilities_macros_rohan.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 "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) |
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) |
void calc_chi2 | ( | TH1D * | histo, |
float & | chi2, | ||
int & | ndof, | ||
float & | pvalue, | ||
float & | average | ||
) |
Definition at line 830 of file utilities_macros_rohan.cpp.
void calc_chi2_diff | ( | TH1D * | histo1, |
TH1D * | histo2, | ||
float & | chi2, | ||
int & | ndof, | ||
float & | pvalue, | ||
float * | average | ||
) |
Definition at line 854 of file utilities_macros_rohan.cpp.
Referenced by main().
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 | ||
) |
Definition at line 978 of file utilities_macros_rohan.cpp.
References gsl_ran_gamma(), intGaus(), anonymous_namespace{make_rpv_datacard.cxx}::nbins, anonymous_namespace{kappa_variations.cxx}::nrep, and styles::setDefaultStyle().
Referenced by GammaToLogN13(), GammaToLogN2(), and main().
TString cuts2title | ( | TString | title | ) |
Definition at line 582 of file utilities_macros_rohan.cpp.
Referenced by main(), MakeGraph(), MakeGraphs(), makePlot(), MakePlots(), OverlayHists(), OverlayHistsmT(), plot_2D_distributions(), and plot_distributions().
void dump_event | ( | small_tree_full & | tree, |
int | entry | ||
) |
Definition at line 896 of file utilities_macros_rohan.cpp.
References small_tree::event(), small_tree_full::GetEntry(), dps::light_blue(), small_tree_full::mc_eta(), small_tree_full::mc_id(), small_tree_full::mc_mom(), small_tree_full::mc_phi(), small_tree_full::mc_pt(), dps::med_blue(), small_tree_full::ntruels(), small_tree_full::ntruleps(), small_tree_full::ntrumus(), small_tree_full::ntrutaush(), small_tree_full::ntrutausl(), ra4::penn_red(), dps::purple(), dps::red(), ra4::seal_brown(), ra4::sig_gold(), ra4::sig_teal(), dps::skype_green(), ra4::tar_heel_blue(), ra4::tcu_purple(), small_tree_full::tks_eta(), small_tree_full::tks_from_w(), small_tree_full::tks_id(), small_tree_full::tks_is_primary(), small_tree_full::tks_phi(), small_tree_full::tks_pt(), small_tree_full::tks_tru_id(), ra4::ucsb_blue(), ra4::ucsb_gold(), ra4::uf_orange(), and ra4::uo_green().
TString format_tag | ( | TString | tag | ) |
Definition at line 778 of file utilities_macros_rohan.cpp.
References sysfeats::bincut(), parse_card::file, sysfeats::push_back(), sfeats::sfeats(), sysfeats::size(), sysfeats::sysfeats(), anonymous_namespace{table_regions.cxx}::tag, and sysfeats::weight().
Referenced by invertcut(), main(), MakeGraph(), makePlot(), MakePlots(), OverlayHists(), OverlayHistsmT(), and PlotTurnOn().
long getYieldErr | ( | TChain & | tree, |
TString | cut, | ||
double & | yield, | ||
double & | uncertainty | ||
) |
Definition at line 887 of file utilities_macros_rohan.cpp.
Referenced by GetNEvents(), main(), and YieldsCut().
double gsl_ran_gamma | ( | const double | a, |
const double | b, | ||
TRandom3 & | rand | ||
) |
Definition at line 944 of file utilities_macros_rohan.cpp.
References efficiency_map::c.
Referenced by calcKappa(), and calcKappaRelUnc().
double intGaus | ( | double | mean, |
double | sigma, | ||
double | minX, | ||
double | maxX | ||
) |
Definition at line 937 of file utilities_macros_rohan.cpp.
Referenced by calcKappa(), and calcKappaRelUnc().
TString invertcut | ( | TString | cut | ) |
Definition at line 632 of file utilities_macros_rohan.cpp.
References hfeats::format_tag(), format_tag(), hfeats::hfeats(), anonymous_namespace{make_rpv_datacard.cxx}::nbins, pfeats::pfeats(), and anonymous_namespace{table_regions.cxx}::tag.
Referenced by main(), MakeGraph(), and MakeGraphs().
void plot_2D_distributions | ( | vector< sfeats > | Samples, |
vector< hfeats > | vars, | ||
TString | luminosity, | ||
TString | filetype, | ||
TString | namestyle, | ||
TString | dir | ||
) |
Definition at line 491 of file utilities_macros_rohan.cpp.
References cuts2title(), parse_card::file, rpv::luminosity, styles::nDivisions, and styles::setDefaultStyle().
Referenced by main().
void plot_distributions | ( | vector< sfeats > | Samples, |
vector< hfeats > | vars, | ||
TString | luminosity, | ||
TString | filetype, | ||
TString | namestyle, | ||
TString | dir, | ||
bool | doRatio | ||
) |
Definition at line 39 of file utilities_macros_rohan.cpp.
References cuts2title(), parse_card::file, rpv_bkg_syst::leg, rpv::luminosity, anonymous_namespace{make_rpv_datacard.cxx}::nbins, efficiency_map::num, and RoundNumber().