#include <APWeightSumEnsemble.h>
Public Member Functions | |
APWeightSumEnsemble () | |
virtual | ~APWeightSumEnsemble () |
void | SetRelPrecision (double rel_prec) |
void | AddWeightToEvt (APWeightEntry *weight) |
void | FinishEvt (double ext_weight=1.0) |
double | GetQuantile (const double prob) |
double | GetRandom () |
double | GetEnsemblePDFMode () |
double | GetEnsemblePDFStdDev () |
TH1F * | GetPDF () |
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.
APWeightSumEnsemble::APWeightSumEnsemble | ( | ) |
Default constructor.
APWeightSumEnsemble::~APWeightSumEnsemble | ( | ) | [virtual] |
Default destructor.
void APWeightSumEnsemble::AddWeightToEvt | ( | APWeightEntry * | weight | ) |
Adds a weight to the sum of weights.
Reimplemented from APWeightSum.
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).
Reimplemented from APWeightSum.
double APWeightSumEnsemble::GetEnsemblePDFMode | ( | ) |
Returns the Mode (= sum of weights from PDF). (Invokes Ensemble Test)
double APWeightSumEnsemble::GetEnsemblePDFStdDev | ( | ) |
Returns the standard deviation from PDF . (Invokes Ensemble Test)
TH1F * APWeightSumEnsemble::GetPDF | ( | ) |
Returns the calculated PDF. (Invokes Ensemble Test)
double APWeightSumEnsemble::GetQuantile | ( | const double | prob | ) |
Returns the quantlile for p=prob for the distribution. (Invokes Ensemble Test)
double APWeightSumEnsemble::GetRandom | ( | ) |
Returns a random value according to the pdf. (Invokes Ensemble Test)
void APWeightSumEnsemble::SetRelPrecision | ( | double | rel_prec | ) |
Sets the relative precision of the gaussian fit to stop the ensemble test at.