CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_6_1_1/src/DataFormats/GeometryCommonDetAlgo/interface/Measurement1D.h

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