/home/bes3soft/bes3soft/Boss/7.0.2/dist/7.0.2/Generator/BesEvtGen/BesEvtGen-00-03-58/src/EvtGen/EvtGenModels/EvtItgTwoCoeffFcn.cc

Go to the documentation of this file.
00001 //--------------------------------------------------------------------------
00002 //
00003 //
00004 // Copyright Information: See EvtGen/COPYRIGHT
00005 //
00006 // Environment:
00007 //      This software is part of the EvtGen package developed jointly
00008 //      for the BaBar and CLEO collaborations.  If you use all or part
00009 //      of it, please give an appropriate acknowledgement.
00010 //
00011 // Module: EvtItgTwoCoeffFcn.cc
00012 //
00013 // Description:
00014 //      Class describing a function with two vectors of coefficients. 
00015 //
00016 // Modification history:
00017 //
00018 //    Jane Tinslay                March 21, 2001       Module created
00019 //
00020 //------------------------------------------------------------------------
00021 #include "EvtGenBase/EvtPatches.hh"
00022 
00023 #include "EvtGenModels/EvtItgTwoCoeffFcn.hh"
00024 
00025 //-------------
00026 // C Headers --
00027 //-------------
00028 extern "C" {
00029 }
00030 
00031 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):
00032   EvtItgAbsFunction(lowerRange, upperRange),
00033   _myFunction(theFunction),
00034   _coeffs1(coeffs1),
00035   _coeffs2(coeffs2)
00036 {}
00037 
00038 EvtItgTwoCoeffFcn::~EvtItgTwoCoeffFcn( )
00039 {}
00040 
00041 double
00042 EvtItgTwoCoeffFcn::myFunction(double x) const{
00043   return _myFunction(x, _coeffs1, _coeffs2);
00044 }
00045 
00046 void
00047 EvtItgTwoCoeffFcn::setCoeff(int vect, int which, double value)
00048 {
00049   if (vect == 1) _coeffs1[which] = value;
00050   else if (vect == 2) _coeffs2[which] = value;
00051 }
00052 
00053 double
00054 EvtItgTwoCoeffFcn::getCoeff(int vect, int which)
00055 {
00056   if (vect == 1) return _coeffs1[which];
00057   else if (vect == 2) return _coeffs2[which];
00058   else {return 0;}
00059 }
00060 

Generated on Tue Nov 29 23:12:19 2016 for BOSS_7.0.2 by  doxygen 1.4.7