19 void getName(std::string& name);
28static double mass1[11];
29static double mass2[11];
30static double width1[11];
31static double width2[11];
33static double phase[11];
34static double a10gam_arr[3000];
35static double a1pgam_arr[3000];
43static double mass_Kaon;
45static double mass_Eta;
46static double mass_Pion;
48static double mass_Pion2;
49static double mass_2Pion;
50static double math_2pi;
61static int E[4][4][4][4];
63void Com_Multi(
double a1[2],
double a2[2],
double res[2]){
64 res[0] = a1[0]*a2[0]-a1[1]*a2[1];
65 res[1] = a1[1]*a2[0]+a1[0]*a2[1];
67void Com_Divide(
double a1[2],
double a2[2],
double res[2]){
68 double tmp = a2[0]*a2[0]+a2[1]*a2[1];
69 res[0] = (a1[0]*a2[0]+a1[1]*a2[1])/tmp;
70 res[1] = (a1[1]*a2[0]-a1[0]*a2[1])/tmp;
72double SCADot(
double a1[4],
double a2[4]){
73 double _cal = a1[0]*a2[0]-a1[1]*a2[1]-a1[2]*a2[2]-a1[3]*a2[3];
76double barrier(
int l,
double sa,
double sb,
double sc,
double r,
double mass){
77 double q = (sa+sb-sc)*(sa+sb-sc)/(4*sa)-sb;
84 double q0 = (sa0+sb-sc)*(sa0+sb-sc)/(4*sa0)-sb;
90 if(l == 1) F = sqrt((1+z0)/(1+z));
91 if(l == 2) F = sqrt((9+3*z0+z0*z0)/(9+3*z+z*z));
98void calt1(
double daug1[4],
double daug2[4],
double t1[4]){
101 for(
int i=0; i<4; i++) {
102 pa[i] = daug1[i] + daug2[i];
103 qa[i] = daug1[i] - daug2[i];
108 for(
int i=0; i<4; i++) {
109 t1[i] = qa[i] - tmp*pa[i];
112void calt2(
double daug1[4],
double daug2[4],
double t2[4][4]){
115 calt1(daug1,daug2,t1);
116 r = SCADot(t1,t1)/3.0;
117 for(
int i=0; i<4; i++) {
118 pa[i] = daug1[i] + daug2[i];
121 for(
int i=0; i<4; i++) {
122 for(
int j=0; j<4; j++) {
123 t2[i][j] = t1[i]*t1[j] - r*(G[i][j]-pa[i]*pa[j]/p);
127double projector1(
double p4[4],
int i,
int j){
133double projector2(
double p4[4],
int i,
int j,
int k,
int l){
135 result+=0.5*projector1(
p4,i,k)*projector1(
p4,j,l);
136 result+=0.5*projector1(
p4,i,l)*projector1(
p4,j,k);
137 result+=(-1./3.)*projector1(
p4,i,j)*projector1(
p4,k,l);
140double wid(
double mass2,
double mass,
double sa,
double sb,
double sc,
double r2,
int l){
144 double tmp1 = sa+tmp;
145 double q = 0.25*tmp1*tmp1/sa-sb;
148 double tmp2 = mass2+tmp;
149 double q0 = 0.25*tmp2*tmp2/mass2-sb;
155 if(l == 0) {widm = sqrt(
t)*
mass/m;}
156 else if(l == 1) {widm =
t*sqrt(
t)*
mass/m*(1+z0)/(1+z);}
157 else if(l == 2) {widm =
t*
t*sqrt(
t)*
mass/m*(9+3*z0+z0*z0)/(9+3*z+z*z);}
160double widl1(
double mass2,
double mass,
double sa,
double sb,
double sc,
double r2){
164 double tmp1 = sa+tmp;
165 double q = 0.25*tmp1*tmp1/sa-sb;
168 double tmp2 = mass2+tmp;
169 double q0 = 0.25*tmp2*tmp2/mass2-sb;
174 double F = (1+z0)/(1+z);
176 widm =
t*sqrt(
t)*
mass/m*F;
179void propagatorRBW(
double mass2,
double mass,
double width,
double sa,
double sb,
double sc,
double r2,
int l,
double prop[2])
185 b[1] = -
mass*width*wid(mass2,
mass,sa,sb,sc,r2,l);
186 Com_Divide(a,
b,prop);
188void propagatorMW(
double mass,
double sa,
int mode,
double prop[2])
195 b[1] = -
mass*a10gam_arr[int(sqrt(sa)*1000)];
197 b[1] = -
mass*a1pgam_arr[int(sqrt(sa)*1000)];
199 Com_Divide(a,
b,prop);
201void Flatte_rhoab(
double sa,
double sb,
double sc,
double rho[2])
203 double q = (sa+sb-sc)*(sa+sb-sc)/(4*sa)-sb;
205 rho[0]=2* sqrt(
q/sa);
210 rho[1]=2*sqrt(-
q/sa);
214void rhoab(
double sa,
double sb,
double sc,
double res[2]) {
215 double tmp = sa+sb-sc;
216 double q = 0.25*tmp*tmp/sa-sb;
218 res[0]=2.0*sqrt(
q/sa);
222 res[1]=2.0*sqrt(-
q/sa);
225void propagatorGS(
double mass2,
double mass,
double width,
double sa,
double sb,
double sc,
double r2,
double prop[2]){
228 double tmp1 = sa+tmp;
229 double q2 = 0.25*tmp1*tmp1/sa-sb;
233 double tmp2 = mass2+tmp;
234 double q02 = 0.25*tmp2*tmp2/mass2-sb;
236 if(q02<0) q02 = -q02;
239 double q0 = sqrt(q02);
242 double tmp3 = log(
mass+2*q0)+1.2760418309;
244 double h = GS1*
q/m*(log(m+2*
q)+1.2760418309);
245 double h0 = GS1*q0/
mass*tmp3;
246 double dh = h0*(0.125/q02-0.5/mass2)+GS3/mass2;
247 double d = GS2/q02*tmp3+GS3*
mass/q0-GS4*
mass/q03;
248 double f = mass2/q03*(q2*(h-h0)+(mass2-sa)*q02*dh);
250 a[0] = 1.0+d*width/
mass;
252 b[0] = mass2-sa+width*
f;
253 b[1] = -
mass*width*widl1(mass2,
mass,sa,sb,sc,r2);
254 Com_Divide(a,
b,prop);
256void propagator980(
double mass,
double sx,
double *sb,
double *sc,
double prop[2]){
257 double unit[2]={1.0};
260 Flatte_rhoab(sx,sb[0],sc[0],rho1);
262 Flatte_rhoab(sx,sb[1],sc[1],rho2);
264 double gK_f980=0.69466, gPi_f980=0.165;
265 double tmp1[2]={gK_f980,0};
267 double tmp2[2]={gPi_f980,0};
269 Com_Multi(tmp1,rho1,tmp11);
270 Com_Multi(tmp2,rho2,tmp22);
271 double tmp3[2]={tmp11[0]+tmp22[0],tmp11[1]+tmp22[1]};
273 Com_Multi(tmp3, ci,tmp31);
274 double tmp4[2]={
mass*
mass-sx-tmp31[0], -1.0*tmp31[1]};
275 Com_Divide(
unit,tmp4, prop);
277double spinf1(
double& p1t,
double& p1x,
double& p1y,
double& p1z,
278 double& p2t,
double& p2x,
double& p2y,
double& p2z,
279 double& p3t,
double& p3x,
double& p3y,
double& p3z,
280 double& p4t,
double& p4x,
double& p4y,
double& p4z){
282 double p1[4]={p1t,p1x,p1y,p1z};
283 double p2[4]={p2t,p2x,p2y,p2z};
284 double p3[4]={p3t,p3x,p3y,p3z};
285 double p4[4]={p4t,p4x,p4y,p4z};
286 double p14[4]={p1t+p4t,p1x+p4x,p1y+p4y,p1z+p4z};
287 double p23[4]={p2t+p3t,p2x+p3x,p2y+p3y,p2z+p3z};
293 calt1(p14,p23,t1_14_23);
298 for(
int a=0; a<4; a++){
299 for(
int b=0;
b<4;
b++){
301 for(
int c=0; c<4; c++){
304 for(
int d=0; d<4; d++){
308 temp_PDF += G[a][a]*G[
b][
b]*G[c][c]*G[d][d]*E[a][
b][c][d]*t1_14_23[a]*t1_14[
b]*t1_23[c]*(
p1[d]+
p2[d]+
p3[d]+
p4[d]);
316double spinf2(
double& p1t,
double& p1x,
double& p1y,
double& p1z,
317 double& p2t,
double& p2x,
double& p2y,
double& p2z,
318 double& p3t,
double& p3x,
double& p3y,
double& p3z,
319 double& p4t,
double& p4x,
double& p4y,
double& p4z){
321 double p1[4]={p1t,p1x,p1y,p1z};
322 double p2[4]={p2t,p2x,p2y,p2z};
323 double p3[4]={p3t,p3x,p3y,p3z};
324 double p4[4]={p4t,p4x,p4y,p4z};
325 double p13[4]={p1t+p3t,p1x+p3x,p1y+p3y,p1z+p3z};
326 double p24[4]={p2t+p4t,p2x+p4x,p2y+p4y,p2z+p4z};
332 calt1(p13,p24,t1_13_24);
337 for(
int a=0; a<4; a++){
338 for(
int b=0;
b<4;
b++){
340 for(
int c=0; c<4; c++){
343 for(
int d=0; d<4; d++){
347 temp_PDF += G[a][a]*G[
b][
b]*G[c][c]*G[d][d]*E[a][
b][c][d]*t1_13_24[a]*t1_13[
b]*t1_24[c]*(
p1[d]+
p2[d]+
p3[d]+
p4[d]);
355double spinf3(
double& p1t,
double& p1x,
double& p1y,
double& p1z,
356 double& p2t,
double& p2x,
double& p2y,
double& p2z,
357 double& p3t,
double& p3x,
double& p3y,
double& p3z,
358 double& p4t,
double& p4x,
double& p4y,
double& p4z){
360 double p1[4]={p1t,p1x,p1y,p1z};
361 double p2[4]={p2t,p2x,p2y,p2z};
362 double p3[4]={p3t,p3x,p3y,p3z};
363 double p4[4]={p4t,p4x,p4y,p4z};
364 double p134[4]={p1t+p3t+p4t,p1x+p3x+p4x,p1y+p3y+p4y,p1z+p3z+p4z};
365 double p14[4]={p1t+p4t,p1x+p4x,p1y+p4y,p1z+p4z};
367 double s134=p134[0]*p134[0]-p134[1]*p134[1]-p134[2]*p134[2]-p134[3]*p134[3];
372 calt1(p134,
p2,t1_134_2);
373 calt1(p14,
p3,t1_14_3);
377 for(
int a=0; a<4; a++){
378 for(
int b=0;
b<4;
b++){
379 for(
int c=0; c<4; c++){
381 for(
int d=0; d<4; d++){
384 for(
int e=0; e<4; e++){
388 temp_PDF += G[a][a]*G[
b][
b]*G[c][c]*G[d][d]*G[e][e]*t1_134_2[a]*(-G[a][
b]+p134[a]*p134[
b]/s134)*E[
b][c][d][e]*t1_14_3[c]*p134[d]*t1_14[e];
397double spinf4(
double& p1t,
double& p1x,
double& p1y,
double& p1z,
398 double& p2t,
double& p2x,
double& p2y,
double& p2z,
399 double& p3t,
double& p3x,
double& p3y,
double& p3z,
400 double& p4t,
double& p4x,
double& p4y,
double& p4z){
402 double p1[4]={p1t,p1x,p1y,p1z};
403 double p2[4]={p2t,p2x,p2y,p2z};
404 double p3[4]={p3t,p3x,p3y,p3z};
405 double p4[4]={p4t,p4x,p4y,p4z};
406 double p234[4]={p2t+p3t+p4t,p2x+p3x+p4x,p2y+p3y+p4y,p2z+p3z+p4z};
407 double p24[4]={p2t+p4t,p2x+p4x,p2y+p4y,p2z+p4z};
409 double s234=p234[0]*p234[0]-p234[1]*p234[1]-p234[2]*p234[2]-p234[3]*p234[3];
414 calt1(p234,
p1,t1_234_1);
415 calt1(p24,
p3,t1_24_3);
419 for(
int a=0; a<4; a++){
420 for(
int b=0;
b<4;
b++){
421 for(
int c=0; c<4; c++){
423 for(
int d=0; d<4; d++){
426 for(
int e=0; e<4; e++){
430 temp_PDF += G[a][a]*G[
b][
b]*G[c][c]*G[d][d]*G[e][e]*t1_234_1[a]*(-G[a][
b]+p234[a]*p234[
b]/s234)*E[
b][c][d][e]*t1_24_3[c]*p234[d]*t1_24[e];
439double spinf5(
double& p1t,
double& p1x,
double& p1y,
double& p1z,
440 double& p2t,
double& p2x,
double& p2y,
double& p2z,
441 double& p3t,
double& p3x,
double& p3y,
double& p3z,
442 double& p4t,
double& p4x,
double& p4y,
double& p4z){
444 double p1[4]={p1t,p1x,p1y,p1z};
445 double p2[4]={p2t,p2x,p2y,p2z};
446 double p3[4]={p3t,p3x,p3y,p3z};
447 double p4[4]={p4t,p4x,p4y,p4z};
448 double p134[4]={p1t+p3t+p4t,p1x+p3x+p4x,p1y+p3y+p4y,p1z+p3z+p4z};
449 double p13[4]={p1t+p3t,p1x+p3x,p1y+p3y,p1z+p3z};
451 double s134=p134[0]*p134[0]-p134[1]*p134[1]-p134[2]*p134[2]-p134[3]*p134[3];
456 calt1(p134,
p2,t1_134_2);
457 calt1(p13,
p4,t1_13_4);
461 for(
int a=0; a<4; a++){
462 for(
int b=0;
b<4;
b++){
463 for(
int c=0; c<4; c++){
465 for(
int d=0; d<4; d++){
468 for(
int e=0; e<4; e++){
472 temp_PDF += G[a][a]*G[
b][
b]*G[c][c]*G[d][d]*G[e][e]*t1_134_2[a]*(-G[a][
b]+p134[a]*p134[
b]/s134)*E[
b][c][d][e]*t1_13_4[c]*p134[d]*t1_13[e];
481double spinf6(
double& p1t,
double& p1x,
double& p1y,
double& p1z,
482 double& p2t,
double& p2x,
double& p2y,
double& p2z,
483 double& p3t,
double& p3x,
double& p3y,
double& p3z,
484 double& p4t,
double& p4x,
double& p4y,
double& p4z){
486 double p1[4]={p1t,p1x,p1y,p1z};
487 double p2[4]={p2t,p2x,p2y,p2z};
488 double p3[4]={p3t,p3x,p3y,p3z};
489 double p4[4]={p4t,p4x,p4y,p4z};
490 double p234[4]={p2t+p3t+p4t,p2x+p3x+p4x,p2y+p3y+p4y,p2z+p3z+p4z};
491 double p23[4]={p2t+p3t,p2x+p3x,p2y+p3y,p2z+p3z};
493 double s234=p234[0]*p234[0]-p234[1]*p234[1]-p234[2]*p234[2]-p234[3]*p234[3];
498 calt1(p234,
p1,t1_234_1);
499 calt1(p23,
p4,t1_23_4);
503 for(
int a=0; a<4; a++){
504 for(
int b=0;
b<4;
b++){
505 for(
int c=0; c<4; c++){
507 for(
int d=0; d<4; d++){
510 for(
int e=0; e<4; e++){
514 temp_PDF += G[a][a]*G[
b][
b]*G[c][c]*G[d][d]*G[e][e]*t1_234_1[a]*(-G[a][
b]+p234[a]*p234[
b]/s234)*E[
b][c][d][e]*t1_23_4[c]*p234[d]*t1_23[e];
523double spinf7(
double& p1t,
double& p1x,
double& p1y,
double& p1z,
524 double& p2t,
double& p2x,
double& p2y,
double& p2z,
525 double& p3t,
double& p3x,
double& p3y,
double& p3z,
526 double& p4t,
double& p4x,
double& p4y,
double& p4z){
528 double p1[4]={p1t,p1x,p1y,p1z};
529 double p2[4]={p2t,p2x,p2y,p2z};
530 double p3[4]={p3t,p3x,p3y,p3z};
531 double p4[4]={p4t,p4x,p4y,p4z};
532 double p134[4]={p1t+p3t+p4t,p1x+p3x+p4x,p1y+p3y+p4y,p1z+p3z+p4z};
533 double p34[4]={p3t+p4t,p3x+p4x,p3y+p4y,p3z+p4z};
535 double s134=p134[0]*p134[0]-p134[1]*p134[1]-p134[2]*p134[2]-p134[3]*p134[3];
540 calt1(p134,
p2,t1_134_2);
541 calt1(p34,
p1,t1_34_1);
545 for(
int a=0; a<4; a++){
546 for(
int b=0;
b<4;
b++){
547 for(
int c=0; c<4; c++){
549 for(
int d=0; d<4; d++){
552 for(
int e=0; e<4; e++){
556 temp_PDF += G[a][a]*G[
b][
b]*G[c][c]*G[d][d]*G[e][e]*t1_134_2[a]*(-G[a][
b]+p134[a]*p134[
b]/s134)*E[
b][c][d][e]*t1_34_1[c]*p134[d]*t1_34[e];
565double spinf8(
double& p1t,
double& p1x,
double& p1y,
double& p1z,
566 double& p2t,
double& p2x,
double& p2y,
double& p2z,
567 double& p3t,
double& p3x,
double& p3y,
double& p3z,
568 double& p4t,
double& p4x,
double& p4y,
double& p4z){
570 double p1[4]={p1t,p1x,p1y,p1z};
571 double p2[4]={p2t,p2x,p2y,p2z};
572 double p3[4]={p3t,p3x,p3y,p3z};
573 double p4[4]={p4t,p4x,p4y,p4z};
574 double p234[4]={p2t+p3t+p4t,p2x+p3x+p4x,p2y+p3y+p4y,p2z+p3z+p4z};
575 double p34[4]={p3t+p4t,p3x+p4x,p3y+p4y,p3z+p4z};
577 double s234=p234[0]*p234[0]-p234[1]*p234[1]-p234[2]*p234[2]-p234[3]*p234[3];
582 calt1(p234,
p1,t1_234_1);
583 calt1(p34,
p2,t1_34_2);
587 for(
int a=0; a<4; a++){
588 for(
int b=0;
b<4;
b++){
589 for(
int c=0; c<4; c++){
591 for(
int d=0; d<4; d++){
594 for(
int e=0; e<4; e++){
598 temp_PDF += G[a][a]*G[
b][
b]*G[c][c]*G[d][d]*G[e][e]*t1_234_1[a]*(-G[a][
b]+p234[a]*p234[
b]/s234)*E[
b][c][d][e]*t1_34_2[c]*p234[d]*t1_34[e];