BornAgain  1.19.79
Open-source research software to simulate and fit neutron and x-ray reflectometry and grazing-incidence small-angle scattering
DepthProbeElement.cpp
Go to the documentation of this file.
1 // ************************************************************************************************
2 //
3 // BornAgain: simulate and fit reflection and scattering
4 //
5 //! @file Base/Element/DepthProbeElement.cpp
6 //! @brief Implements class DepthProbeElement.
7 //!
8 //! @homepage http://www.bornagainproject.org
9 //! @license GNU General Public License v3 or higher (see COPYING)
10 //! @copyright Forschungszentrum Jülich GmbH 2018
11 //! @authors Scientific Computing Group at MLZ (see CITATION, AUTHORS)
12 //
13 // ************************************************************************************************
14 
16 #include "Base/Axis/IAxis.h"
17 #include "Base/Vector/Direction.h"
18 
19 const double phi_i_0 = 0.0;
20 
21 DepthProbeElement::DepthProbeElement(double wavelength, double alpha_i, const IAxis* z_positions)
23  , m_wavelength(wavelength)
24  , m_alpha_i(alpha_i)
25  , m_z_positions(z_positions)
26  , m_calculation_flag(true)
27 {
28  if (!z_positions)
29  throw std::runtime_error(
30  "Error in DepthProbeElement::DepthProbeElement: z positions are not specified");
31  m_intensities.resize(z_positions->size(), 0.0);
32 }
33 
36  , m_wavelength(other.m_wavelength)
37  , m_alpha_i(other.m_alpha_i)
38  , m_intensities(std::move(other.m_intensities))
39  , m_z_positions(other.m_z_positions)
40  , m_calculation_flag(other.m_calculation_flag)
41 {
42 }
43 
45 
47 {
49 }
const double phi_i_0
Defines class DepthProbeElement.
R3 vecOfLambdaAlphaPhi(double _lambda, double _alpha, double _phi)
Definition: Direction.cpp:19
Defines class Direction.
Defines interface IAxis.
double m_alpha_i
the wavelength and the incident angle of the beam
DepthProbeElement(double wavelength, double alpha_i, const IAxis *z_positions)
std::valarray< double > m_intensities
simulated intensity for the set of z positions
Abstract base class for one-dimensional axes.
Definition: IAxis.h:27
virtual size_t size() const =0
Returns the number of bins.
Convenience class for handling polarization density matrix and polarization analyzer operator.
Definition: PolMatrices.h:29