EvtGen 2.2.0
Monte Carlo generator of particle decays, in particular the weak decays of heavy flavour particles such as B mesons.
Loading...
Searching...
No Matches
EvtItgAbsFunction.hh
Go to the documentation of this file.
1
2/***********************************************************************
3* Copyright 1998-2020 CERN for the benefit of the EvtGen authors *
4* *
5* This file is part of EvtGen. *
6* *
7* EvtGen is free software: you can redistribute it and/or modify *
8* it under the terms of the GNU General Public License as published by *
9* the Free Software Foundation, either version 3 of the License, or *
10* (at your option) any later version. *
11* *
12* EvtGen is distributed in the hope that it will be useful, *
13* but WITHOUT ANY WARRANTY; without even the implied warranty of *
14* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
15* GNU General Public License for more details. *
16* *
17* You should have received a copy of the GNU General Public License *
18* along with EvtGen. If not, see <https://www.gnu.org/licenses/>. *
19***********************************************************************/
20
21#ifndef EVTITGABSFUNCTION_HH
22#define EVTITGABSFUNCTION_HH
23
24//-------------
25// C Headers --
26//-------------
27extern "C" {
28}
29
30// Description:
31// Abstraction of a generic function for use in integration methods elsewhere
32// in this package. (Stolen and modified from the BaBar IntegrationUtils package
33// - author: Phil Strother).
34
36 public:
37 // Constructors
38
39 EvtItgAbsFunction( double lowerRange, double upperRange );
40
41 // Destructor
42 virtual ~EvtItgAbsFunction() = default;
43
44 virtual double value( double x ) const;
45
46 virtual double operator()( double x ) const;
47
48 // Selectors (const)
49
50 inline double upperRange() const { return m_upperRange; }
51 inline double lowerRange() const { return m_lowerRange; }
52 inline void getRange( double& lower, double& upper ) const
53 {
54 lower = m_lowerRange;
55 upper = m_upperRange;
56 }
57 virtual void setCoeff( int, int, double ) = 0;
58 virtual double getCoeff( int, int ) = 0;
59
60 protected:
61 virtual double myFunction( double x ) const = 0;
62 void setRange( double x1, double x2 )
63 {
64 m_lowerRange = x1;
65 m_upperRange = x2;
66 };
67
68 private:
71};
72
73#endif // EVTITGABSFUNCTION_HH
virtual double operator()(double x) const
EvtItgAbsFunction(double lowerRange, double upperRange)
void getRange(double &lower, double &upper) const
double lowerRange() const
virtual double getCoeff(int, int)=0
double upperRange() const
virtual double myFunction(double x) const =0
virtual void setCoeff(int, int, double)=0
virtual ~EvtItgAbsFunction()=default
void setRange(double x1, double x2)
virtual double value(double x) const