BornAgain  1.19.79
Open-source research software to simulate and fit neutron and x-ray reflectometry and grazing-incidence small-angle scattering
FootprintGauss.h
Go to the documentation of this file.
1 // ************************************************************************************************
2 //
3 // BornAgain: simulate and fit reflection and scattering
4 //
5 //! @file Device/Beam/FootprintGauss.h
6 //! @brief Defines class FootprintGauss.
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_DEVICE_BEAM_FOOTPRINTGAUSS_H
16 #define BORNAGAIN_DEVICE_BEAM_FOOTPRINTGAUSS_H
17 
19 
20 //! Gaussian beam footprint.
21 //!
22 //! Beam width is the full width at half maximum.
23 //! @ingroup beam
24 
26 public:
27  FootprintGauss(std::vector<double> P);
28  FootprintGauss(double width_ratio);
29 
30  FootprintGauss* clone() const override;
31  std::string className() const final { return "FootprintGauss"; }
32  // const auto tooltip = "class_tooltip";
33  std::vector<ParaMeta> parDefs() const final
34  {
35  return {{"BeamToSampleWidthRatio", "", "ratio of beam width to sample width", 0, INF, 1.}};
36  }
37 
38  //! Calculate footprint correction coefficient from the beam incident angle _alpha_.
39  double calculate(double alpha) const override;
40 
41  std::string name() const override { return "FootprintGauss"; }
42 };
43 
44 #endif // BORNAGAIN_DEVICE_BEAM_FOOTPRINTGAUSS_H
Defines interface IFootprintFactor.
const double INF
Definition: INode.h:26
Gaussian beam footprint.
FootprintGauss * clone() const override
double calculate(double alpha) const override
Calculate footprint correction coefficient from the beam incident angle alpha.
std::vector< ParaMeta > parDefs() const final
Returns the parameter definitions, to be hard-coded in each leaf class.
std::string className() const final
Returns the class name, to be hard-coded in each leaf class that inherits from INode.
std::string name() const override
FootprintGauss(std::vector< double > P)
Abstract base for classes that calculate the beam footprint factor.