EvtItgFourCoeffFcn Class Reference

#include <EvtItgFourCoeffFcn.hh>

Inheritance diagram for EvtItgFourCoeffFcn:

EvtItgAbsFunction List of all members.

Public Member Functions

 EvtItgFourCoeffFcn (double(*theFunction)(double, const std::vector< double > &, const std::vector< double > &, const std::vector< double > &, const std::vector< double > &), double lowerRange, double upperRange, const std::vector< double > &coeffs1, const std::vector< double > &coeffs2, const std::vector< double > &coeffs3, const std::vector< double > &coeffs4)
virtual ~EvtItgFourCoeffFcn ()
virtual void setCoeff (int, int, double)
virtual double getCoeff (int, int)
virtual double value (double x) const
virtual double operator() (double x) const
double upperRange () const
double lowerRange () const
void getRange (double &lower, double &upper) const

Protected Member Functions

virtual double myFunction (double x) const
void setRange (double x1, double x2)

Private Member Functions

 EvtItgFourCoeffFcn (const EvtItgFourCoeffFcn &)
EvtItgFourCoeffFcnoperator= (const EvtItgFourCoeffFcn &)

Private Attributes

double(* _myFunction )(double x, const std::vector< double > &coeffs1, const std::vector< double > &coeffs2, const std::vector< double > &coeffs3, const std::vector< double > &coeffs4)
std::vector< double > _coeffs1
std::vector< double > _coeffs2
std::vector< double > _coeffs3
std::vector< double > _coeffs4

Detailed Description

Definition at line 28 of file EvtItgFourCoeffFcn.hh.


Constructor & Destructor Documentation

EvtItgFourCoeffFcn::EvtItgFourCoeffFcn ( double(*)(double, const std::vector< double > &, const std::vector< double > &, const std::vector< double > &, const std::vector< double > &)  theFunction,
double  lowerRange,
double  upperRange,
const std::vector< double > &  coeffs1,
const std::vector< double > &  coeffs2,
const std::vector< double > &  coeffs3,
const std::vector< double > &  coeffs4 
)

Definition at line 29 of file EvtItgFourCoeffFcn.cc.

00029                                                                                                                                                                                                                                                                                                                                                               :
00030   EvtItgAbsFunction(lowerRange, upperRange),
00031   _myFunction(theFunction),
00032   _coeffs1(coeffs1),
00033   _coeffs2(coeffs2), 
00034   _coeffs3(coeffs3),
00035   _coeffs4(coeffs4)
00036 {}

EvtItgFourCoeffFcn::~EvtItgFourCoeffFcn (  )  [virtual]

Definition at line 38 of file EvtItgFourCoeffFcn.cc.

00039 {}

EvtItgFourCoeffFcn::EvtItgFourCoeffFcn ( const EvtItgFourCoeffFcn  )  [private]


Member Function Documentation

double EvtItgFourCoeffFcn::getCoeff ( int  ,
int   
) [virtual]

Implements EvtItgAbsFunction.

Definition at line 57 of file EvtItgFourCoeffFcn.cc.

References _coeffs1, _coeffs2, _coeffs3, and _coeffs4.

00058 {
00059   if (vect == 1) return _coeffs1[which];
00060   else if (vect == 2) return _coeffs2[which];
00061   else if (vect == 3) return _coeffs3[which];
00062   else if (vect == 4) return _coeffs4[which];
00063   else {return 0;}
00064 }

void EvtItgAbsFunction::getRange ( double &  lower,
double &  upper 
) const [inline, inherited]

Definition at line 53 of file EvtItgAbsFunction.hh.

References EvtItgAbsFunction::_lowerRange, and EvtItgAbsFunction::_upperRange.

00053 { lower = _lowerRange; upper = _upperRange; } 

double EvtItgAbsFunction::lowerRange (  )  const [inline, inherited]

Definition at line 52 of file EvtItgAbsFunction.hh.

References EvtItgAbsFunction::_lowerRange.

Referenced by EvtItgAbsIntegrator::boundsCheck(), and EvtItgAbsIntegrator::normalisation().

00052 {return _lowerRange;}

