BornAgain  1.19.79
Open-source research software to simulate and fit neutron and x-ray reflectometry and grazing-incidence small-angle scattering
HollowSphere.h
Go to the documentation of this file.
1 // ************************************************************************************************
2 //
3 // BornAgain: simulate and fit reflection and scattering
4 //
5 //! @file Sample/HardParticle/HollowSphere.h
6 //! @brief Defines class HollowSphere.
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_HOLLOWSPHERE_H
16 #define BORNAGAIN_SAMPLE_HARDPARTICLE_HOLLOWSPHERE_H
17 
19 
20 //! Integrated full sphere form factor over a uniform distribution of radii.
21 //! @ingroup softParticle
22 
23 class HollowSphere : public IFormFactor {
24 public:
25  HollowSphere(double mean, double full_width);
26 #ifndef USER_API
27  HollowSphere(std::vector<double> P);
28 
29  HollowSphere* clone() const override { return new HollowSphere(m_mean, m_full_width); }
30  std::string className() const final { return "HollowSphere"; }
31  // const auto tooltip = "class_tooltip";
32  std::vector<ParaMeta> parDefs() const final
33  {
34  return {{"MeanRadius", "nm", "para_tooltip", 0, +INF, 0},
35  {"FullWidth", "nm", "para_tooltip", 0, +INF, 0}};
36  }
37 
38  double radialExtension() const override { return m_mean; }
39 
40  complex_t formfactor_at_bottom(C3 q) const override;
41 
42 private:
43  bool checkParameters() const;
44  const double& m_mean; //!< This is the mean radius
45  const double& m_full_width; //!< This is the full width of the radius distribution
46 #endif // USER_API
47 };
48 
49 #endif // BORNAGAIN_SAMPLE_HARDPARTICLE_HOLLOWSPHERE_H
const double INF
Definition: INode.h:26
Defines class Sphere.
Integrated full sphere form factor over a uniform distribution of radii.
Definition: HollowSphere.h:23
double radialExtension() const override
Returns the (approximate in some cases) radial size of the particle of this form factor's shape....
Definition: HollowSphere.h:38
bool checkParameters() const
const double & m_full_width
This is the full width of the radius distribution.
Definition: HollowSphere.h:45
std::vector< ParaMeta > parDefs() const final
Returns the parameter definitions, to be hard-coded in each leaf class.
Definition: HollowSphere.h:32
std::string className() const final
Returns the class name, to be hard-coded in each leaf class that inherits from INode.
Definition: HollowSphere.h:30
const double & m_mean
This is the mean radius.
Definition: HollowSphere.h:44
HollowSphere * clone() const override
Returns a clone of this ISampleNode object.
Definition: HollowSphere.h:29
HollowSphere(double mean, double full_width)
complex_t formfactor_at_bottom(C3 q) const override
Abstract base class for Born form factors.
Definition: IFormFactor.h:36