BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
EvtItgPtrFunction.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: EvtItgPtrFunction.hh
11//
12// Description:
13// Class describing a function with one vector of coefficients. (Stolen and
14// modified from the BaBar IntegrationUtils package - author: Phil Strother).
15//
16// Modification history:
17//
18// Jane Tinslay March 21, 2001 Module adapted for use in
19// EvtGen
20//
21//------------------------------------------------------------------------
23
24#include "EvtItgPtrFunction.hh"
25
26//-------------
27// C Headers --
28//-------------
29extern "C" {}
30
31//----------------
32// Constructors --
33//----------------
34EvtItgPtrFunction::EvtItgPtrFunction( double ( *theFunction )( double,
35 const std::vector<double>& ),
36 double lowerRange, double upperRange,
37 const std::vector<double>& coeffs1 )
39 , _myFunction( theFunction )
40 , _coeffs1( coeffs1 ) {}
41
42//--------------
43// Destructor --
44//--------------
45
47
48double EvtItgPtrFunction::myFunction( double x ) const { return _myFunction( x, _coeffs1 ); }
49
50void EvtItgPtrFunction::setCoeff( int vect, int which, double value ) {
51 if ( vect == 1 ) _coeffs1[which] = value;
52}
53
54double EvtItgPtrFunction::getCoeff( int vect, int which ) {
55 if ( vect == 1 ) return _coeffs1[which];
56 else { return 0; }
57}
EvtItgAbsFunction(double lowerRange, double upperRange)
double lowerRange() const
double upperRange() const
virtual double value(double x) const
virtual void setCoeff(int, int, double)
virtual double getCoeff(int, int)
virtual double myFunction(double x) const
EvtItgPtrFunction(double(*theFunction)(double, const std::vector< double > &), double lowerRange, double upperRange, const std::vector< double > &coeffs1)