Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

EvtItgTwoCoeffFcn Class Reference

#include <EvtItgTwoCoeffFcn.hh>

Inheritance diagram for EvtItgTwoCoeffFcn:

EvtItgAbsFunction List of all members.

Public Member Functions

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

Protected Member Functions

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

Private Member Functions

 EvtItgTwoCoeffFcn (const EvtItgTwoCoeffFcn &)
EvtItgTwoCoeffFcnoperator= (const EvtItgTwoCoeffFcn &)

Private Attributes

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

Constructor & Destructor Documentation

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

00031                                                                                                                                                                                                                                   :
00032   EvtItgAbsFunction(lowerRange, upperRange),
00033   _myFunction(theFunction),
00034   _coeffs1(coeffs1),
00035   _coeffs2(coeffs2)
00036 {}

EvtItgTwoCoeffFcn::~EvtItgTwoCoeffFcn  )  [virtual]
 

00039 {}

EvtItgTwoCoeffFcn::EvtItgTwoCoeffFcn const EvtItgTwoCoeffFcn  )  [private]
 


Member Function Documentation

double EvtItgTwoCoeffFcn::getCoeff int  ,
int 
[virtual]
 

Implements EvtItgAbsFunction.

00055 {
00056   if (vect == 1) return _coeffs1[which];
00057   else if (vect == 2) return _coeffs2[which];
00058   else {return 0;}
00059 }

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

00053 { lower = _lowerRange; upper = _upperRange; } 

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

00052 {return _lowerRange;}

double EvtItgTwoCoeffFcn::myFunction double  x  )  const [protected, virtual]
 

Implements EvtItgAbsFunction.

00042                                            {
00043   return _myFunction(x, _coeffs1, _coeffs2);
00044 }

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

00054                                            {
00055   return myFunction(x);
00056 }

EvtItgTwoCoeffFcn& EvtItgTwoCoeffFcn::operator= const EvtItgTwoCoeffFcn  )  [private]
 

void EvtItgTwoCoeffFcn::setCoeff int  ,
int  ,
double 
[virtual]
 

Implements EvtItgAbsFunction.

00048 {
00049   if (vect == 1) _coeffs1[which] = value;
00050   else if (vect == 2) _coeffs2[which] = value;
00051 }

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

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

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

00051 {return _upperRange;}

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

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> EvtItgTwoCoeffFcn::_coeffs1 [private]
 

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

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


The documentation for this class was generated from the following files:
Generated on Wed Feb 2 16:06:21 2011 for BOSS6.5.5 by  doxygen 1.3.9.1