File indexing completed on 2024-09-10 02:58:37
0001 #ifndef _COMMONDET_MEASUREMENT1D_H_
0002 #define _COMMONDET_MEASUREMENT1D_H_
0003
0004 #include <string>
0005
0006
0007
0008
0009
0010
0011 class Measurement1D {
0012 public:
0013
0014
0015 Measurement1D() : theValue(0.), theError(0.) {}
0016
0017 Measurement1D(const double& aValue) : theValue(aValue), theError(0.) {}
0018
0019 Measurement1D(const double& aValue, const double& aError) : theValue(aValue), theError(aError) {}
0020
0021
0022
0023 ~Measurement1D() {}
0024
0025 double value() const { return theValue; }
0026
0027 double error() const { return theError; }
0028
0029 double significance() const {
0030 if (theError == 0)
0031 return 0;
0032 else
0033 return theValue / theError;
0034 }
0035
0036 private:
0037 double theValue;
0038 double theError;
0039 };
0040
0041 #endif