BornAgain  1.19.79
Open-source research software to simulate and fit neutron and x-ray reflectometry and grazing-incidence small-angle scattering
ReLayout.h
Go to the documentation of this file.
1 // ************************************************************************************************
2 //
3 // BornAgain: simulate and fit reflection and scattering
4 //
5 //! @file Resample/Processed/ReLayout.h
6 //! @brief Defines class reLayout.
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_PROCESSED_RELAYOUT_H
21 #define BORNAGAIN_RESAMPLE_PROCESSED_RELAYOUT_H
22 
23 #include <map>
24 #include <memory>
25 #include <vector>
26 
27 class CoherentFFSum;
28 class IInterference;
29 class Admixtures;
30 
31 //! Data structure that contains preprocessed data for a single layout.
32 //!
33 //! If particles in the layout crossed the limits of the layer slices,
34 //! these particles will be sliced themselves.
35 
36 class reLayout {
37 public:
38  reLayout(bool polarized, double surface_density,
39  std::vector<std::unique_ptr<const CoherentFFSum>>&& formfactors,
40  const IInterference* iff, std::map<size_t, Admixtures>&& slice2admixtures);
41  reLayout(reLayout&& other);
42 
44 
45  double surfaceDensity() const { return m_surface_density; }
46  const std::vector<std::unique_ptr<const CoherentFFSum>>& formfactorList() const
47  {
48  return m_formfactors;
49  }
50  const IInterference* interferenceFunction() const { return m_iff.get(); }
51  const std::map<size_t, Admixtures>& regionMap() const { return m_slice2admixtures; }
52 
53 private:
54  const double m_surface_density;
55  std::vector<std::unique_ptr<const CoherentFFSum>> m_formfactors;
56  std::unique_ptr<const IInterference> m_iff;
57  std::map<size_t, Admixtures> m_slice2admixtures;
58 };
59 
60 #endif // BORNAGAIN_RESAMPLE_PROCESSED_RELAYOUT_H
61 #endif // USER_API
The list of material admixtures to a slice.
Definition: Admixtures.h:39
Information about particle form factor and abundance.
Definition: CoherentFFSum.h:33
Abstract base class of interference functions.
Definition: IInterference.h:24
Data structure that contains preprocessed data for a single layout.
Definition: ReLayout.h:36
const IInterference * interferenceFunction() const
Definition: ReLayout.h:50
reLayout(bool polarized, double surface_density, std::vector< std::unique_ptr< const CoherentFFSum >> &&formfactors, const IInterference *iff, std::map< size_t, Admixtures > &&slice2admixtures)
Definition: ReLayout.cpp:28
const std::map< size_t, Admixtures > & regionMap() const
Definition: ReLayout.h:51
std::unique_ptr< const IInterference > m_iff
Definition: ReLayout.h:56
std::map< size_t, Admixtures > m_slice2admixtures
Definition: ReLayout.h:57
const std::vector< std::unique_ptr< const CoherentFFSum > > & formfactorList() const
Definition: ReLayout.h:46
reLayout(reLayout &&other)
const double m_surface_density
Definition: ReLayout.h:54
double surfaceDensity() const
Definition: ReLayout.h:45
std::vector< std::unique_ptr< const CoherentFFSum > > m_formfactors
Definition: ReLayout.h:55