BornAgain  1.19.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 reflection and scattering
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_SAMPLE_SLICE_LAYERROUGHNESS_H
16 #define BORNAGAIN_SAMPLE_SLICE_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 ISampleNode {
29 public:
30  LayerRoughness(double sigma, double hurstParameter, double lateralCorrLength);
32 
34  {
36  }
37  virtual void accept(INodeVisitor* visitor) const { visitor->visit(this); }
38 
39  //! Returns power spectral density of the surface roughness
40  double getSpectralFun(const kvector_t kvec) const;
41 
42  double getCorrFun(const kvector_t k) const;
43 
44  //! Sets rms of roughness
45  void setSigma(double sigma) { m_sigma = sigma; }
46  //! Returns rms of roughness
47  double getSigma() const { return m_sigma; }
48 
49  //! Sets hurst parameter. It describes how jagged the surface is.
50  void setHurstParameter(double hurstParameter) { m_hurstParameter = hurstParameter; }
51  //! Returns hurst parameter
52  double getHurstParameter() const { return m_hurstParameter; }
53 
54  //! Sets lateral correlation length
55  void setLatteralCorrLength(double lateralCorrLength)
56  {
57  m_lateralCorrLength = lateralCorrLength;
58  }
59  //! Returns lateral correlation length
60  double getLatteralCorrLength() const { return m_lateralCorrLength; }
61 
62 private:
63  double m_sigma; //!< rms of roughness
64  double m_hurstParameter; //!< Hurst parameter which describes how jagged the interface, 0<H<=1
65  double m_lateralCorrLength; //!< lateral correlation length of the roughness
66 };
67 
68 #endif // BORNAGAIN_SAMPLE_SLICE_LAYERROUGHNESS_H
Defines interface class ISampleNode.
Visitor interface to visit ISampleNode objects.
Definition: INodeVisitor.h:146
virtual void visit(const BasicLattice2D *)
Definition: INodeVisitor.h:151
Abstract base class for sample components and properties related to scattering.
Definition: ISampleNode.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 ISampleNode 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.