![]() |
ATLAS Offline Software
|
Class to store a single weight entry (one bin). More...
#include <APWeightEntry.h>
Public Member Functions | |
| APWeightEntry () | |
| Default constructor. | |
| 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. | |
| virtual | ~APWeightEntry () |
| Default destructor. | |
| void | ReadEfficiency (double efficiency, double err_low, double err_high) |
| Read efficiencies and upper/lower uncertainty (if numerator/denominator not applicable (e.g. | |
| void | SetCoordinates (const std::vector< int > &coords, const std::vector< int > &n_dim_origin) |
| unsigned int | GetValDenominator () const |
| Get value of original denominator. | |
| unsigned int | GetValNumerator () const |
| Get value of original numerator. | |
| double | GetExpectancy () const |
| Get Expectancy value of efficiency/weight. | |
| double | GetVariance () const |
| Get Variance of efficiency/weight (classical binomial/poisson model). | |
| double | GetStatUncertLow () const |
| Get lower bound of asymmetric statistical uncertainty. | |
| double | GetStatUncertHigh () const |
| Get upper bound of asymmetric statistical uncertainty. | |
| double | GetSysUncert () const |
| Get absolute systematic uncertainty value of efficiency/weight. | |
| double | GetSysUncert2 () const |
| Get absolute systematic uncertainty squared value of efficiency/weight. | |
| double | GetRandom () |
| Get random number from PDF. | |
| TH1F * | GetPDF () |
| Returns the calculated PDF. | |
| unsigned int | GetID () const |
| Returns the internal ID (used by APReweight/APReweight2D/APReweight3D/APReweightND). | |
| const std::vector< int > & | GetCoords () const |
| Returns the coordinates of the current entry in the original histogram. | |
| const std::vector< int > & | GetOriginalDimensions () const |
| Returns the dimensions and amounts of bins for each dimension of the original histogram. | |
| bool | IsNaN () const |
| Returns true if instance is NaN. | |
| bool | IsTrig () const |
| Returns true if instance is trigger based. | |
| void | SetSystUncert (double rel_uncert) |
| Set the relative (!) systematic uncertainty for the efficiency/weight. | |
| void | SetID (unsigned int id) |
| Set the internal ID (used by APReweight/APReweight2D/APReweight3D/APReweightND). | |
Private Member Functions | |
| APWeightEntry (const APWeightEntry &) | |
| APWeightEntry & | operator= (const APWeightEntry &) |
| void | _CreateHist () |
| Creates a TH1F instance from the arrays if necessary. | |
| void | _ComputeCum () |
| Calculates the cumulative function of the pdf if necessary. | |
Private Attributes | |
| unsigned int | m_val_denominator |
| Holds the value of original denominator. | |
| unsigned int | m_val_numerator |
| Holds the value of original numerator. | |
| double | m_expectancy_val |
| Holds the Expectancy value of efficiency/weight. | |
| double | m_variance |
| Holds Variance of efficiency/weight (classical binomial/poisson model). | |
| double | m_stat_uncert_low |
| Holds lower bound of asymmetric statistical uncertainty. | |
| double | m_stat_uncert_high |
| Holds upper bound of asymmetric statistical uncertainty. | |
| double | m_sys_uncert |
| Holds absolute systematic uncertainty value of efficiency/weight. | |
| double | m_sys_uncert2 |
| Holds absolute systematic uncertainty squared value of efficiency/weight. | |
| bool | m_is_trig |
| Flag, set to true if weight entry is trigger based. | |
| bool | m_is_nan |
| Flag, set to true if denominator is zero. | |
| unsigned int | m_ID |
| Holds internal ID (used by APReweight/APReweight2D/APReweight3D/APReweightND). | |
| double | m_integral |
| Holds the integral of the probability distribution. | |
| double * | m_pdf |
| double * | m_bins |
| double * | m_cumul |
| Histograms to hold the probability distribution and the cumulative distribution. | |
| TH1F * | m_hist |
| Holds the TH1F instance from the arrays if computed. | |
| std::vector< int > | m_coords |
| Holds the coordinates of the current entry in the original histogram. | |
| std::vector< int > | m_n_dim_origin |
| Holds the amount of dimensions and bins per axis in the original histogram. | |
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 | ( | ) |
Default constructor.
Definition at line 20 of file APWeightEntry.cxx.
| 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 |
Creates a TH1F instance from the arrays if necessary.
Definition at line 277 of file APWeightEntry.cxx.
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.
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.