BornAgain  1.19.79
Open-source research software to simulate and fit neutron and x-ray reflectometry and grazing-incidence small-angle scattering
ThickAbsorptiveSampleBuilder.cpp
Go to the documentation of this file.
1 // ************************************************************************************************
2 //
3 // BornAgain: simulate and fit reflection and scattering
4 //
5 //! @file Sample/StandardSamples/ThickAbsorptiveSampleBuilder.cpp
6 //! @brief Implements class to build thick highly-absorptive sample with roughness
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 
20 
22 {
23  Material vacuum_material = MaterialBySLD("Vacuum", 0.0, 0.0);
24  Material au_material = MaterialBySLD("Au", 3.48388057043e-05, 1.79057609656e-05);
25  Material si_material = MaterialBySLD("Si", 3.84197565094e-07, 6.28211531498e-07);
26 
27  Layer vacuum_layer(vacuum_material);
28  Layer au_layer(au_material, 200.0);
29  Layer vacuum_layer_2(vacuum_material, 10.0);
30  Layer substrate_layer(si_material);
31 
32  LayerRoughness rough(5.0, 0.5, 10.0);
33 
34  auto* sample = new MultiLayer();
35  sample->addLayer(vacuum_layer);
36  sample->addLayer(au_layer);
37  sample->addLayer(vacuum_layer_2);
38  sample->addLayerWithTopRoughness(substrate_layer, rough);
39  return sample;
40 }
Defines class LayerRoughness.
Defines class Layer.
Factory functions used to create material instances.
Defines class MultiLayer.
Defines class to build thick highly-absorptive sample with roughness.
A roughness of interface between two layers.
A layer in a MultiLayer sample.
Definition: Layer.h:26
A wrapper for underlying material implementation.
Definition: Material.h:35
Our sample model: a stack of layers one below the other.
Definition: MultiLayer.h:43
Material MaterialBySLD()
MultiLayer * createThickAbsorptiveSample()