BornAgain
1.18.0
Simulate and fit neutron and x-ray scattering at grazing incidence
|
Public Member Functions | |
SimulationElement (double wavelength, double alpha_i, double phi_i, std::unique_ptr< IPixel > pixel) | |
SimulationElement (const SimulationElement &other) | |
SimulationElement & | operator= (const SimulationElement &other) |
SimulationElement (const SimulationElement &other, double x, double y) | |
SimulationElement (SimulationElement &&other) noexcept | |
~SimulationElement () | |
void | setPolarization (const Eigen::Matrix2cd &polarization) |
void | setAnalyzerOperator (const Eigen::Matrix2cd &polarization_operator) |
const PolarizationHandler & | polarizationHandler () const |
double | getWavelength () const |
double | getAlphaI () const |
double | getPhiI () const |
double | getAlphaMean () const |
double | getPhiMean () const |
void | setIntensity (double intensity) |
void | addIntensity (double intensity) |
double | getIntensity () const |
kvector_t | getKi () const |
kvector_t | getMeanKf () const |
kvector_t | getMeanQ () const |
kvector_t | getQ (double x, double y) const |
double | getIntegrationFactor (double x, double y) const |
double | getSolidAngle () const |
double | getAlpha (double x, double y) const |
double | getPhi (double x, double y) const |
void | setSpecular (bool is_specular) |
bool | isSpecular () const |
Private Member Functions | |
void | swapContent (SimulationElement &other) |
kvector_t | getKf (double x, double y) const |
Private Attributes | |
PolarizationHandler | m_polarization |
double | m_wavelength |
double | m_alpha_i |
double | m_phi_i |
kvector_t | m_k_i |
kvector_t | m_mean_kf |
double | m_intensity |
std::unique_ptr< IPixel > | mP_pixel |
bool | m_is_specular |
Data stucture containing both input and output of a single detector cell.
Definition at line 28 of file SimulationElement.h.
SimulationElement::SimulationElement | ( | double | wavelength, |
double | alpha_i, | ||
double | phi_i, | ||
std::unique_ptr< IPixel > | pixel | ||
) |
Definition at line 17 of file SimulationElement.cpp.
SimulationElement::SimulationElement | ( | const SimulationElement & | other | ) |
Definition at line 26 of file SimulationElement.cpp.
References mP_pixel.
SimulationElement::SimulationElement | ( | const SimulationElement & | other, |
double | x, | ||
double | y | ||
) |
Construct SimulationElement from other element and restrict k_f to specific value in the original detector pixel.
Definition at line 34 of file SimulationElement.cpp.
References m_mean_kf, m_wavelength, and mP_pixel.
|
noexcept |
Definition at line 43 of file SimulationElement.cpp.
|
default |
SimulationElement & SimulationElement::operator= | ( | const SimulationElement & | other | ) |
Definition at line 53 of file SimulationElement.cpp.
References swapContent().
|
inline |
Sets the polarization density matrix (in spin basis along z-axis)
Definition at line 45 of file SimulationElement.h.
References m_polarization, and PolarizationHandler::setPolarization().
Referenced by Simulation2D::generateSimulationElements().
|
inline |
Sets the polarization analyzer operator (in spin basis along z-axis)
Definition at line 51 of file SimulationElement.h.
References m_polarization, and PolarizationHandler::setAnalyzerOperator().
Referenced by Simulation2D::generateSimulationElements().
|
inline |
Returns assigned PolarizationHandler.
Definition at line 57 of file SimulationElement.h.
References m_polarization.
Referenced by DecouplingApproximationStrategy::polarizedCalculation(), and SSCApproximationStrategy::polarizedCalculation().
|
inline |
Definition at line 59 of file SimulationElement.h.
References m_wavelength.
Referenced by RoughMultiLayerComputation::compute(), FormFactorCoherentPart::evaluate(), and FormFactorCoherentPart::evaluatePol().
|
inline |
Definition at line 60 of file SimulationElement.h.
References m_alpha_i.
Referenced by GISASSpecularComputation::compute(), and Simulation2D::normalize().
|
inline |
|
inline |
Definition at line 62 of file SimulationElement.h.
References getAlpha().
Referenced by ParticleLayoutComputation::compute(), and RoughMultiLayerComputation::compute().
|
inline |
Definition at line 63 of file SimulationElement.h.
References getPhi().
|
inline |
Definition at line 64 of file SimulationElement.h.
References m_intensity.
Referenced by Simulation2D::addBackgroundIntensity(), GISASSpecularComputation::compute(), and Simulation2D::normalize().
|
inline |
Definition at line 65 of file SimulationElement.h.
References m_intensity.
Referenced by ParticleLayoutComputation::compute(), and RoughMultiLayerComputation::compute().
|
inline |
Definition at line 66 of file SimulationElement.h.
References m_intensity.
Referenced by Simulation2D::addBackgroundIntensity(), and Simulation2D::normalize().
kvector_t SimulationElement::getKi | ( | ) | const |
Definition at line 62 of file SimulationElement.cpp.
References m_k_i.
Referenced by FormFactorCoherentPart::evaluate(), FormFactorCoherentPart::evaluatePol(), getMeanQ(), and getQ().
kvector_t SimulationElement::getMeanKf | ( | ) | const |
Definition at line 67 of file SimulationElement.cpp.
References m_mean_kf.
Referenced by FormFactorCoherentPart::evaluate(), FormFactorCoherentPart::evaluatePol(), getMeanQ(), MatrixFresnelMap::getOutCoefficients(), and ScalarFresnelMap::getOutCoefficients().
kvector_t SimulationElement::getMeanQ | ( | ) | const |
Definition at line 79 of file SimulationElement.cpp.
References getKi(), and getMeanKf().
Referenced by RoughMultiLayerComputation::compute(), DecouplingApproximationStrategy::polarizedCalculation(), SSCApproximationStrategy::polarizedCalculation(), DecouplingApproximationStrategy::scalarCalculation(), and SSCApproximationStrategy::scalarCalculation().
kvector_t SimulationElement::getQ | ( | double | x, |
double | y | ||
) | const |
Returns scattering vector Q, with Kf determined from in-pixel coordinates x,y.
In-pixel coordinates take values from 0 to 1.
Definition at line 86 of file SimulationElement.cpp.
References getKi(), m_wavelength, and mP_pixel.
double SimulationElement::getIntegrationFactor | ( | double | x, |
double | y | ||
) | const |
Definition at line 114 of file SimulationElement.cpp.
References mP_pixel.
Referenced by IInterferenceFunctionStrategy::evaluate_for_fixed_angles().
double SimulationElement::getSolidAngle | ( | ) | const |
Definition at line 119 of file SimulationElement.cpp.
References mP_pixel.
Referenced by GISASSpecularComputation::compute(), IInterferenceFunctionStrategy::evaluate(), and Simulation2D::normalize().
double SimulationElement::getAlpha | ( | double | x, |
double | y | ||
) | const |
Definition at line 104 of file SimulationElement.cpp.
References getKf(), M_PI_2, and BasicVector3D< T >::theta().
Referenced by getAlphaMean().
double SimulationElement::getPhi | ( | double | x, |
double | y | ||
) | const |
Definition at line 109 of file SimulationElement.cpp.
References getKf(), and BasicVector3D< T >::phi().
Referenced by getPhiMean().
|
inline |
Set specularity indication on/off.
Definition at line 80 of file SimulationElement.h.
References m_is_specular.
Referenced by Simulation2D::generateSimulationElements().
|
inline |
Tells if simulation element corresponds to a specular peak.
Definition at line 83 of file SimulationElement.h.
References m_is_specular.
Referenced by GISASSpecularComputation::compute().
|
private |
Definition at line 91 of file SimulationElement.cpp.
References m_alpha_i, m_intensity, m_is_specular, m_k_i, m_mean_kf, m_phi_i, m_polarization, m_wavelength, mP_pixel, swap(), and PolarizationHandler::swapContent().
Referenced by operator=().
|
private |
Returns outgoing wavevector Kf for in-pixel coordinates x,y.
In-pixel coordinates take values from 0 to 1.
Definition at line 74 of file SimulationElement.cpp.
References m_wavelength, and mP_pixel.
Referenced by getAlpha(), and getPhi().
|
private |
Definition at line 90 of file SimulationElement.h.
Referenced by polarizationHandler(), setAnalyzerOperator(), setPolarization(), and swapContent().
|
private |
Definition at line 91 of file SimulationElement.h.
Referenced by getKf(), getQ(), getWavelength(), SimulationElement(), and swapContent().
|
private |
Definition at line 91 of file SimulationElement.h.
Referenced by getAlphaI(), and swapContent().
|
private |
wavelength and angles of beam
Definition at line 91 of file SimulationElement.h.
Referenced by getPhiI(), and swapContent().
|
private |
cached value of k_i
Definition at line 92 of file SimulationElement.h.
Referenced by getKi(), and swapContent().
|
private |
cached value of mean_kf
Definition at line 93 of file SimulationElement.h.
Referenced by getMeanKf(), SimulationElement(), and swapContent().
|
private |
simulated intensity for detector cell
Definition at line 94 of file SimulationElement.h.
Referenced by addIntensity(), getIntensity(), setIntensity(), and swapContent().
|
private |
Definition at line 95 of file SimulationElement.h.
Referenced by getIntegrationFactor(), getKf(), getQ(), getSolidAngle(), SimulationElement(), and swapContent().
|
private |
Definition at line 96 of file SimulationElement.h.
Referenced by isSpecular(), setSpecular(), and swapContent().