BornAgain  1.19.79
Open-source research software to simulate and fit neutron and x-ray reflectometry and grazing-incidence small-angle scattering
ISpecularScan.cpp
Go to the documentation of this file.
1 // ************************************************************************************************
2 //
3 // BornAgain: simulate and fit reflection and scattering
4 //
5 //! @file Sim/Scan/ISpecularScan.cpp
6 //! @brief Implements interface ISpecularScan.
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 #include "Sim/Scan/ISpecularScan.h"
17 #include "Device/Pol/PolFilter.h"
18 
20 
21 void ISpecularScan::setPolarization(R3 bloch_vector)
22 {
23  m_beamPolarization.reset(new R3(bloch_vector));
24 }
25 
26 void ISpecularScan::setAnalyzer(R3 direction, double efficiency, double total_transmission)
27 {
28  m_polAnalyzer.reset(new PolFilter(direction, efficiency, total_transmission));
29 }
30 
32 {
34 }
35 
37 {
38  PolMatrices result;
41  if (m_polAnalyzer)
42  result.setAnalyzerMatrix(m_polAnalyzer->matrix());
43  return result;
44 }
Declares interface ISpecularScan.
Defines class DetectionProperties.
Defines class PolarizerPair.
std::unique_ptr< R3 > m_beamPolarization
Bloch vector encoding the beam's polarization.
Definition: ISpecularScan.h:77
void setPolarization(R3 bloch_vector)
Sets the polarization density matrix according to the given Bloch vector.
void setAnalyzer(R3 direction, double efficiency, double total_transmission)
Sets the polarization analyzer characteristics of the detector.
PolMatrices polMatrices() const
~ISpecularScan() override
std::unique_ptr< PolFilter > m_polAnalyzer
Definition: ISpecularScan.h:78
bool polarized() const
Detector properties (efficiency, transmission).
Definition: PolFilter.h:27
Convenience class for handling polarization density matrix and polarization analyzer operator.
Definition: PolMatrices.h:29
void setAnalyzerMatrix(const SpinMatrix &analyzer)
Sets the polarization analyzer operator (in spin basis along z-axis)
Definition: PolMatrices.h:41
void setPolarizerMatrix(const SpinMatrix &polarization)
Sets the polarization density matrix (in spin basis along z-axis)
Definition: PolMatrices.h:35
static SpinMatrix FromBlochVector(const R3 &v)
Constructs matrix (I+v*s)/2, where s is the Pauli vector.
Definition: SpinMatrix.cpp:41