BornAgain  1.19.79
Open-source research software to simulate and fit neutron and x-ray reflectometry and grazing-incidence small-angle scattering
ParticleInVacuumBuilder.cpp
Go to the documentation of this file.
1 // ************************************************************************************************
2 //
3 // BornAgain: simulate and fit reflection and scattering
4 //
5 //! @file Sample/StandardSamples/ParticleInVacuumBuilder.cpp
6 //! @brief Implements class ParticleInVacuumBuilder.
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 
22 
23 #include <iostream>
24 
26 {
27  Layer vacuum_layer(refMat::Vacuum);
28 
29  Particle particle(refMat::Particle, *ff);
30  ParticleLayout particle_layout(particle);
31  vacuum_layer.addLayout(particle_layout);
32 
33  auto* result = new MultiLayer("ParticleInVacuum_" + ff->shapeName());
34  result->addLayer(vacuum_layer);
35  return result;
36 }
Defines class Layer.
Defines class MultiLayer.
Defines class ParticleInVacuumBuilder.
Defines class ParticleLayout.
Defines class Particle.
Defines materials in namespace refMat.
Defines class Sphere.
Abstract base class for Born form factors.
Definition: IFormFactor.h:36
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.
A particle with a form factor and refractive index.
Definition: Particle.h:25
MultiLayer * createParticleInVacuumWithFF(const IFormFactor *)
static const Material Vacuum
static const Material Particle