BornAgain  1.19.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 reflection and scattering
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_SAMPLE_HARDPARTICLE_FORMFACTORDOT_H
16 #define BORNAGAIN_SAMPLE_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 
23 class FormFactorDot : public IBornFF {
24 public:
25  FormFactorDot(const std::vector<double> P);
26  FormFactorDot(double radius);
27 
28  FormFactorDot* clone() const final { return new FormFactorDot(m_radius); }
29  void accept(INodeVisitor* visitor) const final { visitor->visit(this); }
30 
31  double getRadius() const { return m_radius; }
32 
33  double radialExtension() const final { return 0; }
34 
35  double bottomZ(const IRotation&) const final { return 0; }
36  double topZ(const IRotation&) const final { return 0; }
37 
38  complex_t evaluate_for_q(cvector_t q) const final;
39 
40 protected:
41  bool canSliceAnalytically(const IRotation&) const final { return false; }
42 
43 private:
44  const double& m_radius;
45 };
46 
47 #endif // BORNAGAIN_SAMPLE_HARDPARTICLE_FORMFACTORDOT_H
std::complex< double > complex_t
Definition: Complex.h:20
Defines interface IBornFF.
A dot, with scattering power as a sphere of radius rscat, but with F(q)=const.
Definition: FormFactorDot.h:23
void accept(INodeVisitor *visitor) const final
Calls the INodeVisitor's visit method.
Definition: FormFactorDot.h:29
double getRadius() const
Definition: FormFactorDot.h:31
const double & m_radius
Definition: FormFactorDot.h:44
FormFactorDot * clone() const final
Returns a clone of this ISampleNode object.
Definition: FormFactorDot.h:28
bool canSliceAnalytically(const IRotation &) const final
Checks if slicing has a fast analytical solution.
Definition: FormFactorDot.h:41
complex_t evaluate_for_q(cvector_t q) const final
Returns scattering amplitude for complex scattering wavevector q=k_i-k_f.
FormFactorDot(const std::vector< double > P)
double bottomZ(const IRotation &) const final
Returns the z-coordinate of the lowest point in this shape after a given rotation.
Definition: FormFactorDot.h:35
double topZ(const IRotation &) const final
Returns the z-coordinate of the lowest point in this shape after a given rotation.
Definition: FormFactorDot.h:36
double radialExtension() const final
Returns the (approximate in some cases) radial size of the particle of this form factor's shape.
Definition: FormFactorDot.h:33
Abstract base class for Born form factors.
Definition: IBornFF.h:41
Visitor interface to visit ISampleNode objects.
Definition: INodeVisitor.h:146
Abstract base class for rotations.
Definition: Rotations.h:28