34 const auto &samplepos = ws->getInstrument()->getSample()->getPos();
35 const auto &sourcepos = ws->getInstrument()->getSource()->getPos();
36 const double l1 = samplepos.distance(sourcepos);
47 constexpr double SET_TOF_TO_ZERO{0.};
49 return Correction(SET_TOF_TO_ZERO, m_constShift);
double m_constShift
Cached L1, Ei dependent const shift.
Correction calculate(const size_t &workspace_index) const override
Calculate corrections to get a Time at Sample for a DG instrument.
TimeAtSampleStrategyDirect(const std::shared_ptr< const Mantid::API::MatrixWorkspace > &ws, double ei)
Constructor.
std::shared_ptr< const MatrixWorkspace > MatrixWorkspace_const_sptr
shared pointer to the matrix workspace base class (const version)
static constexpr double NeutronMass
Mass of the neutron in kg.
static constexpr double meV
1 meV in Joules.
The Correction struct to be applied as factor * TOF + offset multiplicativeFactor: TOF correction fac...