BornAgain  1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
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(const std::vector<double> P);
26  FootprintSquare(double width_ratio);
27 
28  void accept(INodeVisitor* visitor) const override { visitor->visit(this); }
29 
30  FootprintSquare* clone() const override;
31 
32  //! Calculate footprint correction coefficient from the beam incident angle _alpha_.
33  double calculate(double alpha) const override;
34 
35  std::string name() const override { return "FootprintSquare"; }
36 };
37 
38 #endif // BORNAGAIN_DEVICE_BEAM_FOOTPRINTSQUARE_H
Defines interface IFootprintFactor.
Rectangular beam footprint.
std::string name() const override
void accept(INodeVisitor *visitor) const override
Calls the INodeVisitor's visit method.
FootprintSquare * clone() const override
double calculate(double alpha) const override
Calculate footprint correction coefficient from the beam incident angle alpha.
FootprintSquare(const std::vector< double > P)
Abstract base for classes that calculate the beam footprint factor.
Visitor interface to visit ISampleNode objects.
Definition: INodeVisitor.h:146
virtual void visit(const BasicLattice2D *)
Definition: INodeVisitor.h:151