Mantid
|
Info about a single neutron detection event, including a weight and error value, but excluding the pulsetime to save memory: More...
#include <Events.h>
Public Member Functions | |
bool | equals (const WeightedEventNoTime &rhs, const double tolTof, const double tolWeight) const |
Compare two events within the specified tolerance. More... | |
double | error () const |
Return the error of the neutron, as a double (it is saved as a float). More... | |
double | errorSquared () const |
Return the squared error of the neutron, as a double. More... | |
double | operator() () const |
bool | operator< (const double rhs_tof) const |
< comparison operator, using the TOF to do the comparison. More... | |
bool | operator< (const WeightedEventNoTime &rhs) const |
< comparison operator, using the TOF to do the comparison. More... | |
bool | operator== (const WeightedEventNoTime &rhs) const |
Comparison operator. More... | |
Mantid::Types::Core::DateAndTime | pulseTime () const |
Return the pulse time; this returns 0 since this type of Event has no time associated. More... | |
double | tof () const |
Return the time-of-flight of the neutron, as a double. More... | |
double | weight () const |
Return the weight of the neutron, as a double (it is saved as a float). More... | |
WeightedEventNoTime () | |
Empty constructor. More... | |
WeightedEventNoTime (const Types::Event::TofEvent &) | |
WeightedEventNoTime (const Types::Event::TofEvent &, double weight, double errorSquared) | |
WeightedEventNoTime (const Types::Event::TofEvent &, float weight, float errorSquared) | |
WeightedEventNoTime (const WeightedEvent &) | |
Constructor, copy from a WeightedEvent object. More... | |
WeightedEventNoTime (double time_of_flight) | |
Constructor, specifying only the time of flight. More... | |
WeightedEventNoTime (double tof, const Mantid::Types::Core::DateAndTime pulsetime, double weight, double errorSquared) | |
Constructor that ignores a time: More... | |
WeightedEventNoTime (double tof, const Mantid::Types::Core::DateAndTime pulsetime, float weight, float errorSquared) | |
Constructor that ignores a time: More... | |
WeightedEventNoTime (double tof, double weight, double errorSquared) | |
Constructor, full. More... | |
WeightedEventNoTime (double tof, float weight, float errorSquared) | |
Constructor, full: More... | |
Public Attributes | |
float | m_errorSquared |
The SQUARE of the error that this neutron contributes. More... | |
float | m_weight |
The weight of this neutron. More... | |
Protected Attributes | |
double | m_tof |
The 'x value' (e.g. time-of-flight) of this neutron. More... | |
Friends | |
class | EventList |
EventList has the right to mess with this. More... | |
std::ostream & | operator<< (std::ostream &os, const WeightedEvent &event) |
Output a string representation of the event to a stream. More... | |
class | tofGreater |
class | tofGreaterOrEqual |
Info about a single neutron detection event, including a weight and error value, but excluding the pulsetime to save memory:
Mantid::DataObjects::WeightedEventNoTime::WeightedEventNoTime | ( | double | time_of_flight | ) |
Constructor, specifying only the time of flight.
------------------— WeightedEventNoTime stuff ---------------------—
Constructor, tof only:
time_of_flight | tof in microseconds. |
Definition at line 128 of file Events.cpp.
Mantid::DataObjects::WeightedEventNoTime::WeightedEventNoTime | ( | double | tof, |
double | weight, | ||
double | errorSquared | ||
) |
Constructor, full.
Constructor, full:
tof | tof in microseconds. |
weight | weight of this neutron event. |
errorSquared | the square of the error on the event |
Definition at line 136 of file Events.cpp.
Mantid::DataObjects::WeightedEventNoTime::WeightedEventNoTime | ( | double | tof, |
float | weight, | ||
float | errorSquared | ||
) |
Constructor, full:
tof | tof in microseconds. |
weight | weight of this neutron event. |
errorSquared | the square of the error on the event |
Definition at line 144 of file Events.cpp.
Mantid::DataObjects::WeightedEventNoTime::WeightedEventNoTime | ( | double | tof, |
const Mantid::Types::Core::DateAndTime | pulsetime, | ||
double | weight, | ||
double | errorSquared | ||
) |
Constructor that ignores a time:
tof | tof in microseconds. |
pulsetime | an ignored pulse time. |
weight | weight of this neutron event. |
errorSquared | the square of the error on the event |
Definition at line 153 of file Events.cpp.
Mantid::DataObjects::WeightedEventNoTime::WeightedEventNoTime | ( | double | tof, |
const Mantid::Types::Core::DateAndTime | pulsetime, | ||
float | weight, | ||
float | errorSquared | ||
) |
Constructor that ignores a time:
tof | tof in microseconds. |
pulsetime | an ignored pulse time. |
weight | weight of this neutron event. |
errorSquared | the square of the error on the event |
Definition at line 163 of file Events.cpp.
Mantid::DataObjects::WeightedEventNoTime::WeightedEventNoTime | ( | const Types::Event::TofEvent & | , |
double | weight, | ||
double | errorSquared | ||
) |
Mantid::DataObjects::WeightedEventNoTime::WeightedEventNoTime | ( | const Types::Event::TofEvent & | , |
float | weight, | ||
float | errorSquared | ||
) |
Mantid::DataObjects::WeightedEventNoTime::WeightedEventNoTime | ( | const WeightedEvent & | rhs | ) |
Constructor, copy from a WeightedEvent object.
rhs | source WeightedEvent |
Definition at line 186 of file Events.cpp.
Mantid::DataObjects::WeightedEventNoTime::WeightedEventNoTime | ( | const Types::Event::TofEvent & | ) |
References std::operator==().
Mantid::DataObjects::WeightedEventNoTime::WeightedEventNoTime | ( | ) |
Empty constructor.
Definition at line 195 of file Events.cpp.
bool Mantid::DataObjects::WeightedEventNoTime::equals | ( | const WeightedEventNoTime & | rhs, |
const double | tolTof, | ||
const double | tolWeight | ||
) | const |
Compare two events within the specified tolerance.
rhs | the other TofEvent to compare |
tolTof | the tolerance of a difference in m_tof. |
tolWeight | the tolerance of a difference in m_weight and m_errorSquared. |
Definition at line 215 of file Events.cpp.
References m_errorSquared, m_tof, and m_weight.
|
inline |
Return the error of the neutron, as a double (it is saved as a float).
Definition at line 194 of file Events.h.
References m_errorSquared.
|
inline |
Return the squared error of the neutron, as a double.
Definition at line 197 of file Events.h.
References m_errorSquared.
|
inline |
|
inline |
|
inline |
< comparison operator, using the TOF to do the comparison.
rhs | the other WeightedEventNoTime to compare. |
Definition at line 135 of file Events.h.
References rhs.
bool Mantid::DataObjects::WeightedEventNoTime::operator== | ( | const WeightedEventNoTime & | rhs | ) | const |
Comparison operator.
rhs | :: event to which we are comparing. |
Definition at line 201 of file Events.cpp.
References m_errorSquared, m_tof, and m_weight.
|
inline |
|
inline |
|
inline |
|
friend |
|
friend |
Output a string representation of the event to a stream.
os | :: Stream |
event | :: WeightedEvent to output to the stream |
Definition at line 115 of file Events.cpp.
float Mantid::DataObjects::WeightedEventNoTime::m_errorSquared |
The SQUARE of the error that this neutron contributes.
Definition at line 107 of file Events.h.
Referenced by equals(), error(), errorSquared(), and operator==().
|
protected |
The 'x value' (e.g. time-of-flight) of this neutron.
Definition at line 100 of file Events.h.
Referenced by equals(), operator()(), operator==(), and tof().
float Mantid::DataObjects::WeightedEventNoTime::m_weight |
The weight of this neutron.
Definition at line 104 of file Events.h.
Referenced by equals(), operator==(), and weight().