BornAgain  1.18.0
Simulate and fit neutron and x-ray scattering at grazing incidence
PolarizationHandler.cpp
Go to the documentation of this file.
1 // ************************************************************************** //
2 //
3 // BornAgain: simulate and fit scattering at grazing incidence
4 //
5 //! @file Base/Pixel/PolarizationHandler.cpp
6 //! @brief Implements class PolarizationHandler.
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 
16 
17 // corresponds to completely unpolarized beam and the absence of spin selection in the analyzer
19  : m_polarization(Eigen::Matrix2cd::Identity() / 2.0),
20  m_analyzer_operator(Eigen::Matrix2cd::Identity())
21 {
22 }
23 
24 PolarizationHandler::PolarizationHandler(const Eigen::Matrix2cd& polarization,
25  const Eigen::Matrix2cd& analyzer)
26  : m_polarization(polarization), m_analyzer_operator(analyzer)
27 {
28 }
29 
31 {
34 }
void swap(OutputDataIterator< TValue, TContainer > &left, OutputDataIterator< TValue, TContainer > &right)
make Swappable
Defines class PolarizationHandler.
Convenience class for handling polarization density matrix and polarization analyzer operator.
Eigen::Matrix2cd m_polarization
polarization density matrix
Eigen::Matrix2cd m_analyzer_operator
polarization analyzer operator
void swapContent(PolarizationHandler &other)