APWeightSum Class Reference

#include <APWeightSum.h>

Inheritance diagram for APWeightSum:
APWeightSumEnsemble

List of all members.

Public Member Functions

 APWeightSum ()
virtual ~APWeightSum ()
void AddWeightToEvt (APWeightEntry *weight)
void FinishEvt (double ext_weight=1.0)
void AddEvt (APEvtWeight *evt_weight, double ext_weight=1.0)
double GetSumW () const
double GetSumW2 () const
double GetSumWExternal () const
double GetStdDev ()
double GetVariance ()
double GetVarianceNoCorr ()
double GetVarianceFullCorr ()
double GetSysUncert () const
unsigned long GetKUnweighted () const
THnSparse * GetUncertHistogram (APReweightBase *weighter)
std::vector< THnSparse * > GetAllUncertHistograms ()

Protected Member Functions

void Compute ()

Protected Attributes

std::vector< APWeightEntry * > _current_evt_weights
std::vector< THnSparse * > _linear_uncert
unsigned long int _k_evt_orig
double _k_evt_weight
double _k_evt_weight2
double _k_evt_weight_external
double _variance
double _variance_nocorr
double _variance_fullcorr
double _variance_sys
bool _isComputed

Detailed Description

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.

Author:
fabian.Kohn@cern.ch

Constructor & Destructor Documentation

APWeightSum::APWeightSum (  ) 

Default constructor.

APWeightSum::~APWeightSum (  )  [virtual]

Default destructor.


Member Function Documentation

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).

void APWeightSum::AddWeightToEvt ( APWeightEntry weight  ) 

Adds a weight to the sum of weights.

Reimplemented in APWeightSumEnsemble.

void APWeightSum::Compute (  )  [protected]

Calculates the final uncertainties including correlations.

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).

Reimplemented in APWeightSumEnsemble.

vector< THnSparse * > APWeightSum::GetAllUncertHistograms (  ) 

Returns vector of THnSparses holding the uncertainties for all APReweight IDs.

unsigned long APWeightSum::GetKUnweighted (  )  const

Returns the unweighted sum of entries.

double APWeightSum::GetStdDev (  ) 

Returns the standard deviation.

double APWeightSum::GetSumW (  )  const

Returns the sum of weights.

double APWeightSum::GetSumW2 (  )  const

Returns sum of (weights^2).

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.

double APWeightSum::GetSysUncert (  )  const

Returns the systematic uncertainty (from systematics assigned to weights).

THnSparse * APWeightSum::GetUncertHistogram ( APReweightBase weighter  ) 

Returns THnSparse holding the uncertainties for given APReweightBase instance.

double APWeightSum::GetVariance (  ) 

Returns the variance.

double APWeightSum::GetVarianceFullCorr (  ) 

Returns the variance, assuming full correlation amongst objects.

double APWeightSum::GetVarianceNoCorr (  ) 

Returns the variance, assuming no correlations.


Member Data Documentation

std::vector< APWeightEntry* > APWeightSum::_current_evt_weights [protected]

Holds the expectancy values of the weights in the current event.

unsigned long int APWeightSum::_k_evt_orig [protected]

Holds the original amount of unweighted counts ("sum of 1's").

double APWeightSum::_k_evt_weight [protected]

Holds the sum of weights.

double APWeightSum::_k_evt_weight2 [protected]

Holds the sum of squared weights.

Holds the sum of external weights (no trigger weighting).

std::vector< THnSparse* > APWeightSum::_linear_uncert [protected]

Holds all histograms for uncertainties.

double APWeightSum::_variance [protected]

Holds the variance.

double APWeightSum::_variance_fullcorr [protected]

Holds the variance, assuming full correlation amongst objects.

double APWeightSum::_variance_nocorr [protected]

Holds the variance, assuming no correlations.

double APWeightSum::_variance_sys [protected]

Holds the systematic variance (from systematics assigned to weights).


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 15 Apr 2017 for RootCore Packages by  doxygen 1.6.1