Mantid
|
Info about a single neutron detection event, including a weight and error value: More...
#include <Events.h>
Public Member Functions | |
bool | equals (const WeightedEvent &rhs, const double tolTof, const double tolWeight, const int64_t tolPulse) const |
Compare two events within the specified tolerance. More... | |
double | error () const |
double | errorSquared () const |
bool | operator== (const WeightedEvent &rhs) const |
Comparison operator. More... | |
double | weight () const |
Return the weight of the neutron, as a double (it is saved as a float). More... | |
WeightedEvent () | |
Empty constructor. More... | |
WeightedEvent (const TofEvent &) | |
Constructor, copy from another WeightedEvent object. More... | |
WeightedEvent (const TofEvent &, double weight, double errorSquared) | |
Constructor, copy from a TofEvent object but add weights. More... | |
WeightedEvent (const TofEvent &, float weight, float errorSquared) | |
Constructor, copy from a TofEvent object but add weights. More... | |
WeightedEvent (double time_of_flight) | |
Constructor, specifying only the time of flight. More... | |
WeightedEvent (double tof, const Mantid::Types::Core::DateAndTime pulsetime, double weight, double errorSquared) | |
Constructor, full. More... | |
WeightedEvent (double tof, const Mantid::Types::Core::DateAndTime pulsetime, 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... | |
Friends | |
class | EventList |
EventList has the right to mess with WeightedEvent. 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 |
class | WeightedEventNoTime |
Info about a single neutron detection event, including a weight and error value:
Mantid::DataObjects::WeightedEvent::WeightedEvent | ( | double | time_of_flight | ) |
Constructor, specifying only the time of flight.
------------------— WeightedEvent stuff ---------------------------—
Constructor, tof only:
time_of_flight | tof in microseconds. |
Definition at line 29 of file Events.cpp.
Mantid::DataObjects::WeightedEvent::WeightedEvent | ( | double | tof, |
const Mantid::Types::Core::DateAndTime | pulsetime, | ||
double | weight, | ||
double | errorSquared | ||
) |
Constructor, full.
Constructor, full:
tof | tof in microseconds. |
pulsetime | absolute pulse time |
weight | weight of this neutron event. |
errorSquared | the square of the error on the event |
Definition at line 37 of file Events.cpp.
Mantid::DataObjects::WeightedEvent::WeightedEvent | ( | double | tof, |
const Mantid::Types::Core::DateAndTime | pulsetime, | ||
float | weight, | ||
float | errorSquared | ||
) |
Constructor, full:
tof | tof in microseconds. |
pulsetime | absolute pulse time |
weight | weight of this neutron event. |
errorSquared | the square of the error on the event |
Definition at line 48 of file Events.cpp.
Mantid::DataObjects::WeightedEvent::WeightedEvent | ( | const TofEvent & | rhs, |
double | weight, | ||
double | errorSquared | ||
) |
Constructor, copy from a TofEvent object but add weights.
rhs | TofEvent to copy into this. |
weight | weight of this neutron event. |
errorSquared | the square of the error on the event |
Definition at line 57 of file Events.cpp.
Mantid::DataObjects::WeightedEvent::WeightedEvent | ( | const TofEvent & | rhs, |
float | weight, | ||
float | errorSquared | ||
) |
Constructor, copy from a TofEvent object but add weights.
rhs | TofEvent to copy into this. |
weight | weight of this neutron event. |
errorSquared | the square of the error on the event |
Definition at line 66 of file Events.cpp.
Mantid::DataObjects::WeightedEvent::WeightedEvent | ( | const TofEvent & | rhs | ) |
Constructor, copy from another WeightedEvent object.
rhs | source TofEvent |
Definition at line 72 of file Events.cpp.
Mantid::DataObjects::WeightedEvent::WeightedEvent | ( | ) |
Empty constructor.
Definition at line 76 of file Events.cpp.
bool Mantid::DataObjects::WeightedEvent::equals | ( | const WeightedEvent & | rhs, |
const double | tolTof, | ||
const double | tolWeight, | ||
const int64_t | tolPulse | ||
) | 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. |
tolPulse | the tolerance of a difference in m_pulsetime in nanoseconds. |
Definition at line 99 of file Events.cpp.
References m_errorSquared, m_weight, and rhs.
|
inline |
Definition at line 169 of file Events.h.
References m_errorSquared.
|
inline |
Definition at line 174 of file Events.h.
References m_errorSquared.
bool Mantid::DataObjects::WeightedEvent::operator== | ( | const WeightedEvent & | rhs | ) | const |
Comparison operator.
rhs | :: event to which we are comparing. |
Definition at line 82 of file Events.cpp.
References m_errorSquared, m_weight, and rhs.
|
inline |
|
friend |
EventList has the right to mess with WeightedEvent.
|
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.
|
friend |
float Mantid::DataObjects::WeightedEvent::m_errorSquared |
The SQUARE of the error that this neutron contributes.
Definition at line 52 of file Events.h.
Referenced by equals(), error(), errorSquared(), and operator==().
float Mantid::DataObjects::WeightedEvent::m_weight |
The weight of this neutron.
Definition at line 49 of file Events.h.
Referenced by equals(), operator==(), and weight().