#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
\Author 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 |
Definition at line 14 of file Accumulator.cc.
Referenced by variance().
|
inline |
|
inline |
Definition at line 22 of file Accumulator.h.
References mathSSE::sqrt(), and variance().
double Accumulator::variance | ( | ) | const |
Definition at line 16 of file Accumulator.cc.
References HLTTauDQMOffline_cfi::denominator, mean(), n_, HLTTauDQMOffline_cfi::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().