BornAgain  1.18.0
Simulate and fit neutron and x-ray scattering at grazing incidence
FormFactorFullSphere.h
Go to the documentation of this file.
1 // ************************************************************************** //
2 //
3 // BornAgain: simulate and fit scattering at grazing incidence
4 //
5 //! @file Sample/HardParticle/FormFactorFullSphere.h
6 //! @brief Defines class FormFactorFullSphere.
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_FORMFACTORFULLSPHERE_H
16 #define BORNAGAIN_CORE_HARDPARTICLE_FORMFACTORFULLSPHERE_H
17 
19 
20 //! A full sphere.
21 //! @ingroup hardParticle
22 
24 {
25 public:
26  FormFactorFullSphere(const std::vector<double> P, bool position_at_center = false);
27  FormFactorFullSphere(double radius, bool position_at_center = false);
28 
29  FormFactorFullSphere* clone() const override final
30  {
32  }
33  void accept(INodeVisitor* visitor) const override final { visitor->visit(this); }
34 
35  double getRadius() const { return m_radius; }
36 
37  double radialExtension() const override final { return m_radius; }
38 
39  double bottomZ(const IRotation& rotation) const override final;
40 
41  double topZ(const IRotation& rotation) const override final;
42 
43  complex_t evaluate_for_q(cvector_t q) const override final;
44 
45 protected:
46  bool canSliceAnalytically(const IRotation&) const override final { return true; }
47 
48  IFormFactor* sliceFormFactor(ZLimits limits, const IRotation& rot,
49  kvector_t translation) const override final;
50 
51  void onChange() override final;
52 
53 private:
54  const double& m_radius;
56 };
57 
58 #endif // BORNAGAIN_CORE_HARDPARTICLE_FORMFACTORFULLSPHERE_H
std::complex< double > complex_t
Definition: Complex.h:20
Defines pure virtual interface class IFormFactorBorn.
bool canSliceAnalytically(const IRotation &) const override final
Checks if slicing has a fast analytical solution.
double bottomZ(const IRotation &rotation) const override final
Returns the z-coordinate of the lowest point in this shape after a given rotation.
complex_t evaluate_for_q(cvector_t q) const override final
Returns scattering amplitude for complex scattering wavevector q=k_i-k_f.
IFormFactor * sliceFormFactor(ZLimits limits, const IRotation &rot, kvector_t translation) const override final
Actually slices the form factor or throws an exception.
double radialExtension() const override final
Returns the (approximate in some cases) radial size of the particle of this form factor's shape.
void accept(INodeVisitor *visitor) const override final
Calls the INodeVisitor's visit method.
void onChange() override final
Action to be taken in inherited class when a parameter has changed.
FormFactorFullSphere * clone() const override final
Returns a clone of this ISample object.
double topZ(const IRotation &rotation) const override final
Returns the z-coordinate of the lowest point in this shape after a given rotation.
FormFactorFullSphere(const std::vector< double > P, bool position_at_center=false)
Pure virtual base class for Born form factors.
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
Class that contains upper and lower limits of the z-coordinate for the slicing of form factors.
Definition: ZLimits.h:41
const double radius(5 *Units::nanometer)