CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_9_patch3/src/DataFormats/GeometryCommonDetAlgo/interface/Measurement1DFloat.h

Go to the documentation of this file.
00001 #ifndef _COMMONDET_MEASUREMENT1DFLOAT_H_
00002 #define _COMMONDET_MEASUREMENT1DFLOAT_H_
00003 
00009 class Measurement1DFloat {
00010 
00011 public:
00012 // construct
00013 
00014 Measurement1DFloat() : theValue(0.) , theError(0.) {}
00015 
00016 Measurement1DFloat( const float& aValue) : 
00017   theValue(aValue) , theError(0.) {}
00018 
00019 Measurement1DFloat( const float& aValue, const float& aError) 
00020   : theValue(aValue) , theError(aError) {} 
00021 
00022 //destruct
00023 
00024 ~Measurement1DFloat() {} ;
00025 
00026 float value() const { return theValue; }
00027 
00028 float error() const { return theError; }
00029 
00030 float significance() const {
00031   if (theError == 0) return 0;
00032   else return theValue/theError;
00033 }
00034 
00035 private:
00036 
00037 float  theValue;
00038 float  theError;
00039 
00040 };
00041 
00042 
00043 
00044 #endif
00045 
00046 
00047 
00048 
00049 
00050 
00051 
00052 
00053 
00054