1 //--------------------------------------------------------------------------
4 // Copyright Information: See EvtGen/COPYRIGHT
7 // This software is part of the EvtGen package developed jointly
8 // for the BaBar and CLEO collaborations. If you use all or part
9 // of it, please give an appropriate acknowledgement.
11 // Module: EvtItgTwoCoeffFcn.cc
14 // Class describing a function with two vectors of coefficients.
16 // Modification history:
18 // Jane Tinslay March 21, 2001 Module created
20 //------------------------------------------------------------------------
21 #include "EvtGenBase/EvtPatches.hh"
23 #include "EvtGenModels/EvtItgTwoCoeffFcn.hh"
31 EvtItgTwoCoeffFcn::EvtItgTwoCoeffFcn( double (*theFunction)(double, const std::vector<double> &, const std::vector<double> &), double lowerRange, double upperRange, const std::vector<double> &coeffs1, const std::vector<double> &coeffs2):
32 EvtItgAbsFunction(lowerRange, upperRange),
33 _myFunction(theFunction),
38 EvtItgTwoCoeffFcn::~EvtItgTwoCoeffFcn( )
42 EvtItgTwoCoeffFcn::myFunction(double x) const{
43 return _myFunction(x, _coeffs1, _coeffs2);
47 EvtItgTwoCoeffFcn::setCoeff(int vect, int which, double value)
49 if (vect == 1) _coeffs1[which] = value;
50 else if (vect == 2) _coeffs2[which] = value;
54 EvtItgTwoCoeffFcn::getCoeff(int vect, int which)
56 if (vect == 1) return _coeffs1[which];
57 else if (vect == 2) return _coeffs2[which];