ATLAS Offline Software
|
#include <APReweight.h>
Public Member Functions | |
APReweight () | |
Default constructor. More... | |
APReweight (TTree *denominator, const std::string &denominator_branch, TTree *numerator, const std::string &numerator_branch, unsigned int n_bins, double x_min, double x_max, bool isTrig=false) | |
Constructor for whole branches (numerator/denominator) to read in. More... | |
APReweight (std::vector< double > denominator, std::vector< double > numerator, unsigned int n_bins, double x_min, double x_max, bool isTrig=false) | |
Constructor for vectors (numerator/denominator) to read in. More... | |
APReweight (TH1 *denominator_in, TH1 *numerator_in, bool isTrig=false) | |
Constructor for histograms (numerator/denominator) to read in. More... | |
virtual | ~APReweight () |
Default destructor. More... | |
void | ReadEfficiency (TH1 *efficiency_in, TH1 *err_low_in, TH1 *err_high_in=0) |
Read efficiencies and upper/lower uncertainty (if numerator/denominator not applicable (e.g. More... | |
APWeightEntry * | GetBinWeight (unsigned int bin) const |
Get Weight entry for a given bin number. More... | |
APWeightEntry * | GetWeight (double value) const |
Get Weight entry for a given value. More... | |
double | GetSampleScale () const |
Get scale factor that was calculated from sample sizes upon instantiation. More... | |
unsigned int | NBins () const |
Get amount of bins. More... | |
unsigned int | GetBin (double value) const |
Get bin number that corresponds to a given value. More... | |
const TH1D * | GetDenominatorHist () const |
Get original denominator histogram. More... | |
const TH1D * | GetNumeratorHist () const |
Get original numerator histogram. More... | |
void | SetSystUncert (double rel_uncert) |
Set the global relative (!) systematic uncertainty of all efficiencies/weights. More... | |
void | SetQuietMode (bool isQuiet=true) |
Sets the flag to turn off messages. More... | |
unsigned int | GetID () const |
Returns the unique ID for assignment of APWeightEntries to source. More... | |
Public Attributes | |
ClassDef(APReweight, 1) private TH1D * | m_numerator_hist |
< Holds the original denominator histogram. More... | |
std::vector< APWeightEntry * > | m_weights |
Holds all weight entries. More... | |
unsigned int | m_n_bins |
Holds the amount of bins. More... | |
TAxis * | m_axis |
Holds the axis of the APReweight instance (from input histograms). More... | |
double | m_scale |
Holds the scale factor that was calculated from sample sizes upon instantiation. More... | |
bool | m_isTrig |
Flag to determine if the class holds trigger efficiencies or "simple" MC weights. More... | |
bool | m_isQuiet |
Flag to turn off messages. More... | |
double | m_syst_uncert_global |
Holds the global relative (!) systematic uncertainty of all efficiencies/weights. More... | |
APWeightEntry * | m_empty_weight |
Dummy weight (equals 0.) to return if value out of range is provided. More... | |
Static Public Attributes | |
static ClassDef(APReweightBase, 1) protected std::atomic< unsigned int > | s_NID = 0 |
< Holds the unique ID for assignment of APWeightEntries to source. More... | |
Class to store 1D parameterized weight maps
Stores a 1D parameterization of APWeightEntries from numerator and denominator histograms or from an efficiency histogram and uncertainties.
Definition at line 30 of file APReweight.h.
APReweight::APReweight | ( | ) |
APReweight::APReweight | ( | TTree * | denominator, |
const std::string & | denominator_branch, | ||
TTree * | numerator, | ||
const std::string & | numerator_branch, | ||
unsigned int | n_bins, | ||
double | x_min, | ||
double | x_max, | ||
bool | isTrig = false |
||
) |
Constructor for whole branches (numerator/denominator) to read in.
Definition at line 25 of file APReweight.cxx.
APReweight::APReweight | ( | std::vector< double > | denominator, |
std::vector< double > | numerator, | ||
unsigned int | n_bins, | ||
double | x_min, | ||
double | x_max, | ||
bool | isTrig = false |
||
) |
Constructor for vectors (numerator/denominator) to read in.
Definition at line 71 of file APReweight.cxx.
APReweight::APReweight | ( | TH1 * | denominator_in, |
TH1 * | numerator_in, | ||
bool | isTrig = false |
||
) |
Constructor for histograms (numerator/denominator) to read in.
Definition at line 93 of file APReweight.cxx.
|
virtual |
unsigned int APReweight::GetBin | ( | double | value | ) | const |
Get bin number that corresponds to a given value.
Definition at line 174 of file APReweight.cxx.
APWeightEntry * APReweight::GetBinWeight | ( | unsigned int | bin | ) | const |
Get Weight entry for a given bin number.
Definition at line 149 of file APReweight.cxx.
const TH1D * APReweight::GetDenominatorHist | ( | ) | const |
Get original denominator histogram.
Definition at line 158 of file APReweight.cxx.
|
inherited |
Returns the unique ID for assignment of APWeightEntries to source.
Definition at line 23 of file APReweightBase.cxx.
const TH1D * APReweight::GetNumeratorHist | ( | ) | const |
Get original numerator histogram.
Definition at line 162 of file APReweight.cxx.
double APReweight::GetSampleScale | ( | ) | const |
Get scale factor that was calculated from sample sizes upon instantiation.
Definition at line 166 of file APReweight.cxx.
APWeightEntry * APReweight::GetWeight | ( | double | value | ) | const |
Get Weight entry for a given value.
Definition at line 154 of file APReweight.cxx.
unsigned int APReweight::NBins | ( | ) | const |
void APReweight::ReadEfficiency | ( | TH1 * | efficiency_in, |
TH1 * | err_low_in, | ||
TH1 * | err_high_in = 0 |
||
) |
Read efficiencies and upper/lower uncertainty (if numerator/denominator not applicable (e.g.
Bootstrap)).
Definition at line 120 of file APReweight.cxx.
void APReweight::SetQuietMode | ( | bool | isQuiet = true | ) |
Sets the flag to turn off messages.
Definition at line 190 of file APReweight.cxx.
void APReweight::SetSystUncert | ( | double | rel_uncert | ) |
Set the global relative (!) systematic uncertainty of all efficiencies/weights.
Definition at line 184 of file APReweight.cxx.
TAxis* APReweight::m_axis |
Holds the axis of the APReweight instance (from input histograms).
Definition at line 61 of file APReweight.h.
|
inherited |
Dummy weight (equals 0.) to return if value out of range is provided.
Definition at line 40 of file APReweightBase.h.
|
inherited |
Flag to turn off messages.
Definition at line 38 of file APReweightBase.h.
|
inherited |
Flag to determine if the class holds trigger efficiencies or "simple" MC weights.
Definition at line 37 of file APReweightBase.h.
unsigned int APReweight::m_n_bins |
Holds the amount of bins.
Definition at line 60 of file APReweight.h.
ClassDef (APReweight, 1) private TH1D* APReweight::m_numerator_hist |
< Holds the original denominator histogram.
Holds the original numerator histogram.
Definition at line 58 of file APReweight.h.
|
inherited |
Holds the scale factor that was calculated from sample sizes upon instantiation.
Definition at line 36 of file APReweightBase.h.
|
inherited |
Holds the global relative (!) systematic uncertainty of all efficiencies/weights.
Definition at line 39 of file APReweightBase.h.
std::vector< APWeightEntry* > APReweight::m_weights |
Holds all weight entries.
Definition at line 59 of file APReweight.h.
|
staticinherited |
< Holds the unique ID for assignment of APWeightEntries to source.
Holds the overall number of assigned IDs.
Definition at line 35 of file APReweightBase.h.