herwig is hosted by Hepforge, IPPP Durham
Herwig 7.3.0
Herwig::Statistic Class Reference

The Statistic class is a simple class designed to store a variable for statistical analysis. More...

#include <Statistic.h>

Public Member Functions

 Statistic ()
 The default constructor.
 
double minimum () const
 The minimum value.
 
double maximum () const
 The maximum value.
 
void operator+= (double input)
 Operator to add another point.
 
unsigned int numberOfPoints () const
 Number of points.
 
double mean () const
 Mean.
 
double mean_stdDev () const
 Error on the mean estimate.
 
double mean_var () const
 Variance on the mean estimate.
 
double stdDev () const
 Standard Deviation.
 
double var () const
 Variance.
 
double total () const
 Total entry.
 

Private Attributes

unsigned int _n
 Number of entries.
 
double _xsum
 Sum of the values.
 
double _x2sum
 Sum of the squares of the values.
 
double _min
 The minimum value.
 
double _max
 The maximum value.
 

Detailed Description

The Statistic class is a simple class designed to store a variable for statistical analysis.

Definition at line 23 of file Statistic.h.

Constructor & Destructor Documentation

◆ Statistic()

Herwig::Statistic::Statistic ( )
inline

The default constructor.

Definition at line 30 of file Statistic.h.

Member Function Documentation

◆ maximum()

double Herwig::Statistic::maximum ( ) const
inline

The maximum value.

Definition at line 41 of file Statistic.h.

References _max.

◆ mean()

double Herwig::Statistic::mean ( ) const
inline

Mean.

Definition at line 63 of file Statistic.h.

References _n, and _xsum.

Referenced by Herwig::MultiplicityInfo::simMultiplicity().

◆ mean_stdDev()

double Herwig::Statistic::mean_stdDev ( ) const
inline

Error on the mean estimate.

Needed for example for Profile histograms, where this should be used to compute a chi2 or significance level of deviation to data, rather than stdDeV. This is obvious because the error on the estimate should go to zero for N -> infinity.

Definition at line 75 of file Statistic.h.

References mean_var().

Referenced by Herwig::MultiplicityInfo::simError().

◆ mean_var()

double Herwig::Statistic::mean_var ( ) const
inline

Variance on the mean estimate.

Needed for example for Profile histograms, where this should be used to compute a chi2 or significance level of deviation to data, rather than stdDeV This is obvious because the error on the estimate should go to zero for N -> infinity.

Definition at line 84 of file Statistic.h.

References _n, and var().

Referenced by mean_stdDev().

◆ minimum()

double Herwig::Statistic::minimum ( ) const
inline

The minimum value.

Definition at line 36 of file Statistic.h.

References _min.

◆ numberOfPoints()

unsigned int Herwig::Statistic::numberOfPoints ( ) const
inline

Number of points.

Definition at line 58 of file Statistic.h.

References _n.

◆ operator+=()

void Herwig::Statistic::operator+= ( double  input)
inline

Operator to add another point.

Definition at line 46 of file Statistic.h.

References _max, _min, _n, _x2sum, and _xsum.

◆ stdDev()

double Herwig::Statistic::stdDev ( ) const
inline

Standard Deviation.

Definition at line 92 of file Statistic.h.

References var().

◆ total()

double Herwig::Statistic::total ( ) const
inline

Total entry.

Definition at line 105 of file Statistic.h.

References _xsum.

◆ var()

double Herwig::Statistic::var ( ) const
inline

Variance.

Definition at line 97 of file Statistic.h.

References _n, _x2sum, and _xsum.

Referenced by mean_var(), and stdDev().

Member Data Documentation

◆ _max

double Herwig::Statistic::_max
private

The maximum value.

Definition at line 132 of file Statistic.h.

Referenced by maximum(), and operator+=().

◆ _min

double Herwig::Statistic::_min
private

The minimum value.

Definition at line 127 of file Statistic.h.

Referenced by minimum(), and operator+=().

◆ _n

unsigned int Herwig::Statistic::_n
private

Number of entries.

Definition at line 112 of file Statistic.h.

Referenced by mean(), mean_var(), numberOfPoints(), operator+=(), and var().

◆ _x2sum

double Herwig::Statistic::_x2sum
private

Sum of the squares of the values.

Definition at line 122 of file Statistic.h.

Referenced by operator+=(), and var().

◆ _xsum

double Herwig::Statistic::_xsum
private

Sum of the values.

Definition at line 117 of file Statistic.h.

Referenced by mean(), operator+=(), total(), and var().


The documentation for this class was generated from the following file: