BornAgain  1.18.0
Simulate and fit neutron and x-ray scattering at grazing incidence
InterferenceFunction3DLattice.h
Go to the documentation of this file.
1 // ************************************************************************** //
2 //
3 // BornAgain: simulate and fit scattering at grazing incidence
4 //
5 //! @file Sample/Aggregate/InterferenceFunction3DLattice.h
6 //! @brief Defines class InterferenceFunction3DLattice.
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_AGGREGATE_INTERFERENCEFUNCTION3DLATTICE_H
16 #define BORNAGAIN_CORE_AGGREGATE_INTERFERENCEFUNCTION3DLATTICE_H
17 
19 #include "Sample/Lattice/Lattice.h"
20 
21 class IPeakShape;
22 
23 //! Interference function of a 3D lattice.
24 //! @ingroup interference
25 
27 {
28 public:
31 
32  InterferenceFunction3DLattice* clone() const override final;
33 
34  void accept(INodeVisitor* visitor) const override final { visitor->visit(this); }
35 
36  void setPeakShape(const IPeakShape& peak_shape);
37 
38  const Lattice& lattice() const;
39 
40  bool supportsMultilayer() const override final { return false; }
41 
42  std::vector<const INode*> getChildren() const override final;
43 
44  void onChange() override final;
45 
46 private:
47  double iff_without_dw(const kvector_t q) const override final;
48  void initRecRadius();
49 
50  Lattice m_lattice; // TODO ASAP unique_ptr as in otehr InterferenceFunction%s
51  std::unique_ptr<IPeakShape> mP_peak_shape;
52  double m_rec_radius; //!< radius in reciprocal space defining the nearest q vectors to use
53 };
54 
55 #endif // BORNAGAIN_CORE_AGGREGATE_INTERFERENCEFUNCTION3DLATTICE_H
Defines and implements the interface class IInterferenceFunction.
Defines class Lattice.
Pure virtual base class of interference functions.
Visitor interface to visit ISample objects.
Definition: INodeVisitor.h:149
Pure virtual interface class that defines the peak shape of a Bragg peak.
Definition: IPeakShape.h:25
Interference function of a 3D lattice.
void setPeakShape(const IPeakShape &peak_shape)
double m_rec_radius
radius in reciprocal space defining the nearest q vectors to use
void accept(INodeVisitor *visitor) const override final
Calls the INodeVisitor's visit method.
InterferenceFunction3DLattice(const Lattice &lattice)
void onChange() override final
Action to be taken in inherited class when a parameter has changed.
double iff_without_dw(const kvector_t q) const override final
Calculates the structure factor without Debye-Waller factor.
bool supportsMultilayer() const override final
Indicates if this interference function can be used with a multilayer (DWBA mode)
InterferenceFunction3DLattice * clone() const override final
Returns a clone of this ISample object.
std::vector< const INode * > getChildren() const override final
Returns a vector of children (const).
std::unique_ptr< IPeakShape > mP_peak_shape
A lattice with three basis vectors.
Definition: Lattice.h:28