BornAgain  1.18.0
Simulate and fit neutron and x-ray scattering at grazing incidence
TwoLayerRoughnessBuilder.cpp
Go to the documentation of this file.
1 // ************************************************************************** //
2 //
3 // BornAgain: simulate and fit scattering at grazing incidence
4 //
5 //! @file Sample/StandardSamples/TwoLayerRoughnessBuilder.cpp
6 //! @brief Implement class TwoLayerRoughnessBuilder.
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 
16 #include "Base/Const/Units.h"
21 
23 {
24  const double m_sigma(1.0 * Units::nanometer);
25  const double m_hurst(0.3);
26  const double m_lateralCorrLength(5.0 * Units::nanometer);
27 
28  Layer vacuum_layer(refMat::Vacuum, 0);
29  Layer substrate_layer(refMat::Substrate, 0);
30 
31  LayerRoughness roughness(m_sigma, m_hurst, m_lateralCorrLength);
32 
33  MultiLayer* multi_layer = new MultiLayer();
34  multi_layer->addLayer(vacuum_layer);
35  multi_layer->addLayerWithTopRoughness(substrate_layer, roughness);
36  return multi_layer;
37 }
Defines class LayerRoughness.
Defines class Layer.
Defines class MultiLayer.
Defines materials in namespace refMat.
Defines class TwoLayerRoughnessBuilder.
Defines some unit conversion factors and other constants in namespace Units.
A roughness of interface between two layers.
A layer, with thickness (in nanometer) and material.
Definition: Layer.h:28
Our sample model: a stack of layers one below the other.
Definition: MultiLayer.h:42
void addLayer(const Layer &layer)
Adds object to multilayer.
Definition: MultiLayer.cpp:54
void addLayerWithTopRoughness(const Layer &layer, const LayerRoughness &roughness)
Adds layer with top roughness.
Definition: MultiLayer.cpp:61
static constexpr double nanometer
Definition: Units.h:24
static const Material Vacuum
static const Material Substrate