11#include "MantidAlgorithms/DllConfig.h"
72 const std::string
category()
const override {
return "CorrectionFunctions\\AbsorptionCorrections"; }
74 const std::string
summary()
const override {
75 return "Calculates an approximation of the attenuation due to absorption "
76 "and single scattering in a generic sample shape. The sample shape "
77 "can be defined by the CreateSampleShape algorithm.";
115 void init()
override;
116 std::map<std::string, std::string> validateInputs()
override;
118 void exec()
override;
120 void retrieveBaseProperties();
122 void calculateDistances(
const Geometry::IDetector &detector, std::vector<double> &L2s)
const;
123 inline double doIntegration(
const double linearCoefAbs,
const std::vector<double> &L2s,
const size_t startIndex,
124 const size_t endIndex)
const;
125 inline double doIntegration(
const double linearCoefAbsL1,
const double linearCoefAbsL2,
126 const std::vector<double> &L2s,
const size_t startIndex,
const size_t endIndex)
const;
Base class from which all concrete algorithm classes should be derived.
This class stores information about the sample used in particular run.
A base class for absorption correction algorithms.
std::vector< double > m_elementVolumes
Cached element volumes.
int64_t m_xStep
interpolated linearly
virtual void retrieveProperties()
A virtual function in which additional properties should be retrieved into member variables.
virtual void defineProperties()
A virtual function in which additional properties of an algorithm should be declared.
double(*)(double) expfunction
Typedef pointer to exponential function.
const std::string category() const override
Algorithm's category for identification.
double m_linearCoefTotScatt
The total scattering cross-section in 1/m.
double m_lambdaFixed
The wavelength corresponding to the fixed energy,.
Kernel::V3D m_beamDirection
The direction of the beam.
expfunction EXPONENTIAL
Pointer to exponential function.
double m_sampleVolume
The total volume of the sample.
const std::string summary() const override
Algorithm's summary.
API::MatrixWorkspace_sptr m_inputWS
A pointer to the input workspace.
const Geometry::IObject * m_sampleObject
Local cache of sample object.
Kernel::DeltaEMode::Type m_emode
size_t m_numVolumeElements
The number of volume elements.
std::vector< Kernel::V3D > m_elementPositions
Cached element positions.
std::vector< double > m_L1s
Cached L1 distances.
~AbsorptionCorrection()=default
virtual std::string sampleXML()=0
Returns the XML string describing the sample, which can be used by the ShapeFactory.
Kernel::Material m_material
int64_t m_num_lambda
The number of points in wavelength, the rest is.
virtual void initialiseCachedDistances()=0
Calculate the distances for L1 and element size for each element in the sample.
Interface class for detector objects.
IObject : Interface for geometry objects.
A material is defined as being composed of a given element, defined as a PhysicalConstants::NeutronAt...
std::shared_ptr< MatrixWorkspace > MatrixWorkspace_sptr
shared pointer to the matrix workspace base class
Helper class which provides the Collimation Length for SANS instruments.
Type
Define the available energy transfer modes It is important to assign enums proper numbers,...