BornAgain  1.18.0
Simulate and fit neutron and x-ray scattering at grazing incidence
InterferenceFunctionRadialParaCrystal.h
Go to the documentation of this file.
1 // ************************************************************************** //
2 //
3 // BornAgain: simulate and fit scattering at grazing incidence
4 //
5 //! @file Sample/Aggregate/InterferenceFunctionRadialParaCrystal.h
6 //! @brief Defines class InterferenceFunctionRadialParaCrystal.
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_INTERFERENCEFUNCTIONRADIALPARACRYSTAL_H
16 #define BORNAGAIN_CORE_AGGREGATE_INTERFERENCEFUNCTIONRADIALPARACRYSTAL_H
17 
18 #include "Base/Types/Complex.h"
21 #include <memory>
22 
23 //! Interference function of radial paracrystal.
24 //! @ingroup interference
25 
27 {
28 public:
29  InterferenceFunctionRadialParaCrystal(double peak_distance, double damping_length);
30  InterferenceFunctionRadialParaCrystal* clone() const override final;
31 
32  void accept(INodeVisitor* visitor) const override final { visitor->visit(this); }
33 
34  void setKappa(double kappa);
35  double kappa() const;
36 
37  void setDomainSize(double size);
38  double domainSize() const { return m_domain_size; }
39 
40  complex_t FTPDF(double qpar) const;
41 
43 
44  double peakDistance() const { return m_peak_distance; }
45 
46  double dampingLength() const { return m_damping_length; }
47 
48  std::vector<const INode*> getChildren() const override final;
49 
50  double randomSample() const { return mP_pdf->createSampler()->randomSample(); }
51 
52 private:
53  double iff_without_dw(const kvector_t q) const override final;
55 
56  double m_peak_distance; //!< the distance to the first neighbor peak
57  double m_damping_length; //!< damping length of paracrystal
58  //! Fourier transformed probability distribution of the nearest particle
59  std::unique_ptr<IFTDistribution1D> mP_pdf;
61  double m_kappa; //!< Size-spacing coupling parameter
62  double m_domain_size; //!< Size of coherence domain
63 };
64 
65 #endif // BORNAGAIN_CORE_AGGREGATE_INTERFERENCEFUNCTIONRADIALPARACRYSTAL_H
Defines complex_t, and a few elementary functions.
std::complex< double > complex_t
Definition: Complex.h:20
Defines interface class IFTDistribution1D, and children thereof.
Defines and implements the interface class IInterferenceFunction.
Interface for a one-dimensional distribution, with normalization adjusted so that the Fourier transfo...
Pure virtual base class of interference functions.
Visitor interface to visit ISample objects.
Definition: INodeVisitor.h:149
Interference function of radial paracrystal.
InterferenceFunctionRadialParaCrystal(double peak_distance, double damping_length)
Constructor of interference function of radial paracrystal.
std::vector< const INode * > getChildren() const override final
Returns a vector of children (const).
InterferenceFunctionRadialParaCrystal * clone() const override final
Returns a clone of this ISample object.
std::unique_ptr< IFTDistribution1D > mP_pdf
Fourier transformed probability distribution of the nearest particle.
void setDomainSize(double size)
Sets domain size (finite size corrections).
double iff_without_dw(const kvector_t q) const override final
Calculates the structure factor without Debye-Waller factor.
void accept(INodeVisitor *visitor) const override final
Calls the INodeVisitor's visit method.
void setKappa(double kappa)
Sets size spacing coupling parameter of the Size Spacing Correlation Approximation.
double m_peak_distance
the distance to the first neighbor peak
void setProbabilityDistribution(const IFTDistribution1D &pdf)
Sets one-dimensional probability distribution.