BornAgain  1.18.0
Simulate and fit neutron and x-ray scattering at grazing incidence
FormFactorCoreShell.h
Go to the documentation of this file.
1 // ************************************************************************** //
2 //
3 // BornAgain: simulate and fit scattering at grazing incidence
4 //
5 //! @file Sample/Particle/FormFactorCoreShell.h
6 //! @brief Defines class FormFactorCoreShell.
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 #ifndef BORNAGAIN_CORE_PARTICLE_FORMFACTORCORESHELL_H
16 #define BORNAGAIN_CORE_PARTICLE_FORMFACTORCORESHELL_H
17 
19 
20 #include <memory>
21 
22 //! Form Factor for a core shell particle.
23 //!
24 //! Used by ParticleCoreShell.
25 
26 //! @ingroup formfactors_internal
27 
29 {
30 public:
32  ~FormFactorCoreShell() override final;
33 
34  FormFactorCoreShell* clone() const override final;
35 
36  void accept(INodeVisitor* visitor) const override final { visitor->visit(this); }
37 
38  double radialExtension() const override final;
39 
40  double bottomZ(const IRotation& rotation) const override final;
41 
42  double topZ(const IRotation& rotation) const override final;
43 
44  void setAmbientMaterial(const Material& material) override final;
45 
46  complex_t evaluate(const WavevectorInfo& wavevectors) const override final;
47 
48 #ifndef SWIG
49  //! Calculates and returns a polarized form factor calculation in DWBA
50  Eigen::Matrix2cd evaluatePol(const WavevectorInfo& wavevectors) const override final;
51 #endif
52 
53 protected:
54  std::unique_ptr<IFormFactor> mP_core;
55  std::unique_ptr<IFormFactor> mP_shell;
56 };
57 
58 #endif // BORNAGAIN_CORE_PARTICLE_FORMFACTORCORESHELL_H
std::complex< double > complex_t
Definition: Complex.h:20
Defines and implements pure virtual interface IFormFactor.
Form Factor for a core shell particle.
std::unique_ptr< IFormFactor > mP_core
FormFactorCoreShell * clone() const override final
Returns a clone of this ISample object.
void setAmbientMaterial(const Material &material) override final
Passes the material in which this particle is embedded.
Eigen::Matrix2cd evaluatePol(const WavevectorInfo &wavevectors) const override final
Calculates and returns a polarized form factor calculation in DWBA.
~FormFactorCoreShell() override final
double radialExtension() const override final
Returns the (approximate in some cases) radial size of the particle of this form factor's shape.
double topZ(const IRotation &rotation) const override final
Returns the z-coordinate of the lowest point in this shape after a given rotation.
double bottomZ(const IRotation &rotation) const override final
Returns the z-coordinate of the lowest point in this shape after a given rotation.
FormFactorCoreShell(IFormFactor *core, IFormFactor *shell)
complex_t evaluate(const WavevectorInfo &wavevectors) const override final
Returns scattering amplitude for complex wavevectors ki, kf.
std::unique_ptr< IFormFactor > mP_shell
void accept(INodeVisitor *visitor) const override final
Calls the INodeVisitor's visit method.
Pure virtual base class for all form factors.
Definition: IFormFactor.h:40
Visitor interface to visit ISample objects.
Definition: INodeVisitor.h:149
Pure virtual interface for rotations.
Definition: Rotations.h:27
virtual const Material * material() const
Returns nullptr, unless overwritten to return a specific material.
Definition: ISample.h:37
A wrapper for underlying material implementation.
Definition: Material.h:29
Holds all wavevector information relevant for calculating form factors.