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

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

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