20using Types::Event::TofEvent;
39 : TofEvent(tof, pulsetime), m_weight(static_cast<float>(weight)), m_errorSquared(static_cast<float>(errorSquared)) {
50 : TofEvent(tof, pulsetime), m_weight(weight), m_errorSquared(errorSquared) {}
58 : TofEvent(
rhs.m_tof,
rhs.m_pulsetime), m_weight(static_cast<float>(weight)),
59 m_errorSquared(static_cast<float>(errorSquared)) {}
67 : TofEvent(
rhs.m_tof,
rhs.m_pulsetime), m_weight(weight), m_errorSquared(errorSquared) {}
73 : TofEvent(
rhs.m_tof,
rhs.m_pulsetime), m_weight(1.0), m_errorSquared(1.0) {}
83 return (this->m_tof ==
rhs.m_tof) && (this->m_pulsetime ==
rhs.m_pulsetime) && (this->
m_weight == rhs.
m_weight) &&
100 const int64_t tolPulse)
const {
101 if (std::fabs(this->m_tof -
rhs.m_tof) > tolTof)
108 return (this->m_pulsetime.equals(
rhs.m_pulsetime, tolPulse));
116 os <<
event.m_tof <<
"," <<
event.m_pulsetime.toSimpleString() <<
" (W" <<
event.m_weight <<
" +- " <<
event.error()
129 : m_tof(time_of_flight), m_weight(1.0), m_errorSquared(1.0) {}
137 : m_tof(tof), m_weight(static_cast<float>(weight)), m_errorSquared(static_cast<float>(errorSquared)) {}
145 : m_tof(tof), m_weight(weight), m_errorSquared(errorSquared) {}
155 : m_tof(tof), m_weight(static_cast<float>(weight)), m_errorSquared(static_cast<float>(errorSquared)) {}
165 : m_tof(tof), m_weight(weight), m_errorSquared(errorSquared) {}
173 : m_tof(
rhs.m_tof), m_weight(static_cast<float>(weight)), m_errorSquared(static_cast<float>(errorSquared)) {}
181 : m_tof(
rhs.m_tof), m_weight(weight), m_errorSquared(errorSquared) {}
187 : m_tof(
rhs.m_tof), m_weight(
rhs.m_weight), m_errorSquared(
rhs.m_errorSquared) {}
216 if (std::fabs(this->
m_tof - rhs.
m_tof) > tolTof)
const std::vector< double > & rhs
Info about a single neutron detection event, including a weight and error value, but excluding the pu...
double m_tof
The 'x value' (e.g. time-of-flight) of this neutron.
float m_weight
The weight of this neutron.
float m_errorSquared
The SQUARE of the error that this neutron contributes.
bool equals(const WeightedEventNoTime &rhs, const double tolTof, const double tolWeight) const
Compare two events within the specified tolerance.
WeightedEventNoTime()
Empty constructor.
bool operator==(const WeightedEventNoTime &rhs) const
Comparison operator.
Info about a single neutron detection event, including a weight and error value:
bool equals(const WeightedEvent &rhs, const double tolTof, const double tolWeight, const int64_t tolPulse) const
Compare two events within the specified tolerance.
float m_errorSquared
The SQUARE of the error that this neutron contributes.
float m_weight
The weight of this neutron.
bool operator==(const WeightedEvent &rhs) const
Comparison operator.
WeightedEvent()
Empty constructor.
MANTID_API_DLL std::ostream & operator<<(std::ostream &, const AlgorithmHistory &)
Prints a text representation.