BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
EvtItgThreeCoeffFcn.cc
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: EvtItgThreeCoeffFcn.cc
12//
13// Description:
14// Class describing a function with three vectors of coefficients.
15//
16// Modification history:
17//
18// Jane Tinslay March 21, 2001 Module created
19//
20//------------------------------------------------------------------------
22
24
25//-------------
26// C Headers --
27//-------------
28extern "C" {}
29
31 double ( *theFunction )( double, const std::vector<double>&, const std::vector<double>&,
32 const std::vector<double>& ),
33 double lowerRange, double upperRange, const std::vector<double>& coeffs1,
34 const std::vector<double>& coeffs2, const std::vector<double>& coeffs3 )
36 , _myFunction( theFunction )
37 , _coeffs1( coeffs1 )
38 , _coeffs2( coeffs2 )
39 , _coeffs3( coeffs3 ) {}
40
42
43double EvtItgThreeCoeffFcn::myFunction( double x ) const {
44 return _myFunction( x, _coeffs1, _coeffs2, _coeffs3 );
45}
46
47void EvtItgThreeCoeffFcn::setCoeff( int vect, int which, double value ) {
48 if ( vect == 1 ) _coeffs1[which] = value;
49 else if ( vect == 2 ) _coeffs2[which] = value;
50 else if ( vect == 3 ) _coeffs3[which] = value;
51}
52
53double EvtItgThreeCoeffFcn::getCoeff( int vect, int which ) {
54 if ( vect == 1 ) return _coeffs1[which];
55 else if ( vect == 2 ) return _coeffs2[which];
56 else if ( vect == 3 ) return _coeffs3[which];
57 else { return 0; }
58}
EvtItgAbsFunction(double lowerRange, double upperRange)
double lowerRange() const
double upperRange() const
virtual double value(double x) const
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 void setCoeff(int, int, double)
virtual double getCoeff(int, int)
virtual double myFunction(double x) const