11#include "MantidAlgorithms/DllConfig.h"
74 const std::string
name()
const override {
return "DetectorEfficiencyCor"; }
76 const std::string
summary()
const override {
77 return "This algorithm adjusts the binned data in a workspace for detector "
78 "efficiency, calculated from the neutrons' kinetic energy, the gas "
79 "filled detector's geometry and gas pressure. The data are then "
80 "multiplied by :math:`k_i/k_f`";
84 int version()
const override {
return 1; }
85 const std::vector<std::string>
seeAlso()
const override {
return {
"He3TubeEfficiency",
"DetectorEfficiencyCorUser"}; }
88 return "CorrectionFunctions\\EfficiencyCorrections;Inelastic\\Corrections";
93 void retrieveProperties();
95 void correctForEfficiency(int64_t spectraIn,
const API::SpectrumInfo &spectrumInfo);
97 double calculateOneOverK(
double loBinBound,
double uppBinBound)
const;
103 double detectorEfficiency(
const double alpha)
const;
105 double chebevApprox(
double a,
double b,
const double exspansionCoefs[],
double x)
const;
107 void logErrors(
size_t totalNDetectors)
const;
124 std::map<const Geometry::IObject *, std::pair<double, Kernel::V3D>>
m_shapeCache;
131 void init()
override;
132 void exec()
override;
Base class from which all concrete algorithm classes should be derived.
API::SpectrumInfo is an intermediate step towards a SpectrumInfo that is part of Instrument-2....
Returns efficiency of cylindrical helium gas tube.
Kernel::V3D m_samplePos
Sample position.
double m_ki
stores the wave number of incidient neutrons, calculated from the energy
std::list< int64_t > m_spectraSkipped
The spectra numbers that were skipped.
const std::string name() const override
Algorithm's name for identification overriding a virtual method.
std::map< const Geometry::IObject *, std::pair< double, Kernel::V3D > > m_shapeCache
A lookup of previously seen shape objects used to save calculation time as most detectors have the sa...
const std::vector< std::string > seeAlso() const override
Function to return all of the seeAlso algorithms related to this algorithm.
API::MatrixWorkspace_const_sptr m_inputWS
the user selected workspace
int version() const override
Algorithm's version for identification overriding a virtual method.
API::MatrixWorkspace_sptr m_outputWS
output workspace, maybe the same as the input one
double m_Ei
stores the user selected value for incidient energy of the neutrons
const std::string category() const override
Algorithm's category for identification overriding a virtual method.
const std::string summary() const override
Summary of algorithms purpose.
const Geometry::ParameterMap * m_paraMap
points the map that stores additional properties for detectors in that map
Interface class for detector objects.
IObject : Interface for geometry objects.
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.