/home/bes3soft/bes3soft/Boss/7.0.2/dist/7.0.2/Generator/BesEvtGen/BesEvtGen-00-03-58/src/EvtGen/EvtGenModels/EvtItgPtrFunction.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: EvtItgPtrFunction.hh
00011 //
00012 // Description:
00013 //      Class describing a function with one vector of coefficients. (Stolen and 
00014 //      modified from the BaBar IntegrationUtils package - author: Phil Strother).
00015 //
00016 // Modification history:
00017 //
00018 //    Jane Tinslay                March 21, 2001       Module adapted for use in 
00019 //                                                     EvtGen
00020 //
00021 //------------------------------------------------------------------------
00022 #include "EvtGenBase/EvtPatches.hh"
00023 
00024 #include "EvtGenModels/EvtItgPtrFunction.hh"
00025 
00026 //-------------
00027 // C Headers --
00028 //-------------
00029 extern "C" {
00030 }
00031 
00032 //----------------
00033 // Constructors --
00034 //----------------
00035 EvtItgPtrFunction::EvtItgPtrFunction( double (*theFunction)(double, const std::vector<double> &), double lowerRange, double upperRange, const std::vector<double> &coeffs1):
00036   EvtItgAbsFunction(lowerRange, upperRange),
00037   _myFunction(theFunction),
00038   _coeffs1(coeffs1)
00039 {}
00040 
00041 
00042 //--------------
00043 // Destructor --
00044 //--------------
00045 
00046 EvtItgPtrFunction::~EvtItgPtrFunction( )
00047 {}
00048 
00049 
00050 double
00051 EvtItgPtrFunction::myFunction(double x) const{
00052   return _myFunction(x, _coeffs1);
00053 }
00054 
00055 void
00056 EvtItgPtrFunction::setCoeff(int vect, int which, double value)
00057 {
00058   if (vect == 1) _coeffs1[which] = value;
00059 }
00060 
00061 double
00062 EvtItgPtrFunction::getCoeff(int vect, int which)
00063 {
00064   if (vect == 1) return _coeffs1[which];
00065   else {return 0;}
00066 }

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