BornAgain
1.18.0
Simulate and fit neutron and x-ray scattering at grazing incidence
SlicedFormFactorList.h
Go to the documentation of this file.
1
// ************************************************************************** //
2
//
3
// BornAgain: simulate and fit scattering at grazing incidence
4
//
5
//! @file Sample/Slice/SlicedFormFactorList.h
6
//! @brief Defines class SlicedFormFactorList.
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
#ifndef BORNAGAIN_CORE_MULTILAYER_SLICEDFORMFACTORLIST_H
16
#define BORNAGAIN_CORE_MULTILAYER_SLICEDFORMFACTORLIST_H
17
18
#include "
Sample/Particle/HomogeneousRegion.h
"
19
#include "
Sample/Scattering/IFormFactor.h
"
20
#include <map>
21
#include <memory>
22
23
class
MultiLayer
;
24
class
Slice
;
25
26
//! Class that contains and owns a list of form factors and the index of their containing layer.
27
//! This class also handles the slicing of form factors if they cross layer interfaces.
28
//!
29
//! @ingroup intern
30
31
class
SlicedFormFactorList
32
{
33
public
:
34
SlicedFormFactorList
() =
default
;
35
SlicedFormFactorList
(
SlicedFormFactorList
&& other) =
default
;
36
SlicedFormFactorList
&
operator=
(
SlicedFormFactorList
&& other) =
default
;
37
~SlicedFormFactorList
() =
default
;
38
39
static
SlicedFormFactorList
createSlicedFormFactors
(
const
IParticle
& particle,
40
const
std::vector<Slice>& slices,
41
double
z_ref);
42
43
size_t
size
()
const
;
44
45
std::pair<const IFormFactor*, size_t>
operator[]
(
size_t
index)
const
;
46
47
std::map<size_t, std::vector<HomogeneousRegion>>
regionMap
()
const
;
48
49
private
:
50
void
addParticle
(
IParticle
& particle,
const
std::vector<Slice>& slices,
double
z_ref);
51
std::vector<std::pair<std::unique_ptr<IFormFactor>,
size_t
>>
m_ff_list
;
52
std::map<size_t, std::vector<HomogeneousRegion>>
m_region_map
;
53
};
54
55
#endif
// BORNAGAIN_CORE_MULTILAYER_SLICEDFORMFACTORLIST_H
HomogeneousRegion.h
Defines struct HomogeneousRegion, and declares fct createAveragedMaterial.
IFormFactor.h
Defines and implements pure virtual interface IFormFactor.
IParticle
Pure virtual base class for Particle, ParticleComposition, ParticleCoreShell, MesoCrystal.
Definition:
IParticle.h:33
MultiLayer
Our sample model: a stack of layers one below the other.
Definition:
MultiLayer.h:42
Slice
Data structure containing the data of a single slice, for calculating the Fresnel coefficients.
Definition:
Slice.h:28
SlicedFormFactorList
Class that contains and owns a list of form factors and the index of their containing layer.
Definition:
SlicedFormFactorList.h:32
SlicedFormFactorList::operator[]
std::pair< const IFormFactor *, size_t > operator[](size_t index) const
Definition:
SlicedFormFactorList.cpp:72
SlicedFormFactorList::m_ff_list
std::vector< std::pair< std::unique_ptr< IFormFactor >, size_t > > m_ff_list
Definition:
SlicedFormFactorList.h:51
SlicedFormFactorList::~SlicedFormFactorList
~SlicedFormFactorList()=default
SlicedFormFactorList::addParticle
void addParticle(IParticle &particle, const std::vector< Slice > &slices, double z_ref)
Definition:
SlicedFormFactorList.cpp:45
SlicedFormFactorList::createSlicedFormFactors
static SlicedFormFactorList createSlicedFormFactors(const IParticle &particle, const std::vector< Slice > &slices, double z_ref)
Definition:
SlicedFormFactorList.cpp:33
SlicedFormFactorList::regionMap
std::map< size_t, std::vector< HomogeneousRegion > > regionMap() const
Definition:
SlicedFormFactorList.cpp:80
SlicedFormFactorList::operator=
SlicedFormFactorList & operator=(SlicedFormFactorList &&other)=default
SlicedFormFactorList::SlicedFormFactorList
SlicedFormFactorList()=default
SlicedFormFactorList::SlicedFormFactorList
SlicedFormFactorList(SlicedFormFactorList &&other)=default
SlicedFormFactorList::m_region_map
std::map< size_t, std::vector< HomogeneousRegion > > m_region_map
Definition:
SlicedFormFactorList.h:52
SlicedFormFactorList::size
size_t size() const
Definition:
SlicedFormFactorList.cpp:67
Sample
Slice
SlicedFormFactorList.h
Generated by
1.9.1