#include <EvtItgThreeCoeffFcn.hh>
Inheritance diagram for EvtItgThreeCoeffFcn:
Public Member Functions | |
EvtItgThreeCoeffFcn (double(*theFunction)(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) | |
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 | ~EvtItgThreeCoeffFcn () |
Protected Member Functions | |
virtual double | myFunction (double x) const |
void | setRange (double x1, double x2) |
Private Member Functions | |
EvtItgThreeCoeffFcn (const EvtItgThreeCoeffFcn &) | |
EvtItgThreeCoeffFcn & | operator= (const EvtItgThreeCoeffFcn &) |
Private Attributes | |
std::vector< double > | _coeffs1 |
std::vector< double > | _coeffs2 |
std::vector< double > | _coeffs3 |
double(* | _myFunction )(double x, const std::vector< double > &coeffs1, const std::vector< double > &coeffs2, const std::vector< double > &coeffs3) |
|
00032 : 00033 EvtItgAbsFunction(lowerRange, upperRange), 00034 _myFunction(theFunction), 00035 _coeffs1(coeffs1), 00036 _coeffs2(coeffs2), 00037 _coeffs3(coeffs3) 00038 {}
|
|
00041 {}
|
|
|
|
Implements EvtItgAbsFunction. 00059 { 00060 if (vect == 1) return _coeffs1[which]; 00061 else if (vect == 2) return _coeffs2[which]; 00062 else if (vect == 3) return _coeffs3[which]; 00063 else {return 0;} 00064 }
|
|
00053 { lower = _lowerRange; upper = _upperRange; }
|
|
00052 {return _lowerRange;}
|
|
Implements EvtItgAbsFunction. 00045 { 00046 return _myFunction(x, _coeffs1, _coeffs2, _coeffs3); 00047 }
|
|
00054 { 00055 return myFunction(x); 00056 }
|
|
|
|
Implements EvtItgAbsFunction. 00051 { 00052 if (vect == 1) _coeffs1[which] = value; 00053 else if (vect == 2) _coeffs2[which] = value; 00054 else if (vect == 3) _coeffs3[which] = value; 00055 }
|
|
00060 { _lowerRange=x1; _upperRange=x2; };
|
|
00051 {return _upperRange;}
|
|
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 }
|
|
|
|
|
|
|
|
|