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: EvtItgThreeCoeffFcn.cc
14 // Class describing a function with three vectors of coefficients.
16 // Modification history:
18 // Jane Tinslay March 21, 2001 Module created
20 //------------------------------------------------------------------------
21 #include "EvtGenBase/EvtPatches.hh"
24 #include "EvtGenModels/EvtItgThreeCoeffFcn.hh"
32 EvtItgThreeCoeffFcn::EvtItgThreeCoeffFcn( double (*theFunction)(double, const std::vector<double> &, const std::vector<double> &, const std::vector<double> &), double lowerRange, double upperRange, const std::vector<double> &coeffs1, const std::vector<double> &coeffs2, const std::vector<double> &coeffs3):
33 EvtItgAbsFunction(lowerRange, upperRange),
34 _myFunction(theFunction),
40 EvtItgThreeCoeffFcn::~EvtItgThreeCoeffFcn( )
45 EvtItgThreeCoeffFcn::myFunction(double x) const{
46 return _myFunction(x, _coeffs1, _coeffs2, _coeffs3);
50 EvtItgThreeCoeffFcn::setCoeff(int vect, int which, double value)
52 if (vect == 1) _coeffs1[which] = value;
53 else if (vect == 2) _coeffs2[which] = value;
54 else if (vect == 3) _coeffs3[which] = value;
58 EvtItgThreeCoeffFcn::getCoeff(int vect, int which)
60 if (vect == 1) return _coeffs1[which];
61 else if (vect == 2) return _coeffs2[which];
62 else if (vect == 3) return _coeffs3[which];