ATLAS Offline Software
|
#include <APWeightSum.h>
Public Member Functions | |
APWeightSum () | |
Default constructor. More... | |
virtual | ~APWeightSum () |
Default destructor. More... | |
void | AddWeightToEvt (APWeightEntry *weight) |
Adds a weight to the sum of weights. More... | |
void | FinishEvt (double ext_weight=1.0) |
Finishes the current event and calculates the event weight. More... | |
void | AddEvt (APEvtWeight *evt_weight, double ext_weight=1.0) |
Adds an event with an externally calculated EvtWeight object. More... | |
double | GetSumW () const |
Returns the sum of weights. More... | |
double | GetSumW2 () const |
Returns sum of (weights^2). More... | |
double | GetSumWExternal () const |
Returns the sum of weights without taking into account the trigger weighting (external weights only) to allow switching trigger weighting on/off. More... | |
double | GetStdDev () |
Returns the standard deviation. More... | |
double | GetVariance () |
Returns the variance. More... | |
double | GetVarianceNoCorr () |
Returns the variance, assuming no correlations. More... | |
double | GetVarianceFullCorr () |
Returns the variance, assuming full correlation amongst objects. More... | |
double | GetSysUncert () const |
Returns the systematic uncertainty (from systematics assigned to weights). More... | |
unsigned long | GetKUnweighted () const |
Returns the unweighted sum of entries. More... | |
THnSparse * | GetUncertHistogram (APReweightBase *weighter) |
Returns THnSparse holding the uncertainties for given APReweightBase instance. More... | |
const std::vector< THnSparse * > & | GetAllUncertHistograms () |
Returns vector of THnSparses holding the uncertainties for all APReweight IDs. More... | |
Public Attributes | |
ClassDef(APWeightSum, 1) protected std::vector< APWeightEntry * > | m_current_evt_weights |
< Calculates the final uncertainties including correlations. More... | |
std::vector< THnSparse * > | m_linear_uncert |
Holds all histograms for uncertainties. More... | |
unsigned long int | m_k_evt_orig |
Holds the original amount of unweighted counts ("sum of 1's"). More... | |
double | m_k_evt_weight |
Holds the sum of weights. More... | |
double | m_k_evt_weight2 |
Holds the sum of squared weights. More... | |
double | m_k_evt_weight_external |
Holds the sum of external weights (no trigger weighting). More... | |
double | m_variance |
Holds the variance. More... | |
double | m_variance_nocorr |
Holds the variance, assuming no correlations. More... | |
double | m_variance_fullcorr |
Holds the variance, assuming full correlation amongst objects. More... | |
double | m_variance_sys |
Holds the systematic variance (from systematics assigned to weights). More... | |
bool | m_isComputed |
Class to calculate the sum of weights ("weighted counter")
Calculates the sum of weights taking into account the underlying asymmetric probability distribution. This is done by modelling the pdf and then extracting the corresponding quantiles.
Definition at line 29 of file APWeightSum.h.
APWeightSum::APWeightSum | ( | ) |
|
virtual |
Default destructor.
Definition at line 30 of file APWeightSum.cxx.
void APWeightSum::AddEvt | ( | APEvtWeight * | evt_weight, |
double | ext_weight = 1.0 |
||
) |
Adds an event with an externally calculated EvtWeight object.
Takes an optional external weight factor (e.g. mc weight).
Definition at line 100 of file APWeightSum.cxx.
void APWeightSum::AddWeightToEvt | ( | APWeightEntry * | weight | ) |
Adds a weight to the sum of weights.
Definition at line 35 of file APWeightSum.cxx.
void APWeightSum::FinishEvt | ( | double | ext_weight = 1.0 | ) |
Finishes the current event and calculates the event weight.
Takes an optional external weight factor (e.g. mc weight).
Definition at line 78 of file APWeightSum.cxx.
Returns vector of THnSparses holding the uncertainties for all APReweight IDs.
Definition at line 480 of file APWeightSum.cxx.
unsigned long APWeightSum::GetKUnweighted | ( | ) | const |
Returns the unweighted sum of entries.
Definition at line 74 of file APWeightSum.cxx.
double APWeightSum::GetStdDev | ( | ) |
Returns the standard deviation.
Definition at line 51 of file APWeightSum.cxx.
double APWeightSum::GetSumW | ( | ) | const |
Returns the sum of weights.
Definition at line 39 of file APWeightSum.cxx.
double APWeightSum::GetSumW2 | ( | ) | const |
Returns sum of (weights^2).
Definition at line 43 of file APWeightSum.cxx.
double APWeightSum::GetSumWExternal | ( | ) | const |
Returns the sum of weights without taking into account the trigger weighting (external weights only) to allow switching trigger weighting on/off.
Definition at line 47 of file APWeightSum.cxx.
double APWeightSum::GetSysUncert | ( | ) | const |
Returns the systematic uncertainty (from systematics assigned to weights).
Definition at line 70 of file APWeightSum.cxx.
THnSparse * APWeightSum::GetUncertHistogram | ( | APReweightBase * | weighter | ) |
Returns THnSparse holding the uncertainties for given APReweightBase instance.
Definition at line 471 of file APWeightSum.cxx.
double APWeightSum::GetVariance | ( | ) |
Returns the variance.
Definition at line 56 of file APWeightSum.cxx.
double APWeightSum::GetVarianceFullCorr | ( | ) |
Returns the variance, assuming full correlation amongst objects.
Definition at line 65 of file APWeightSum.cxx.
double APWeightSum::GetVarianceNoCorr | ( | ) |
Returns the variance, assuming no correlations.
Definition at line 61 of file APWeightSum.cxx.
ClassDef (APWeightSum,1) protected std::vector< APWeightEntry* > APWeightSum::m_current_evt_weights |
< Calculates the final uncertainties including correlations.
Holds the expectancy values of the weights in the current event.
Definition at line 57 of file APWeightSum.h.
bool APWeightSum::m_isComputed |
Definition at line 67 of file APWeightSum.h.
unsigned long int APWeightSum::m_k_evt_orig |
Holds the original amount of unweighted counts ("sum of 1's").
Definition at line 59 of file APWeightSum.h.
double APWeightSum::m_k_evt_weight |
Holds the sum of weights.
Definition at line 60 of file APWeightSum.h.
double APWeightSum::m_k_evt_weight2 |
Holds the sum of squared weights.
Definition at line 61 of file APWeightSum.h.
double APWeightSum::m_k_evt_weight_external |
Holds the sum of external weights (no trigger weighting).
Definition at line 62 of file APWeightSum.h.
std::vector< THnSparse* > APWeightSum::m_linear_uncert |
Holds all histograms for uncertainties.
Definition at line 58 of file APWeightSum.h.
double APWeightSum::m_variance |
Holds the variance.
Definition at line 63 of file APWeightSum.h.
double APWeightSum::m_variance_fullcorr |
Holds the variance, assuming full correlation amongst objects.
Definition at line 65 of file APWeightSum.h.
double APWeightSum::m_variance_nocorr |
Holds the variance, assuming no correlations.
Definition at line 64 of file APWeightSum.h.
double APWeightSum::m_variance_sys |
Holds the systematic variance (from systematics assigned to weights).
Definition at line 66 of file APWeightSum.h.