BornAgain  1.18.0
Simulate and fit neutron and x-ray scattering at grazing incidence
PoissonNoiseBackground.cpp
Go to the documentation of this file.
1 // ************************************************************************** //
2 //
3 // BornAgain: simulate and fit scattering at grazing incidence
4 //
5 //! @file Core/Computation/PoissonNoiseBackground.cpp
6 //! @brief Implements class PoissonNoiseBackground.
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 
17 
19  : IBackground({"PoissonNoiseBackground", "class_tooltip", {}}, {})
20 {
21 }
22 
24 {
25  return new PoissonNoiseBackground;
26 }
27 
28 double PoissonNoiseBackground::addBackground(double intensity) const
29 {
30  return MathFunctions::GeneratePoissonRandom(intensity);
31 }
Defines namespace MathFunctions.
Defines class PoissonNoiseBackground.
Interface for a simulating the background signal.
Definition: IBackground.h:26
Class representing Poisson noise on top of the scattered intensity.
PoissonNoiseBackground * clone() const override final
double addBackground(double intensity) const override final
double GeneratePoissonRandom(double average)