11#include "MantidAlgorithms/DllConfig.h"
39 const std::string
name()
const override {
return "PaalmanPingsAbsorptionCorrection"; }
41 const std::string
category()
const override {
return "CorrectionFunctions\\AbsorptionCorrections"; }
43 const std::string
summary()
const override {
44 return "Calculates the attenuation due to absorption "
45 "and single scattering in a generic sample shape for all "
46 "Paalmin-pings terms.";
49 const std::vector<std::string>
seeAlso()
const override {
50 return {
"SetSampleMaterial",
"AbsorptionCorrection",
"ApplyPaalmanPingsCorrection",
51 "PaalmanPingsMonteCarloAbsorption"};
55 int version()
const override {
return (1); }
60 std::map<std::string, std::string> validateInputs()
override;
64 void retrieveBaseProperties();
66 void calculateDistances(
const Geometry::IDetector &detector, std::vector<double> &sample_L2s,
67 std::vector<double> &sample_container_L2s, std::vector<double> &container_L2s,
68 std::vector<double> &container_sample_L2s)
const;
69 void doIntegration(
double &integral,
double &crossIntegral,
const double linearCoefAbs,
70 const double linearCoefTotScatt,
const std::vector<double> &elementVolumes,
71 const std::vector<double> &L1s,
const std::vector<double> &L2s,
const double linearCoefAbs2,
72 const double linearCoefTotScatt2,
const std::vector<double> &L1s2,
const std::vector<double> &L2s2,
73 const size_t startIndex,
const size_t endIndex)
const;
76 void initialiseCachedDistances();
108 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.
Holds the information used for doing numerical integrations of object in the beam.