#include <Accumulator.h>
Public Member Functions | |
Accumulator () | |
void | addEntry (double value, double weight=1.) |
double | mean () const |
unsigned long | nEntries () const |
double | sigma () const |
double | variance () const |
double | weightedMean () const |
Private Attributes | |
unsigned long | n_ |
double | sum_ |
double | sumOfSquares_ |
double | sumOfWeights_ |
double | weightedSum_ |
For validation purposes. This program calculates mean and RMS of a distribution
Rick Wilkinson
Definition at line 12 of file Accumulator.h.
Accumulator::Accumulator | ( | ) |
Definition at line 4 of file Accumulator.cc.
void Accumulator::addEntry | ( | double | value, |
double | weight = 1. |
||
) |
Definition at line 6 of file Accumulator.cc.
References n_, sum_, sumOfSquares_, sumOfWeights_, relativeConstraints::value, mps_merge::weight, and weightedSum_.
double Accumulator::mean | ( | ) | const |
|
inline |
|
inline |
double Accumulator::variance | ( | ) | const |
Definition at line 16 of file Accumulator.cc.
References bTagMiniDQMTaggers::denominator, mean(), n_, bTagMiniDQMTaggers::numerator, sum_, and sumOfSquares_.
Referenced by sigma(), and average.Average::uncertainty().
double Accumulator::weightedMean | ( | ) | const |
|
private |
Definition at line 33 of file Accumulator.h.
Referenced by addEntry(), mean(), nEntries(), and variance().
|
private |
Definition at line 29 of file Accumulator.h.
Referenced by addEntry(), mean(), and variance().
|
private |
Definition at line 30 of file Accumulator.h.
Referenced by addEntry(), and variance().
|
private |
Definition at line 32 of file Accumulator.h.
Referenced by addEntry(), and weightedMean().
|
private |
Definition at line 31 of file Accumulator.h.
Referenced by addEntry(), and weightedMean().