BornAgain  1.18.0
Simulate and fit neutron and x-ray scattering at grazing incidence
FormFactorCoherentPart Class Reference
Collaboration diagram for FormFactorCoherentPart:

Public Member Functions

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

Private Attributes

std::unique_ptr< IFormFactormP_ff
 
const IFresnelMapmp_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 29 of file FormFactorCoherentPart.h.

Constructor & Destructor Documentation

◆ FormFactorCoherentPart() [1/3]

FormFactorCoherentPart::FormFactorCoherentPart ( IFormFactor p_ff)

Definition at line 22 of file FormFactorCoherentPart.cpp.

22 : mP_ff(p_ff) {}
std::unique_ptr< IFormFactor > mP_ff

◆ FormFactorCoherentPart() [2/3]

FormFactorCoherentPart::FormFactorCoherentPart ( const FormFactorCoherentPart other)

Definition at line 24 of file FormFactorCoherentPart.cpp.

25  : mP_ff(other.mP_ff->clone()), mp_fresnel_map(other.mp_fresnel_map),
27 {
28 }
const IFresnelMap * mp_fresnel_map

◆ FormFactorCoherentPart() [3/3]

FormFactorCoherentPart::FormFactorCoherentPart ( FormFactorCoherentPart &&  other)
default

◆ ~FormFactorCoherentPart()

FormFactorCoherentPart::~FormFactorCoherentPart ( )
default

Member Function Documentation

◆ operator=() [1/2]

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

Definition at line 30 of file FormFactorCoherentPart.cpp.

31 {
32  mP_ff.reset(other.mP_ff->clone());
35  return *this;
36 }

References m_layer_index, mP_ff, and mp_fresnel_map.

◆ operator=() [2/2]

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

◆ evaluate()

complex_t FormFactorCoherentPart::evaluate ( const SimulationElement sim_element) const

Definition at line 44 of file FormFactorCoherentPart.cpp.

45 {
46  WavevectorInfo wavevectors(sim_element.getKi(), sim_element.getMeanKf(),
47  sim_element.getWavelength());
48 
49  auto P_in_coeffs = mp_fresnel_map->getInCoefficients(sim_element, m_layer_index);
50  auto P_out_coeffs = mp_fresnel_map->getOutCoefficients(sim_element, m_layer_index);
51  mP_ff->setSpecularInfo(std::move(P_in_coeffs), std::move(P_out_coeffs));
52  return mP_ff->evaluate(wavevectors);
53 }
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:41
kvector_t getMeanKf() const
double getWavelength() const
kvector_t getKi() const
Holds all wavevector information relevant for calculating form factors.

References IFresnelMap::getInCoefficients(), SimulationElement::getKi(), SimulationElement::getMeanKf(), IFresnelMap::getOutCoefficients(), SimulationElement::getWavelength(), m_layer_index, mP_ff, and mp_fresnel_map.

Here is the call graph for this function:

◆ evaluatePol()

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

Definition at line 55 of file FormFactorCoherentPart.cpp.

56 {
57  WavevectorInfo wavevectors(sim_element.getKi(), sim_element.getMeanKf(),
58  sim_element.getWavelength());
59 
60  auto P_in_coeffs = mp_fresnel_map->getInCoefficients(sim_element, m_layer_index);
61  auto P_out_coeffs = mp_fresnel_map->getOutCoefficients(sim_element, m_layer_index);
62  mP_ff->setSpecularInfo(std::move(P_in_coeffs), std::move(P_out_coeffs));
63  return mP_ff->evaluatePol(wavevectors);
64 }

References IFresnelMap::getInCoefficients(), SimulationElement::getKi(), SimulationElement::getMeanKf(), IFresnelMap::getOutCoefficients(), SimulationElement::getWavelength(), m_layer_index, mP_ff, and mp_fresnel_map.

Here is the call graph for this function:

◆ setSpecularInfo()

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

Definition at line 66 of file FormFactorCoherentPart.cpp.

67 {
68  mp_fresnel_map = p_fresnel_map;
69  m_layer_index = layer_index;
70 }

References m_layer_index, and mp_fresnel_map.

◆ radialExtension()

double FormFactorCoherentPart::radialExtension ( ) const

Definition at line 72 of file FormFactorCoherentPart.cpp.

73 {
74  return mP_ff->radialExtension();
75 }

References mP_ff.

Member Data Documentation

◆ mP_ff

std::unique_ptr<IFormFactor> FormFactorCoherentPart::mP_ff
private

Definition at line 48 of file FormFactorCoherentPart.h.

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

◆ mp_fresnel_map

const IFresnelMap* FormFactorCoherentPart::mp_fresnel_map
private

Definition at line 49 of file FormFactorCoherentPart.h.

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

◆ m_layer_index

size_t FormFactorCoherentPart::m_layer_index
private

Definition at line 50 of file FormFactorCoherentPart.h.

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


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