BornAgain  1.18.0
Simulate and fit neutron and x-ray scattering at grazing incidence
ConstantBackground.h
Go to the documentation of this file.
1 // ************************************************************************** //
2 //
3 // BornAgain: simulate and fit scattering at grazing incidence
4 //
5 //! @file Core/Computation/ConstantBackground.h
6 //! @brief Defines class ConstantBackground.
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_COMPUTATION_CONSTANTBACKGROUND_H
16 #define BORNAGAIN_CORE_COMPUTATION_CONSTANTBACKGROUND_H
17 
19 
20 //! Class representing a constant background signal
21 //!
22 //! @ingroup simulation
23 
25 {
26 public:
27  ConstantBackground(const std::vector<double> P);
28  ConstantBackground(double background_value);
29 
30  ConstantBackground* clone() const override final;
31 
32  double backgroundValue() const { return m_background_value; }
33 
34  void accept(INodeVisitor* visitor) const override { visitor->visit(this); }
35 
36  double addBackground(double intensity) const override final;
37 
38 private:
39  const double& m_background_value;
40 };
41 
42 #endif // BORNAGAIN_CORE_COMPUTATION_CONSTANTBACKGROUND_H
Defines interface IBackground.
Class representing a constant background signal.
ConstantBackground(const std::vector< double > P)
double addBackground(double intensity) const override final
const double & m_background_value
void accept(INodeVisitor *visitor) const override
Calls the INodeVisitor's visit method.
double backgroundValue() const
ConstantBackground * clone() const override final
Interface for a simulating the background signal.
Definition: IBackground.h:26
Visitor interface to visit ISample objects.
Definition: INodeVisitor.h:149
virtual void visit(const BasicLattice *)
Definition: INodeVisitor.h:154