BornAgain  1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
ComputeDWBA.h
Go to the documentation of this file.
1 // ************************************************************************************************
2 //
3 // BornAgain: simulate and fit reflection and scattering
4 //
5 //! @file Sample/FFCompute/ComputeDWBA.h
6 //! @brief Defines class ComputeDWBA.
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_COMPUTEDWBA_H
21 #define BORNAGAIN_SAMPLE_FFCOMPUTE_COMPUTEDWBA_H
22 
24 #include <memory>
25 
27 
28 //! Provides scalar DWBA computation for given IFormFactor.
29 
30 //! @ingroup formfactors_internal
31 
32 class ComputeDWBA : public IComputeFF {
33 public:
34  ComputeDWBA(const IFormFactor& ff);
35  ~ComputeDWBA() override;
36 
37  ComputeDWBA* clone() const override;
38 
39  //! Returns the coherent sum of the four DWBA terms for scalar scattering.
40  complex_t evaluate(const WavevectorInfo& wavevectors) const override;
41 
42  void setSpecularInfo(std::unique_ptr<const ILayerRTCoefficients> p_in_coeffs,
43  std::unique_ptr<const ILayerRTCoefficients> p_out_coeffs) override;
44 
45  friend class TestPolarizedDWBATerms;
46 
47 private:
48  std::unique_ptr<const ILayerRTCoefficients> m_in_coeffs;
49  std::unique_ptr<const ILayerRTCoefficients> m_out_coeffs;
50 };
51 
52 #endif // BORNAGAIN_SAMPLE_FFCOMPUTE_COMPUTEDWBA_H
53 #endif // USER_API
std::complex< double > complex_t
Definition: Complex.h:20
Defines and implements interface IFormFactor.
Provides scalar DWBA computation for given IFormFactor.
Definition: ComputeDWBA.h:32
ComputeDWBA * clone() const override
Definition: ComputeDWBA.cpp:24
void setSpecularInfo(std::unique_ptr< const ILayerRTCoefficients > p_in_coeffs, std::unique_ptr< const ILayerRTCoefficients > p_out_coeffs) override
Sets reflection/transmission info.
Definition: ComputeDWBA.cpp:72
std::unique_ptr< const ILayerRTCoefficients > m_out_coeffs
Definition: ComputeDWBA.h:49
complex_t evaluate(const WavevectorInfo &wavevectors) const override
Returns the coherent sum of the four DWBA terms for scalar scattering.
Definition: ComputeDWBA.cpp:35
std::unique_ptr< const ILayerRTCoefficients > m_in_coeffs
Definition: ComputeDWBA.h:48
~ComputeDWBA() override
friend class TestPolarizedDWBATerms
Definition: ComputeDWBA.h:45
ComputeDWBA(const IFormFactor &ff)
Definition: ComputeDWBA.cpp:20
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.