ATLAS Offline Software
Public Member Functions | Public Attributes | List of all members
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) { }

◆ 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); }

◆ 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:
AllowedVariables::e
e
Definition: AsgElectronSelectorTool.cxx:37
hist_file_dump.d
d
Definition: hist_file_dump.py:137
StatVal::error
double error
Definition: StatVal.h:31
StatVal::value
double value
Definition: StatVal.h:30
python.PyAthena.v
v
Definition: PyAthena.py:154
StatVal::StatVal
StatVal()
Definition: StatVal.h:33
error
Definition: IImpactPoint3dEstimator.h:70