BornAgain  1.19.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 reflection and scattering
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 #ifdef SWIG
16 #error no need to expose this header to Swig
17 #endif
18 
19 #ifndef USER_API
20 #ifndef BORNAGAIN_SAMPLE_PARTICLE_FORMFACTORCORESHELL_H
21 #define BORNAGAIN_SAMPLE_PARTICLE_FORMFACTORCORESHELL_H
22 
24 
25 #include <memory>
26 
27 //! Form Factor for a core shell particle.
28 //!
29 //! Used by ParticleCoreShell.
30 
31 //! @ingroup formfactors_internal
32 
34 public:
37 
38  FormFactorCoreShell* clone() const override;
39 
40  void accept(INodeVisitor* visitor) const override { visitor->visit(this); }
41 
42  double radialExtension() const override;
43 
44  double bottomZ(const IRotation& rotation) const override;
45 
46  double topZ(const IRotation& rotation) const override;
47 
48  void setAmbientMaterial(const Material& material) override;
49 
50  complex_t evaluate(const WavevectorInfo& wavevectors) const override;
51 
52 #ifndef SWIG
53  //! Calculates and returns a polarized form factor calculation in DWBA
54  Eigen::Matrix2cd evaluatePol(const WavevectorInfo& wavevectors) const override;
55 #endif
56 
57 protected:
58  std::unique_ptr<IFormFactor> m_core;
59  std::unique_ptr<IFormFactor> m_shell;
60 };
61 
62 #endif // BORNAGAIN_SAMPLE_PARTICLE_FORMFACTORCORESHELL_H
63 #endif // USER_API
std::complex< double > complex_t
Definition: Complex.h:20
Defines and implements interface IFormFactor.
Form Factor for a core shell particle.
void accept(INodeVisitor *visitor) const override
Calls the INodeVisitor's visit method.
complex_t evaluate(const WavevectorInfo &wavevectors) const override
Returns scattering amplitude for complex wavevectors ki, kf.
Eigen::Matrix2cd evaluatePol(const WavevectorInfo &wavevectors) const override
Calculates and returns a polarized form factor calculation in DWBA.
std::unique_ptr< IFormFactor > m_shell
~FormFactorCoreShell() override
void setAmbientMaterial(const Material &material) override
Passes the material in which this particle is embedded.
std::unique_ptr< IFormFactor > m_core
FormFactorCoreShell * clone() const override
Returns a clone of this ISampleNode object.
FormFactorCoreShell(IFormFactor *core, IFormFactor *shell)
double topZ(const IRotation &rotation) const override
Returns the z-coordinate of the lowest point in this shape after a given rotation.
double radialExtension() const override
Returns the (approximate in some cases) radial size of the particle of this form factor's shape.
double bottomZ(const IRotation &rotation) const override
Returns the z-coordinate of the lowest point in this shape after a given rotation.
Abstract base class for all form factors.
Definition: IFormFactor.h:36
Visitor interface to visit ISampleNode objects.
Definition: INodeVisitor.h:146
virtual void visit(const BasicLattice2D *)
Definition: INodeVisitor.h:151
Abstract base class for rotations.
Definition: Rotations.h:28
virtual const Material * material() const
Returns nullptr, unless overwritten to return a specific material.
Definition: ISampleNode.h:37
A wrapper for underlying material implementation.
Definition: Material.h:29
Holds all wavevector information relevant for calculating form factors.