/usr/include/ThePEG/Analysis/LWH/Measurement.h is in libthepeg-dev 1.8.0-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 | // -*- C++ -*-
//
// Measurement.h is a part of ThePEG - Toolkit for HEP Event Generation
// Copyright (C) 1999-2011 Leif Lonnblad
//
// ThePEG is licenced under version 2 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef LWH_Measurement_H
#define LWH_Measurement_H
//
// This is the declaration of the Measurement class representing
//
#include <limits>
#include <cmath>
#include <algorithm>
#include "AIMeasurement.h"
namespace LWH {
using namespace AIDA;
/**
* Basic user-level interface class for holding a single "measurement"
* with positive and negative errors (to allow for asymmetric errors).
* "IMeasurement" = "value" + "errorPlus" - "errorMinus"
*/
class Measurement: public IMeasurement {
public:
/**
* Standard constructor.
*/
Measurement(double v = 0.0, double ep = 0.0, double em = 0.0)
: val(v), errp(ep), errm(em) {}
/**
* Copy constructor.
*/
Measurement(const Measurement & m)
:IMeasurement(m), val(m.val), errp(m.errp), errm(m.errm) {}
/**
* Destructor.
*/
virtual ~Measurement() { /* nop */; }
/**
* Get the value of the Measurement.
* @return The value of the Measurement.
*/
double value() const {
return val;
}
/**
* Get the plus error of the IMeasurement.
* @return The plus error.
*/
double errorPlus() const {
return errp;
}
/**
* Get the minus error of the IMeasurement.
* @return The minus error.
*/
double errorMinus() const {
return errm;
}
/**
* Set the value of the IMeasurement.
* @param v The new value of the IMeasurement.
* @return false If the value cannot be set.
*/
bool setValue(double v) {
val = v;
return true;
}
/**
* Set the plus error of the IMeasurement.
* @param ep The new plus error of the IMeasurement.
* @return false If the error cannot be set or it is negative.
*/
bool setErrorPlus(double ep) {
errp = ep;
return ep < 0.0;
}
/**
* Set the minus error of the IMeasurement.
* @param em The new minus error of the IMeasurement.
* @return false If the error cannot be set or it is negative.
*/
bool setErrorMinus(double em) {
errm = em;
return em < 0.0;
}
private:
/**
* The value.
*/
double val;
/**
* The plus error.
*/
double errp;
/**
* The minus error.
*/
double errm;
};
}
#endif /* LWH_Measurement_H */
|