BornAgain
1.19.79
Open-source research software to simulate and fit neutron and x-ray reflectometry and grazing-incidence small-angle scattering
SumDWBA.h
Go to the documentation of this file.
1
// ************************************************************************************************
2
//
3
// BornAgain: simulate and fit reflection and scattering
4
//
5
//! @file Resample/Coherence/SumDWBA.h
6
//! @brief Defines class SumDWBA.
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_RESAMPLE_COHERENCE_SUMDWBA_H
21
#define BORNAGAIN_RESAMPLE_COHERENCE_SUMDWBA_H
22
23
#include "
Base/Spin/SpinMatrix.h
"
24
#include <heinz/Complex.h>
25
#include <memory>
26
#include <optional>
27
28
class
DiffuseElement
;
// used by all children
29
class
IFlux
;
// used by all children
30
class
IReParticle
;
31
class
WavevectorInfo
;
// used by all children
32
33
//! Computes coherent sum of the four DWBA terms.
34
//! Wraps an IReParticle, and provides functions evaluate or evaluatePol.
35
//! Used from CoherentFFSum.
36
37
class
SumDWBA
{
38
public
:
39
SumDWBA
(
const
IReParticle
&
ff
,
size_t
i_layer);
40
SumDWBA
(
const
IReParticle
&
ff
);
41
42
virtual
~SumDWBA
();
43
44
const
IReParticle
&
ff
()
const
{
return
*
m_ff
; }
45
size_t
iLayer
()
const
;
46
47
//! Returns the coherent sum of the four DWBA terms for scalar scattering.
48
complex_t
coherentFF
(
const
DiffuseElement
& ele)
const
;
49
50
//! Returns the coherent sum of the four DWBA terms for polarized scattering.
51
SpinMatrix
coherentPolFF
(
const
DiffuseElement
& ele)
const
;
52
53
private
:
54
const
std::unique_ptr<const IReParticle>
m_ff
;
55
const
std::optional<size_t>
m_i_layer
;
56
57
friend
class
TestPolarizedDWBATerm
;
58
};
59
60
#endif
// BORNAGAIN_RESAMPLE_COHERENCE_SUMDWBA_H
61
#endif
// USER_API
SpinMatrix.h
Defines class SpinMatrix.
DiffuseElement
Data stucture containing both input and output of a single detector cell.
Definition:
DiffuseElement.h:37
IFlux
Interface to access reflection/transmission coefficients. Realized by ScalarFlux and MatrixFlux.
Definition:
IFlux.h:30
IReParticle
Abstract base class for reprocessed particles.
Definition:
IReParticle.h:37
SpinMatrix
Definition:
SpinMatrix.h:23
SumDWBA
Computes coherent sum of the four DWBA terms. Wraps an IReParticle, and provides functions evaluate o...
Definition:
SumDWBA.h:37
SumDWBA::m_i_layer
const std::optional< size_t > m_i_layer
Definition:
SumDWBA.h:55
SumDWBA::coherentPolFF
SpinMatrix coherentPolFF(const DiffuseElement &ele) const
Returns the coherent sum of the four DWBA terms for polarized scattering.
Definition:
SumDWBA.cpp:94
SumDWBA::SumDWBA
SumDWBA(const IReParticle &ff, size_t i_layer)
Definition:
SumDWBA.cpp:23
SumDWBA::~SumDWBA
virtual ~SumDWBA()
SumDWBA::TestPolarizedDWBATerm
friend class TestPolarizedDWBATerm
Definition:
SumDWBA.h:57
SumDWBA::ff
const IReParticle & ff() const
Definition:
SumDWBA.h:44
SumDWBA::m_ff
const std::unique_ptr< const IReParticle > m_ff
Definition:
SumDWBA.h:54
SumDWBA::coherentFF
complex_t coherentFF(const DiffuseElement &ele) const
Returns the coherent sum of the four DWBA terms for scalar scattering.
Definition:
SumDWBA.cpp:43
SumDWBA::iLayer
size_t iLayer() const
Definition:
SumDWBA.cpp:37
WavevectorInfo
Holds all wavevector information relevant for calculating form factors.
Definition:
WavevectorInfo.h:29
ff
Definition:
IFormFactorPolyhedron.h:23
Resample
Coherence
SumDWBA.h
Generated by
1.9.1