10#include "MantidCurveFitting/DllConfig.h"
14#include <unordered_map>
22namespace CurveFitting {
37 const std::string name()
const override;
39 const std::string
summary()
const override {
40 return "Calculates the background due to gamma rays produced when neutrons "
41 "are absorbed by shielding.";
43 const std::vector<std::string>
seeAlso()
const override {
return {
"VesuvioCorrections"}; }
45 int version()
const override;
46 const std::string category()
const override;
62 bool calculateBackground(
size_t inputIndex,
size_t outputIndex);
64 void applyCorrection(
const size_t inputIndex,
const size_t outputIndex);
66 void calculateSpectrumFromDetector(
const size_t inputIndex,
const size_t outputIndex);
68 void calculateBackgroundFromFoils(
const size_t inputIndex,
const size_t outputIndex);
70 void calculateBackgroundSingleFoil(std::vector<double> &ctfoil,
const size_t wsIndex,
const FoilInfo &foilInfo,
74 std::vector<double> calculateTofSpectrum(
const std::vector<double> &inSpectrum, std::vector<double> &tmpWork,
79 void retrieveInputs();
81 void createOutputWorkspaces();
83 void cacheInstrumentGeometry();
86 const unsigned int horizDir)
const;
120 std::unique_ptr<API::Progress> m_progress =
nullptr;
Base class from which all concrete algorithm classes should be derived.
const std::vector< std::string > seeAlso() const override
Function to return all of the seeAlso (these are not validated) algorithms related to this algorithm....
const std::string summary() const override
Summary of algorithms purpose.
double m_foilRadius
Radius of (imaginary) circle that foils sit on.
std::set< specnum_t > m_reversed
List of spectra numbers whose background sum is to be reversed.
Kernel::V3D m_samplePos
Sample position.
double m_l1
Source to sample distance.
std::vector< FoilInfo > m_foils0
Description of foils in the position 0.
API::MatrixWorkspace_const_sptr m_inputWS
Input TOF data.
std::vector< FoilInfo > m_foils1
Description of foils in the position 0.
double m_foilUpMax
Minimum in up dir to stop integration over foil volume.
std::unordered_map< size_t, size_t > m_indices
Sorted indices to correct.
size_t m_npeaks
The number of peaks in spectrum.
std::string m_profileFunction
Function that defines the mass profile.
API::MatrixWorkspace_sptr m_backgroundWS
Stores the value of the calculated background.
double m_foilUpMin
Minimum in up dir to start integration over foil volume.
API::MatrixWorkspace_sptr m_correctedWS
Stores the corrected data.
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
std::shared_ptr< const IComponent > IComponent_const_sptr
Typdef of a shared pointer to a const IComponent.
Helper class which provides the Collimation Length for SANS instruments.
Simple data structure to store nominal detector values It avoids some functions taking a huge number ...
Hold information about a single foil.
Simple data structure to store resolution parameter values It avoids some functions taking a huge num...