BornAgain  1.19.79
Open-source research software to simulate and fit neutron and x-ray reflectometry and grazing-incidence small-angle scattering
DepthProbeElement Class Reference

Description

Definition at line 29 of file DepthProbeElement.h.

Inheritance diagram for DepthProbeElement:
[legend]
Collaboration diagram for DepthProbeElement:
[legend]

Public Member Functions

 DepthProbeElement (const DepthProbeElement &other)=delete
 
 DepthProbeElement (DepthProbeElement &&other)
 
 DepthProbeElement (double wavelength, double alpha_i, const IAxis *z_positions)
 
 ~DepthProbeElement ()
 
double alphaI () const
 
const std::valarray< double > & getIntensities () const
 
R3 getKi () const
 
const IAxisgetZPositions () const
 
bool isCalculated () const
 
const PolMatricespolMatrices () const
 Returns polarizer and analyzer matrices. More...
 
void setCalculationFlag (bool calculation_flag)
 Set calculation flag (if it's false, zero intensity is assigned to the element) More...
 
template<typename T >
void setIntensities (T &&intensities)
 
void setZPositions (const IAxis *z_positions)
 
size_t size () const
 
double wavelength () const
 

Protected Attributes

const PolMatrices m_polMatrices
 

Private Attributes

double m_alpha_i
 the wavelength and the incident angle of the beam More...
 
bool m_calculation_flag
 
std::valarray< double > m_intensities
 simulated intensity for the set of z positions More...
 
double m_wavelength
 
const IAxism_z_positions
 positions (lower z corresponds to a greater depth) More...
 

Constructor & Destructor Documentation

◆ DepthProbeElement() [1/3]

DepthProbeElement::DepthProbeElement ( double  wavelength,
double  alpha_i,
const IAxis z_positions 
)

Definition at line 21 of file DepthProbeElement.cpp.

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 }
const IAxis * m_z_positions
positions (lower z corresponds to a greater depth)
double m_alpha_i
the wavelength and the incident angle of the beam
double wavelength() const
std::valarray< double > m_intensities
simulated intensity for the set of z positions
virtual size_t size() const =0
Returns the number of bins.
IElement(PolMatrices polMatrices)
Definition: IElement.h:31
Convenience class for handling polarization density matrix and polarization analyzer operator.
Definition: PolMatrices.h:29

References m_intensities, and IAxis::size().

Here is the call graph for this function:

◆ DepthProbeElement() [2/3]

DepthProbeElement::DepthProbeElement ( const DepthProbeElement other)
delete

◆ DepthProbeElement() [3/3]

DepthProbeElement::DepthProbeElement ( DepthProbeElement &&  other)

Definition at line 34 of file DepthProbeElement.cpp.

36  , m_wavelength(other.m_wavelength)
37  , m_alpha_i(other.m_alpha_i)
38  , m_intensities(std::move(other.m_intensities))
41 {
42 }

◆ ~DepthProbeElement()

DepthProbeElement::~DepthProbeElement ( )
default

Member Function Documentation

◆ alphaI()

double DepthProbeElement::alphaI ( ) const
inline

Definition at line 38 of file DepthProbeElement.h.

38 { return m_alpha_i; }

References m_alpha_i.

◆ getIntensities()

const std::valarray<double>& DepthProbeElement::getIntensities ( ) const
inline

Definition at line 50 of file DepthProbeElement.h.

50 { return m_intensities; }

References m_intensities.

◆ getKi()

R3 DepthProbeElement::getKi ( ) const

Definition at line 46 of file DepthProbeElement.cpp.

47 {
49 }
const double phi_i_0
R3 vecOfLambdaAlphaPhi(double _lambda, double _alpha, double _phi)
Definition: Direction.cpp:19

References m_alpha_i, m_wavelength, phi_i_0, and vecOfLambdaAlphaPhi().

Referenced by DepthProbeComputation::runProtected().

Here is the call graph for this function:

◆ getZPositions()

const IAxis* DepthProbeElement::getZPositions ( ) const
inline

Definition at line 53 of file DepthProbeElement.h.

53 { return m_z_positions; }

References m_z_positions.

Referenced by DepthProbeComputation::runProtected().

◆ isCalculated()

bool DepthProbeElement::isCalculated ( ) const
inline

Definition at line 59 of file DepthProbeElement.h.

59 { return m_calculation_flag; }

References m_calculation_flag.

Referenced by DepthProbeComputation::runProtected().

◆ polMatrices()

const PolMatrices& IElement::polMatrices ( ) const
inlineinherited

◆ setCalculationFlag()

void DepthProbeElement::setCalculationFlag ( bool  calculation_flag)
inline

Set calculation flag (if it's false, zero intensity is assigned to the element)

Definition at line 58 of file DepthProbeElement.h.

58 { m_calculation_flag = calculation_flag; }

References m_calculation_flag.

◆ setIntensities()

template<typename T >
void DepthProbeElement::setIntensities ( T &&  intensities)
inline

Definition at line 42 of file DepthProbeElement.h.

43  {
44  static_assert(
45  std::is_assignable<std::valarray<double>, typename std::decay<T>::type>::value,
46  "Error in DepthProbeElement::setIntensities: wrong type of input data.");
47  m_intensities = std::forward<T>(intensities);
48  }

References m_intensities.

Referenced by DepthProbeComputation::runProtected().

◆ setZPositions()

void DepthProbeElement::setZPositions ( const IAxis z_positions)
inline

Definition at line 52 of file DepthProbeElement.h.

52 { m_z_positions = z_positions; }

References m_z_positions.

◆ size()

size_t DepthProbeElement::size ( ) const
inline

Definition at line 55 of file DepthProbeElement.h.

55 { return m_intensities.size(); }

References m_intensities.

◆ wavelength()

double DepthProbeElement::wavelength ( ) const
inline

Definition at line 37 of file DepthProbeElement.h.

37 { return m_wavelength; }

References m_wavelength.

Member Data Documentation

◆ m_alpha_i

double DepthProbeElement::m_alpha_i
private

the wavelength and the incident angle of the beam

Definition at line 62 of file DepthProbeElement.h.

Referenced by alphaI(), and getKi().

◆ m_calculation_flag

bool DepthProbeElement::m_calculation_flag
private

Definition at line 65 of file DepthProbeElement.h.

Referenced by isCalculated(), and setCalculationFlag().

◆ m_intensities

std::valarray<double> DepthProbeElement::m_intensities
private

simulated intensity for the set of z positions

Definition at line 63 of file DepthProbeElement.h.

Referenced by DepthProbeElement(), getIntensities(), setIntensities(), and size().

◆ m_polMatrices

const PolMatrices IElement::m_polMatrices
protectedinherited

Definition at line 40 of file IElement.h.

Referenced by DiffuseElement::pointElement(), and IElement::polMatrices().

◆ m_wavelength

double DepthProbeElement::m_wavelength
private

Definition at line 62 of file DepthProbeElement.h.

Referenced by getKi(), and wavelength().

◆ m_z_positions

const IAxis* DepthProbeElement::m_z_positions
private

positions (lower z corresponds to a greater depth)

Definition at line 64 of file DepthProbeElement.h.

Referenced by getZPositions(), and setZPositions().


The documentation for this class was generated from the following files: