BornAgain  1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
FormFactorCoherentPart Class Reference

Information about single particle form factor and specular info of the embedding layer. More...

Collaboration diagram for FormFactorCoherentPart:
[legend]

Public Member Functions

 FormFactorCoherentPart (const FormFactorCoherentPart &other)
 
 FormFactorCoherentPart (FormFactorCoherentPart &&other)
 
 FormFactorCoherentPart (IComputeFF *ff)
 
 ~FormFactorCoherentPart ()
 
complex_t evaluate (const SimulationElement &sim_element) const
 
Eigen::Matrix2cd evaluatePol (const SimulationElement &sim_element) const
 
FormFactorCoherentPartoperator= (const FormFactorCoherentPart &other)
 
FormFactorCoherentPartoperator= (FormFactorCoherentPart &&other)
 
double radialExtension () const
 
void setSpecularInfo (const IFresnelMap *fresnel_map, size_t layer_index)
 

Private Attributes

std::unique_ptr< IComputeFFm_ff
 
const IFresnelMapm_fresnel_map
 
size_t m_layer_index
 

Detailed Description

Information about single particle form factor and specular info of the embedding layer.

Definition at line 34 of file FormFactorCoherentPart.h.

Constructor & Destructor Documentation

◆ FormFactorCoherentPart() [1/3]

FormFactorCoherentPart::FormFactorCoherentPart ( IComputeFF ff)

Definition at line 22 of file FormFactorCoherentPart.cpp.

22 : m_ff(ff) {}
std::unique_ptr< IComputeFF > m_ff

◆ FormFactorCoherentPart() [2/3]

FormFactorCoherentPart::FormFactorCoherentPart ( const FormFactorCoherentPart other)

Definition at line 24 of file FormFactorCoherentPart.cpp.

25  : m_ff(std::unique_ptr<IComputeFF>(other.m_ff->clone()))
28 {
29 }
const IFresnelMap * m_fresnel_map

◆ FormFactorCoherentPart() [3/3]

FormFactorCoherentPart::FormFactorCoherentPart ( FormFactorCoherentPart &&  other)
default

◆ ~FormFactorCoherentPart()

FormFactorCoherentPart::~FormFactorCoherentPart ( )
default

Member Function Documentation

◆ evaluate()

complex_t FormFactorCoherentPart::evaluate ( const SimulationElement sim_element) const

Definition at line 45 of file FormFactorCoherentPart.cpp.

46 {
47  WavevectorInfo wavevectors(sim_element.getKi(), sim_element.getMeanKf(),
48  sim_element.wavelength());
49 
50  auto in_coeffs = m_fresnel_map->getInCoefficients(sim_element, m_layer_index);
51  auto out_coeffs = m_fresnel_map->getOutCoefficients(sim_element, m_layer_index);
52  m_ff->setSpecularInfo(std::move(in_coeffs), std::move(out_coeffs));
53  return m_ff->evaluate(wavevectors);
54 }
virtual std::unique_ptr< const ILayerRTCoefficients > getOutCoefficients(const SimulationElement &sim_element, size_t layer_index) const =0
Retrieves the amplitude coefficients for a (time-reversed) outgoing wavevector.
std::unique_ptr< const ILayerRTCoefficients > getInCoefficients(const T &sim_element, size_t layer_index) const
Retrieves the amplitude coefficients for an incoming wavevector.
Definition: IFresnelMap.h:45
double wavelength() const
kvector_t getMeanKf() const
kvector_t getKi() const
Holds all wavevector information relevant for calculating form factors.

References IFresnelMap::getInCoefficients(), SimulationElement::getKi(), SimulationElement::getMeanKf(), IFresnelMap::getOutCoefficients(), m_ff, m_fresnel_map, m_layer_index, and SimulationElement::wavelength().

Here is the call graph for this function:

◆ evaluatePol()

Eigen::Matrix2cd FormFactorCoherentPart::evaluatePol ( const SimulationElement sim_element) const

Definition at line 56 of file FormFactorCoherentPart.cpp.

57 {
58  WavevectorInfo wavevectors(sim_element.getKi(), sim_element.getMeanKf(),
59  sim_element.wavelength());
60 
61  auto in_coeffs = m_fresnel_map->getInCoefficients(sim_element, m_layer_index);
62  auto out_coeffs = m_fresnel_map->getOutCoefficients(sim_element, m_layer_index);
63  m_ff->setSpecularInfo(std::move(in_coeffs), std::move(out_coeffs));
64  return m_ff->evaluatePol(wavevectors);
65 }

References IFresnelMap::getInCoefficients(), SimulationElement::getKi(), SimulationElement::getMeanKf(), IFresnelMap::getOutCoefficients(), m_ff, m_fresnel_map, m_layer_index, and SimulationElement::wavelength().

Here is the call graph for this function:

◆ operator=() [1/2]

FormFactorCoherentPart & FormFactorCoherentPart::operator= ( const FormFactorCoherentPart other)

Definition at line 31 of file FormFactorCoherentPart.cpp.

32 {
33  m_ff.reset(other.m_ff->clone());
36  return *this;
37 }

References m_ff, m_fresnel_map, and m_layer_index.

◆ operator=() [2/2]

FormFactorCoherentPart & FormFactorCoherentPart::operator= ( FormFactorCoherentPart &&  other)
default

◆ radialExtension()

double FormFactorCoherentPart::radialExtension ( ) const

Definition at line 73 of file FormFactorCoherentPart.cpp.

74 {
75  return m_ff->radialExtension();
76 }

References m_ff.

◆ setSpecularInfo()

void FormFactorCoherentPart::setSpecularInfo ( const IFresnelMap fresnel_map,
size_t  layer_index 
)

Definition at line 67 of file FormFactorCoherentPart.cpp.

68 {
69  m_fresnel_map = fresnel_map;
70  m_layer_index = layer_index;
71 }

References m_fresnel_map, and m_layer_index.

Member Data Documentation

◆ m_ff

std::unique_ptr<IComputeFF> FormFactorCoherentPart::m_ff
private

Definition at line 52 of file FormFactorCoherentPart.h.

Referenced by evaluate(), evaluatePol(), operator=(), and radialExtension().

◆ m_fresnel_map

const IFresnelMap* FormFactorCoherentPart::m_fresnel_map
private

Definition at line 53 of file FormFactorCoherentPart.h.

Referenced by evaluate(), evaluatePol(), operator=(), and setSpecularInfo().

◆ m_layer_index

size_t FormFactorCoherentPart::m_layer_index
private

Definition at line 54 of file FormFactorCoherentPart.h.

Referenced by evaluate(), evaluatePol(), operator=(), and setSpecularInfo().


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