BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
EvtItgAbsIntegrator.hh
Go to the documentation of this file.
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: EvtItgAbsIntegrator.hh
12//
13// Description:
14// Abstraction of a generic integrator (Stolen and modified from
15// the BaBar IntegrationUtils package - author: Phil Strother).
16//
17// Modification history:
18//
19// Jane Tinslay March 21, 2001 Module adapted for use in
20// EvtGen
21//
22//------------------------------------------------------------------------
23
24#ifndef EVTITGABSINTEGRATOR_HH
25#define EVTITGABSINTEGRATOR_HH
26
27#include "EvtItgAbsFunction.hh"
28
30
31public:
33
34 virtual ~EvtItgAbsIntegrator();
35
36 double evaluate( double lower, double upper ) const;
37
38 double normalisation() const;
39
40protected:
41 double trapezoid( double lower, double higher, int n, double& result ) const;
42
43 virtual double evaluateIt( double lower, double higher ) const = 0;
44
45 double myFunction( double x ) const { return _myFunction( x ); }
46
47private:
48 const EvtItgAbsFunction& _myFunction;
49
50 void boundsCheck( double&, double& ) const;
51
52 // Note: if your class needs a copy constructor or an assignment operator,
53 // make one of the following public and implement it.
55 EvtItgAbsIntegrator( const EvtItgAbsIntegrator& ); // Copy Constructor
56 EvtItgAbsIntegrator& operator=( const EvtItgAbsIntegrator& ); // Assignment op
57};
58
59#endif // EVTITGABSINTEGRATOR_HH
const Int_t n
double trapezoid(double lower, double higher, int n, double &result) const
virtual double evaluateIt(double lower, double higher) const =0
double myFunction(double x) const
EvtItgAbsIntegrator(const EvtItgAbsFunction &)
double evaluate(double lower, double upper) const