BornAgain  1.19.79
Open-source research software to simulate and fit neutron and x-ray reflectometry and grazing-incidence small-angle scattering
InterferenceRadialParaCrystal.h
Go to the documentation of this file.
1 // ************************************************************************************************
2 //
3 // BornAgain: simulate and fit reflection and scattering
4 //
5 //! @file Sample/Aggregate/InterferenceRadialParaCrystal.h
6 //! @brief Defines class InterferenceRadialParaCrystal.
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_SAMPLE_AGGREGATE_INTERFERENCERADIALPARACRYSTAL_H
16 #define BORNAGAIN_SAMPLE_AGGREGATE_INTERFERENCERADIALPARACRYSTAL_H
17 
20 #include <heinz/Complex.h>
21 #include <memory>
22 
23 //! Interference function of radial paracrystal.
24 //! @ingroup interference
25 
27 public:
28  InterferenceRadialParaCrystal(double peak_distance, double damping_length);
29  InterferenceRadialParaCrystal* clone() const override;
30  std::string className() const final { return "InterferenceRadialParaCrystal"; }
31  std::vector<ParaMeta> parDefs() const final
32  {
33  return {{"PeakDistance", "nm", "peak distance", 0, +INF, 0},
34  {"DampingLength", "nm", "damping length", 0, +INF, 0}};
35  }
36 
37  void setKappa(double kappa);
38  double kappa() const;
39 
40  void setDomainSize(double size);
41  double domainSize() const { return m_domain_size; }
42 
43  complex_t FTPDF(double qpar) const;
44 
45  void setProbabilityDistribution(const IProfile1D& pdf);
46 
47  double peakDistance() const { return m_peak_distance; }
48 
49  double dampingLength() const { return m_damping_length; }
50 
51  std::vector<const INode*> nodeChildren() const override;
52 
53  double randomSample() const { return m_pdf->createSampler()->randomSample(); }
54 
55 private:
56  double iff_without_dw(R3 q) const override;
58 
59  double m_peak_distance; //!< the distance to the first neighbor peak
60  double m_damping_length; //!< damping length of paracrystal
61  //! Fourier transformed probability distribution of the nearest particle
62  std::unique_ptr<IProfile1D> m_pdf;
64  double m_kappa; //!< Size-spacing coupling parameter
65  double m_domain_size; //!< Size of coherence domain
66 };
67 
68 #endif // BORNAGAIN_SAMPLE_AGGREGATE_INTERFERENCERADIALPARACRYSTAL_H
Defines and implements the interface class IInterference.
const double INF
Definition: INode.h:26
Defines interface class IProfile1D, and children thereof.
Abstract base class of interference functions.
Definition: IInterference.h:24
Interface for a one-dimensional distribution, with normalization adjusted so that the Fourier transfo...
Definition: Profiles1D.h:29
Interference function of radial paracrystal.
double iff_without_dw(R3 q) const override
Calculates the structure factor without Debye-Waller factor.
double m_kappa
Size-spacing coupling parameter.
std::string className() const final
Returns the class name, to be hard-coded in each leaf class that inherits from INode.
double m_domain_size
Size of coherence domain.
std::vector< const INode * > nodeChildren() const override
Returns all children.
InterferenceRadialParaCrystal * clone() const override
std::unique_ptr< IProfile1D > m_pdf
InterferenceRadialParaCrystal(double peak_distance, double damping_length)
Constructor of interference function of radial paracrystal.
void setKappa(double kappa)
Sets size spacing coupling parameter of the Size Spacing Correlation Approximation.
void setDomainSize(double size)
Sets domain size (finite size corrections).
void setProbabilityDistribution(const IProfile1D &pdf)
Sets one-dimensional probability distribution.
double m_damping_length
damping length of paracrystal Fourier transformed probability distribution of the nearest particle
double m_peak_distance
the distance to the first neighbor peak
std::vector< ParaMeta > parDefs() const final
Returns the parameter definitions, to be hard-coded in each leaf class.