11#include "MantidAlgorithms/DllConfig.h"
38 const std::string
name()
const override {
return "PaalmanPingsAbsorptionCorrection"; }
40 const std::string
category()
const override {
return "CorrectionFunctions\\AbsorptionCorrections"; }
42 const std::string
summary()
const override {
43 return "Calculates the attenuation due to absorption "
44 "and single scattering in a generic sample shape for all "
45 "Paalmin-pings terms.";
48 const std::vector<std::string>
seeAlso()
const override {
49 return {
"SetSampleMaterial",
"AbsorptionCorrection",
"ApplyPaalmanPingsCorrection",
50 "PaalmanPingsMonteCarloAbsorption"};
54 int version()
const override {
return (1); }
59 std::map<std::string, std::string> validateInputs()
override;
63 void retrieveBaseProperties();
65 void calculateDistances(
const Geometry::IDetector &detector, std::vector<double> &sample_L2s,
66 std::vector<double> &sample_container_L2s, std::vector<double> &container_L2s,
67 std::vector<double> &container_sample_L2s)
const;
68 void doIntegration(
double &integral,
double &crossIntegral,
const double linearCoefAbs,
69 const double linearCoefTotScatt,
const std::vector<double> &elementVolumes,
70 const std::vector<double> &L1s,
const std::vector<double> &L2s,
const double linearCoefAbs2,
71 const double linearCoefTotScatt2,
const std::vector<double> &L1s2,
const std::vector<double> &L2s2,
72 const size_t startIndex,
const size_t endIndex)
const;
75 void initialiseCachedDistances();
106 std::shared_ptr<const Geometry::IObject> constructGaugeVolume();
Base class from which all concrete algorithm classes should be derived.
This class stores information about the sample used in particular run.
PaalmanPingsAbsorptionCorrection : calculate paalman-pings absorption terms.
API::MatrixWorkspace_sptr m_inputWS
A pointer to the input workspace.
std::vector< double > m_sampleL1s
Cached sample L1 distances.
double m_containerLinearCoefTotScatt
The total scattering cross-section in 1/m for the container.
const std::vector< std::string > seeAlso() const override
Function to return all of the seeAlso algorithms related to this algorithm.
std::vector< double > m_containerL1s
Cached container L1 distances.
size_t m_numContainerVolumeElements
The number of container volume elements.
std::vector< double > m_sample_containerL1s
Cached L1 distances through container hitting sample.
int version() const override
Algorithm's version.
void retrieveProperties()
std::vector< Kernel::V3D > m_sampleElementPositions
Cached sample element positions.
const Geometry::IObject * m_sampleObject
Local cache of sample object.
Kernel::Material m_material
int64_t m_num_lambda
The number of points in wavelength, the rest is.
Kernel::Material m_containerMaterial
size_t m_numSampleVolumeElements
The number of sample volume elements.
const Geometry::IObject * m_containerObject
Local cache of container object.
std::vector< Kernel::V3D > m_containerElementPositions
Cached container element positions.
double m_cubeSideContainer
The length of the side of an element cube in m.
double m_cubeSideSample
The length of the side of an element cube in m.
Kernel::V3D m_beamDirection
The direction of the beam.
const std::string category() const override
Algorithm's category for identification.
std::vector< double > m_containerElementVolumes
Cached container element volumes.
const std::string summary() const override
Algorithm's summary.
std::vector< double > m_container_sampleL1s
Cached L1 distances through sample hitting container.
int64_t m_xStep
interpolated linearly
double m_ampleLinearCoefTotScatt
The total scattering cross-section in 1/m for the sample.
std::vector< double > m_sampleElementVolumes
Cached sample element volumes.
double m_sampleVolume
The total volume of the sample.
double m_containerVolume
The total volume of the container.
const std::string name() const override
Algorithm's name.
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.