double EvtItgFourCoeffFcn::myFunction ( double  x  )  const [protected, virtual]

Implements EvtItgAbsFunction.

Definition at line 43 of file EvtItgFourCoeffFcn.cc.

References _coeffs1, _coeffs2, _coeffs3, _coeffs4, and _myFunction.

00043                                             {
00044   return _myFunction(x, _coeffs1, _coeffs2, _coeffs3, _coeffs4);
00045 }

double EvtItgAbsFunction::operator() ( double  x  )  const [virtual, inherited]

Definition at line 54 of file EvtItgAbsFunction.cc.

References EvtItgAbsFunction::myFunction().

00054                                            {
00055   return myFunction(x);
00056 }

EvtItgFourCoeffFcn& EvtItgFourCoeffFcn::operator= ( const EvtItgFourCoeffFcn  )  [private]

void EvtItgFourCoeffFcn::setCoeff ( int  ,
int  ,
double   
) [virtual]

Implements EvtItgAbsFunction.

Definition at line 48 of file EvtItgFourCoeffFcn.cc.

References _coeffs1, _coeffs2, _coeffs3, and _coeffs4.

Referenced by EvtBtoXsgammaKagan::computeHadronicMass().

00049 {
00050   if (vect == 1) _coeffs1[which] = value;
00051   else if (vect == 2) _coeffs2[which] = value;
00052   else if (vect == 3) _coeffs3[which] = value;
00053   else if (vect == 4) _coeffs4[which] = value;
00054 }

void EvtItgAbsFunction::setRange ( double  x1,
double  x2 
) [inline, protected, inherited]

Definition at line 60 of file EvtItgAbsFunction.hh.

References EvtItgAbsFunction::_lowerRange, and EvtItgAbsFunction::_upperRange.

00060 { _lowerRange=x1; _upperRange=x2; };

double EvtItgAbsFunction::upperRange (  )  const [inline, inherited]

Definition at line 51 of file EvtItgAbsFunction.hh.

References EvtItgAbsFunction::_upperRange.

Referenced by EvtItgAbsIntegrator::boundsCheck(), and EvtItgAbsIntegrator::normalisation().

00051 {return _upperRange;}

double EvtItgAbsFunction::value ( double  x  )  const [virtual, inherited]

Definition at line 45 of file EvtItgAbsFunction.cc.

References EvtItgAbsFunction::_lowerRange, EvtItgAbsFunction::_upperRange, calibUtil::ERROR, EvtItgAbsFunction::myFunction(), and report().

Referenced by EvtBtoXsgammaRootFinder::GetRootSingleFunc().

00045                                        {
00046   if (x >= _lowerRange && x <= _upperRange) return myFunction(x);
00047    report(ERROR,"EvtGen") << "Error in EvtItgAbsFunction::value.  Given co-ordinate " << x
00048                 << " is outside of allowed range [" << _lowerRange << ", "
00049                 << _upperRange << "].  Returning 0.0" << endl;
00050   return 0.0;  // Never get here
00051 }


Member Data Documentation

std::vector<double> EvtItgFourCoeffFcn::_coeffs1 [private]

Definition at line 53 of file EvtItgFourCoeffFcn.hh.

Referenced by getCoeff(), myFunction(), and setCoeff().

std::vector<double> EvtItgFourCoeffFcn::_coeffs2 [private]

Definition at line 54 of file EvtItgFourCoeffFcn.hh.

Referenced by getCoeff(), myFunction(), and setCoeff().

std::vector<double> EvtItgFourCoeffFcn::_coeffs3 [private]

Definition at line 55 of file EvtItgFourCoeffFcn.hh.

Referenced by getCoeff(), myFunction(), and setCoeff().

std::vector<double> EvtItgFourCoeffFcn::_coeffs4 [private]

Definition at line 56 of file EvtItgFourCoeffFcn.hh.

Referenced by getCoeff(), myFunction(), and setCoeff().

double(* EvtItgFourCoeffFcn::_myFunction)(double x, const std::vector< double > &coeffs1, const std::vector< double > &coeffs2, const std::vector< double > &coeffs3, const std::vector< double > &coeffs4) [private]

Referenced by myFunction().


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