ATLAS Offline Software
|
#include <APWeightEntry.h>
Public Member Functions | |
APWeightEntry () | |
Default constructor. More... | |
APWeightEntry (unsigned int val_denominator, unsigned int val_numerator, double scale, bool isTrig=false) | |
Constructor, takes n_denom, n_num, the relative scale of the used samples or an additional user scale and a bool if the entry is a trigger weight. More... | |
virtual | ~APWeightEntry () |
Default destructor. More... | |
void | ReadEfficiency (double efficiency, double err_low, double err_high) |
Read efficiencies and upper/lower uncertainty (if numerator/denominator not applicable (e.g. More... | |
void | SetCoordinates (const std::vector< int > &coords, const std::vector< int > &n_dim_origin) |
unsigned int | GetValDenominator () const |
Get value of original denominator. More... | |
unsigned int | GetValNumerator () const |
Get value of original numerator. More... | |
double | GetExpectancy () const |
Get Expectancy value of efficiency/weight. More... | |
double | GetVariance () const |
Get Variance of efficiency/weight (classical binomial/poisson model). More... | |
double | GetStatUncertLow () const |
Get lower bound of asymmetric statistical uncertainty. More... | |
double | GetStatUncertHigh () const |
Get upper bound of asymmetric statistical uncertainty. More... | |
double | GetSysUncert () const |
Get absolute systematic uncertainty value of efficiency/weight. More... | |
double | GetSysUncert2 () const |
Get absolute systematic uncertainty squared value of efficiency/weight. More... | |
double | GetRandom () |
Get random number from PDF. More... | |
TH1F * | GetPDF () |
Returns the calculated PDF. More... | |
unsigned int | GetID () const |
Returns the internal ID (used by APReweight/APReweight2D/APReweight3D/APReweightND). More... | |
std::vector< int > | GetCoords () const |
Returns the coordinates of the current entry in the original histogram. More... | |
std::vector< int > | GetOriginalDimensions () const |
Returns the dimensions and amounts of bins for each dimension of the original histogram. More... | |
bool | IsNaN () const |
Returns true if instance is NaN. More... | |
bool | IsTrig () const |
Returns true if instance is trigger based. More... | |
void | SetSystUncert (double rel_uncert) |
Set the relative (!) systematic uncertainty for the efficiency/weight. More... | |
void | SetID (unsigned int id) |
Set the internal ID (used by APReweight/APReweight2D/APReweight3D/APReweightND). More... | |
Private Member Functions | |
APWeightEntry (const APWeightEntry &) | |
APWeightEntry & | operator= (const APWeightEntry &) |
void | _CreateHist () |
Creates a TH1F instance from the arrays if necessary. More... | |
void | _ComputeCum () |
Calculates the cumulative function of the pdf if necessary. More... | |
Private Attributes | |
unsigned int | m_val_denominator |
Holds the value of original denominator. More... | |
unsigned int | m_val_numerator |
Holds the value of original numerator. More... | |
double | m_expectancy_val |
Holds the Expectancy value of efficiency/weight. More... | |
double | m_variance |
Holds Variance of efficiency/weight (classical binomial/poisson model). More... | |
double | m_stat_uncert_low |
Holds lower bound of asymmetric statistical uncertainty. More... | |
double | m_stat_uncert_high |
Holds upper bound of asymmetric statistical uncertainty. More... | |
double | m_sys_uncert |
Holds absolute systematic uncertainty value of efficiency/weight. More... | |
double | m_sys_uncert2 |
Holds absolute systematic uncertainty squared value of efficiency/weight. More... | |
bool | m_is_trig |
Flag, set to true if weight entry is trigger based. More... | |
bool | m_is_nan |
Flag, set to true if denominator is zero. More... | |
unsigned int | m_ID |
Holds internal ID (used by APReweight/APReweight2D/APReweight3D/APReweightND). More... | |
double | m_integral |
Holds the integral of the probability distribution. More... | |
double * | m_pdf |
double * | m_bins |
double * | m_cumul |
Histograms to hold the probability distribution and the cumulative distribution. More... | |
TH1F * | m_hist |
Holds the TH1F instance from the arrays if computed. More... | |
std::vector< int > | m_coords |
Holds the coordinates of the current entry in the original histogram. More... | |
std::vector< int > | m_n_dim_origin |
Holds the amount of dimensions and bins per axis in the original histogram. More... | |
Class to store a single weight entry (one bin).
Stores a single binned weight, corresponding to a pair of bins from the underlying numerator and denominator histograms. Allows access to quantities like central values, uncertainties and PDFs.
Definition at line 25 of file APWeightEntry.h.
APWeightEntry::APWeightEntry | ( | ) |
APWeightEntry::APWeightEntry | ( | unsigned int | val_denominator, |
unsigned int | val_numerator, | ||
double | scale, | ||
bool | isTrig = false |
||
) |
Constructor, takes n_denom, n_num, the relative scale of the used samples or an additional user scale and a bool if the entry is a trigger weight.
Definition at line 41 of file APWeightEntry.cxx.
|
virtual |
|
private |
|
private |
Calculates the cumulative function of the pdf if necessary.
Definition at line 286 of file APWeightEntry.cxx.
|
private |
vector< int > APWeightEntry::GetCoords | ( | ) | const |
Returns the coordinates of the current entry in the original histogram.
Definition at line 252 of file APWeightEntry.cxx.
double APWeightEntry::GetExpectancy | ( | ) | const |
Get Expectancy value of efficiency/weight.
Definition at line 206 of file APWeightEntry.cxx.
unsigned int APWeightEntry::GetID | ( | ) | const |
Returns the internal ID (used by APReweight/APReweight2D/APReweight3D/APReweightND).
Definition at line 248 of file APWeightEntry.cxx.
vector< int > APWeightEntry::GetOriginalDimensions | ( | ) | const |
Returns the dimensions and amounts of bins for each dimension of the original histogram.
Definition at line 256 of file APWeightEntry.cxx.
TH1F * APWeightEntry::GetPDF | ( | ) |
Returns the calculated PDF.
Definition at line 243 of file APWeightEntry.cxx.
double APWeightEntry::GetRandom | ( | ) |
Get random number from PDF.
Definition at line 230 of file APWeightEntry.cxx.
double APWeightEntry::GetStatUncertHigh | ( | ) | const |
Get upper bound of asymmetric statistical uncertainty.
Definition at line 218 of file APWeightEntry.cxx.
double APWeightEntry::GetStatUncertLow | ( | ) | const |
Get lower bound of asymmetric statistical uncertainty.
Definition at line 214 of file APWeightEntry.cxx.
double APWeightEntry::GetSysUncert | ( | ) | const |
Get absolute systematic uncertainty value of efficiency/weight.
Definition at line 222 of file APWeightEntry.cxx.
double APWeightEntry::GetSysUncert2 | ( | ) | const |
Get absolute systematic uncertainty squared value of efficiency/weight.
Definition at line 226 of file APWeightEntry.cxx.
unsigned int APWeightEntry::GetValDenominator | ( | ) | const |
Get value of original denominator.
Definition at line 198 of file APWeightEntry.cxx.
unsigned int APWeightEntry::GetValNumerator | ( | ) | const |
Get value of original numerator.
Definition at line 202 of file APWeightEntry.cxx.
double APWeightEntry::GetVariance | ( | ) | const |
Get Variance of efficiency/weight (classical binomial/poisson model).
Definition at line 210 of file APWeightEntry.cxx.
bool APWeightEntry::IsNaN | ( | ) | const |
Returns true if instance is NaN.
Definition at line 260 of file APWeightEntry.cxx.
bool APWeightEntry::IsTrig | ( | ) | const |
Returns true if instance is trigger based.
Definition at line 264 of file APWeightEntry.cxx.
|
private |
void APWeightEntry::ReadEfficiency | ( | double | efficiency, |
double | err_low, | ||
double | err_high | ||
) |
Read efficiencies and upper/lower uncertainty (if numerator/denominator not applicable (e.g.
Bootstrap)).
Definition at line 168 of file APWeightEntry.cxx.
void APWeightEntry::SetCoordinates | ( | const std::vector< int > & | coords, |
const std::vector< int > & | n_dim_origin | ||
) |
Definition at line 180 of file APWeightEntry.cxx.
void APWeightEntry::SetID | ( | unsigned int | id | ) |
Set the internal ID (used by APReweight/APReweight2D/APReweight3D/APReweightND).
Definition at line 273 of file APWeightEntry.cxx.
void APWeightEntry::SetSystUncert | ( | double | rel_uncert | ) |
Set the relative (!) systematic uncertainty for the efficiency/weight.
Definition at line 268 of file APWeightEntry.cxx.
|
private |
Definition at line 76 of file APWeightEntry.h.
|
private |
Holds the coordinates of the current entry in the original histogram.
Definition at line 78 of file APWeightEntry.h.
|
private |
Histograms to hold the probability distribution and the cumulative distribution.
Definition at line 76 of file APWeightEntry.h.
|
private |
Holds the Expectancy value of efficiency/weight.
Definition at line 65 of file APWeightEntry.h.
|
private |
Holds the TH1F instance from the arrays if computed.
Definition at line 77 of file APWeightEntry.h.
|
private |
Holds internal ID (used by APReweight/APReweight2D/APReweight3D/APReweightND).
Definition at line 74 of file APWeightEntry.h.
|
private |
Holds the integral of the probability distribution.
Definition at line 75 of file APWeightEntry.h.
|
private |
Flag, set to true if denominator is zero.
Definition at line 73 of file APWeightEntry.h.
|
private |
Flag, set to true if weight entry is trigger based.
Definition at line 72 of file APWeightEntry.h.
|
private |
Holds the amount of dimensions and bins per axis in the original histogram.
Definition at line 79 of file APWeightEntry.h.
|
private |
Definition at line 76 of file APWeightEntry.h.
|
private |
Holds upper bound of asymmetric statistical uncertainty.
Definition at line 68 of file APWeightEntry.h.
|
private |
Holds lower bound of asymmetric statistical uncertainty.
Definition at line 67 of file APWeightEntry.h.
|
private |
Holds absolute systematic uncertainty value of efficiency/weight.
Definition at line 69 of file APWeightEntry.h.
|
private |
Holds absolute systematic uncertainty squared value of efficiency/weight.
Definition at line 70 of file APWeightEntry.h.
|
private |
Holds the value of original denominator.
Definition at line 63 of file APWeightEntry.h.
|
private |
Holds the value of original numerator.
Definition at line 64 of file APWeightEntry.h.
|
private |
Holds Variance of efficiency/weight (classical binomial/poisson model).
Definition at line 66 of file APWeightEntry.h.