15#include <boost/optional/optional.hpp>
33class AttenuationProfile;
54 std::shared_ptr<PhysicalConstants::Atom>
atom;
56 FormulaUnit(std::shared_ptr<PhysicalConstants::Atom> atom,
const double multiplicity);
62 static ChemicalFormula parseChemicalFormula(
const std::string &chemicalSymbol);
71 const double packingFraction = 1,
const double temperature = 300,
74 const double packingFraction = 1,
const double temperature = 300,
85 const std::string &name()
const;
91 double numberDensity()
const;
93 double numberDensityEffective()
const;
95 double packingFraction()
const;
97 double totalAtoms()
const;
99 double temperature()
const;
101 double pressure()
const;
103 double cohScatterXSection()
const;
105 double incohScatterXSection()
const;
107 double totalScatterXSection()
const;
109 double absorbXSection(
const double lambda = PhysicalConstants::NeutronAtom::ReferenceLambda)
const;
110 double attenuationCoefficient(
const double lambda)
const;
112 double attenuation(
const double distance,
113 const double lambda = PhysicalConstants::NeutronAtom::ReferenceLambda)
const;
115 double xRayAttenuation(
const double distance,
const double energy)
const;
122 double linearAbsorpCoef(
const double lambda = PhysicalConstants::NeutronAtom::ReferenceLambda)
const;
129 std::vector<double> linearAbsorpCoef(std::vector<double>::const_iterator lambdaBegin,
130 std::vector<double>::const_iterator lambdaEnd)
const;
133 double cohScatterLength(
const double lambda = PhysicalConstants::NeutronAtom::ReferenceLambda)
const;
135 double incohScatterLength(
const double lambda = PhysicalConstants::NeutronAtom::ReferenceLambda)
const;
137 double totalScatterLength(
const double lambda = PhysicalConstants::NeutronAtom::ReferenceLambda)
const;
140 double cohScatterLengthReal(
const double lambda = PhysicalConstants::NeutronAtom::ReferenceLambda)
const;
142 double cohScatterLengthImg(
const double lambda = PhysicalConstants::NeutronAtom::ReferenceLambda)
const;
144 double incohScatterLengthReal(
const double lambda = PhysicalConstants::NeutronAtom::ReferenceLambda)
const;
146 double incohScatterLengthImg(
const double lambda = PhysicalConstants::NeutronAtom::ReferenceLambda)
const;
153 double cohScatterLengthSqrd(
const double lambda = PhysicalConstants::NeutronAtom::ReferenceLambda)
const;
159 double incohScatterLengthSqrd(
const double lambda = PhysicalConstants::NeutronAtom::ReferenceLambda)
const;
166 double totalScatterLengthSqrd(
const double lambda = PhysicalConstants::NeutronAtom::ReferenceLambda)
const;
169 void saveNexus(::NeXus::File *file,
const std::string &group)
const;
170 void loadNexus(::NeXus::File *file,
const std::string &group);
172 bool hasValidXRayAttenuationProfile();
178 void calculateLinearAbsorpXSectionByWL();
180 void calculateTotalScatterXSection();
const std::vector< double > * lambda
A material is defined as being composed of a given element, defined as a PhysicalConstants::NeutronAt...
ChemicalFormula m_chemicalFormula
The normalized chemical formula.
double m_totalScatterXSection
double m_temperature
Temperature.
std::vector< FormulaUnit > ChemicalFormula
virtual ~Material()=default
Virtual destructor.
double m_packingFraction
Packing fraction should be between 0 and 2.
double m_atomTotal
Total number of atoms.
boost::optional< AttenuationProfile > m_attenuationOverride
std::string m_name
Material name.
double m_linearAbsorpXSectionByWL
double m_pressure
Pressure.
boost::optional< AttenuationProfile > m_xRayAttenuationProfile
double m_numberDensity
Number density in atoms per A^-3.
Struture to hold the common information for an atom.
std::shared_ptr< const Material > Material_const_sptr
Typedef for a shared pointer to a const object.
std::shared_ptr< Material > Material_sptr
Typedef for a shared pointer.
A namespace containing physical constants that are required by algorithms and unit routines.
static constexpr double StandardAtmosphere
Standard atmospheric pressure in kPa.
Helper class which provides the Collimation Length for SANS instruments.
Structure to store neutronic scattering information for the various elements.