ATLAS Offline Software
|
#include <APWeightSumEnsemble.h>
Public Member Functions | |
APWeightSumEnsemble () | |
Default constructor. More... | |
virtual | ~APWeightSumEnsemble () |
Default destructor. More... | |
void | SetRelPrecision (double rel_prec) |
Sets the relative precision of the gaussian fit to stop the ensemble test at. 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... | |
double | GetQuantile (const double prob) |
Returns the quantlile for p=prob for the distribution. More... | |
double | GetRandom () |
Returns a random value according to the pdf. More... | |
double | GetEnsemblePDFMode () |
Returns the Mode (= sum of weights from PDF). More... | |
double | GetEnsemblePDFStdDev () |
Returns the standard deviation from PDF . More... | |
TH1F * | GetPDF () |
Returns the calculated PDF. 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... | |
std::vector< THnSparse * > | GetAllUncertHistograms () |
Returns vector of THnSparses holding the uncertainties for all APReweight IDs. More... | |
Public Attributes | |
ClassDef(APWeightSumEnsemble, 1) private std::vector< std::vector< APWeightEntry * > > | m_weight_vector |
< Performs the ensemble test to model final PDF. More... | |
std::vector< APWeightEntry * > | m_current_evt_pdfs |
Holds the weight objects for the current event. More... | |
std::vector< double > | m_ext_weights |
Holds the external event weight provided when finishing the respective events. More... | |
double | m_rel_prec |
Holds the relative precision of the gaussian fit to stop the ensemble test at. More... | |
TH1F * | m_pdf |
Holds the TH1F instance from the arrays if computed. More... | |
double | m_ensemble_mode |
Holds the Mode (= sum of weights from PDF) from ensemble test. More... | |
double | m_ensemble_sigma |
Holds the standard deviation from ensemble test. More... | |
bool | m_ensembleTest_done |
Flag if the ensemble test has been performed with the current set of weights. More... | |
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 28 of file APWeightSumEnsemble.h.
APWeightSumEnsemble::APWeightSumEnsemble | ( | ) |
|
virtual |
Default destructor.
Definition at line 22 of file APWeightSumEnsemble.cxx.
|
inherited |
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 APWeightSumEnsemble::AddWeightToEvt | ( | APWeightEntry * | weight | ) |
void APWeightSumEnsemble::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 65 of file APWeightSumEnsemble.cxx.
|
inherited |
Returns vector of THnSparses holding the uncertainties for all APReweight IDs.
Definition at line 480 of file APWeightSum.cxx.
double APWeightSumEnsemble::GetEnsemblePDFMode | ( | ) |
Returns the Mode (= sum of weights from PDF).
(Invokes Ensemble Test)
Definition at line 50 of file APWeightSumEnsemble.cxx.
double APWeightSumEnsemble::GetEnsemblePDFStdDev | ( | ) |
Returns the standard deviation from PDF .
(Invokes Ensemble Test)
Definition at line 55 of file APWeightSumEnsemble.cxx.
|
inherited |
Returns the unweighted sum of entries.
Definition at line 74 of file APWeightSum.cxx.
TH1F * APWeightSumEnsemble::GetPDF | ( | ) |
Returns the calculated PDF.
(Invokes Ensemble Test)
Definition at line 60 of file APWeightSumEnsemble.cxx.
double APWeightSumEnsemble::GetQuantile | ( | const double | prob | ) |
Returns the quantlile for p=prob for the distribution.
(Invokes Ensemble Test)
Definition at line 37 of file APWeightSumEnsemble.cxx.
double APWeightSumEnsemble::GetRandom | ( | ) |
Returns a random value according to the pdf.
(Invokes Ensemble Test)
Definition at line 45 of file APWeightSumEnsemble.cxx.
|
inherited |
Returns the standard deviation.
Definition at line 51 of file APWeightSum.cxx.
|
inherited |
Returns the sum of weights.
Definition at line 39 of file APWeightSum.cxx.
|
inherited |
Returns sum of (weights^2).
Definition at line 43 of file APWeightSum.cxx.
|
inherited |
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.
|
inherited |
Returns the systematic uncertainty (from systematics assigned to weights).
Definition at line 70 of file APWeightSum.cxx.
|
inherited |
Returns THnSparse holding the uncertainties for given APReweightBase instance.
Definition at line 471 of file APWeightSum.cxx.
|
inherited |
Returns the variance.
Definition at line 56 of file APWeightSum.cxx.
|
inherited |
Returns the variance, assuming full correlation amongst objects.
Definition at line 65 of file APWeightSum.cxx.
|
inherited |
Returns the variance, assuming no correlations.
Definition at line 61 of file APWeightSum.cxx.
void APWeightSumEnsemble::SetRelPrecision | ( | double | rel_prec | ) |
Sets the relative precision of the gaussian fit to stop the ensemble test at.
Definition at line 26 of file APWeightSumEnsemble.cxx.
std::vector< APWeightEntry* > APWeightSumEnsemble::m_current_evt_pdfs |
Holds the weight objects for the current event.
Definition at line 50 of file APWeightSumEnsemble.h.
|
inherited |
< 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.
double APWeightSumEnsemble::m_ensemble_mode |
Holds the Mode (= sum of weights from PDF) from ensemble test.
Definition at line 54 of file APWeightSumEnsemble.h.
double APWeightSumEnsemble::m_ensemble_sigma |
Holds the standard deviation from ensemble test.
Definition at line 55 of file APWeightSumEnsemble.h.
bool APWeightSumEnsemble::m_ensembleTest_done |
Flag if the ensemble test has been performed with the current set of weights.
Definition at line 56 of file APWeightSumEnsemble.h.
std::vector< double > APWeightSumEnsemble::m_ext_weights |
Holds the external event weight provided when finishing the respective events.
Definition at line 51 of file APWeightSumEnsemble.h.
|
inherited |
Definition at line 67 of file APWeightSum.h.
|
inherited |
Holds the original amount of unweighted counts ("sum of 1's").
Definition at line 59 of file APWeightSum.h.
|
inherited |
Holds the sum of weights.
Definition at line 60 of file APWeightSum.h.
|
inherited |
Holds the sum of squared weights.
Definition at line 61 of file APWeightSum.h.
|
inherited |
Holds the sum of external weights (no trigger weighting).
Definition at line 62 of file APWeightSum.h.
|
inherited |
Holds all histograms for uncertainties.
Definition at line 58 of file APWeightSum.h.
TH1F* APWeightSumEnsemble::m_pdf |
Holds the TH1F instance from the arrays if computed.
Definition at line 53 of file APWeightSumEnsemble.h.
double APWeightSumEnsemble::m_rel_prec |
Holds the relative precision of the gaussian fit to stop the ensemble test at.
Definition at line 52 of file APWeightSumEnsemble.h.
|
inherited |
Holds the variance.
Definition at line 63 of file APWeightSum.h.
|
inherited |
Holds the variance, assuming full correlation amongst objects.
Definition at line 65 of file APWeightSum.h.
|
inherited |
Holds the variance, assuming no correlations.
Definition at line 64 of file APWeightSum.h.
|
inherited |
Holds the systematic variance (from systematics assigned to weights).
Definition at line 66 of file APWeightSum.h.
ClassDef (APWeightSumEnsemble,1) private std::vector< std::vector< APWeightEntry* > > APWeightSumEnsemble::m_weight_vector |
< Performs the ensemble test to model final PDF.
Holds the weight objects (dim2) for each event (dim1).
Definition at line 49 of file APWeightSumEnsemble.h.