EvtGen
2.2.0
Monte Carlo generator of particle decays, in particular the weak decays of heavy flavour particles such as B mesons.
Toggle main menu visibility
Loading...
Searching...
No Matches
EvtGenModels
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
//-------------
27
extern
"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
35
class
EvtItgAbsFunction
{
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
:
69
double
m_upperRange
;
70
double
m_lowerRange
;
71
};
72
73
#endif
// EVTITGABSFUNCTION_HH
EvtItgAbsFunction::operator()
virtual double operator()(double x) const
Definition
EvtItgAbsFunction.cpp:49
EvtItgAbsFunction::EvtItgAbsFunction
EvtItgAbsFunction(double lowerRange, double upperRange)
Definition
EvtItgAbsFunction.cpp:33
EvtItgAbsFunction::getRange
void getRange(double &lower, double &upper) const
Definition
EvtItgAbsFunction.hh:52
EvtItgAbsFunction::lowerRange
double lowerRange() const
Definition
EvtItgAbsFunction.hh:51
EvtItgAbsFunction::getCoeff
virtual double getCoeff(int, int)=0
EvtItgAbsFunction::m_lowerRange
double m_lowerRange
Definition
EvtItgAbsFunction.hh:70
EvtItgAbsFunction::upperRange
double upperRange() const
Definition
EvtItgAbsFunction.hh:50
EvtItgAbsFunction::myFunction
virtual double myFunction(double x) const =0
EvtItgAbsFunction::setCoeff
virtual void setCoeff(int, int, double)=0
EvtItgAbsFunction::~EvtItgAbsFunction
virtual ~EvtItgAbsFunction()=default
EvtItgAbsFunction::setRange
void setRange(double x1, double x2)
Definition
EvtItgAbsFunction.hh:62
EvtItgAbsFunction::value
virtual double value(double x) const
Definition
EvtItgAbsFunction.cpp:38
EvtItgAbsFunction::m_upperRange
double m_upperRange
Definition
EvtItgAbsFunction.hh:69
Generated by
1.17.0