|
ra4_stats
0341147a0dc35f80f4e12c6003afb76a38e2ed6e
|
#include "sig_inj.hpp"#include <cmath>#include <fstream>#include <iostream>#include <iomanip>#include <sstream>#include <vector>#include <algorithm>#include <future>#include <utility>#include <mutex>#include <limits>#include <numeric>#include <functional>#include <stdlib.h>#include <getopt.h>#include "TFile.h"#include "TGraphAsymmErrors.h"#include "TH1D.h"#include "TCanvas.h"#include "TF1.h"#include "TLine.h"#include "RooWorkspace.h"#include "RooRealVar.h"#include "RooArgList.h"#include "RooFitResult.h"#include "utilities.hpp"#include "styles.hpp"#include "thread_pool.hpp"Go to the source code of this file.
Namespaces | |
| anonymous_namespace{sig_inj.cxx} | |
Functions | |
| int | main (int argc, char *argv[]) |
| void | InjectSignal (const string id_string, double inject, size_t index) |
| pair< double, double > | ExtractSignal (const string id_string, size_t index, size_t toy, bool is_nc) |
| double | GetAsymError (const RooRealVar &var, double &ehi, double &elo) |
| double | GetError (const RooAbsReal &var, const RooFitResult &f) |
| void | GetStats (const vector< double > &vals, double &mean, double &median, double &up, double &down, double &up2, double &down2) |
| double | GetValue (vector< double > vals, double fraction) |
| double | GetMode (const vector< double > &v, double frac) |
| vector< double > | GetSmallestRange (const vector< double > &v, double frac) |
| void | GetOptions (int argc, char *argv[]) |
| void | MakePlot (const vector< double > &injections_list, const vector< vector< double > > &yvals, bool is_nc, bool is_pull) |
| void | Plot1D (double inj, const vector< double > &vals, double mean, double median, double up, double down, double up2, double down2, bool is_nc, bool is_pull) |
| void | RemoveBadResults (vector< double > &vals, vector< double > &pulls) |
| void | MergeWithText (vector< double > &injs, vector< vector< double > > &yvals, vector< vector< double > > &pulls, bool is_nc) |
| size_t | GetIndex (const vector< double > &v, double x) |
| void | SortByInjectionStrength (vector< double > &inj, vector< vector< double > > &yvals, vector< vector< double > > &pulls) |
Variables | |
| int | anonymous_namespace{sig_inj.cxx}::ntoys = 5 |
| vector< double > | anonymous_namespace{sig_inj.cxx}::injections |
| double | anonymous_namespace{sig_inj.cxx}::lumi = 2.246 |
| bool | anonymous_namespace{sig_inj.cxx}::do_asymmetric_error = false |
| bool | anonymous_namespace{sig_inj.cxx}::do_systematics = false |
| bool | anonymous_namespace{sig_inj.cxx}::draw_only = false |
| mutex | anonymous_namespace{sig_inj.cxx}::global_mutex |
| pair<double, double> ExtractSignal | ( | const string | id_string, |
| size_t | index, | ||
| size_t | toy, | ||
| bool | is_nc | ||
| ) |
Definition at line 145 of file sig_inj.cxx.
References anonymous_namespace{sig_inj.cxx}::do_asymmetric_error, execute(), anonymous_namespace{test_agnostic.cxx}::f, anonymous_namespace{plot_likelihood.cxx}::file_name, GetAsymError(), GetError(), anonymous_namespace{sig_inj.cxx}::global_mutex, anonymous_namespace{sig_inj.cxx}::injections, MakeDir(), and change_r::workdir.
Referenced by main().
| double GetAsymError | ( | const RooRealVar & | var, |
| double & | ehi, | ||
| double & | elo | ||
| ) |
Definition at line 210 of file sig_inj.cxx.
Referenced by ExtractSignal().
| double GetError | ( | const RooAbsReal & | var, |
| const RooFitResult & | f | ||
| ) |
Definition at line 229 of file sig_inj.cxx.
References one_bin_test_statistic::GetName().
Referenced by ExtractSignal().
| size_t GetIndex | ( | const vector< double > & | v, |
| double | x | ||
| ) |
Definition at line 674 of file sig_inj.cxx.
References plot_variations::x.
Referenced by MergeWithText().
| double GetMode | ( | const vector< double > & | v, |
| double | frac | ||
| ) |
Definition at line 333 of file sig_inj.cxx.
References GetSmallestRange().
| void GetOptions | ( | int | argc, |
| char * | argv[] | ||
| ) |
Definition at line 379 of file sig_inj.cxx.
References anonymous_namespace{sig_inj.cxx}::do_asymmetric_error, anonymous_namespace{sig_inj.cxx}::do_systematics, anonymous_namespace{sig_inj.cxx}::draw_only, anonymous_namespace{sig_inj.cxx}::injections, anonymous_namespace{sig_inj.cxx}::lumi, and anonymous_namespace{sig_inj.cxx}::ntoys.
Referenced by main().
| vector<double> GetSmallestRange | ( | const vector< double > & | v, |
| double | frac | ||
| ) |
Definition at line 358 of file sig_inj.cxx.
Referenced by GetMode().
| void GetStats | ( | const vector< double > & | vals, |
| double & | mean, | ||
| double & | median, | ||
| double & | up, | ||
| double & | down, | ||
| double & | up2, | ||
| double & | down2 | ||
| ) |
| double GetValue | ( | vector< double > | vals, |
| double | fraction | ||
| ) |
Definition at line 313 of file sig_inj.cxx.
Referenced by GetStats().
| void InjectSignal | ( | const string | id_string, |
| double | inject, | ||
| size_t | index | ||
| ) |
Definition at line 124 of file sig_inj.cxx.
References anonymous_namespace{sig_inj.cxx}::do_systematics, execute(), anonymous_namespace{sig_inj.cxx}::global_mutex, anonymous_namespace{sig_inj.cxx}::lumi, and anonymous_namespace{sig_inj.cxx}::ntoys.
Referenced by main().
| int main | ( | int | argc, |
| char * | argv[] | ||
| ) |
Definition at line 50 of file sig_inj.cxx.
References anonymous_namespace{sig_inj.cxx}::do_asymmetric_error, anonymous_namespace{sig_inj.cxx}::do_systematics, anonymous_namespace{sig_inj.cxx}::draw_only, execute(), ExtractSignal(), GetOptions(), anonymous_namespace{sig_inj.cxx}::injections, InjectSignal(), anonymous_namespace{sig_inj.cxx}::lumi, MakePlot(), MergeWithText(), anonymous_namespace{sig_inj.cxx}::ntoys, ThreadPool::Push(), RemoveBadResults(), styles::setDefaultStyle(), and bin_significance::style().
| void MakePlot | ( | const vector< double > & | injections_list, |
| const vector< vector< double > > & | yvals, | ||
| bool | is_nc, | ||
| bool | is_pull | ||
| ) |
Definition at line 431 of file sig_inj.cxx.
References plot_variations::c, anonymous_namespace{sig_inj.cxx}::do_asymmetric_error, anonymous_namespace{sig_inj.cxx}::do_systematics, anonymous_namespace{test_agnostic.cxx}::f, GetStats(), anonymous_namespace{sig_inj.cxx}::lumi, anonymous_namespace{sig_inj.cxx}::ntoys, Plot1D(), ReplaceAll(), plot_variations::xmax, and plot_variations::ymax.
Referenced by main().
| void MergeWithText | ( | vector< double > & | injs, |
| vector< vector< double > > & | yvals, | ||
| vector< vector< double > > & | pulls, | ||
| bool | is_nc | ||
| ) |
Definition at line 634 of file sig_inj.cxx.
References GetIndex(), anonymous_namespace{sig_inj.cxx}::lumi, SortByInjectionStrength(), and plot_variations::y.
Referenced by main().
| void Plot1D | ( | double | inj, |
| const vector< double > & | vals, | ||
| double | mean, | ||
| double | median, | ||
| double | up, | ||
| double | down, | ||
| double | up2, | ||
| double | down2, | ||
| bool | is_nc, | ||
| bool | is_pull | ||
| ) |
Definition at line 540 of file sig_inj.cxx.
References plot_variations::c, anonymous_namespace{sig_inj.cxx}::lumi, and scan_aggregate::name.
Referenced by MakePlot().
| void RemoveBadResults | ( | vector< double > & | vals, |
| vector< double > & | pulls | ||
| ) |
| void SortByInjectionStrength | ( | vector< double > & | inj, |
| vector< vector< double > > & | yvals, | ||
| vector< vector< double > > & | pulls | ||
| ) |
Definition at line 681 of file sig_inj.cxx.
References anonymous_namespace{test_agnostic.cxx}::a, and anonymous_namespace{test_agnostic.cxx}::b.
Referenced by MergeWithText().
1.8.11