Mantid
Loading...
Searching...
No Matches
NeutronAtom.h
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI,
4// NScD Oak Ridge National Laboratory, European Spallation Source,
5// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS
6// SPDX - License - Identifier: GPL - 3.0 +
7#pragma once
8
9//------------------------------------------------------------------------------
10// Include
11//------------------------------------------------------------------------------
12#include "MantidKernel/DllConfig.h"
13#include <iosfwd>
14
15namespace Mantid {
16namespace PhysicalConstants {
17
22struct MANTID_KERNEL_DLL NeutronAtom {
23
25 static const double ReferenceLambda;
26
27 NeutronAtom(const uint16_t z, const double coh_b_real, const double inc_b_real, const double coh_xs,
28 const double inc_xs, const double tot_xs, const double abs_xs);
29
30 NeutronAtom(const uint16_t z, const uint16_t a, const double coh_b_real, const double inc_b_real, const double coh_xs,
31 const double inc_xs, const double tot_xs, const double abs_xs);
32
33 NeutronAtom(const uint16_t z, const uint16_t a, const double coh_b_real, const double coh_b_img,
34 const double inc_b_real, const double inc_b_img, const double coh_xs, const double inc_xs,
35 const double tot_xs, const double abs_xs);
36
37 NeutronAtom(const NeutronAtom &other);
38
39 NeutronAtom &operator=(const NeutronAtom &other);
40
42
44 uint16_t z_number;
45
48 uint16_t a_number;
49
52
55
58
61
64
67
70
73
76
79
82};
83
84MANTID_KERNEL_DLL bool operator==(const NeutronAtom &left, const NeutronAtom &right);
85MANTID_KERNEL_DLL bool operator!=(const NeutronAtom &left, const NeutronAtom &right);
86
87// addition
88MANTID_KERNEL_DLL NeutronAtom operator+(const NeutronAtom &left, const NeutronAtom &right);
89
90// multiplication
91MANTID_KERNEL_DLL NeutronAtom operator*(const NeutronAtom &left, const double right);
92MANTID_KERNEL_DLL NeutronAtom operator*(const double left, const NeutronAtom &right);
93
94MANTID_KERNEL_DLL std::ostream &operator<<(std::ostream &out, const NeutronAtom &atom);
95MANTID_KERNEL_DLL NeutronAtom getNeutronAtom(const uint16_t z_number, const uint16_t a_number = 0);
96MANTID_KERNEL_DLL NeutronAtom getNeutronNoExceptions(const uint16_t z_number, const uint16_t a_number);
97MANTID_KERNEL_DLL NeutronAtom getNeutronNoExceptions(const NeutronAtom &other);
98
100MANTID_KERNEL_DLL void calculateScatteringLengths(NeutronAtom &atom);
101
102} // Namespace PhysicalConstants
103} // Namespace Mantid
double left
Definition: LineProfile.cpp:80
double right
Definition: LineProfile.cpp:81
A namespace containing physical constants that are required by algorithms and unit routines.
Definition: Atom.h:14
MANTID_KERNEL_DLL bool operator!=(const Atom &left, const Atom &right)
Inequality operator overload.
Definition: Atom.cpp:3150
MANTID_KERNEL_DLL void calculateScatteringLengths(NeutronAtom &atom)
Utility function to calculate scattering lengths from cross-sections.
Definition: NeutronAtom.cpp:27
MANTID_KERNEL_DLL NeutronAtom getNeutronNoExceptions(const uint16_t z_number, const uint16_t a_number)
MANTID_KERNEL_DLL NeutronAtom getNeutronAtom(const uint16_t z_number, const uint16_t a_number=0)
Retrieve a copy of NeutronAtom.
MANTID_KERNEL_DLL NeutronAtom operator*(const NeutronAtom &left, const double right)
Multiplying a NeutronAtom by a number sets a_number=z_number=0 and multiplies all of the scattering i...
MANTID_KERNEL_DLL std::ostream & operator<<(std::ostream &out, const Atom &atom)
Stream operator overload.
Definition: Atom.cpp:3152
MANTID_KERNEL_DLL NeutronAtom operator+(const NeutronAtom &left, const NeutronAtom &right)
Adding two NeutronAtoms together sets a_number=z_number=0 and adds all of the scattering information.
MANTID_KERNEL_DLL bool operator==(const Atom &left, const Atom &right)
Equality operator overload.
Definition: Atom.cpp:3128
Helper class which provides the Collimation Length for SANS instruments.
Structure to store neutronic scattering information for the various elements.
Definition: NeutronAtom.h:22
double coh_scatt_length_real
The real part of the coherent scattering length in fm.
Definition: NeutronAtom.h:51
double tot_scatt_length
The total scattering length in fm.
Definition: NeutronAtom.h:75
double inc_scatt_length
The incoherent scattering length in fm.
Definition: NeutronAtom.h:81
uint16_t z_number
The atomic number, or number of protons, for the atom.
Definition: NeutronAtom.h:44
double coh_scatt_length
The coherent scattering length in fm.
Definition: NeutronAtom.h:78
double coh_scatt_length_img
The imaginary part of the coherent scattering length in fm.
Definition: NeutronAtom.h:54
double inc_scatt_length_img
The imaginary part of the incoherent scattering length in fm.
Definition: NeutronAtom.h:60
double inc_scatt_xs
The incoherent scattering cross section in barns.
Definition: NeutronAtom.h:66
double tot_scatt_xs
The total scattering cross section in barns.
Definition: NeutronAtom.h:69
double abs_scatt_xs
The absorption cross section for 2200m/s neutrons in barns.
Definition: NeutronAtom.h:72
double inc_scatt_length_real
The real part of the incoherent scattering length in fm.
Definition: NeutronAtom.h:57
double coh_scatt_xs
The coherent scattering cross section in barns.
Definition: NeutronAtom.h:63
static const double ReferenceLambda
The reference wavelength value for absorption cross sections.
Definition: NeutronAtom.h:25
uint16_t a_number
The total number of protons and neutrons, or mass number, for the atom for isotopic averages this is ...
Definition: NeutronAtom.h:48