CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups 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 13 of file Measurement1DFloat.h.

Measurement1DFloat::Measurement1DFloat ( const float &  aValue)
inline

Definition at line 15 of file Measurement1DFloat.h.

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

Definition at line 17 of file Measurement1DFloat.h.

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

Definition at line 21 of file Measurement1DFloat.h.

21 {};

Member Function Documentation

float Measurement1DFloat::error ( ) const
inline

Definition at line 25 of file Measurement1DFloat.h.

References theError.

Referenced by pat::VertexAssociation::hasErrors().

25 { return theError; }
float Measurement1DFloat::significance ( ) const
inline

Definition at line 27 of file Measurement1DFloat.h.

References theError, and theValue.

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

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

Member Data Documentation

float Measurement1DFloat::theError
private

Definition at line 36 of file Measurement1DFloat.h.

Referenced by error(), and significance().

float Measurement1DFloat::theValue
private

Definition at line 35 of file Measurement1DFloat.h.

Referenced by significance(), and value().