BornAgain  1.19.79
Open-source research software to simulate and fit neutron and x-ray reflectometry and grazing-incidence small-angle scattering
InterferenceTwin.h
Go to the documentation of this file.
1 // ************************************************************************************************
2 //
3 // BornAgain: simulate and fit reflection and scattering
4 //
5 //! @file Sample/Aggregate/InterferenceTwin.h
6 //! @brief Defines class InterferenceTwin.
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_INTERFERENCETWIN_H
16 #define BORNAGAIN_SAMPLE_AGGREGATE_INTERFERENCETWIN_H
17 
19 
20 //! Interference function for two particles at a mean distance and given standard deviation
21 //! from each other in a given direction.
22 //! TODO: RENAME (has nothing to do with crystallographic twin)
23 //! @ingroup interference
24 
26 public:
27  InterferenceTwin(const R3& direction, double mean_distance, double std_dev);
28 
29  InterferenceTwin* clone() const override;
30  std::string className() const final { return "InterferenceTwin"; }
31  std::vector<ParaMeta> parDefs() const final
32  {
33  return {{"MeanDistance", "nm", "mean distance", 0, +INF, 0},
34  {"StdDeviation", "nm", "standard deviation of distance", 0, +INF, 0}};
35  }
36 
37  R3 direction() const;
38  double meanDistance() const;
39  double stdDev() const;
40 
41 private:
42  double iff_without_dw(R3 q) const override;
43 
45  double m_distance;
46  double m_std_dev;
47 };
48 
49 #endif // BORNAGAIN_SAMPLE_AGGREGATE_INTERFERENCETWIN_H
Defines and implements the interface class IInterference.
const double INF
Definition: INode.h:26
Abstract base class of interference functions.
Definition: IInterference.h:24
Interference function for two particles at a mean distance and given standard deviation from each oth...
double iff_without_dw(R3 q) const override
Calculates the structure factor without Debye-Waller factor.
InterferenceTwin * clone() const override
double meanDistance() const
std::string className() const final
Returns the class name, to be hard-coded in each leaf class that inherits from INode.
double stdDev() const
std::vector< ParaMeta > parDefs() const final
Returns the parameter definitions, to be hard-coded in each leaf class.
InterferenceTwin(const R3 &direction, double mean_distance, double std_dev)