44 if ( &
n ==
this )
return *
this;
64 _p4_p(p4_p),_p4_d1(p4_d1), _p4_d2(p4_d2)
74 for (
int i=0;i<
x.size();i++){
75 e1 =
x[i];
e2 = ym[i]; e3 = yp[i];
85 vector<double> vx, vym, vyp;
86 for (
int i=0;i<
n;i++){
130 if(yp1.
real > 0.99e30) {
138 if(yp1.
imag > 0.99e30) {
151 sig=(
x[i]-
x[i-1])/(
x[i+1]-
x[i-1]);
152 p=sig*y2[i-1].real+2.0;
153 y2[i].real=(sig-1.0)/p;
154 u[i].
real=(
y[i+1].real-
y[i].real)/(
x[i+1]-
x[i]) - (
y[i].real-
y[i-1].real)/(
x[i]-
x[i-1]);
156 p=sig*y2[i-1].imag+2.0;
157 y2[i].imag=(sig-1.0)/p;
158 u[i].
imag=(
y[i+1].imag-
y[i].imag)/(
x[i+1]-
x[i]) - (
y[i].imag-
y[i-1].imag)/(
x[i]-
x[i-1]);
164 if(ypn.
real > 0.99e30) {
170 un=(3.0/(
x[
n-1]-
x[
n-2]))*(ypn.
real-(
y[
n-1].real-
y[
n-2].real)/(
x[
n-1]-
x[
n-2]));
172 y2[
n-1].real=(un-qn*u[
n-2].
real)/(qn*y2[
n-2].
real+1.0);
173 if(ypn.
imag > 0.99e30) {
179 un=(3.0/(
x[
n-1]-
x[
n-2]))*(ypn.
imag-(
y[
n-1].imag-
y[
n-2].imag)/(
x[
n-1]-
x[
n-2]));
181 y2[
n-1].imag=(un-qn*u[
n-2].
imag)/(qn*y2[
n-2].
imag+1.0);
185 for(k=
n-2;k>=0;k--) {
186 y2[k].real=y2[k].real*y2[k+1].real+u[k].
real;
187 y2[k].imag=y2[k].imag*y2[k+1].imag+u[k].
imag;
202 double mAB = (_p4_d1+_p4_d2).
mass();
204 int kloAB = khiAB -1 ;
205 double dmHH, aa, bb, aa3, bb3;
206 double pwa_coefs_real_kloAB =
_yvalues[kloAB].real;
207 double pwa_coefs_imag_kloAB =
_yvalues[kloAB].imag;
208 double pwa_coefs_real_khiAB =
_yvalues[khiAB].real;
209 double pwa_coefs_imag_khiAB =
_yvalues[khiAB].imag;
210 double pwa_coefs_prime_real_kloAB =
_y2values[kloAB].real;
211 double pwa_coefs_prime_imag_kloAB =
_y2values[kloAB].imag;
212 double pwa_coefs_prime_real_khiAB =
_y2values[khiAB].real;
213 double pwa_coefs_prime_imag_khiAB =
_y2values[khiAB].imag;
217 aa3 = aa * aa * aa; bb3 = bb * bb * bb;
218 double ret_real = aa * pwa_coefs_real_kloAB + bb * pwa_coefs_real_khiAB + ((aa3 - aa)*pwa_coefs_prime_real_kloAB + (bb3 - bb) * pwa_coefs_prime_real_khiAB) * (dmHH*dmHH)/6.0;
219 double ret_imag = aa * pwa_coefs_imag_kloAB + bb * pwa_coefs_imag_khiAB + ((aa3 - aa)*pwa_coefs_prime_imag_kloAB + (bb3 - bb) * pwa_coefs_prime_imag_khiAB) * (dmHH*dmHH)/6.0;
double sin(const BesAngle a)
double cos(const BesAngle a)
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 &)
static vector< ControlPoint > _y2values
static void setParams(const vector< double > x, const vector< double > ym, const vector< double > yp)
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)