CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Measurement1D.h
Go to the documentation of this file.
1 #ifndef _COMMONDET_MEASUREMENT1D_H_
2 #define _COMMONDET_MEASUREMENT1D_H_
3 
4 #include <string>
5 
12 public:
13  // construct
14 
16 
17  Measurement1D(const double& aValue) : theValue(aValue), theError(0.){};
18 
19  Measurement1D(const double& aValue, const double& aError) : theValue(aValue), theError(aError){};
20 
21  //destruct
22 
24 
25  double value() const { return theValue; }
26 
27  double error() const { return theError; }
28 
29  double significance() const {
30  if (theError == 0)
31  return 0;
32  else
33  return theValue / theError;
34  }
35 
36 private:
37  double theValue;
38  double theError;
39 };
40 
41 #endif
double error() const
Definition: Measurement1D.h:27
double significance() const
Definition: Measurement1D.h:29
double value() const
Definition: Measurement1D.h:25
Measurement1D(const double &aValue)
Definition: Measurement1D.h:17
Measurement1D(const double &aValue, const double &aError)
Definition: Measurement1D.h:19