BornAgain  1.19.79
Open-source research software to simulate and fit neutron and x-ray reflectometry and grazing-incidence small-angle scattering
Interference1DLattice.h
Go to the documentation of this file.
1 // ************************************************************************************************
2 //
3 // BornAgain: simulate and fit reflection and scattering
4 //
5 //! @file Sample/Aggregate/Interference1DLattice.h
6 //! @brief Defines class Interference1DLattice.
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_INTERFERENCE1DLATTICE_H
16 #define BORNAGAIN_SAMPLE_AGGREGATE_INTERFERENCE1DLATTICE_H
17 
19 
20 class IProfile1D;
21 
22 //! Interference function of a 1D lattice.
23 //! @ingroup interference
24 
26 public:
27  Interference1DLattice(double length, double xi);
29 
30  Interference1DLattice* clone() const override;
31  std::string className() const final { return "Interference1DLattice"; }
32  std::vector<ParaMeta> parDefs() const final
33  {
34  return {{"Length", "nm", "lattice constant", 0, +INF, 0},
35  {"Xi", "rad", "angle x axis and lattice vector??", -INF, +INF, 0}};
36  }
37 
38  void setDecayFunction(const IProfile1D& decay);
39 
40  double length() const { return m_length; }
41  double xi() const { return m_xi; }
42 
43  std::vector<const INode*> nodeChildren() const override;
44 
45 private:
46  double iff_without_dw(R3 q) const override;
47 
48  double m_length;
49  double m_xi;
50  std::unique_ptr<IProfile1D> m_decay;
51  int m_na; //!< determines the number of reciprocal lattice points to use
52 };
53 
54 #endif // BORNAGAIN_SAMPLE_AGGREGATE_INTERFERENCE1DLATTICE_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
Interface for a one-dimensional distribution, with normalization adjusted so that the Fourier transfo...
Definition: Profiles1D.h:29
Interference function of a 1D lattice.
int m_na
determines the number of reciprocal lattice points to use
std::string className() const final
Returns the class name, to be hard-coded in each leaf class that inherits from INode.
void setDecayFunction(const IProfile1D &decay)
Sets one-dimensional decay function.
std::vector< ParaMeta > parDefs() const final
Returns the parameter definitions, to be hard-coded in each leaf class.
std::vector< const INode * > nodeChildren() const override
Returns all children.
double iff_without_dw(R3 q) const override
Calculates the structure factor without Debye-Waller factor.
Interference1DLattice * clone() const override
std::unique_ptr< IProfile1D > m_decay
~Interference1DLattice() override
Interference1DLattice(double length, double xi)
Constructor of interference function of one-dimensional lattice.