BornAgain  1.18.0
Simulate and fit neutron and x-ray scattering at grazing incidence
LayerRoughness.h
Go to the documentation of this file.
1 // ************************************************************************** //
2 //
3 // BornAgain: simulate and fit scattering at grazing incidence
4 //
5 //! @file Sample/Slice/LayerRoughness.h
6 //! @brief Defines class LayerRoughness.
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_MULTILAYER_LAYERROUGHNESS_H
16 #define BORNAGAIN_CORE_MULTILAYER_LAYERROUGHNESS_H
17 
19 
20 //! A roughness of interface between two layers.
21 //!
22 //! Based on the article
23 //! D.K.G. de Boer, Physical review B, Volume 51, Number 8, 15 February 1995
24 //! "X-ray reflection and transmission by rough surfaces"
25 //!
26 //! @ingroup samples
27 
28 class LayerRoughness : public ISample
29 {
30 public:
31  LayerRoughness(double sigma, double hurstParameter, double lateralCorrLength);
33 
35  {
37  }
38  virtual void accept(INodeVisitor* visitor) const { visitor->visit(this); }
39 
40  //! Returns power spectral density of the surface roughness
41  double getSpectralFun(const kvector_t kvec) const;
42 
43  double getCorrFun(const kvector_t k) const;
44 
45  //! Sets rms of roughness
46  void setSigma(double sigma) { m_sigma = sigma; }
47  //! Returns rms of roughness
48  double getSigma() const { return m_sigma; }
49 
50  //! Sets hurst parameter. It describes how jagged the surface is.
51  void setHurstParameter(double hurstParameter) { m_hurstParameter = hurstParameter; }
52  //! Returns hurst parameter
53  double getHurstParameter() const { return m_hurstParameter; }
54 
55  //! Sets lateral correlation length
56  void setLatteralCorrLength(double lateralCorrLength)
57  {
58  m_lateralCorrLength = lateralCorrLength;
59  }
60  //! Returns lateral correlation length
61  double getLatteralCorrLength() const { return m_lateralCorrLength; }
62 
63 private:
64  double m_sigma; //!< rms of roughness
65  double m_hurstParameter; //!< Hurst parameter which describes how jagged the interface, 0<H<=1
66  double m_lateralCorrLength; //!< lateral correlation length of the roughness
67 };
68 
69 #endif // BORNAGAIN_CORE_MULTILAYER_LAYERROUGHNESS_H
Defines interface class ISample.
Visitor interface to visit ISample objects.
Definition: INodeVisitor.h:149
virtual void visit(const BasicLattice *)
Definition: INodeVisitor.h:154
Pure virtual base class for sample components and properties related to scattering.
Definition: ISample.h:28
A roughness of interface between two layers.
double m_hurstParameter
Hurst parameter which describes how jagged the interface, 0<H<=1.
void setSigma(double sigma)
Sets rms of roughness.
double getSigma() const
Returns rms of roughness.
double getSpectralFun(const kvector_t kvec) const
Returns power spectral density of the surface roughness.
double m_lateralCorrLength
lateral correlation length of the roughness
double getLatteralCorrLength() const
Returns lateral correlation length.
double getHurstParameter() const
Returns hurst parameter.
double getCorrFun(const kvector_t k) const
Correlation function of the roughness profile.
double m_sigma
rms of roughness
LayerRoughness * clone() const
Returns a clone of this ISample object.
virtual void accept(INodeVisitor *visitor) const
Calls the INodeVisitor's visit method.
void setLatteralCorrLength(double lateralCorrLength)
Sets lateral correlation length.
void setHurstParameter(double hurstParameter)
Sets hurst parameter. It describes how jagged the surface is.