21#ifndef EVTCUBICSPLINE_HH
22#define EVTCUBICSPLINE_HH
49 static void setParams(
const vector<double> x,
const vector<double> ym,
const vector<double> yp);
50 static void setParams(
const int n,
const double* x,
const double* ym,
const double* yp);
74 inline double theta() {
return _theta; }
81 inline static void fprime(
const vector<double>& x,
const vector<ControlPoint>&
y,
const int n,
ControlPoint &yp2){
82 double s1 =
x[
n-1] -
x[
n-2],
89 -( s2*s3/( s1*
s12*s13 ) )*
y[
n-2].
real+( 1./s1+1./s2+1./s3 )*
y[
n-1].real;
91 -( s2*s3/( s1*
s12*s13 ) )*
y[
n-2].
imag+( 1./s1+1./s2+1./s3 )*
y[
n-1].imag;
94 double s1 =
x[0]-
x[1],
102 -( s2*s3/( s1*
s12*s13 ) )*
y[1].
real+( 1./s1+1./s2+1./s3 )*
y[0].real;
104 -( s2*s3/( s1*
s12*s13 ) )*
y[1].
imag+( 1./s1+1./s2+1./s3 )*
y[0].imag;
106 static int find_bin(
double mass1,
const vector<double>& x,
const int n){
109 if (mass1<
x[mhi])
break;
112 return mhi==0?1:(mhi==
n?
n-1:mhi);
114 static bool Complex_Derivative(
const vector<double>& x,
const vector<ControlPoint>&
y,
const int n, vector<ControlPoint> &y2);
119 double _ampl, _theta;
double imag(const EvtComplex &c)
static vector< ControlPoint > _yvalues
static vector< double > _mHHLimits
static int find_bin(double mass1, const vector< double > &x, const int n)
EvtCubicSpline(const EvtVector4R &p4_p, const EvtVector4R &p4_d1, const EvtVector4R &p4_d2)
virtual ~EvtCubicSpline()
EvtCubicSpline & operator=(const EvtCubicSpline &)
const EvtVector4R & p4_p()
static vector< ControlPoint > _y2values
static void setParams(const vector< double > x, const vector< double > ym, const vector< double > yp)
const EvtVector4R & p4_d2()
static bool Complex_Derivative(const vector< double > &x, const vector< ControlPoint > &y, const int n, vector< ControlPoint > &y2)
static void fprime(const vector< double > &x, const vector< ControlPoint > &y, const int n, ControlPoint &yp2)
const EvtVector4R & p4_d1()
static void fprime(const vector< double > &x, const vector< ControlPoint > &y, ControlPoint &yp2)
double double double double * s12
double double double double double * s23
ControlPoint(double r=0, double i=0.)