BornAgain
1.19.79
Open-source research software to simulate and fit neutron and x-ray reflectometry and grazing-incidence small-angle scattering
CoherentFFSum.cpp
Go to the documentation of this file.
1
// ************************************************************************************************
2
//
3
// BornAgain: simulate and fit reflection and scattering
4
//
5
//! @file Resample/Coherence/CoherentFFSum.cpp
6
//! @brief Implements class CoherentFFSum.
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 "
Resample/Coherence/CoherentFFSum.h
"
16
#include "
Resample/Coherence/SumDWBA.h
"
17
#include "
Resample/Particle/IReParticle.h
"
18
#include <utility>
19
20
CoherentFFSum::CoherentFFSum
(
double
abundance, std::vector<std::shared_ptr<const SumDWBA>> terms)
21
: m_abundance(abundance)
22
, m_terms(std::move(terms))
23
{
24
}
25
26
complex_t
CoherentFFSum::summedFF
(
const
DiffuseElement
& ele)
const
27
{
28
complex_t result = 0.;
29
for
(
const
auto
& term :
m_terms
)
30
result += term->coherentFF(ele);
31
return
result;
32
}
33
34
SpinMatrix
CoherentFFSum::summedPolFF
(
const
DiffuseElement
& ele)
const
35
{
36
SpinMatrix
result;
37
for
(
const
auto
& term :
m_terms
)
38
result += term->coherentPolFF(ele);
39
return
result;
40
}
41
42
double
CoherentFFSum::radialExtension
()
const
43
{
44
return
m_terms
[0]->ff().radialExtension();
45
}
CoherentFFSum.h
Defines class CoherentFFSum.
IReParticle.h
Defines and implements interface IReParticle.
SumDWBA.h
Defines class SumDWBA.
CoherentFFSum::summedPolFF
SpinMatrix summedPolFF(const DiffuseElement &ele) const
Definition:
CoherentFFSum.cpp:34
CoherentFFSum::radialExtension
double radialExtension() const
Definition:
CoherentFFSum.cpp:42
CoherentFFSum::CoherentFFSum
CoherentFFSum(double abundance, std::vector< std::shared_ptr< const SumDWBA >> terms)
Definition:
CoherentFFSum.cpp:20
CoherentFFSum::summedFF
complex_t summedFF(const DiffuseElement &ele) const
Definition:
CoherentFFSum.cpp:26
CoherentFFSum::m_terms
const std::vector< std::shared_ptr< const SumDWBA > > m_terms
Definition:
CoherentFFSum.h:45
DiffuseElement
Data stucture containing both input and output of a single detector cell.
Definition:
DiffuseElement.h:37
SpinMatrix
Definition:
SpinMatrix.h:23
Resample
Coherence
CoherentFFSum.cpp
Generated by
1.9.1