BornAgain  1.18.0
Simulate and fit neutron and x-ray scattering at grazing incidence
FormFactorHemiEllipsoid.h
Go to the documentation of this file.
1 // ************************************************************************** //
2 //
3 // BornAgain: simulate and fit scattering at grazing incidence
4 //
5 //! @file Sample/HardParticle/FormFactorHemiEllipsoid.h
6 //! @brief Defines class FormFactorHemiEllipsoid.
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_HARDPARTICLE_FORMFACTORHEMIELLIPSOID_H
16 #define BORNAGAIN_CORE_HARDPARTICLE_FORMFACTORHEMIELLIPSOID_H
17 
19 
20 //! An hemi ellipsoid,
21 //! obtained by truncating a full ellipsoid in the middle plane spanned by two principal axes.
22 //! @ingroup hardParticle
23 
25 {
26 public:
27  FormFactorHemiEllipsoid(const std::vector<double> P);
28  FormFactorHemiEllipsoid(double radius_x, double radius_y, double height);
30 
31  FormFactorHemiEllipsoid* clone() const override final
32  {
34  }
35  void accept(INodeVisitor* visitor) const override final { visitor->visit(this); }
36 
37  double getHeight() const { return m_height; }
38  double getRadiusX() const { return m_radius_x; }
39  double getRadiusY() const { return m_radius_y; }
40 
41  double radialExtension() const override final;
42 
43  complex_t evaluate_for_q(cvector_t q) const override final;
44 
45 protected:
46  void onChange() override final;
47 
48 private:
49  complex_t Integrand(double Z) const;
50 
51  const double& m_radius_x;
52  const double& m_radius_y;
53  const double& m_height;
54  mutable cvector_t m_q;
55 };
56 
57 #endif // BORNAGAIN_CORE_HARDPARTICLE_FORMFACTORHEMIELLIPSOID_H
std::complex< double > complex_t
Definition: Complex.h:20
Defines pure virtual interface class IFormFactorBorn.
An hemi ellipsoid, obtained by truncating a full ellipsoid in the middle plane spanned by two princip...
void onChange() override final
Action to be taken in inherited class when a parameter has changed.
void accept(INodeVisitor *visitor) const override final
Calls the INodeVisitor's visit method.
FormFactorHemiEllipsoid * clone() const override final
Returns a clone of this ISample object.
complex_t evaluate_for_q(cvector_t q) const override final
Returns scattering amplitude for complex scattering wavevector q=k_i-k_f.
complex_t Integrand(double Z) const
Integrand for complex form factor.
double radialExtension() const override final
Returns the (approximate in some cases) radial size of the particle of this form factor's shape.
FormFactorHemiEllipsoid(const std::vector< double > P)
Pure virtual base class for Born form factors.
Visitor interface to visit ISample objects.
Definition: INodeVisitor.h:149