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

Description

Data stucture containing both input and output of a single image pixel for specular simulation.

Definition at line 35 of file SpecularElement.h.

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

Public Member Functions

 SpecularElement (const SpecularElement &other)=delete
 
 SpecularElement (SpecularElement &&other)
 
 ~SpecularElement ()
 
double intensity () const
 
bool isCalculated () const
 Returns calculation flag (if it's false, zero intensity is assigned to the element) More...
 
const PolMatricespolMatrices () const
 Returns polarizer and analyzer matrices. More...
 
std::vector< complex_t > produceKz (const SliceStack &slices)
 Returns kz values for Abeles computation of reflection/transition coefficients. More...
 
void setIntensity (double intensity)
 

Static Public Member Functions

static SpecularElement FromAlphaScan (double wavelength, double alpha, const PolMatrices &polMatrices, bool computable)
 
static SpecularElement FromQzScan (double kz, const PolMatrices &polMatrices, bool computable)
 

Protected Attributes

const PolMatrices m_polMatrices
 

Private Member Functions

 SpecularElement (bool computable, const PolMatrices &polMatrices, std::function< std::vector< complex_t >(const SliceStack &)> kz_comp)
 

Private Attributes

const bool m_computable
 
double m_intensity
 simulated intensity for detector cell More...
 
const std::function< std::vector< complex_t >const SliceStack &)> m_kz_computation
 

Constructor & Destructor Documentation

◆ SpecularElement() [1/3]

SpecularElement::SpecularElement ( const SpecularElement other)
delete

Referenced by FromAlphaScan(), and FromQzScan().

◆ SpecularElement() [2/3]

SpecularElement::SpecularElement ( SpecularElement &&  other)
default

◆ ~SpecularElement()

SpecularElement::~SpecularElement ( )
default

◆ SpecularElement() [3/3]

SpecularElement::SpecularElement ( bool  computable,
const PolMatrices polMatrices,
std::function< std::vector< complex_t >(const SliceStack &)>  kz_comp 
)
private

Definition at line 37 of file SpecularElement.cpp.

40  , m_intensity(0.0)
41  , m_computable(computable)
42  , m_kz_computation(kz_comp)
43 {
44 }
IElement(PolMatrices polMatrices)
Definition: IElement.h:31
const PolMatrices & polMatrices() const
Returns polarizer and analyzer matrices.
Definition: IElement.h:37
double m_intensity
simulated intensity for detector cell
const bool m_computable
const std::function< std::vector< complex_t >const SliceStack &)> m_kz_computation

Member Function Documentation

◆ FromAlphaScan()

SpecularElement SpecularElement::FromAlphaScan ( double  wavelength,
double  alpha,
const PolMatrices polMatrices,
bool  computable 
)
static

Definition at line 27 of file SpecularElement.cpp.

29 {
30  return SpecularElement(
31  computable, polMatrices,
32  [k = vecOfLambdaAlphaPhi(wavelength, alpha, 0.0)](const SliceStack& slices) {
33  return Compute::Kz::computeKzFromRefIndices(slices, k);
34  });
35 }
R3 vecOfLambdaAlphaPhi(double _lambda, double _alpha, double _phi)
Definition: Direction.cpp:19
A stack of Slices.
Definition: SliceStack.h:38
SpecularElement(const SpecularElement &other)=delete
std::vector< complex_t > computeKzFromRefIndices(const SliceStack &slices, R3 k)
Computes kz values from k-vector of the incoming beam known at a distant point in vacuum....

References SpecularElement(), Compute::Kz::computeKzFromRefIndices(), IElement::polMatrices(), and vecOfLambdaAlphaPhi().

Referenced by AlphaScan::generateElements().

Here is the call graph for this function:

◆ FromQzScan()

SpecularElement SpecularElement::FromQzScan ( double  kz,
const PolMatrices polMatrices,
bool  computable 
)
static

Definition at line 19 of file SpecularElement.cpp.

21 {
22  return SpecularElement(computable, polMatrices, [kz](const SliceStack& slices) {
23  return Compute::Kz::computeKzFromSLDs(slices, kz);
24  });
25 }
std::vector< complex_t > computeKzFromSLDs(const SliceStack &slices, double kz)
Computes kz values from kz of the incoming beam known at a distant point in vacuum....

References SpecularElement(), Compute::Kz::computeKzFromSLDs(), and IElement::polMatrices().

Referenced by QzScan::generateElements().

Here is the call graph for this function:

◆ intensity()

double SpecularElement::intensity ( ) const
inline

Definition at line 46 of file SpecularElement.h.

46 { return m_intensity; }

References m_intensity.

Referenced by setIntensity().

◆ isCalculated()

bool SpecularElement::isCalculated ( ) const
inline

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

Definition at line 50 of file SpecularElement.h.

50 { return m_computable; }

References m_computable.

Referenced by SpecularComputation::runProtected().

◆ polMatrices()

const PolMatrices& IElement::polMatrices ( ) const
inlineinherited

Returns polarizer and analyzer matrices.

Definition at line 37 of file IElement.h.

37 { return m_polMatrices; }
const PolMatrices m_polMatrices
Definition: IElement.h:40

References IElement::m_polMatrices.

Referenced by FromAlphaScan(), FromQzScan(), DecouplingApproximationStrategy::polarizedCalculation(), SSCAStrategy::polarizedCalculation(), and SpecularComputation::runProtected().

◆ produceKz()

std::vector< complex_t > SpecularElement::produceKz ( const SliceStack slices)

Returns kz values for Abeles computation of reflection/transition coefficients.

Definition at line 50 of file SpecularElement.cpp.

51 {
52  return m_kz_computation(slices);
53 }

References m_kz_computation.

Referenced by SpecularComputation::runProtected().

◆ setIntensity()

void SpecularElement::setIntensity ( double  intensity)
inline

Definition at line 47 of file SpecularElement.h.

double intensity() const

References intensity(), and m_intensity.

Referenced by SpecularComputation::runProtected().

Here is the call graph for this function:

Member Data Documentation

◆ m_computable

const bool SpecularElement::m_computable
private

Definition at line 60 of file SpecularElement.h.

Referenced by isCalculated().

◆ m_intensity

double SpecularElement::m_intensity
private

simulated intensity for detector cell

Definition at line 59 of file SpecularElement.h.

Referenced by intensity(), and setIntensity().

◆ m_kz_computation

const std::function<std::vector<complex_t>const SliceStack&)> SpecularElement::m_kz_computation
private

Definition at line 61 of file SpecularElement.h.

Referenced by produceKz().

◆ m_polMatrices

const PolMatrices IElement::m_polMatrices
protectedinherited

Definition at line 40 of file IElement.h.

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


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