22constexpr double ZERO_ADDITIVE_OFFSET{0.};
28 : m_spectrumInfo(ws->spectrumInfo()), m_L1s(m_spectrumInfo.l1()),
29 m_beamDir(ws->getInstrument()->getReferenceFrame()->vecPointingAlongBeam()) {}
42 scale = std::abs(
m_L1s / L1m);
47 return Correction(scale, ZERO_ADDITIVE_OFFSET);
bool isMonitor(const size_t index) const
Returns true if the detector(s) associated with the spectrum are monitors.
Kernel::V3D sourcePosition() const
Returns the source position.
Kernel::V3D position(const size_t index) const
Returns the position of the spectrum with given index.
double l2(const size_t index) const
Returns L2 (distance from sample to spectrum).
Correction calculate(const size_t &workspace_index) const override
Calculate correction.
const API::SpectrumInfo & m_spectrumInfo
const Kernel::V3D m_beamDir
TimeAtSampleStrategyElastic(std::shared_ptr< const Mantid::API::MatrixWorkspace > ws)
Constructor.
constexpr double scalar_prod(const V3D &v) const noexcept
Calculates the cross product.
std::shared_ptr< const MatrixWorkspace > MatrixWorkspace_const_sptr
shared pointer to the matrix workspace base class (const version)
The Correction struct to be applied as factor * TOF + offset multiplicativeFactor: TOF correction fac...