CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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::Measurement1DFloat ( )
inline

Definition at line 14 of file Measurement1DFloat.h.

Measurement1DFloat::Measurement1DFloat ( const float &  aValue)
inline

Definition at line 16 of file Measurement1DFloat.h.

16  :
17  theValue(aValue) , theError(0.) {}
Measurement1DFloat::Measurement1DFloat ( const float &  aValue,
const float &  aError 
)
inline

Definition at line 19 of file Measurement1DFloat.h.

20  : theValue(aValue) , theError(aError) {}
Measurement1DFloat::~Measurement1DFloat ( )
inline

Definition at line 24 of file Measurement1DFloat.h.

24 {} ;

Member Function Documentation

float Measurement1DFloat::error ( ) const
inline
float Measurement1DFloat::significance ( ) const
inline

Definition at line 30 of file Measurement1DFloat.h.

References theError, and theValue.

Referenced by ConversionHitChecker::nHitsBeforeVtx(), and pat::VertexAssociationSelector::operator()().

30  {
31  if (theError == 0) return 0;
32  else return theValue/theError;
33 }
float Measurement1DFloat::value ( ) const
inline

Member Data Documentation

float Measurement1DFloat::theError
private

Definition at line 38 of file Measurement1DFloat.h.

Referenced by error(), and significance().

float Measurement1DFloat::theValue
private

Definition at line 37 of file Measurement1DFloat.h.

Referenced by significance(), and value().