BornAgain  1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
ComputeDWBAPol.h
Go to the documentation of this file.
1 // ************************************************************************************************
2 //
3 // BornAgain: simulate and fit reflection and scattering
4 //
5 //! @file Sample/FFCompute/ComputeDWBAPol.h
6 //! @brief Defines class ComputeDWBAPol.
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_FFCOMPUTE_COMPUTEDWBAPOL_H
21 #define BORNAGAIN_SAMPLE_FFCOMPUTE_COMPUTEDWBAPOL_H
22 
24 #include <memory>
25 
27 
28 //! Provides polarized DWBA computation for given IFormFactor.
29 
30 //! @ingroup formfactors_internal
31 
32 class ComputeDWBAPol : public IComputeFF {
33 public:
34  ComputeDWBAPol(const IFormFactor& ff);
35  ~ComputeDWBAPol() override;
36 
37  ComputeDWBAPol* clone() const override;
38 
39  //! Throws not-implemented exception.
40  complex_t evaluate(const WavevectorInfo& wavevectors) const override;
41 
42  //! Returns the coherent sum of the four DWBA terms for polarized scattering.
43  Eigen::Matrix2cd evaluatePol(const WavevectorInfo& wavevectors) const override;
44 
45  void setSpecularInfo(std::unique_ptr<const ILayerRTCoefficients> p_in_coeffs,
46  std::unique_ptr<const ILayerRTCoefficients> p_out_coeffs) override;
47 
48  friend class TestPolarizedDWBATerms;
49 
50 private:
51  std::unique_ptr<const ILayerRTCoefficients> m_in_coeffs;
52  std::unique_ptr<const ILayerRTCoefficients> m_out_coeffs;
53 };
54 
55 #endif // BORNAGAIN_SAMPLE_FFCOMPUTE_COMPUTEDWBAPOL_H
56 #endif // USER_API
std::complex< double > complex_t
Definition: Complex.h:20
Defines and implements interface IFormFactor.
Provides polarized DWBA computation for given IFormFactor.
ComputeDWBAPol * clone() const override
Eigen::Matrix2cd evaluatePol(const WavevectorInfo &wavevectors) const override
Returns the coherent sum of the four DWBA terms for polarized scattering.
void setSpecularInfo(std::unique_ptr< const ILayerRTCoefficients > p_in_coeffs, std::unique_ptr< const ILayerRTCoefficients > p_out_coeffs) override
Sets reflection/transmission info.
std::unique_ptr< const ILayerRTCoefficients > m_in_coeffs
complex_t evaluate(const WavevectorInfo &wavevectors) const override
Throws not-implemented exception.
~ComputeDWBAPol() override
friend class TestPolarizedDWBATerms
std::unique_ptr< const ILayerRTCoefficients > m_out_coeffs
ComputeDWBAPol(const IFormFactor &ff)
Abstract base class for form factor evaluations.
Definition: IComputeFF.h:39
Abstract base class for all form factors.
Definition: IFormFactor.h:36
Interface to access reflection/transmission coefficients.
Holds all wavevector information relevant for calculating form factors.