BornAgain  1.19.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 reflection and scattering
4 //
5 //! @file Sample/LegacyRT/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 #ifdef SWIG
16 #error no need to expose this header to Swig
17 #endif
18 
19 #ifndef USER_API
20 #ifndef BORNAGAIN_SAMPLE_LEGACYRT_MATRIXRTCOEFFICIENTS_V2_H
21 #define BORNAGAIN_SAMPLE_LEGACYRT_MATRIXRTCOEFFICIENTS_V2_H
22 
23 #include "Base/Vector/Vectors3D.h"
25 #include <vector>
26 
27 //! Specular reflection and transmission coefficients in a layer in case
28 //! of magnetic interactions between the scattered particle and the layer.
29 //! @ingroup algorithms_internal
30 
32 public:
35 
36  MatrixRTCoefficients_v2(double kz_sign, Eigen::Vector2cd eigenvalues, kvector_t b);
39 
40  MatrixRTCoefficients_v2* clone() const override;
41 
42  //! The following functions return the transmitted and reflected amplitudes
43  //! for different incoming beam polarizations and eigenmodes
44  Eigen::Vector2cd T1plus() const override;
45  Eigen::Vector2cd R1plus() const override;
46  Eigen::Vector2cd T2plus() const override;
47  Eigen::Vector2cd R2plus() const override;
48  Eigen::Vector2cd T1min() const override;
49  Eigen::Vector2cd R1min() const override;
50  Eigen::Vector2cd T2min() const override;
51  Eigen::Vector2cd R2min() const override;
52  //! Returns z-part of the two wavevector eigenmodes
53  Eigen::Vector2cd getKz() const override;
54 
55  Eigen::Matrix2cd getReflectionMatrix() const override;
56 
57 private:
58  double m_kz_sign; //! wave propagation direction (-1 for direct one, 1 for time reverse)
59  Eigen::Vector2cd m_lambda; //!< eigenvalues for wave propagation
60  kvector_t m_b; //!< normalized magnetic field impact (with correction for external mag. field)
61 
62  Eigen::Vector4cd m_w_plus; //!< boundary values for up-polarization
63  Eigen::Vector4cd m_w_min; //!< boundary values for down-polarization
64 
65  Eigen::Matrix4cd T1; //!< matrix selecting the transmitted part of
66  //!< the first eigenmode
67  Eigen::Matrix4cd R1; //!< matrix selecting the reflected part of
68  //!< the first eigenmode
69  Eigen::Matrix4cd T2; //!< matrix selecting the transmitted part of
70  //!< the second eigenmode
71  Eigen::Matrix4cd R2; //!< matrix selecting the reflected part of
72  //!< the second eigenmode
73 };
74 
75 #endif // BORNAGAIN_SAMPLE_LEGACYRT_MATRIXRTCOEFFICIENTS_V2_H
76 #endif // USER_API
Defines and implements class ILayerRTCoefficients.
Defines basic vectors in Z^3, R^3, 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
friend class SpecularMagneticOriginalStrategy
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.