BornAgain  1.18.0
Simulate and fit neutron and x-ray scattering at grazing incidence
MatrixRTCoefficients.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.h
6 //! @brief Defines class MatrixRTCoefficients.
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_H
16 #define BORNAGAIN_CORE_RT_MATRIXRTCOEFFICIENTS_H
17 
19 
20 //! Specular reflection and transmission coefficients in a layer in case
21 //! of 2x2 matrix interactions between the layers and the scattered particle.
22 //! @ingroup algorithms_internal
23 
25 {
26 public:
28  virtual ~MatrixRTCoefficients() {}
29 
30  virtual MatrixRTCoefficients* clone() const;
31 
32  //! The following functions return the transmitted and reflected amplitudes
33  //! for different incoming beam polarizations and eigenmodes
34  virtual Eigen::Vector2cd T1plus() const;
35  virtual Eigen::Vector2cd R1plus() const;
36  virtual Eigen::Vector2cd T2plus() const;
37  virtual Eigen::Vector2cd R2plus() const;
38  virtual Eigen::Vector2cd T1min() const;
39  virtual Eigen::Vector2cd R1min() const;
40  virtual Eigen::Vector2cd T2min() const;
41  virtual Eigen::Vector2cd R2min() const;
42  //! Returns z-part of the two wavevector eigenmodes
43  virtual Eigen::Vector2cd getKz() const { return kz; }
44 
45  void calculateTRMatrices();
48 
49  // NOTE: exceptionally, this class has member variables without prefix m_
50  Eigen::Vector2cd kz; //!< z-part of the two wavevector eigenmodes
51  Eigen::Vector2cd lambda; //!< positive eigenvalues of transfer matrix
52  Eigen::Vector4cd phi_psi_plus; //!< boundary values for up-polarization
53  Eigen::Vector4cd phi_psi_min; //!< boundary values for down-polarization
54  Eigen::Matrix4cd T1m; //!< matrix selecting the transmitted part of
55  //!< the first eigenmode
56  Eigen::Matrix4cd R1m; //!< matrix selecting the reflected part of
57  //!< the first eigenmode
58  Eigen::Matrix4cd T2m; //!< matrix selecting the transmitted part of
59  //!< the second eigenmode
60  Eigen::Matrix4cd R2m; //!< matrix selecting the reflected part of
61  //!< the second eigenmode
62  Eigen::Matrix2cd m_scatt_matrix; //!< scattering matrix
63  complex_t m_a; //!< polarization independent part of scattering matrix
64  complex_t m_b_mag; //!< magnitude of magnetic interaction term
65  complex_t m_bz; //!< z-part of magnetic interaction term
66  double m_kt; //!< wavevector length times thickness of layer for use when
67  //!< lambda=0
68 };
69 
70 #endif // BORNAGAIN_CORE_RT_MATRIXRTCOEFFICIENTS_H
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...
complex_t m_bz
z-part of magnetic interaction term
Eigen::Matrix4cd T2m
matrix selecting the transmitted part of the second eigenmode
Eigen::Matrix2cd m_scatt_matrix
scattering matrix
Eigen::Vector2cd lambda
positive eigenvalues of transfer matrix
complex_t m_a
polarization independent part of scattering matrix
Eigen::Matrix4cd R2m
matrix selecting the reflected part of the second eigenmode
Eigen::Vector4cd phi_psi_min
boundary values for down-polarization
virtual Eigen::Vector2cd T1plus() const
The following functions return the transmitted and reflected amplitudes for different incoming beam p...
Eigen::Vector4cd phi_psi_plus
boundary values for up-polarization
Eigen::Vector2cd kz
z-part of the two wavevector eigenmodes
double m_kt
wavevector length times thickness of layer for use when lambda=0
complex_t m_b_mag
magnitude of magnetic interaction term
virtual Eigen::Vector2cd T1min() const
virtual Eigen::Vector2cd R2plus() const
virtual Eigen::Vector2cd R1min() const
virtual Eigen::Vector2cd T2min() 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
virtual Eigen::Vector2cd getKz() const
Returns z-part of the two wavevector eigenmodes.
virtual Eigen::Vector2cd R2min() const
virtual MatrixRTCoefficients * clone() const
virtual Eigen::Vector2cd T2plus() const
virtual Eigen::Vector2cd R1plus() const