StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
EvtItgAbsFunction.hh
1 //--------------------------------------------------------------------------
2 //
3 //
4 // Copyright Information: See EvtGen/COPYRIGHT
5 //
6 // Environment:
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.
10 //
11 // Module: EvtItgAbsFunction.hh
12 //
13 // Description:
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).
17 //
18 // Modification history:
19 //
20 // Jane Tinslay March 21, 2001 Module adapted for use in
21 // EvtGen
22 //
23 //------------------------------------------------------------------------
24 
25 #ifndef EVTITGABSFUNCTION_HH
26 #define EVTITGABSFUNCTION_HH
27 
28 //-------------
29 // C Headers --
30 //-------------
31 extern "C" {
32 }
33 
35 
36 public:
37 
38  // Constructors
39 
40  EvtItgAbsFunction(double lowerRange, double upperRange);
41 
42  // Destructor
43  virtual ~EvtItgAbsFunction( );
44 
45  virtual double value( double x) const;
46 
47  virtual double operator()(double x) const;
48 
49  // Selectors (const)
50 
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;
56 
57 protected:
58 
59  virtual double myFunction(double x) const=0;
60  void setRange(double x1,double x2) { _lowerRange=x1; _upperRange=x2; };
61 
62 private:
63 
64  double _upperRange;
65  double _lowerRange;
66 
67  EvtItgAbsFunction( const EvtItgAbsFunction& ); // Copy Constructor
68  EvtItgAbsFunction& operator= ( const EvtItgAbsFunction& ); // Assignment op
69 
70 };
71 
72 #endif // EVTITGABSFUNCTION_HH