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: EvtItgAbsFunction.hh
14 // Abstraction of a generic function for use in integration methods elsewhere
15 // in this package. (Stolen and modified from the BaBar IntegrationUtils package
16 // - author: Phil Strother).
18 // Modification history:
20 // Jane Tinslay March 21, 2001 Module adapted for use in
23 //------------------------------------------------------------------------
25 #ifndef EVTITGABSFUNCTION_HH
26 #define EVTITGABSFUNCTION_HH
34 class EvtItgAbsFunction {
40 EvtItgAbsFunction(double lowerRange, double upperRange);
43 virtual ~EvtItgAbsFunction( );
45 virtual double value( double x) const;
47 virtual double operator()(double x) const;
51 inline double upperRange() const {return _upperRange;}
52 inline double lowerRange() const {return _lowerRange;}
53 inline void getRange(double &lower,double &upper) const { lower = _lowerRange; upper = _upperRange; }
54 virtual void setCoeff(int, int, double)=0;
55 virtual double getCoeff(int, int)=0;
59 virtual double myFunction(double x) const=0;
60 void setRange(double x1,double x2) { _lowerRange=x1; _upperRange=x2; };
67 EvtItgAbsFunction( const EvtItgAbsFunction& ); // Copy Constructor
68 EvtItgAbsFunction& operator= ( const EvtItgAbsFunction& ); // Assignment op
72 #endif // EVTITGABSFUNCTION_HH