BornAgain  1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
MatrixRTCoefficients_v1.h
Go to the documentation of this file.
1 // ************************************************************************************************
2 //
3 // BornAgain: simulate and fit reflection and scattering
4 //
5 //! @file Sample/LegacyRT/MatrixRTCoefficients_v1.h
6 //! @brief Defines class MatrixRTCoefficients_v1.
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_V1_H
21 #define BORNAGAIN_SAMPLE_LEGACYRT_MATRIXRTCOEFFICIENTS_V1_H
22 
24 
25 //! Specular reflection and transmission coefficients in a layer in case
26 //! of 2x2 matrix interactions between the layers and the scattered particle.
27 //! @ingroup algorithms_internal
28 
30 public:
33 
34  virtual MatrixRTCoefficients_v1* clone() const;
35 
36  //! The following functions return the transmitted and reflected amplitudes
37  //! for different incoming beam polarizations and eigenmodes
38  virtual Eigen::Vector2cd T1plus() const;
39  virtual Eigen::Vector2cd R1plus() const;
40  virtual Eigen::Vector2cd T2plus() const;
41  virtual Eigen::Vector2cd R2plus() const;
42  virtual Eigen::Vector2cd T1min() const;
43  virtual Eigen::Vector2cd R1min() const;
44  virtual Eigen::Vector2cd T2min() const;
45  virtual Eigen::Vector2cd R2min() const;
46  //! Returns z-part of the two wavevector eigenmodes
47  virtual Eigen::Vector2cd getKz() const { return kz; }
48 
49  void calculateTRMatrices();
52 
53  // NOTE: exceptionally, this class has member variables without prefix m_
54  Eigen::Vector2cd kz; //!< z-part of the two wavevector eigenmodes
55  Eigen::Vector2cd lambda; //!< positive eigenvalues of transfer matrix
56  Eigen::Vector4cd phi_psi_plus; //!< boundary values for up-polarization
57  Eigen::Vector4cd phi_psi_min; //!< boundary values for down-polarization
58  Eigen::Matrix4cd T1m; //!< matrix selecting the transmitted part of
59  //!< the first eigenmode
60  Eigen::Matrix4cd R1m; //!< matrix selecting the reflected part of
61  //!< the first eigenmode
62  Eigen::Matrix4cd T2m; //!< matrix selecting the transmitted part of
63  //!< the second eigenmode
64  Eigen::Matrix4cd R2m; //!< matrix selecting the reflected part of
65  //!< the second eigenmode
66  Eigen::Matrix2cd m_scatt_matrix; //!< scattering matrix
67  complex_t m_a; //!< polarization independent part of scattering matrix
68  complex_t m_b_mag; //!< magnitude of magnetic interaction term
69  complex_t m_bz; //!< z-part of magnetic interaction term
70  double m_kt; //!< wavevector length times thickness of layer for use when
71  //!< lambda=0
72 };
73 
74 #endif // BORNAGAIN_SAMPLE_LEGACYRT_MATRIXRTCOEFFICIENTS_V1_H
75 #endif // USER_API
std::complex< double > complex_t
Definition: Complex.h:20
Defines and implements class ILayerRTCoefficients.
Interface to access reflection/transmission coefficients.
Specular reflection and transmission coefficients in a layer in case of 2x2 matrix interactions betwe...
virtual Eigen::Vector2cd R2plus() const
complex_t m_a
polarization independent part of scattering matrix
virtual Eigen::Vector2cd T1min() const
virtual Eigen::Vector2cd getKz() const
Returns z-part of the two wavevector eigenmodes.
virtual Eigen::Vector2cd R1min() const
virtual Eigen::Vector2cd T2min() const
Eigen::Matrix4cd T2m
matrix selecting the transmitted part of the second eigenmode
virtual Eigen::Vector2cd T1plus() const
The following functions return the transmitted and reflected amplitudes for different incoming beam p...
Eigen::Matrix2cd m_scatt_matrix
scattering matrix
Eigen::Vector2cd lambda
positive eigenvalues of transfer matrix
Eigen::Vector4cd phi_psi_min
boundary values for down-polarization
complex_t m_b_mag
magnitude of magnetic interaction term
virtual Eigen::Vector2cd T2plus() const
virtual Eigen::Vector2cd R1plus() const
double m_kt
wavevector length times thickness of layer for use when lambda=0
Eigen::Vector2cd kz
z-part of the two wavevector eigenmodes
virtual MatrixRTCoefficients_v1 * clone() const
Eigen::Matrix4cd R2m
matrix selecting the reflected part of the second eigenmode
Eigen::Vector4cd phi_psi_plus
boundary values for up-polarization
virtual Eigen::Vector2cd R2min() const
Eigen::Matrix4cd T1m
matrix selecting the transmitted part of the first eigenmode
Eigen::Matrix4cd R1m
matrix selecting the reflected part of the first eigenmode
complex_t m_bz
z-part of magnetic interaction term