#include <EvtCubicSpline.hh>
|
static void | setParams (const vector< double > x, const vector< double > ym, const vector< double > yp) |
|
static void | setParams (const int n, const double *x, const double *ym, const double *yp) |
|
static void | fprime (const vector< double > &x, const vector< ControlPoint > &y, const int n, ControlPoint &yp2) |
|
static void | fprime (const vector< double > &x, const vector< ControlPoint > &y, ControlPoint &yp2) |
|
static int | find_bin (double mass1, const vector< double > &x, const int n) |
|
static bool | Complex_Derivative (const vector< double > &x, const vector< ControlPoint > &y, const int n, vector< ControlPoint > &y2) |
|
Definition at line 42 of file EvtCubicSpline.hh.
◆ EvtCubicSpline()
Definition at line 61 of file EvtCubicSpline.cc.
63 :
65
66
67{
68
69}
const EvtVector4R & p4_p()
const EvtVector4R & p4_d2()
const EvtVector4R & p4_d1()
◆ ~EvtCubicSpline()
EvtCubicSpline::~EvtCubicSpline |
( |
| ) |
|
|
virtual |
◆ amplitude()
double EvtCubicSpline::amplitude |
( |
| ) |
|
|
inline |
◆ Complex_Derivative()
bool EvtCubicSpline::Complex_Derivative |
( |
const vector< double > & | x, |
|
|
const vector< ControlPoint > & | y, |
|
|
const int | n, |
|
|
vector< ControlPoint > & | y2 ) |
|
static |
Definition at line 117 of file EvtCubicSpline.cc.
117 {
118 int i,k;
120 double sig,p,qn,un;
122
123
124
125
128
129
130 if(yp1.
real > 0.99e30) {
131 y2[0].real = 0.;
133 }
134 else{
135 y2[0].real=-0.5;
137 }
138 if(yp1.
imag > 0.99e30) {
139 y2[0].imag = 0.;
141 }
142 else{
143 y2[0].imag=-0.5;
145 }
146
147
148
149
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]);
160 }
161
162
163
164 if(ypn.
real > 0.99e30) {
165 qn = 0.;
166 un = 0.;
167 }
168 else{
169 qn=0.5;
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]));
171 }
172 y2[
n-1].real=(un-qn*u[
n-2].
real)/(qn*y2[
n-2].
real+1.0);
173 if(ypn.
imag > 0.99e30) {
174 qn = 0.;
175 un = 0.;
176 }
177 else{
178 qn=0.5;
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]));
180 }
181 y2[
n-1].imag=(un-qn*u[
n-2].
imag)/(qn*y2[
n-2].
imag+1.0);
182
183
184
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;
188 }
189 delete [] u;
190 return true;
191}
double imag(const EvtComplex &c)
static void fprime(const vector< double > &x, const vector< ControlPoint > &y, const int n, ControlPoint &yp2)
Referenced by setParams().
◆ find_bin()
static int EvtCubicSpline::find_bin |
( |
double | mass1, |
|
|
const vector< double > & | x, |
|
|
const int | n ) |
|
inlinestatic |
Definition at line 106 of file EvtCubicSpline.hh.
106 {
107 int mhi = 0;
109 if (mass1<x[mhi]) break;
110 mhi++;
111 }
112 return mhi==0?1:(mhi==
n?
n-1:mhi);
113 }
Referenced by resAmpl().
◆ fprime() [1/2]
static void EvtCubicSpline::fprime |
( |
const vector< double > & | x, |
|
|
const vector< ControlPoint > & | y, |
|
|
const int | n, |
|
|
ControlPoint & | yp2 ) |
|
inlinestatic |
Definition at line 81 of file EvtCubicSpline.hh.
81 {
82 double s1 =
x[
n-1] -
x[
n-2],
86 s13 = s1-s3,
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;
92 }
double double double double * s12
double double double double double * s23
Referenced by Complex_Derivative().
◆ fprime() [2/2]
Definition at line 93 of file EvtCubicSpline.hh.
93 {
94 double s1 =
x[0]-
x[1],
98 s13 = s1-s3,
100
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;
105 }
◆ operator=()
Definition at line 42 of file EvtCubicSpline.cc.
43{
44 if ( &
n ==
this )
return *
this;
50
51
52
53
54
55
56 return *this;
57}
◆ p4_d1()
◆ p4_d2()
◆ p4_p()
◆ resAmpl()
Definition at line 195 of file EvtCubicSpline.cc.
195 {
196
197
198
200
201
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;
216 bb = 1 - aa;
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;
221}
static vector< ControlPoint > _yvalues
static vector< double > _mHHLimits
static int find_bin(double mass1, const vector< double > &x, const int n)
static vector< ControlPoint > _y2values
Referenced by EvtDDalitz::decay().
◆ setParams() [1/2]
void EvtCubicSpline::setParams |
( |
const int | n, |
|
|
const double * | x, |
|
|
const double * | ym, |
|
|
const double * | yp ) |
|
static |
Definition at line 84 of file EvtCubicSpline.cc.
84 {
85 vector<double> vx, vym, vyp;
86 for (
int i=0;i<
n;i++){
87 vx.push_back(x[i]);
88 vym.push_back(ym[i]);
89 vyp.push_back(yp[i]);
90 }
92}
static void setParams(const vector< double > x, const vector< double > ym, const vector< double > yp)
◆ setParams() [2/2]
void EvtCubicSpline::setParams |
( |
const vector< double > | x, |
|
|
const vector< double > | ym, |
|
|
const vector< double > | yp ) |
|
static |
Definition at line 71 of file EvtCubicSpline.cc.
71 {
74 for (
int i=0;i<
x.size();i++){
75 e1 =
x[i];
e2 = ym[i]; e3 = yp[i];
80 }
82}
double sin(const BesAngle a)
double cos(const BesAngle a)
static bool Complex_Derivative(const vector< double > &x, const vector< ControlPoint > &y, const int n, vector< ControlPoint > &y2)
Referenced by EvtDDalitz::decay(), and setParams().
◆ theta()
double EvtCubicSpline::theta |
( |
| ) |
|
|
inline |
◆ _mHHLimits
vector< double > EvtCubicSpline::_mHHLimits |
|
static |
◆ _nPoints
int EvtCubicSpline::_nPoints = 0 |
|
static |
◆ _y2values
◆ _yvalues
The documentation for this class was generated from the following files: