BornAgain  1.18.0
Simulate and fit neutron and x-ray scattering at grazing incidence
FormFactorBAPol.h
Go to the documentation of this file.
1 // ************************************************************************** //
2 //
3 // BornAgain: simulate and fit scattering at grazing incidence
4 //
5 //! @file Sample/Scattering/FormFactorBAPol.h
6 //! @brief Defines class FormFactorBAPol.
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_MULTILAYER_FORMFACTORBAPOL_H
16 #define BORNAGAIN_CORE_MULTILAYER_FORMFACTORBAPOL_H
17 
19 #include <memory>
20 
21 //! Evaluates the matrix BA term in a polarized IFormFactor.
22 
23 //! @ingroup formfactors_internal
24 
25 class FormFactorBAPol final : public IFormFactor
26 {
27 public:
28  FormFactorBAPol(const IFormFactor& form_factor);
29  ~FormFactorBAPol() override;
30 
31  FormFactorBAPol* clone() const override;
32 
33  void accept(INodeVisitor* visitor) const override { visitor->visit(this); }
34 
35  void setAmbientMaterial(const Material& material) override
36  {
37  mP_form_factor->setAmbientMaterial(material);
38  }
39 
40  //! Throws not-implemented exception
41  complex_t evaluate(const WavevectorInfo& wavevectors) const override;
42 
43  //! Calculates and returns a polarized form factor calculation in BA
44  Eigen::Matrix2cd evaluatePol(const WavevectorInfo& wavevectors) const override;
45 
46  double volume() const override { return mP_form_factor->volume(); }
47 
48  double radialExtension() const override { return mP_form_factor->radialExtension(); }
49 
50  double bottomZ(const IRotation& rotation) const override;
51 
52  double topZ(const IRotation& rotation) const override;
53 
54 private:
55  //! The form factor for BA
56  std::unique_ptr<IFormFactor> mP_form_factor;
57 };
58 
59 #endif // BORNAGAIN_CORE_MULTILAYER_FORMFACTORBAPOL_H
std::complex< double > complex_t
Definition: Complex.h:20
Defines and implements pure virtual interface IFormFactor.
Evaluates the matrix BA term in a polarized IFormFactor.
double topZ(const IRotation &rotation) const override
Returns the z-coordinate of the lowest point in this shape after a given rotation.
double volume() const override
Returns the total volume of the particle of this form factor's shape.
FormFactorBAPol * clone() const override
Returns a clone of this ISample object.
double bottomZ(const IRotation &rotation) const override
Returns the z-coordinate of the lowest point in this shape after a given rotation.
void accept(INodeVisitor *visitor) const override
Calls the INodeVisitor's visit method.
~FormFactorBAPol() override
complex_t evaluate(const WavevectorInfo &wavevectors) const override
Throws not-implemented exception.
Eigen::Matrix2cd evaluatePol(const WavevectorInfo &wavevectors) const override
Calculates and returns a polarized form factor calculation in BA.
void setAmbientMaterial(const Material &material) override
Passes the material in which this particle is embedded.
double radialExtension() const override
Returns the (approximate in some cases) radial size of the particle of this form factor's shape.
std::unique_ptr< IFormFactor > mP_form_factor
The form factor for BA.
FormFactorBAPol(const IFormFactor &form_factor)
Pure virtual base class for all form factors.
Definition: IFormFactor.h:40
Visitor interface to visit ISample objects.
Definition: INodeVisitor.h:149
virtual void visit(const BasicLattice *)
Definition: INodeVisitor.h:154
Pure virtual interface for rotations.
Definition: Rotations.h:27
virtual const Material * material() const
Returns nullptr, unless overwritten to return a specific material.
Definition: ISample.h:37
A wrapper for underlying material implementation.
Definition: Material.h:29
Holds all wavevector information relevant for calculating form factors.