BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
EvtItgFourCoeffFcn.cc
Go to the documentation of this file.
1//--------------------------------------------------------------------------
2//
3// Copyright Information: See EvtGen/COPYRIGHT
4//
5// Environment:
6// This software is part of the EvtGen package developed jointly
7// for the BaBar and CLEO collaborations. If you use all or part
8// of it, please give an appropriate acknowledgement.
9//
10// Module: EvtItgFourCoeffFcn.cc
11//
12// Description:
13// Class describing a function with four vectors of coefficients.
14//
15// Modification history:
16//
17// Jane Tinslay March 21, 2001 Module created
18//
19//------------------------------------------------------------------------
20#include "EvtItgFourCoeffFcn.hh"
22
23//-------------
24// C Headers --
25//-------------
26extern "C" {}
27
29 double ( *theFunction )( double, const std::vector<double>&, const std::vector<double>&,
30 const std::vector<double>&, const std::vector<double>& ),
31 double lowerRange, double upperRange, const std::vector<double>& coeffs1,
32 const std::vector<double>& coeffs2, const std::vector<double>& coeffs3,
33 const std::vector<double>& coeffs4 )
35 , _myFunction( theFunction )
36 , _coeffs1( coeffs1 )
37 , _coeffs2( coeffs2 )
38 , _coeffs3( coeffs3 )
39 , _coeffs4( coeffs4 ) {}
40
42
43double EvtItgFourCoeffFcn::myFunction( double x ) const {
44 return _myFunction( x, _coeffs1, _coeffs2, _coeffs3, _coeffs4 );
45}
46
47void EvtItgFourCoeffFcn::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 else if ( vect == 4 ) _coeffs4[which] = value;
52}
53
54double EvtItgFourCoeffFcn::getCoeff( int vect, int which ) {
55 if ( vect == 1 ) return _coeffs1[which];
56 else if ( vect == 2 ) return _coeffs2[which];
57 else if ( vect == 3 ) return _coeffs3[which];
58 else if ( vect == 4 ) return _coeffs4[which];
59 else { return 0; }
60}
EvtItgAbsFunction(double lowerRange, double upperRange)
double lowerRange() const
double upperRange() const
virtual double value(double x) const
virtual double myFunction(double x) const
virtual void setCoeff(int, int, double)
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 double getCoeff(int, int)