13#include "MantidDataObjects/DllConfig.h"
16#include "MantidTypes/Event/TofEvent.h"
25namespace DataHandling {
29namespace DataObjects {
39class MANTID_DATAOBJECTS_DLL
WeightedEvent :
public Types::Event::TofEvent {
44 friend class tofGreaterOrEqual;
45 friend class tofGreater;
59 WeightedEvent(
double tof,
const Mantid::Types::Core::DateAndTime pulsetime,
double weight,
double errorSquared);
60 WeightedEvent(
double tof,
const Mantid::Types::Core::DateAndTime pulsetime,
float weight,
float errorSquared);
62 WeightedEvent(
const TofEvent &,
double weight,
double errorSquared);
63 WeightedEvent(
const TofEvent &,
float weight,
float errorSquared);
70 bool equals(
const WeightedEvent &
rhs,
const double tolTof,
const double tolWeight,
const int64_t tolPulse)
const;
72 double weight()
const;
74 double errorSquared()
const;
95 friend class tofGreaterOrEqual;
96 friend class tofGreater;
117 WeightedEventNoTime(
double tof,
const Mantid::Types::Core::DateAndTime pulsetime,
double weight,
double errorSquared);
118 WeightedEventNoTime(
double tof,
const Mantid::Types::Core::DateAndTime pulsetime,
float weight,
float errorSquared);
141 bool operator<(
const double rhs_tof)
const {
return (this->m_tof < rhs_tof); }
145 double operator()()
const;
147 Mantid::Types::Core::DateAndTime pulseTime()
const;
148 double weight()
const;
149 double error()
const;
150 double errorSquared()
const;
const std::vector< double > & rhs
std::ostream & operator<<(std::ostream &out, const MantidQt::MantidWidgets::IndexType< i > &index)
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.
double tof() const
Return the time-of-flight of the neutron, as a double.
double operator()() const
double error() const
Return the error of the neutron, as a double (it is saved as a float).
WeightedEventNoTime(const Types::Event::TofEvent &, float weight, float errorSquared)
float m_weight
The weight of this neutron.
double weight() const
Return the weight of the neutron, as a double (it is saved as a float).
WeightedEventNoTime(const Types::Event::TofEvent &, double weight, double errorSquared)
double errorSquared() const
Return the squared error of the neutron, as a double.
float m_errorSquared
The SQUARE of the error that this neutron contributes.
WeightedEventNoTime(const Types::Event::TofEvent &)
Mantid::Types::Core::DateAndTime pulseTime() const
Return the pulse time; this returns 0 since this type of Event has no time associated.
bool operator<(const double rhs_tof) const
< comparison operator, using the TOF to do the comparison.
bool operator<(const WeightedEventNoTime &rhs) const
< comparison operator, using the TOF to do the comparison.
Info about a single neutron detection event, including a weight and error value:
double weight() const
Return the weight of the neutron, as a double (it is saved as a float).
float m_errorSquared
The SQUARE of the error that this neutron contributes.
float m_weight
The weight of this neutron.
double errorSquared() const
bool MANTID_API_DLL equals(const MatrixWorkspace_sptr &lhs, const MatrixWorkspace_sptr &rhs, double tolerance=0.0)
Performs a comparison operation on two workspaces, using the CompareWorkspaces algorithm.
Helper class which provides the Collimation Length for SANS instruments.
constexpr bool operator==(const wide_integer< Bits, Signed > &lhs, const wide_integer< Bits2, Signed2 > &rhs)