BornAgain  1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
IFormFactorPrism.h
Go to the documentation of this file.
1 // ************************************************************************************************
2 //
3 // BornAgain: simulate and fit reflection and scattering
4 //
5 //! @file Sample/HardParticle/IFormFactorPrism.h
6 //! @brief Defines interface IFormFactorPrism.
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 USER_API
16 #ifndef BORNAGAIN_SAMPLE_HARDPARTICLE_IFORMFACTORPRISM_H
17 #define BORNAGAIN_SAMPLE_HARDPARTICLE_IFORMFACTORPRISM_H
18 
20 #include <memory>
21 
22 class Prism;
23 
24 //! A prism with a polygonal base, for form factor computation.
25 
26 class IFormFactorPrism : public IBornFF {
27 public:
28  IFormFactorPrism(const NodeMeta& meta, const std::vector<double>& PValues);
30 
31  double bottomZ(const IRotation& rotation) const final;
32  double topZ(const IRotation& rotation) const final;
33 
34  complex_t evaluate_for_q(cvector_t q) const override;
35  double volume() const override;
36  double radialExtension() const override;
37  double getHeight() const;
38 
39 protected:
40  void setPrism(bool symmetry_Ci, const std::vector<kvector_t>& vertices);
41  virtual double height() const = 0; // TODO mv parameter m_height back from children to this
42 
43 private:
44  std::unique_ptr<Prism> pimpl;
45 };
46 
47 #endif // BORNAGAIN_SAMPLE_HARDPARTICLE_IFORMFACTORPRISM_H
48 #endif // USER_API
std::complex< double > complex_t
Definition: Complex.h:20
Defines interface IBornFF.
Abstract base class for Born form factors.
Definition: IBornFF.h:41
A prism with a polygonal base, for form factor computation.
double topZ(const IRotation &rotation) const final
Returns the z-coordinate of the lowest point in this shape after a given rotation.
double radialExtension() const override
Returns the (approximate in some cases) radial size of the particle of this form factor's shape.
virtual double height() const =0
double getHeight() const
double bottomZ(const IRotation &rotation) const final
Returns the z-coordinate of the lowest point in this shape after a given rotation.
IFormFactorPrism(const NodeMeta &meta, const std::vector< double > &PValues)
double volume() const override
Returns the volume of this prism.
std::unique_ptr< Prism > pimpl
void setPrism(bool symmetry_Ci, const std::vector< kvector_t > &vertices)
complex_t evaluate_for_q(cvector_t q) const override
Returns the form factor F(q) of this polyhedron, respecting the offset height/2.
Abstract base class for rotations.
Definition: Rotations.h:28
Definition: Prism.h:27
Metadata of one model node.
Definition: INode.h:38