1 //--------------------------------------------------------------------------
3 // Copyright Information: See EvtGen/COPYRIGHT
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.
10 // Module: EvtItgPtrFunction.hh
13 // Class describing a function with one vector of coefficients. (Stolen and
14 // modified from the BaBar IntegrationUtils package - author: Phil Strother).
16 // Modification history:
18 // Jane Tinslay March 21, 2001 Module adapted for use in
21 //------------------------------------------------------------------------
22 #include "EvtGenBase/EvtPatches.hh"
24 #include "EvtGenModels/EvtItgPtrFunction.hh"
35 EvtItgPtrFunction::EvtItgPtrFunction( double (*theFunction)(double, const std::vector<double> &), double lowerRange, double upperRange, const std::vector<double> &coeffs1):
36 EvtItgAbsFunction(lowerRange, upperRange),
37 _myFunction(theFunction),
46 EvtItgPtrFunction::~EvtItgPtrFunction( )
51 EvtItgPtrFunction::myFunction(double x) const{
52 return _myFunction(x, _coeffs1);
56 EvtItgPtrFunction::setCoeff(int vect, int which, double value)
58 if (vect == 1) _coeffs1[which] = value;
62 EvtItgPtrFunction::getCoeff(int vect, int which)
64 if (vect == 1) return _coeffs1[which];