BornAgain  1.18.0
Simulate and fit neutron and x-ray scattering at grazing incidence
MatrixRTCoefficients_v2.h
Go to the documentation of this file.
1 // ************************************************************************** //
2 //
3 // BornAgain: simulate and fit scattering at grazing incidence
4 //
5 //! @file Sample/RT/MatrixRTCoefficients_v2.h
6 //! @brief Defines class MatrixRTCoefficients_v2.
7 //!
8 //! @homepage http://www.bornagainproject.org
9 //! @license GNU General Public License v3 or higher (see COPYING)
10 //! @copyright Forschungszentrum Jülich GmbH 2018
11 //! @authors Scientific Computing Group at MLZ (see CITATION, AUTHORS)
12 //
13 // ************************************************************************** //
14 
15 #ifndef BORNAGAIN_CORE_RT_MATRIXRTCOEFFICIENTS_V2_H
16 #define BORNAGAIN_CORE_RT_MATRIXRTCOEFFICIENTS_V2_H
17 
18 #include "Base/Vector/Vectors3D.h"
20 #include <vector>
21 
22 //! Specular reflection and transmission coefficients in a layer in case
23 //! of magnetic interactions between the scattered particle and the layer.
24 //! @ingroup algorithms_internal
25 
27 {
28 public:
30 
31  MatrixRTCoefficients_v2(double kz_sign, Eigen::Vector2cd eigenvalues, kvector_t b);
34 
35  MatrixRTCoefficients_v2* clone() const override;
36 
37  //! The following functions return the transmitted and reflected amplitudes
38  //! for different incoming beam polarizations and eigenmodes
39  Eigen::Vector2cd T1plus() const override;
40  Eigen::Vector2cd R1plus() const override;
41  Eigen::Vector2cd T2plus() const override;
42  Eigen::Vector2cd R2plus() const override;
43  Eigen::Vector2cd T1min() const override;
44  Eigen::Vector2cd R1min() const override;
45  Eigen::Vector2cd T2min() const override;
46  Eigen::Vector2cd R2min() const override;
47  //! Returns z-part of the two wavevector eigenmodes
48  Eigen::Vector2cd getKz() const override;
49 
50  Eigen::Matrix2cd getReflectionMatrix() const override;
51 
52 private:
53  double m_kz_sign; //! wave propagation direction (-1 for direct one, 1 for time reverse)
54  Eigen::Vector2cd m_lambda; //!< eigenvalues for wave propagation
55  kvector_t m_b; //!< normalized magnetic field impact (with correction for external mag. field)
56 
57  Eigen::Vector4cd m_w_plus; //!< boundary values for up-polarization
58  Eigen::Vector4cd m_w_min; //!< boundary values for down-polarization
59 
60  Eigen::Matrix4cd T1; //!< matrix selecting the transmitted part of
61  //!< the first eigenmode
62  Eigen::Matrix4cd R1; //!< matrix selecting the reflected part of
63  //!< the first eigenmode
64  Eigen::Matrix4cd T2; //!< matrix selecting the transmitted part of
65  //!< the second eigenmode
66  Eigen::Matrix4cd R2; //!< matrix selecting the reflected part of
67  //!< the second eigenmode
68 };
69 
70 #endif // BORNAGAIN_CORE_RT_MATRIXRTCOEFFICIENTS_V2_H
Defines and implements class ILayerRTCoefficients.
Defines basic vectors in R^3 and C^3.
Interface to access reflection/transmission coefficients.
Specular reflection and transmission coefficients in a layer in case of magnetic interactions between...
MatrixRTCoefficients_v2(const MatrixRTCoefficients_v2 &other)
MatrixRTCoefficients_v2 * clone() const override
Eigen::Vector2cd T2plus() const override
Eigen::Vector2cd R2min() const override
~MatrixRTCoefficients_v2() override
Eigen::Vector2cd R2plus() const override
Eigen::Vector2cd getKz() const override
Returns z-part of the two wavevector eigenmodes.
Eigen::Vector2cd m_lambda
wave propagation direction (-1 for direct one, 1 for time reverse)
Eigen::Matrix4cd T2
matrix selecting the transmitted part of the second eigenmode
Eigen::Vector2cd T2min() const override
Eigen::Matrix4cd R1
matrix selecting the reflected part of the first eigenmode
Eigen::Vector2cd T1plus() const override
The following functions return the transmitted and reflected amplitudes for different incoming beam p...
Eigen::Vector4cd m_w_plus
boundary values for up-polarization
Eigen::Vector4cd m_w_min
boundary values for down-polarization
MatrixRTCoefficients_v2(double kz_sign, Eigen::Vector2cd eigenvalues, kvector_t b)
Eigen::Vector2cd T1min() const override
Eigen::Vector2cd R1min() const override
Eigen::Vector2cd R1plus() const override
Eigen::Matrix2cd getReflectionMatrix() const override
Eigen::Matrix4cd T1
matrix selecting the transmitted part of the first eigenmode
kvector_t m_b
normalized magnetic field impact (with correction for external mag. field)
Eigen::Matrix4cd R2
matrix selecting the reflected part of the second eigenmode
Implements the magnetic Fresnel computation without roughness.
Eigen::Vector2cd eigenvalues(complex_t kz, double b_mag)