BornAgain  1.19.79
Open-source research software to simulate and fit neutron and x-ray reflectometry and grazing-incidence small-angle scattering
RipplesBuilder.cpp
Go to the documentation of this file.
1 // ************************************************************************************************
2 //
3 // BornAgain: simulate and fit reflection and scattering
4 //
5 //! @file Sample/StandardSamples/RipplesBuilder.cpp
6 //! @brief Implement classes to build various ripples.
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 "Fit/Param/RealLimits.h"
25 
27 {
28  Layer vacuum_layer(refMat::Vacuum);
29  CosineRippleBox ff_ripple1(100.0, 20.0, 4.0);
30  Particle ripple(refMat::Particle, ff_ripple1);
31 
32  ParticleLayout particle_layout;
33  particle_layout.addParticle(ripple, 1.0);
34  InterferenceRadialParaCrystal interparticle(20.0, 1e7);
35  Profile1DGauss pdf(4.0);
36  interparticle.setProbabilityDistribution(pdf);
37  particle_layout.setInterference(interparticle);
38 
39  vacuum_layer.addLayout(particle_layout);
40 
41  Layer substrate_layer(refMat::Substrate);
42 
43  auto* sample = new MultiLayer();
44  sample->addLayer(vacuum_layer);
45  sample->addLayer(substrate_layer);
46  return sample;
47 }
48 
50 {
51  Layer vacuum_layer(refMat::Vacuum);
52  SawtoothRippleBox ff_ripple2(100.0, 20.0, 4.0, d);
53  Particle ripple(refMat::Particle, ff_ripple2);
54 
55  ParticleLayout particle_layout;
56  particle_layout.addParticle(ripple, 1.0);
57  InterferenceRadialParaCrystal interparticle(20.0, 1e7);
58  Profile1DGauss pdf(4.0);
59  interparticle.setProbabilityDistribution(pdf);
60  particle_layout.setInterference(interparticle);
61 
62  vacuum_layer.addLayout(particle_layout);
63  Layer substrate_layer(refMat::Substrate);
64 
65  auto* sample = new MultiLayer();
66  sample->addLayer(vacuum_layer);
67  sample->addLayer(substrate_layer);
68  return sample;
69 }
70 
72 {
74 }
Defines classes CosineRipple*.
Defines class InterferenceRadialParaCrystal.
Defines class Layer.
Defines class MultiLayer.
Defines class ParticleLayout.
Defines class Particle.
Defines class RealLimits.
Defines materials in namespace refMat.
Defines classes to build various ripples.
Defines classes SawtoothRipple*.
The form factor for a cosine ripple, with box profile in elongation direction.
Definition: CosineRipple.h:22
Interference function of radial paracrystal.
void setProbabilityDistribution(const IProfile1D &pdf)
Sets one-dimensional probability distribution.
A layer in a MultiLayer sample.
Definition: Layer.h:26
void addLayout(const ParticleLayout &layout)
Definition: Layer.cpp:49
Our sample model: a stack of layers one below the other.
Definition: MultiLayer.h:43
Decorator class that adds particles to ISampleNode objects.
void addParticle(const IParticle &particle, double abundance=-1.0)
Adds particle to the layout with abundance, position and the rotation defined.
void setInterference(const IInterference &interparticle)
Adds interference functions.
A particle with a form factor and refractive index.
Definition: Particle.h:25
Gaussian IProfile1D; its Fourier transform standardizedFT(q) is a Gaussian starting at standardizedFT...
Definition: Profiles1D.h:87
The form factor for a cosine ripple, with box profile in elongation direction.
MultiLayer * createAsymRipple()
MultiLayer * createTriangularRipple(double d=0)
MultiLayer * createCosineRipple()
static const Material Vacuum
static const Material Particle
static const Material Substrate