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