BornAgain  1.18.0
Simulate and fit neutron and x-ray scattering at grazing incidence
FormFactorDot.h
Go to the documentation of this file.
1 // ************************************************************************** //
2 //
3 // BornAgain: simulate and fit scattering at grazing incidence
4 //
5 //! @file Sample/HardParticle/FormFactorDot.h
6 //! @brief Defines class FormFactorDot.
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_FORMFACTORDOT_H
16 #define BORNAGAIN_CORE_HARDPARTICLE_FORMFACTORDOT_H
17 
19 
20 //! A dot, with scattering power as a sphere of radius rscat, but with F(q)=const.
21 //! @ingroup hardParticle
22 
24 {
25 public:
26  FormFactorDot(const std::vector<double> P);
27  FormFactorDot(double radius);
28 
29  FormFactorDot* clone() const override final { return new FormFactorDot(m_radius); }
30  void accept(INodeVisitor* visitor) const override final { visitor->visit(this); }
31 
32  double getRadius() const { return m_radius; }
33 
34  double radialExtension() const override final { return 0; }
35 
36  double bottomZ(const IRotation&) const override final { return 0; }
37  double topZ(const IRotation&) const override final { return 0; }
38 
39  complex_t evaluate_for_q(cvector_t q) const override final;
40 
41 protected:
42  bool canSliceAnalytically(const IRotation&) const override final { return false; }
43 
44 private:
45  const double& m_radius;
46 };
47 
48 #endif // BORNAGAIN_CORE_HARDPARTICLE_FORMFACTORDOT_H
std::complex< double > complex_t
Definition: Complex.h:20
Defines pure virtual interface class IFormFactorBorn.
A dot, with scattering power as a sphere of radius rscat, but with F(q)=const.
Definition: FormFactorDot.h:24
double getRadius() const
Definition: FormFactorDot.h:32
bool canSliceAnalytically(const IRotation &) const override final
Checks if slicing has a fast analytical solution.
Definition: FormFactorDot.h:42
const double & m_radius
Definition: FormFactorDot.h:45
double topZ(const IRotation &) const override final
Returns the z-coordinate of the lowest point in this shape after a given rotation.
Definition: FormFactorDot.h:37
double radialExtension() const override final
Returns the (approximate in some cases) radial size of the particle of this form factor's shape.
Definition: FormFactorDot.h:34
FormFactorDot(const std::vector< double > P)
complex_t evaluate_for_q(cvector_t q) const override final
Returns scattering amplitude for complex scattering wavevector q=k_i-k_f.
double bottomZ(const IRotation &) const override final
Returns the z-coordinate of the lowest point in this shape after a given rotation.
Definition: FormFactorDot.h:36
void accept(INodeVisitor *visitor) const override final
Calls the INodeVisitor's visit method.
Definition: FormFactorDot.h:30
FormFactorDot * clone() const override final
Returns a clone of this ISample object.
Definition: FormFactorDot.h:29
Pure virtual base class for Born form factors.
Visitor interface to visit ISample objects.
Definition: INodeVisitor.h:149
Pure virtual interface for rotations.
Definition: Rotations.h:27
const double radius(5 *Units::nanometer)