ra4_stats
0341147a0dc35f80f4e12c6003afb76a38e2ed6e
|
#include <string>
#include <vector>
#include <limits>
#include "TH1D.h"
#include "TGraphErrors.h"
#include "RooWorkspace.h"
#include "RooFitResult.h"
#include "RooMinuit.h"
Go to the source code of this file.
Functions | |
void | GetOptionsExtract (int argc, char *argv[]) |
void | RunFit (const std::string &path) |
std::string | GetSignalName (const RooWorkspace &w) |
std::string | TexFriendly (const std::string &s) |
void | PrintDebug (RooWorkspace &w, const RooFitResult &f, const std::string &file_name) |
void | PrintTable (RooWorkspace &w, const RooFitResult &f, const std::string &file_name) |
double | GetMCYield (const RooWorkspace &w, const std::string &bin_name, const std::string &prc_name) |
double | GetMCTotal (const RooWorkspace &w, const std::string &bin_name) |
double | GetMCTotalErr (RooWorkspace &w, const RooFitResult &f, const std::string &bin_name) |
double | GetBkgPred (const RooWorkspace &w, const std::string &bin_name) |
double | GetBkgPredErr (RooWorkspace &w, const RooFitResult &f, const std::string &bin_name) |
double | GetSigPred (const RooWorkspace &w, const std::string &bin_name) |
double | GetSigPredErr (RooWorkspace &w, const RooFitResult &f, const std::string &bin_name) |
double | GetTotPred (const RooWorkspace &w, const std::string &bin_name) |
double | GetTotPredErr (RooWorkspace &w, const RooFitResult &f, const std::string &bin_name) |
double | GetObserved (const RooWorkspace &w, const std::string &bin_name) |
double | GetKappaNoSys (const RooWorkspace &w, const std::string &bin_name) |
double | GetKappaNoSysErr (RooWorkspace &w, const RooFitResult &f, const std::string &bin_name) |
double | GetKappaSys (const RooWorkspace &w, const std::string &bin_name) |
double | GetKappaSysErr (RooWorkspace &w, const RooFitResult &f, const std::string &bin_name) |
double | GetLambda (const RooWorkspace &w, const std::string &bin_name) |
double | GetLambdaErr (RooWorkspace &w, const RooFitResult &f, const std::string &bin_name) |
RooRealVar * | SetVariables (RooWorkspace &w, const RooFitResult &f) |
void | MakeYieldPlot (RooWorkspace &w, const RooFitResult &f, const std::string &file_name, bool linear) |
std::vector< std::string > | GetVarNames (const RooWorkspace &w) |
void | ManuallyAddBins (const RooWorkspace &w, std::vector< std::string > &names) |
std::vector< std::string > | GetFuncNames (const RooWorkspace &w) |
std::vector< std::string > | GetBinNames (const RooWorkspace &w, bool r4_only=false) |
std::vector< std::string > | GetPlainBinNames (const RooWorkspace &w) |
std::vector< std::string > | GetProcessNames (const RooWorkspace &w) |
std::vector< std::vector< double > > | GetComponentYields (const RooWorkspace &w, const std::vector< std::string > &bin_names, const std::vector< std::string > &process_names) |
std::vector< TH1D > | MakeBackgroundHistos (const std::vector< std::vector< double > > &component_yields, const std::vector< std::string > &bin_names, const std::vector< std::string > &prc_names) |
TH1D | MakeExpSignal (RooWorkspace &w, const std::vector< std::string > &bin_names) |
TH1D | MakeTotalHisto (RooWorkspace &w, const RooFitResult &f, const std::vector< std::string > &bin_names) |
TH1D | MakeObserved (const RooWorkspace &w, const std::vector< std::string > &bin_names) |
void | SetBounds (TH1D &a, TH1D &b, std::vector< TH1D > &cs) |
double | GetMaximum (const TH1D &a, const TH1D &b, const std::vector< TH1D > &cs) |
double | GetMinimum (const TH1D &a, const TH1D &b, const std::vector< TH1D > &cs) |
double | GetMaximum (const TH1D &h, double y=std::numeric_limits< double >::max()) |
double | GetMinimum (const TH1D &h, double y=-std::numeric_limits< double >::max()) |
TGraphErrors | MakeErrorBand (const TH1D &h) |
TGraphErrors | MakeRatio (const TH1D &num, const TH1D &den) |
std::string | StripPath (const std::string &full_path) |
void | MakeCorrectionPlot (RooWorkspace &w, const RooFitResult &f, const std::string &file_name) |
void | MakeCovarianceMatrix (RooWorkspace &w, const RooFitResult &f, std::string covar_file_name) |
std::string | PrettyBinName (std::string name) |
double | GetError (const RooAbsReal &var, const RooFitResult &f) |
std::vector<std::string> GetBinNames | ( | const RooWorkspace & | w, |
bool | r4_only = false |
||
) |
Definition at line 832 of file extract_yields.cxx.
References Append(), Contains(), GetFuncNames(), and scan_aggregate::name.
Referenced by MakeCorrectionPlot(), and MakeYieldPlot().
double GetBkgPred | ( | const RooWorkspace & | w, |
const std::string & | bin_name | ||
) |
Definition at line 353 of file extract_yields.cxx.
double GetBkgPredErr | ( | RooWorkspace & | w, |
const RooFitResult & | f, | ||
const std::string & | bin_name | ||
) |
Definition at line 373 of file extract_yields.cxx.
References Contains(), GetError(), and scan_aggregate::name.
Referenced by PrintTable().
std::vector<std::vector<double> > GetComponentYields | ( | const RooWorkspace & | w, |
const std::vector< std::string > & | bin_names, | ||
const std::vector< std::string > & | process_names | ||
) |
Definition at line 882 of file extract_yields.cxx.
Referenced by MakeYieldPlot().
double GetError | ( | const RooAbsReal & | var, |
const RooFitResult & | f | ||
) |
Definition at line 1351 of file extract_yields.cxx.
std::vector<std::string> GetFuncNames | ( | const RooWorkspace & | w | ) |
Definition at line 796 of file extract_yields.cxx.
References Append(), and scan_aggregate::name.
Referenced by GetBinNames(), GetPlainBinNames(), PrintDebug(), and SetVariables().
double GetKappaNoSys | ( | const RooWorkspace & | w, |
const std::string & | bin_name | ||
) |
Definition at line 493 of file extract_yields.cxx.
References Contains(), and scan_aggregate::name.
Referenced by PrintTable().
double GetKappaNoSysErr | ( | RooWorkspace & | w, |
const RooFitResult & | f, | ||
const std::string & | bin_name | ||
) |
Definition at line 513 of file extract_yields.cxx.
References Contains(), GetError(), and scan_aggregate::name.
Referenced by PrintTable().
double GetKappaSys | ( | const RooWorkspace & | w, |
const std::string & | bin_name | ||
) |
Definition at line 534 of file extract_yields.cxx.
References Contains(), and scan_aggregate::name.
Referenced by PrintTable().
double GetKappaSysErr | ( | RooWorkspace & | w, |
const RooFitResult & | f, | ||
const std::string & | bin_name | ||
) |
Definition at line 554 of file extract_yields.cxx.
References Contains(), GetError(), and scan_aggregate::name.
Referenced by PrintTable().
double GetLambda | ( | const RooWorkspace & | w, |
const std::string & | bin_name | ||
) |
Definition at line 575 of file extract_yields.cxx.
References Contains(), and scan_aggregate::name.
Referenced by PrintTable().
double GetLambdaErr | ( | RooWorkspace & | w, |
const RooFitResult & | f, | ||
const std::string & | bin_name | ||
) |
Definition at line 595 of file extract_yields.cxx.
References Contains(), GetError(), and scan_aggregate::name.
Referenced by PrintTable().
double GetMaximum | ( | const TH1D & | a, |
const TH1D & | b, | ||
const std::vector< TH1D > & | cs | ||
) |
Definition at line 1055 of file extract_yields.cxx.
References plot_variations::c.
Referenced by SetBounds(), and styles::testGlobalStyle().
double GetMaximum | ( | const TH1D & | h, |
double | y = std::numeric_limits< double >::max() |
||
) |
Definition at line 1081 of file extract_yields.cxx.
References plot_variations::y.
double GetMCTotal | ( | const RooWorkspace & | w, |
const std::string & | bin_name | ||
) |
Definition at line 312 of file extract_yields.cxx.
References Contains(), and scan_aggregate::name.
Referenced by PrintTable().
double GetMCTotalErr | ( | RooWorkspace & | w, |
const RooFitResult & | f, | ||
const std::string & | bin_name | ||
) |
Definition at line 332 of file extract_yields.cxx.
References Contains(), GetError(), and scan_aggregate::name.
Referenced by PrintTable().
double GetMCYield | ( | const RooWorkspace & | w, |
const std::string & | bin_name, | ||
const std::string & | prc_name | ||
) |
Definition at line 291 of file extract_yields.cxx.
References Contains(), and scan_aggregate::name.
Referenced by MakeExpSignal(), and PrintTable().
double GetMinimum | ( | const TH1D & | a, |
const TH1D & | b, | ||
const std::vector< TH1D > & | cs | ||
) |
Definition at line 1068 of file extract_yields.cxx.
References plot_variations::c.
Referenced by SetBounds().
double GetMinimum | ( | const TH1D & | h, |
double | y = -std::numeric_limits< double >::max() |
||
) |
Definition at line 1096 of file extract_yields.cxx.
References plot_variations::y.
double GetObserved | ( | const RooWorkspace & | w, |
const std::string & | bin_name | ||
) |
Definition at line 476 of file extract_yields.cxx.
References Contains(), and scan_aggregate::name.
Referenced by PrintTable().
void GetOptionsExtract | ( | int | argc, |
char * | argv[] | ||
) |
Definition at line 1449 of file extract_yields.cxx.
References anonymous_namespace{extract_yields.cxx}::do_global, anonymous_namespace{extract_yields.cxx}::file_wspace(), anonymous_namespace{extract_yields.cxx}::r4_only(), anonymous_namespace{extract_yields.cxx}::show_exp_sig(), and anonymous_namespace{extract_yields.cxx}::table_clean().
Referenced by main().
std::vector<std::string> GetPlainBinNames | ( | const RooWorkspace & | w | ) |
Definition at line 845 of file extract_yields.cxx.
References Append(), GetFuncNames(), and scan_aggregate::name.
Referenced by PrintTable().
std::vector<std::string> GetProcessNames | ( | const RooWorkspace & | w | ) |
Definition at line 860 of file extract_yields.cxx.
References Append(), and scan_aggregate::name.
Referenced by MakeCorrectionPlot(), MakeYieldPlot(), and PrintTable().
std::string GetSignalName | ( | const RooWorkspace & | w | ) |
Definition at line 89 of file extract_yields.cxx.
References scan_aggregate::name.
Referenced by PrintTable().
double GetSigPred | ( | const RooWorkspace & | w, |
const std::string & | bin_name | ||
) |
Definition at line 394 of file extract_yields.cxx.
References Contains(), and scan_aggregate::name.
Referenced by PrintTable().
double GetSigPredErr | ( | RooWorkspace & | w, |
const RooFitResult & | f, | ||
const std::string & | bin_name | ||
) |
Definition at line 414 of file extract_yields.cxx.
References Contains(), GetError(), and scan_aggregate::name.
Referenced by PrintTable().
double GetTotPred | ( | const RooWorkspace & | w, |
const std::string & | bin_name | ||
) |
Definition at line 435 of file extract_yields.cxx.
References Contains(), and scan_aggregate::name.
Referenced by PrintTable().
double GetTotPredErr | ( | RooWorkspace & | w, |
const RooFitResult & | f, | ||
const std::string & | bin_name | ||
) |
Definition at line 455 of file extract_yields.cxx.
References Contains(), GetError(), and scan_aggregate::name.
Referenced by PrintTable().
std::vector<std::string> GetVarNames | ( | const RooWorkspace & | w | ) |
Definition at line 779 of file extract_yields.cxx.
std::vector<TH1D> MakeBackgroundHistos | ( | const std::vector< std::vector< double > > & | component_yields, |
const std::vector< std::string > & | bin_names, | ||
const std::vector< std::string > & | prc_names | ||
) |
Definition at line 906 of file extract_yields.cxx.
References anonymous_namespace{test_agnostic.cxx}::a, anonymous_namespace{test_agnostic.cxx}::b, Contains(), anonymous_namespace{extract_yields.cxx}::file_wspace(), plot_aggregates::GetColor(), and scan_aggregate::name.
Referenced by MakeYieldPlot().
void MakeCorrectionPlot | ( | RooWorkspace & | w, |
const RooFitResult & | f, | ||
const std::string & | file_name | ||
) |
Definition at line 1155 of file extract_yields.cxx.
References plot_variations::c, GetBinNames(), GetError(), GetProcessNames(), and SetVariables().
Referenced by main().
void MakeCovarianceMatrix | ( | RooWorkspace & | w, |
const RooFitResult & | f, | ||
std::string | covar_file_name | ||
) |
Definition at line 1181 of file extract_yields.cxx.
References plot_variations::c, Contains(), scan_aggregate::name, PrettyBinName(), anonymous_namespace{extract_yields.cxx}::r4_only(), ReplaceAll(), SetVariables(), plot_variations::x, and plot_variations::y.
Referenced by main().
TGraphErrors MakeErrorBand | ( | const TH1D & | h | ) |
Definition at line 1111 of file extract_yields.cxx.
Referenced by MakeYieldPlot().
TH1D MakeExpSignal | ( | RooWorkspace & | w, |
const std::vector< std::string > & | bin_names | ||
) |
Definition at line 952 of file extract_yields.cxx.
References GetMCYield(), and scan_aggregate::name.
Referenced by MakeYieldPlot().
TH1D MakeObserved | ( | const RooWorkspace & | w, |
const std::vector< std::string > & | bin_names | ||
) |
Definition at line 1001 of file extract_yields.cxx.
References scan_aggregate::name.
Referenced by MakeYieldPlot().
TGraphErrors MakeRatio | ( | const TH1D & | num, |
const TH1D & | den | ||
) |
Definition at line 1122 of file extract_yields.cxx.
References plot_variations::x.
Referenced by MakeYieldPlot().
TH1D MakeTotalHisto | ( | RooWorkspace & | w, |
const RooFitResult & | f, | ||
const std::vector< std::string > & | bin_names | ||
) |
Definition at line 977 of file extract_yields.cxx.
References GetError(), and scan_aggregate::name.
Referenced by MakeYieldPlot().
void MakeYieldPlot | ( | RooWorkspace & | w, |
const RooFitResult & | f, | ||
const std::string & | file_name, | ||
bool | linear | ||
) |
Definition at line 652 of file extract_yields.cxx.
References plot_variations::c, Contains(), GetBinNames(), GetComponentYields(), GetError(), GetProcessNames(), MakeBackgroundHistos(), MakeErrorBand(), MakeExpSignal(), MakeObserved(), MakeRatio(), MakeTotalHisto(), anonymous_namespace{extract_yields.cxx}::r4_only(), SetBounds(), and SetVariables().
Referenced by main().
void ManuallyAddBins | ( | const RooWorkspace & | w, |
std::vector< std::string > & | names | ||
) |
Definition at line 814 of file extract_yields.cxx.
References scan_aggregate::name.
std::string PrettyBinName | ( | std::string | name | ) |
Definition at line 1432 of file extract_yields.cxx.
References scan_aggregate::name, and ReplaceAll().
Referenced by MakeCovarianceMatrix().
void PrintDebug | ( | RooWorkspace & | w, |
const RooFitResult & | f, | ||
const std::string & | file_name | ||
) |
Definition at line 133 of file extract_yields.cxx.
References GetError(), GetFuncNames(), GetVarNames(), SetVariables(), TexFriendly(), and plot_variations::var_names.
Referenced by main().
void PrintTable | ( | RooWorkspace & | w, |
const RooFitResult & | f, | ||
const std::string & | file_name | ||
) |
Definition at line 178 of file extract_yields.cxx.
References Contains(), DBG, anonymous_namespace{extract_yields.cxx}::do_global, GetBkgPred(), GetBkgPredErr(), GetKappaNoSys(), GetKappaNoSysErr(), GetKappaSys(), GetKappaSysErr(), GetLambda(), GetLambdaErr(), GetMCTotal(), GetMCTotalErr(), GetMCYield(), GetObserved(), GetPlainBinNames(), GetProcessNames(), GetSignalName(), GetSigPred(), GetSigPredErr(), GetTotPred(), GetTotPredErr(), ReplaceAll(), SetVariables(), anonymous_namespace{extract_yields.cxx}::table_clean(), and TexFriendly().
Referenced by main().
void RunFit | ( | const std::string & | path | ) |
void SetBounds | ( | TH1D & | a, |
TH1D & | b, | ||
std::vector< TH1D > & | cs | ||
) |
Definition at line 1024 of file extract_yields.cxx.
References plot_variations::c, Contains(), anonymous_namespace{extract_yields.cxx}::file_wspace(), GetMaximum(), and GetMinimum().
Referenced by MakeYieldPlot().
RooRealVar* SetVariables | ( | RooWorkspace & | w, |
const RooFitResult & | f | ||
) |
Definition at line 616 of file extract_yields.cxx.
std::string StripPath | ( | const std::string & | full_path | ) |
Definition at line 1146 of file extract_yields.cxx.
References send_combine_aggregates::full_path.
std::string TexFriendly | ( | const std::string & | s | ) |
Definition at line 121 of file extract_yields.cxx.
Referenced by PrintDebug(), and PrintTable().