CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
Measurement1DFloat Class Reference

#include <Measurement1DFloat.h>

Public Member Functions

float error () const
 
 Measurement1DFloat ()
 
 Measurement1DFloat (const float &aValue)
 
 Measurement1DFloat (const float &aValue, const float &aError)
 
float significance () const
 
float value () const
 
 ~Measurement1DFloat ()
 

Private Attributes

float theError
 
float theValue
 

Detailed Description

A class that combines a value and it's associated uncertainty, or error, together. Provides a more explicit interface than a pair<float,float>. If you don't like the name, propose a better one!

Definition at line 9 of file Measurement1DFloat.h.

Constructor & Destructor Documentation

◆ Measurement1DFloat() [1/3]

Measurement1DFloat::Measurement1DFloat ( )
inline

Definition at line 13 of file Measurement1DFloat.h.

◆ Measurement1DFloat() [2/3]

Measurement1DFloat::Measurement1DFloat ( const float &  aValue)
inline

Definition at line 15 of file Measurement1DFloat.h.

◆ Measurement1DFloat() [3/3]

Measurement1DFloat::Measurement1DFloat ( const float &  aValue,
const float &  aError 
)
inline

Definition at line 17 of file Measurement1DFloat.h.

17 : theValue(aValue), theError(aError) {}

◆ ~Measurement1DFloat()

Measurement1DFloat::~Measurement1DFloat ( )
inline

Definition at line 21 of file Measurement1DFloat.h.

21 {};

Member Function Documentation

◆ error()

float Measurement1DFloat::error ( ) const
inline

◆ significance()

float Measurement1DFloat::significance ( ) const
inline

Definition at line 27 of file Measurement1DFloat.h.

References theError, and theValue.

Referenced by pat::VertexAssociationSelector::operator()().

27  {
28  if (theError == 0)
29  return 0;
30  else
31  return theValue / theError;
32  }

◆ value()

float Measurement1DFloat::value ( ) const
inline

Member Data Documentation

◆ theError

float Measurement1DFloat::theError
private

Definition at line 36 of file Measurement1DFloat.h.

Referenced by error(), and significance().

◆ theValue

float Measurement1DFloat::theValue
private

Definition at line 35 of file Measurement1DFloat.h.

Referenced by significance(), and value().