BOSS 7.0.1
BESIII Offline Software System
Loading...
Searching...
No Matches
EvtItgPtrFunction.cc
Go to the documentation of this file.
1//--------------------------------------------------------------------------
2//
3// Copyright Information: See EvtGen/COPYRIGHT
4//
5// Environment:
6// This software is part of the EvtGen package developed jointly
7// for the BaBar and CLEO collaborations. If you use all or part
8// of it, please give an appropriate acknowledgement.
9//
10// Module: EvtItgPtrFunction.hh
11//
12// Description:
13// Class describing a function with one vector of coefficients. (Stolen and
14// modified from the BaBar IntegrationUtils package - author: Phil Strother).
15//
16// Modification history:
17//
18// Jane Tinslay March 21, 2001 Module adapted for use in
19// EvtGen
20//
21//------------------------------------------------------------------------
23
25
26//-------------
27// C Headers --
28//-------------
29extern "C" {
30}
31
32//----------------
33// Constructors --
34//----------------
35EvtItgPtrFunction::EvtItgPtrFunction( double (*theFunction)(double, const std::vector<double> &), double lowerRange, double upperRange, const std::vector<double> &coeffs1):
36 EvtItgAbsFunction(lowerRange, upperRange),
37 _myFunction(theFunction),
38 _coeffs1(coeffs1)
39{}
40
41
42//--------------
43// Destructor --
44//--------------
45
47{}
48
49
50double
52 return _myFunction(x, _coeffs1);
53}
54
55void
56EvtItgPtrFunction::setCoeff(int vect, int which, double value)
57{
58 if (vect == 1) _coeffs1[which] = value;
59}
60
61double
62EvtItgPtrFunction::getCoeff(int vect, int which)
63{
64 if (vect == 1) return _coeffs1[which];
65 else {return 0;}
66}
Double_t x[10]
virtual double value(double x) const
virtual void setCoeff(int, int, double)
virtual ~EvtItgPtrFunction()
virtual double getCoeff(int, int)
virtual double myFunction(double x) const
EvtItgPtrFunction(double(*theFunction)(double, const std::vector< double > &), double lowerRange, double upperRange, const std::vector< double > &coeffs1)