thepeg
is hosted by
Hepforge
,
IPPP Durham
ThePEG
2.3.0
Analysis
LWH
Measurement.h
1
// -*- C++ -*-
2
//
3
// Measurement.h is a part of ThePEG - Toolkit for HEP Event Generation
4
// Copyright (C) 1999-2019 Leif Lonnblad
5
//
6
// ThePEG is licenced under version 3 of the GPL, see COPYING for details.
7
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
8
//
9
#ifndef LWH_Measurement_H
10
#define LWH_Measurement_H
11
//
12
// This is the declaration of the Measurement class representing
13
//
14
15
16
#include <limits>
17
#include <cmath>
18
#include <algorithm>
19
#include "AIMeasurement.h"
20
21
namespace
LWH
{
22
23
using namespace
AIDA;
24
30
class
Measurement
:
public
IMeasurement {
31
32
public
:
33
37
Measurement
(
double
v = 0.0,
double
ep = 0.0,
double
em = 0.0)
38
:
val
(v),
errp
(ep),
errm
(em) {}
39
43
Measurement
(
const
Measurement
& m)
44
:IMeasurement(m),
val
(m.
val
),
errp
(m.
errp
),
errm
(m.
errm
) {}
45
49
Measurement
&
operator=
(
const
Measurement
&) =
default
;
50
54
virtual
~Measurement
() {
/* nop */
; }
55
60
double
value
()
const
{
61
return
val
;
62
}
63
68
double
errorPlus
()
const
{
69
return
errp
;
70
}
71
76
double
errorMinus
()
const
{
77
return
errm
;
78
}
79
85
bool
setValue
(
double
v) {
86
val
= v;
87
return
true
;
88
}
89
95
bool
setErrorPlus
(
double
ep) {
96
errp
= ep;
97
return
ep < 0.0;
98
}
99
105
bool
setErrorMinus
(
double
em) {
106
errm
= em;
107
return
em < 0.0;
108
}
109
110
private
:
111
115
double
val
;
116
120
double
errp
;
121
125
double
errm
;
126
127
};
128
129
}
130
131
#endif
/* LWH_Measurement_H */
LWH::Measurement
Basic user-level interface class for holding a single "measurement" with positive and negative errors...
Definition:
Measurement.h:30
LWH::Measurement::val
double val
The value.
Definition:
Measurement.h:115
LWH::Measurement::Measurement
Measurement(double v=0.0, double ep=0.0, double em=0.0)
Standard constructor.
Definition:
Measurement.h:37
LWH::Measurement::setErrorMinus
bool setErrorMinus(double em)
Set the minus error of the IMeasurement.
Definition:
Measurement.h:105
LWH::Measurement::errorPlus
double errorPlus() const
Get the plus error of the IMeasurement.
Definition:
Measurement.h:68
LWH::Measurement::setErrorPlus
bool setErrorPlus(double ep)
Set the plus error of the IMeasurement.
Definition:
Measurement.h:95
LWH::Measurement::value
double value() const
Get the value of the Measurement.
Definition:
Measurement.h:60
LWH::Measurement::operator=
Measurement & operator=(const Measurement &)=default
Default assignment operator (to avoid compiler warnings).
LWH::Measurement::errorMinus
double errorMinus() const
Get the minus error of the IMeasurement.
Definition:
Measurement.h:76
LWH::Measurement::Measurement
Measurement(const Measurement &m)
Copy constructor.
Definition:
Measurement.h:43
LWH::Measurement::setValue
bool setValue(double v)
Set the value of the IMeasurement.
Definition:
Measurement.h:85
LWH::Measurement::errm
double errm
The minus error.
Definition:
Measurement.h:125
LWH::Measurement::~Measurement
virtual ~Measurement()
Destructor.
Definition:
Measurement.h:54
LWH::Measurement::errp
double errp
The plus error.
Definition:
Measurement.h:120
LWH
The LWH namespace contains a Light-Weight Histogram package which implements the most rudimentary his...
Definition:
AnalysisFactory.h:35
Generated on Thu Jun 20 2024 14:47:00 for ThePEG by
1.9.6