BornAgain  1.18.0
Simulate and fit neutron and x-ray scattering at grazing incidence
FormFactorCone.h
Go to the documentation of this file.
1 // ************************************************************************** //
2 //
3 // BornAgain: simulate and fit scattering at grazing incidence
4 //
5 //! @file Sample/HardParticle/FormFactorCone.h
6 //! @brief Defines class FormFactorCone
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_FORMFACTORCONE_H
16 #define BORNAGAIN_CORE_HARDPARTICLE_FORMFACTORCONE_H
17 
19 
20 //! A conical frustum (cone truncated parallel to the base) with circular base.
21 //! @ingroup hardParticle
22 
24 {
25 public:
26  FormFactorCone(const std::vector<double> P);
27  FormFactorCone(double radius, double height, double alpha);
28 
29  FormFactorCone* clone() const override final
30  {
32  }
33  void accept(INodeVisitor* visitor) const override final { visitor->visit(this); }
34 
35  double getHeight() const { return m_height; }
36  double getAlpha() const { return m_alpha; }
37  double getRadius() const { return m_radius; }
38 
39  double radialExtension() const override final { return m_radius; }
40 
41  complex_t evaluate_for_q(cvector_t q) const override final;
42 
43 protected:
44  IFormFactor* sliceFormFactor(ZLimits limits, const IRotation& rot,
45  kvector_t translation) const override final;
46 
47  void onChange() override final;
48 
49 private:
50  complex_t Integrand(double Z) const;
51 
52  const double& m_radius;
53  const double& m_height;
54  const double& m_alpha;
55  double m_cot_alpha;
56  mutable cvector_t m_q;
57 };
58 
59 #endif // BORNAGAIN_CORE_HARDPARTICLE_FORMFACTORCONE_H
std::complex< double > complex_t
Definition: Complex.h:20
Defines pure virtual interface class IFormFactorBorn.
A conical frustum (cone truncated parallel to the base) with circular base.
double radialExtension() const override final
Returns the (approximate in some cases) radial size of the particle of this form factor's shape.
const double & m_alpha
IFormFactor * sliceFormFactor(ZLimits limits, const IRotation &rot, kvector_t translation) const override final
Actually slices the form factor or throws an exception.
void onChange() override final
Action to be taken in inherited class when a parameter has changed.
FormFactorCone(const std::vector< double > P)
const double & m_radius
double getHeight() const
double getRadius() const
complex_t Integrand(double Z) const
Integrand for complex form factor.
double getAlpha() const
complex_t evaluate_for_q(cvector_t q) const override final
Returns scattering amplitude for complex scattering wavevector q=k_i-k_f.
FormFactorCone * clone() const override final
Returns a clone of this ISample object.
void accept(INodeVisitor *visitor) const override final
Calls the INodeVisitor's visit method.
const double & m_height
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)