ATLAS Offline Software
Loading...
Searching...
No Matches
StatVal Class Reference

simple struct to hold a value and it's associated uncertainty. More...

#include <StatVal.h>

Collaboration diagram for StatVal:

Public Member Functions

 StatVal ()
 StatVal (double v)
 StatVal (double v, double e)
StatVal operator*= (const double &d)
StatVal operator* (const double &d) const
StatVal operator/ (const double &d) const

Public Attributes

double value
double error

Detailed Description

simple struct to hold a value and it's associated uncertainty.

Definition at line 26 of file StatVal.h.

Constructor & Destructor Documentation

◆ StatVal() [1/3]

StatVal::StatVal ( )
inline

Definition at line 33 of file StatVal.h.

33: value(0), error(0) { }
double value
Definition StatVal.h:30
double error
Definition StatVal.h:31

◆ StatVal() [2/3]

StatVal::StatVal ( double v)
inline

Definition at line 34 of file StatVal.h.

34: value(v) { error=( v>=0 ? sqrt(v) : sqrt(-v) ); }

◆ StatVal() [3/3]

StatVal::StatVal ( double v,
double e )
inline

Definition at line 35 of file StatVal.h.

35: value(v), error(e) { }

Member Function Documentation

◆ operator*()

StatVal StatVal::operator* ( const double & d) const
inline

Definition at line 41 of file StatVal.h.

41{ return StatVal(d*value, d*error); }
StatVal()
Definition StatVal.h:33

◆ operator*=()

StatVal StatVal::operator*= ( const double & d)
inline

Definition at line 39 of file StatVal.h.

39{ value*=d; error*=d; return (*this); }

◆ operator/()

StatVal StatVal::operator/ ( const double & d) const
inline

Definition at line 43 of file StatVal.h.

43{ return StatVal(value/d, error/d); }

Member Data Documentation

◆ error

double StatVal::error

Definition at line 31 of file StatVal.h.

◆ value

double StatVal::value

Definition at line 30 of file StatVal.h.


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