BOSS 7.0.9
BESIII Offline Software System
Loading...
Searching...
No Matches
EvtItgAbsIntegrator Class Referenceabstract

#include <EvtItgAbsIntegrator.hh>

+ Inheritance diagram for EvtItgAbsIntegrator:

Public Member Functions

 EvtItgAbsIntegrator (const EvtItgAbsFunction &)
 
virtual ~EvtItgAbsIntegrator ()
 
double evaluate (double lower, double upper) const
 
double normalisation () const
 
 EvtItgAbsIntegrator (const EvtItgAbsFunction &)
 
virtual ~EvtItgAbsIntegrator ()
 
double evaluate (double lower, double upper) const
 
double normalisation () const
 

Protected Member Functions

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
 
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
 

Detailed Description

Constructor & Destructor Documentation

◆ EvtItgAbsIntegrator() [1/2]

EvtItgAbsIntegrator::EvtItgAbsIntegrator ( const EvtItgAbsFunction theFunction)

Definition at line 39 of file bak-BesEvtGen-00-04-08/src/EvtGen/EvtGenModels/EvtItgAbsIntegrator.cc.

39 :
40 _myFunction(theFunction)
41{}

Referenced by EvtItgAbsIntegrator().

◆ ~EvtItgAbsIntegrator() [1/2]

EvtItgAbsIntegrator::~EvtItgAbsIntegrator ( )
virtual

◆ EvtItgAbsIntegrator() [2/2]

EvtItgAbsIntegrator::EvtItgAbsIntegrator ( const EvtItgAbsFunction )

◆ ~EvtItgAbsIntegrator() [2/2]

virtual EvtItgAbsIntegrator::~EvtItgAbsIntegrator ( )
virtual

Member Function Documentation

◆ evaluate() [1/2]

double EvtItgAbsIntegrator::evaluate ( double  lower,
double  upper 
) const

Definition at line 52 of file bak-BesEvtGen-00-04-08/src/EvtGen/EvtGenModels/EvtItgAbsIntegrator.cc.

52 {
53
54 double newLower(lower), newUpper(upper);
55
56 boundsCheck(newLower, newUpper);
57
58 return evaluateIt(newLower, newUpper);
59}
virtual double evaluateIt(double lower, double higher) const =0

Referenced by EvtBtoXsgammaKagan::computeHadronicMass(), and EvtBtoXsgammaRootFinder::GetGaussIntegFcnRoot().

◆ evaluate() [2/2]

double EvtItgAbsIntegrator::evaluate ( double  lower,
double  upper 
) const

◆ evaluateIt() [1/2]

virtual double EvtItgAbsIntegrator::evaluateIt ( double  lower,
double  higher 
) const
protectedpure virtual

◆ evaluateIt() [2/2]

virtual double EvtItgAbsIntegrator::evaluateIt ( double  lower,
double  higher 
) const
protectedpure virtual

◆ myFunction() [1/2]

double EvtItgAbsIntegrator::myFunction ( double  x) const
inlineprotected

Definition at line 49 of file bak-BesEvtGen-00-04-08/src/EvtGen/EvtGenModels/EvtItgAbsIntegrator.hh.

49{return _myFunction(x);}

◆ myFunction() [2/2]

double EvtItgAbsIntegrator::myFunction ( double  x) const
inlineprotected

Definition at line 49 of file BesEvtGen-00-04-08/src/EvtGen/EvtGenModels/EvtItgAbsIntegrator.hh.

49{return _myFunction(x);}

◆ normalisation() [1/2]

double EvtItgAbsIntegrator::normalisation ( ) const

◆ normalisation() [2/2]

double EvtItgAbsIntegrator::normalisation ( ) const

◆ trapezoid() [1/2]

double EvtItgAbsIntegrator::trapezoid ( double  lower,
double  higher,
int  n,
double &  result 
) const
protected

Definition at line 62 of file bak-BesEvtGen-00-04-08/src/EvtGen/EvtGenModels/EvtItgAbsIntegrator.cc.

62 {
63
64 if (n==1) return 0.5*(higher-lower)*(_myFunction(lower) + _myFunction(higher));
65
66 int it, j;
67
68 for (it=1, j=1;j<n-1;j++) it <<=1;
69
70 double itDouble(it);
71
72 double sum(0.0);
73
74 double deltaX((higher - lower)/itDouble);
75
76 double x(lower + 0.5* deltaX);
77
78 for (j=1;j<=it;j++){
79 sum+=_myFunction(x);
80 x+=deltaX;
81 }
82
83 result = 0.5*(result+(higher - lower)*sum/itDouble);
84
85 return result;
86}
const Int_t n
Double_t x[10]

Referenced by EvtItgSimpsonIntegrator::evaluateIt().

◆ trapezoid() [2/2]

double EvtItgAbsIntegrator::trapezoid ( double  lower,
double  higher,
int  n,
double &  result 
) const
protected

The documentation for this class was generated from the following files: