BOSS 7.0.7
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
23
25
26//-------------
27// C Headers --
28//-------------
29extern "C" {
30}
31
32EvtItgThreeCoeffFcn::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):
33 EvtItgAbsFunction(lowerRange, upperRange),
34 _myFunction(theFunction),
35 _coeffs1(coeffs1),
36 _coeffs2(coeffs2),
37 _coeffs3(coeffs3)
38{}
39
41{}
42
43
44double
46 return _myFunction(x, _coeffs1, _coeffs2, _coeffs3);
47}
48
49void
50EvtItgThreeCoeffFcn::setCoeff(int vect, int which, double value)
51{
52 if (vect == 1) _coeffs1[which] = value;
53 else if (vect == 2) _coeffs2[which] = value;
54 else if (vect == 3) _coeffs3[which] = value;
55}
56
57double
59{
60 if (vect == 1) return _coeffs1[which];
61 else if (vect == 2) return _coeffs2[which];
62 else if (vect == 3) return _coeffs3[which];
63 else {return 0;}
64}
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
double x[1000]