13#include "MantidAlgorithms/DllConfig.h"
42 const std::string
name()
const override {
return "GetEi"; }
44 const std::string
summary()
const override {
45 return "Calculates the kinetic energy of neutrons leaving the source based "
46 "on the time it takes for them to travel between two monitors.";
50 int version()
const override {
return 1; }
52 const std::string
category()
const override {
return "Inelastic\\Ei"; }
72 double &monitor0Dist,
double &monitor1Dist)
const;
75 double timeToFly(
double s,
double E_KE)
const;
77 void extractSpec(
int wsInd,
double start,
double end);
78 void getPeakEstimates(
double &
height, int64_t ¢reInd,
double &background)
const;
79 double findHalfLoc(MantidVec::size_type startInd,
const double height,
const double noise,
const direction go)
const;
80 double neutron_E_At(
double speed)
const;
81 void advanceProgress(
double toAdd);
Base class from which all concrete algorithm classes should be derived.
Requires an estimate for the initial neutron energy which it uses to search for monitor peaks and fro...
static const double PEAK_THRESH_H
ignore an peaks that are less than this factor of the background
static const double HALF_WINDOW
the range of TOF X-values over which the peak will be searched is double this value,...
direction
used by the function findHalfLoc to indicate whether to search left or right
double m_fracCompl
An estimate of the percentage of the algorithm runtimes that has been completed.
static const double PEAK_THRESH_A
ignore peaks where the half width times the ratio of the peak height to the background is less this
static const double CROP
fraction of algorithm time taken up with running CropWorkspace
API::MatrixWorkspace_sptr m_tempWS
name of the tempory workspace that we create and use
int version() const override
Algorithm's version for identification overriding a virtual method.
static const double FIT_PEAK
single call to ConvertToDistribution
const std::string summary() const override
Summary of algorithms purpose.
const std::string name() const override
Algorithm's name for identification overriding a virtual method.
static const int64_t PEAK_THRESH_W
for peaks where the distance to the half heigth is less than this number of bins in either direction ...
const std::string category() const override
Algorithm's category for identification overriding a virtual method.
static const double GET_COUNT_RATE
fraction of algorithm taken by a
std::shared_ptr< const MatrixWorkspace > MatrixWorkspace_const_sptr
shared pointer to the matrix workspace base class (const version)
std::shared_ptr< MatrixWorkspace > MatrixWorkspace_sptr
shared pointer to the matrix workspace base class
Helper class which provides the Collimation Length for SANS instruments.
int32_t specnum_t
Typedef for a spectrum Number.