ra4_macros
bede988c286599a3a84b77a4d788ac0a971e89f9
|
#include <fstream>
#include <sstream>
#include <string>
#include <vector>
#include "gamma_params.hpp"
#include "small_tree_quick.hpp"
Go to the source code of this file.
Functions | |
void | GetCounts (small_tree_quick &tree, std::vector< GammaParams > &gp) |
void | CountsToGammas (double sumw, double sumw2, double sumw_backup, double sumw2_backup, double &nraw, double &weight) |
size_t | LookUpBin (small_tree_quick &tree) |
void | GetMCTotals (std::vector< GammaParams > &mc_gp, const std::vector< std::vector< GammaParams > > &bkg_gps) |
void | MockUpData (std::vector< double > &data, const std::vector< GammaParams > &sig_gp, const std::vector< std::vector< GammaParams > > &bkg_gps) |
double | sqr (double x) |
void | WriteFile (const std::vector< std::vector< GammaParams > > &bkg_gps, const std::vector< std::string > &bkg_names, const std::vector< GammaParams > &sig_gp, const std::vector< GammaParams > &mc_gp, const std::vector< double > &data_counts) |
void | GetGammaParameters (int &raw, double &weight, double sumw, double sumw2) |
void | GetBinMapping (size_t &nr1, std::vector< size_t > &r1_map, size_t &nr2, std::vector< size_t > &r2_map, size_t &nr3, std::vector< size_t > &r3_map, size_t &nr4, std::vector< size_t > &r4_map) |
void | GetOptions (int argc, char *argv[]) |
double | GetPred (const std::vector< double > &data, const std::vector< GammaParams > &mc_gp, const std::vector< GammaParams > &proc_gp, size_t ir1, size_t ir2, size_t ir3, size_t ir4) |
void | PrintGamma (std::ofstream &file, const std::vector< size_t > map, const std::string &name, size_t iregion, size_t nr1, size_t nr2, size_t nr3, size_t nr4, const std::vector< GammaParams > &gp, const std::vector< double > &preds, size_t iproc, size_t nbkgs) |
std::string | NoDecimal (double x) |
void | PrintSystematics (std::ofstream &file, size_t bkgs) |
void | RepLogN (std::ofstream &file, double val, size_t nbkgs) |
void | RepAsymLogN (std::ofstream &file, double minus, double plus, size_t nbkgs) |
std::string | Expand (std::string in, size_t size) |
template<typename T > | |
std::string | ToString (const T &x) |
void | GammaToLogN13 (std::ofstream &file, const std::vector< size_t > &map, size_t nr1, size_t nr2, size_t nr4, const std::vector< double > &counts, size_t nbkgs) |
void | GammaToLogN2 (std::ofstream &file, const std::vector< size_t > &map, size_t nr1, size_t nr2, size_t nr4, const std::vector< double > &counts, size_t nbkgs) |
void | GammaToLogN13 (std::ofstream &file, const std::vector< size_t > &map, size_t nr1, size_t nr2, size_t nr4, const std::vector< std::vector< GammaParams > > &gps) |
void | GammaToLogN2 (std::ofstream &file, const std::vector< size_t > &map, size_t nr1, size_t nr2, size_t nr4, const std::vector< std::vector< GammaParams > > &gps) |
void | PrintDebug (const std::vector< GammaParams > &gps, const std::string &name) |
void CountsToGammas | ( | double | sumw, |
double | sumw2, | ||
double | sumw_backup, | ||
double | sumw2_backup, | ||
double & | nraw, | ||
double & | weight | ||
) |
Definition at line 318 of file make_card.cxx.
Referenced by GetCounts().
std::string Expand | ( | std::string | in, |
size_t | size | ||
) |
Definition at line 946 of file make_card.cxx.
Referenced by GammaToLogN13(), GammaToLogN2(), and PrintGamma().
void GammaToLogN13 | ( | std::ofstream & | file, |
const std::vector< size_t > & | map, | ||
size_t | nr1, | ||
size_t | nr2, | ||
size_t | nr4, | ||
const std::vector< double > & | counts, | ||
size_t | nbkgs | ||
) |
Definition at line 953 of file make_card.cxx.
References calcKappa(), Expand(), ToString(), and anonymous_namespace{make_card.cxx}::verbose.
Referenced by ToString(), and WriteFile().
void GammaToLogN13 | ( | std::ofstream & | file, |
const std::vector< size_t > & | map, | ||
size_t | nr1, | ||
size_t | nr2, | ||
size_t | nr4, | ||
const std::vector< std::vector< GammaParams > > & | gps | ||
) |
Definition at line 1016 of file make_card.cxx.
References calcKappa(), Expand(), ToString(), and anonymous_namespace{make_card.cxx}::verbose.
void GammaToLogN2 | ( | std::ofstream & | file, |
const std::vector< size_t > & | map, | ||
size_t | nr1, | ||
size_t | nr2, | ||
size_t | nr4, | ||
const std::vector< double > & | counts, | ||
size_t | nbkgs | ||
) |
Definition at line 986 of file make_card.cxx.
References calcKappa(), Expand(), ToString(), and anonymous_namespace{make_card.cxx}::verbose.
Referenced by ToString(), and WriteFile().
void GammaToLogN2 | ( | std::ofstream & | file, |
const std::vector< size_t > & | map, | ||
size_t | nr1, | ||
size_t | nr2, | ||
size_t | nr4, | ||
const std::vector< std::vector< GammaParams > > & | gps | ||
) |
Definition at line 1053 of file make_card.cxx.
References calcKappa(), Expand(), ToString(), and anonymous_namespace{make_card.cxx}::verbose.
void GetBinMapping | ( | size_t & | nr1, |
std::vector< size_t > & | r1_map, | ||
size_t & | nr2, | ||
std::vector< size_t > & | r2_map, | ||
size_t & | nr3, | ||
std::vector< size_t > & | r3_map, | ||
size_t & | nr4, | ||
std::vector< size_t > & | r4_map | ||
) |
Definition at line 520 of file make_card.cxx.
References anonymous_namespace{make_card.cxx}::method.
Referenced by WriteFile().
void GetCounts | ( | small_tree_quick & | tree, |
std::vector< GammaParams > & | gp | ||
) |
Definition at line 266 of file make_card.cxx.
References CountsToGammas(), anonymous_namespace{make_card.cxx}::do_tk_veto, small_tree::GetEntries(), small_tree_quick::GetEntry(), small_tree::ht(), anonymous_namespace{make_card.cxx}::ht_min, Timer::Iterate(), LookUpBin(), anonymous_namespace{make_card.cxx}::lumi, anonymous_namespace{make_card.cxx}::mc_multiplier, small_tree::met(), anonymous_namespace{make_card.cxx}::met_min, anonymous_namespace{make_card.cxx}::method, anonymous_namespace{make_card.cxx}::nb_min, anonymous_namespace{make_rpv_datacard.cxx}::nbins, small_tree::nbm(), small_tree::nels(), small_tree::njets(), anonymous_namespace{make_card.cxx}::njets_min, small_tree::nmus(), small_tree_quick::ntks_chg_mini(), Timer::Start(), and small_tree::weight().
Referenced by main().
void GetGammaParameters | ( | int & | raw, |
double & | weight, | ||
double | sumw, | ||
double | sumw2 | ||
) |
void GetMCTotals | ( | std::vector< GammaParams > & | mc_gp, |
const std::vector< std::vector< GammaParams > > & | bkg_gps | ||
) |
Definition at line 493 of file make_card.cxx.
Referenced by main().
void GetOptions | ( | int | argc, |
char * | argv[] | ||
) |
Definition at line 129 of file make_card.cxx.
double GetPred | ( | const std::vector< double > & | data, |
const std::vector< GammaParams > & | mc_gp, | ||
const std::vector< GammaParams > & | proc_gp, | ||
size_t | ir1, | ||
size_t | ir2, | ||
size_t | ir3, | ||
size_t | ir4 | ||
) |
Definition at line 707 of file make_card.cxx.
References anonymous_namespace{make_card.cxx}::method, anonymous_namespace{make_card.cxx}::no_mc_kappa, and parse_card::pred.
Referenced by WriteFile().
size_t LookUpBin | ( | small_tree_quick & | tree | ) |
Definition at line 336 of file make_card.cxx.
References small_tree::met(), anonymous_namespace{make_card.cxx}::met_div, anonymous_namespace{make_card.cxx}::method, small_tree_quick::mj(), anonymous_namespace{make_card.cxx}::mj_div, small_tree::mt(), anonymous_namespace{make_card.cxx}::mt_div, anonymous_namespace{make_card.cxx}::nb_div, small_tree::nbm(), small_tree::njets(), and anonymous_namespace{make_card.cxx}::njets_div.
Referenced by GetCounts().
void MockUpData | ( | std::vector< double > & | data, |
const std::vector< GammaParams > & | sig_gp, | ||
const std::vector< std::vector< GammaParams > > & | bkg_gps | ||
) |
Definition at line 508 of file make_card.cxx.
References anonymous_namespace{make_card.cxx}::inject_signal.
Referenced by main().
std::string NoDecimal | ( | double | x | ) |
Definition at line 783 of file make_card.cxx.
References rpv_bkg_syst::fixed.
Referenced by WriteFile().
void PrintDebug | ( | const std::vector< GammaParams > & | gps, |
const std::string & | name | ||
) |
Definition at line 1086 of file make_card.cxx.
Referenced by main(), and ToString().
void PrintGamma | ( | std::ofstream & | file, |
const std::vector< size_t > | map, | ||
const std::string & | name, | ||
size_t | iregion, | ||
size_t | nr1, | ||
size_t | nr2, | ||
size_t | nr3, | ||
size_t | nr4, | ||
const std::vector< GammaParams > & | gp, | ||
const std::vector< double > & | preds, | ||
size_t | iproc, | ||
size_t | nbkgs | ||
) |
Definition at line 745 of file make_card.cxx.
References Expand(), GetGammaParameters(), and ToString().
Referenced by WriteFile().
void PrintSystematics | ( | std::ofstream & | file, |
size_t | bkgs | ||
) |
Definition at line 796 of file make_card.cxx.
References anonymous_namespace{make_card.cxx}::lumi, anonymous_namespace{make_card.cxx}::mc_multiplier, anonymous_namespace{make_card.cxx}::method, RepAsymLogN(), and RepLogN().
Referenced by WriteFile().
void RepAsymLogN | ( | std::ofstream & | file, |
double | minus, | ||
double | plus, | ||
size_t | nbkgs | ||
) |
Definition at line 939 of file make_card.cxx.
References ToString().
Referenced by PrintSystematics().
void RepLogN | ( | std::ofstream & | file, |
double | val, | ||
size_t | nbkgs | ||
) |
Definition at line 932 of file make_card.cxx.
Referenced by PrintSystematics().
double sqr | ( | double | x | ) |
Definition at line 562 of file make_card.cxx.
std::string ToString | ( | const T & | x | ) |
Definition at line 71 of file make_card.hpp.
References parse_card::file, GammaToLogN13(), GammaToLogN2(), and PrintDebug().
Referenced by GammaToLogN13(), GammaToLogN2(), PrintGamma(), and RepAsymLogN().
void WriteFile | ( | const std::vector< std::vector< GammaParams > > & | bkg_gps, |
const std::vector< std::string > & | bkg_names, | ||
const std::vector< GammaParams > & | sig_gp, | ||
const std::vector< GammaParams > & | mc_gp, | ||
const std::vector< double > & | data_counts | ||
) |
Definition at line 566 of file make_card.cxx.
References anonymous_namespace{make_card.cxx}::do_tk_veto, parse_card::file, GammaToLogN13(), GammaToLogN2(), GetBinMapping(), GetPred(), anonymous_namespace{make_card.cxx}::ht_min, anonymous_namespace{make_card.cxx}::inject_signal, parse_card::kappa, anonymous_namespace{make_card.cxx}::lumi, anonymous_namespace{make_card.cxx}::mc_multiplier, anonymous_namespace{make_card.cxx}::met_div, anonymous_namespace{make_card.cxx}::met_min, anonymous_namespace{make_card.cxx}::method, anonymous_namespace{make_card.cxx}::mgluino, anonymous_namespace{make_card.cxx}::mj_div, anonymous_namespace{make_card.cxx}::mj_min, anonymous_namespace{make_card.cxx}::mlsp, anonymous_namespace{make_card.cxx}::mt_div, anonymous_namespace{make_card.cxx}::mt_min, anonymous_namespace{make_card.cxx}::nb_div, anonymous_namespace{make_card.cxx}::nb_min, anonymous_namespace{make_card.cxx}::njets_div, anonymous_namespace{make_card.cxx}::njets_min, anonymous_namespace{make_card.cxx}::no_mc_kappa, anonymous_namespace{make_card.cxx}::no_systematics, NoDecimal(), anonymous_namespace{make_card.cxx}::ntuple_date, PrintGamma(), PrintSystematics(), anonymous_namespace{make_card.cxx}::set_ht, anonymous_namespace{make_card.cxx}::set_inject_signal, anonymous_namespace{make_card.cxx}::set_lumi, anonymous_namespace{make_card.cxx}::set_masses, anonymous_namespace{make_card.cxx}::set_mc_multiplier, anonymous_namespace{make_card.cxx}::set_met, anonymous_namespace{make_card.cxx}::set_method, anonymous_namespace{make_card.cxx}::set_mj, anonymous_namespace{make_card.cxx}::set_mt, anonymous_namespace{make_card.cxx}::set_nb, anonymous_namespace{make_card.cxx}::set_njets, and anonymous_namespace{make_card.cxx}::set_ntuple_date.
Referenced by main().