36 model_name=
"DsToKSKpPipPim";
93 mass_Pion2 = 0.0194797849;
105 Ga0_980 = 5.0000e-02;
106 Geta1475= 9.0000e-02;
113 ma0_980 = 9.9000e-01;
114 meta1475= 1.4750e+00;
121 int GG[4][4] = { {1,0,0,0}, {0,-1,0,0}, {0,0,-1,0}, {0,0,0,-1} };
123 { { {{0,0,0,0}, {0,0,0,0}, {0,0,0,0}, {0,0,0,0} },
124 {{0,0,0,0}, {0,0,0,0}, {0,0,0,1}, {0,0,-1,0}},
125 {{0,0,0,0}, {0,0,0,-1}, {0,0,0,0}, {0,1,0,0} },
126 {{0,0,0,0}, {0,0,1,0}, {0,-1,0,0}, {0,0,0,0} } },
127 { {{0,0,0,0}, {0,0,0,0}, {0,0,0,-1}, {0,0,1,0} },
128 {{0,0,0,0}, {0,0,0,0}, {0,0,0,0}, {0,0,0,0} },
129 {{0,0,0,1}, {0,0,0,0}, {0,0,0,0}, {-1,0,0,0}},
130 {{0,0,-1,0}, {0,0,0,0}, {1,0,0,0}, {0,0,0,0} } },
131 { {{0,0,0,0}, {0,0,0,1}, {0,0,0,0}, {0,-1,0,0}},
132 {{0,0,0,-1}, {0,0,0,0}, {0,0,0,0}, {1,0,0,0} },
133 {{0,0,0,0}, {0,0,0,0}, {0,0,0,0}, {0,0,0,0} },
134 {{0,1,0,0}, {-1,0,0,0}, {0,0,0,0}, {0,0,0,0} } },
135 { {{0,0,0,0}, {0,0,-1,0}, {0,1,0,0}, {0,0,0,0} },
136 {{0,0,1,0}, {0,0,0,0}, {-1,0,0,0}, {0,0,0,0} },
137 {{0,-1,0,0}, {1,0,0,0}, {0,0,0,0}, {0,0,0,0} },
138 {{0,0,0,0}, {0,0,0,0}, {0,0,0,0}, {0,0,0,0} } } };
139 for (
int i=0; i<4; i++) {
140 for (
int j=0; j<4; j++) {
142 for (
int k=0; k<4; k++) {
143 for (
int l=0; l<4; l++) {
144 E[i][j][k][l] = EE[i][j][k][l];
190 double Pip[4],Pim[4],Kp[4],Ks[4];
191 Ks[0] = ks.
get(0); Kp[0] = kp.
get(0); Pip[0] = pip.
get(0); Pim[0] = pim.
get(0);
192 Ks[1] = ks.
get(1); Kp[1] = kp.
get(1); Pip[1] = pip.
get(1); Pim[1] = pim.
get(1);
193 Ks[2] = ks.
get(2); Kp[2] = kp.
get(2); Pip[2] = pip.
get(2); Pim[2] = pim.
get(2);
194 Ks[3] = ks.
get(3); Kp[3] = kp.
get(3); Pip[3] = pip.
get(3); Pim[3] = pim.
get(3);
207 int g0[8]={1,1,1,1,1,1,1,1};
210 calEvaMy(Ks,Kp,Pip,Pim,mass,width,rho,phi,g0,modetype,nstates,value);
216void EvtDsToKSKpPipPim::Com_Multi(
double a1[2],
double a2[2],
double res[2]){
217 res[0] = a1[0]*a2[0]-a1[1]*a2[1];
218 res[1] = a1[1]*a2[0]+a1[0]*a2[1];
220void EvtDsToKSKpPipPim::Com_Divide(
double a1[2],
double a2[2],
double res[2]){
221 res[0] = (a1[0]*a2[0]+a1[1]*a2[1])/(a2[0]*a2[0]+a2[1]*a2[1]);
222 res[1] = (a1[1]*a2[0]-a1[0]*a2[1])/(a2[0]*a2[0]+a2[1]*a2[1]);
224double EvtDsToKSKpPipPim::SCADot(
double a1[4],
double a2[4])
227 _cal = a1[0]*a2[0]-a1[1]*a2[1]-a1[2]*a2[2]-a1[3]*a2[3];
230double EvtDsToKSKpPipPim::barrier(
int l,
double sa,
double sb,
double sc,
double r2)
233 double tmp = sa+sb-sc;
234 double q = 0.25*tmp*tmp/sa-sb;
235 if (
q < 0)
q = 1e-16;
238 F = sqrt(2.0*z/(1.0+z));
242 F = sqrt(13.0*z2/(9.0+3.0*z+z2));
248void EvtDsToKSKpPipPim::calt1(
double daug1[4],
double daug0[4],
double t1[4]){
251 for(
int i=0; i<4; i++){
252 pa[i] = daug1[i] + daug0[i];
253 qa[i] = daug1[i] - daug0[i];
257 for(
int i=0; i<4; i++){
258 t1[i] = qa[i] - pq/p*pa[i];
261void EvtDsToKSKpPipPim::calt2(
double daug1[4],
double daug0[4],
double t2[4][4]){
264 calt1(daug1,daug0,t1);
265 r = SCADot(t1,t1)/3.0;
266 for(
int i=0; i<4; i++) {
267 pa[i] = daug1[i] + daug0[i];
270 for(
int i=0; i<4; i++) {
271 for(
int j=0; j<4; j++) {
272 t2[i][j] = t1[i]*t1[j] - r*(G[i][j]-pa[i]*pa[j]/p);
277double EvtDsToKSKpPipPim::wid(
double mass,
double sa,
double sb,
double sc,
double r2,
int l){
282 double tmp1 = sa+tmp;
283 double q = 0.25*tmp1*tmp1/sa-sb;
285 double tmp2 = sa0+tmp;
286 double q0 = 0.25*tmp2*tmp2/sa0-sb;
291 if(l == 0) {widm = sqrt(
t)*
mass/m;}
292 else if(l == 1) {widm =
t*sqrt(
t)*
mass/m*(1+z0)/(1+z);}
293 else if(l == 2) {widm =
t*
t*sqrt(
t)*
mass/m*(9+3*z0+z0*z0)/(9+3*z+z*z);}
296double EvtDsToKSKpPipPim::widl1(
double mass,
double sa,
double sb,
double sc,
double r2)
302 double tmp1 = sa+tmp;
303 double q = 0.25*tmp1*tmp1/sa-sb;
305 double tmp2 = sa0+tmp;
306 double q0 = 0.25*tmp2*tmp2/sa0-sb;
310 double F = (1+z0)/(1+z);
312 widm =
t*sqrt(
t)*
mass/m*F;
315void EvtDsToKSKpPipPim::Flatte_rhoab(
double sa,
double sb,
double sc,
double rho[2])
317 double q = (sa+sb-sc)*(sa+sb-sc)/(4*sa)-sb;
319 rho[0]=2* sqrt(
q/sa);
324 rho[1]=2*sqrt(-
q/sa);
327void EvtDsToKSKpPipPim::propagatora0980(
double mass,
double sx,
double *sb,
double *sc,
double prop[2])
329 double unit[2]={1.0};
332 Flatte_rhoab(sx,sb[0],sc[0],rho1);
334 Flatte_rhoab(sx,sb[1],sc[1],rho2);
336 double gKK_a980=0.892*0.341, gPiEta_a980=0.341;
337 double tmp1[2]={gKK_a980,0};
339 double tmp2[2]={gPiEta_a980,0};
341 Com_Multi(tmp1,rho1,tmp11);
342 Com_Multi(tmp2,rho2,tmp22);
343 double tmp3[2]={tmp11[0]+tmp22[0],tmp11[1]+tmp22[1]};
345 Com_Multi(tmp3, ci,tmp31);
346 double tmp4[2]={
mass*
mass-sx-tmp31[0], -1.0*tmp31[1]};
347 Com_Divide(
unit,tmp4, prop);
349void EvtDsToKSKpPipPim::propagatorRBW(
double mass,
double width,
double sa,
double sb,
double sc,
double r2,
int l,
double prop[2]){
354 b[1] = -
mass*width*wid(mass,sa,sb,sc,r2,l);
355 Com_Divide(a,
b,prop);
359void EvtDsToKSKpPipPim::KPiSLASS(
double sa,
double sb,
double sc,
double prop[2]) {
360 const double m1430 = 1.441;
361 const double sa0 = 2.076481;
362 const double w1430 = 0.193;
363 const double Lass1 = 0.25/sa0;
365 double tmp1 = sa0+tmp;
366 double q0 = Lass1*tmp1*tmp1-sb;
368 double tmp2 = sa+tmp;
369 double qs = 0.25*tmp2*tmp2/sa-sb;
371 double width = w1430*
q*m1430/sqrt(sa*q0);
372 double temp_R = atan(m1430*width/(sa0-sa));
373 if(temp_R<0) temp_R += math_pi;
374 double deltaR = -109.7 + temp_R;
375 double temp_F = atan(0.226*
q/(2.0-3.8194*qs));
376 if(temp_F<0) temp_F += math_pi;
377 double deltaF = 0.1 + temp_F;
378 double deltaS = deltaR + 2.0*deltaF;
379 double t1 = 0.96*
sin(deltaF);
380 double t2 =
sin(deltaR);
386 prop[0] = t1*CF[0] + t2*
CS[0];
387 prop[1] = t1*CF[1] + t2*
CS[1];
390void EvtDsToKSKpPipPim:: propagatorGS(
double mass2,
double mass,
double width,
double sa,
double sb,
double sc,
double r2,
double prop[2])
394 double tmp1 = sa+tmp;
395 double q2 = 0.25*tmp1*tmp1/sa-sb;
398 double tmp2 = mass2+tmp;
399 double q02 = 0.25*tmp2*tmp2/mass2-sb;
400 if(q02<0) q02 = 1e-16;
403 double q0 = sqrt(q02);
406 double tmp3 = log(mass+2*q0)+1.2760418309;
408 double h = GS1*
q/m*(log(m+2*
q)+1.2760418309);
409 double h0 = GS1*q0/
mass*tmp3;
410 double dh = h0*(0.125/q02-0.5/mass2)+GS3/mass2;
411 double d = GS2/q02*tmp3+GS3*
mass/q0-GS4*
mass/q03;
412 double f = mass2/q03*(q2*(h-h0)+(mass2-sa)*q02*dh);
414 a[0] = 1.0+d*width/
mass;
416 b[0] = mass2-sa+width*
f;
417 b[1] = -
mass*width*widl1(mass,sa,sb,sc,r2);
418 Com_Divide(a,
b,prop);
421void EvtDsToKSKpPipPim::calEvaMy(
double* Ks,
double* Kp,
double* Pip,
double* Pim,
double *mass1,
double *width1,
double *amp,
double *phase,
int* g0,
int* modetype,
int nstates,
double & Result)
423 double pD[4],pKpPim[4],pKsPim[4],pKsKpPim[4],pKsKp[4],pKsPipPim[4],pKpPipPim[4],pPipPim[4];
424 for(
int i=0;i!=4;i++)
427 pD[i] = Ks[i]+Pip[i]+Kp[i]+Pim[i];
429 pKsPim[i] =Ks[i]+Pim[i];
430 pKpPim[i] =Kp[i]+Pim[i];
431 pPipPim[i]=Pip[i]+Pim[i];
432 pKsKp[i] = Kp[i]+Ks[i];
433 pKsKpPim[i] = pKsPim[i] + Kp[i];
434 pKpPipPim[i] = Kp[i]+Pip[i]+Pim[i];
435 pKsPipPim[i] = Ks[i]+Pip[i]+Pim[i];
439 double sPim,sPip,sKs,sKp,sKpPim,sD,sKsPim,sKsKpPim,sKsKp,sKpPipPim,sKsPipPim,sPipPim;
444 sPip= SCADot(Pip,Pip);
445 sPim= SCADot(Pim,Pim);
446 sPipPim= SCADot(pPipPim,pPipPim);
447 sKsPim = SCADot(pKsPim,pKsPim);
448 sKpPim = SCADot(pKpPim,pKpPim);
449 sKsKpPim = SCADot(pKsKpPim,pKsKpPim);
450 sKpPipPim = SCADot(pKpPipPim,pKpPipPim);
451 sKsPipPim = SCADot(pKsPipPim,pKsPipPim);
452 sKsKp =SCADot(pKsKp,pKsKp);
454 double t1D[4],t1KpPim[4],t1KsPim[4],t1KsKpPim_kspim[4],t1KsKpPip_ksk[4],t1KsKp_PipPim[4],t1PipPim[4],t1KsKpPim_ksk[4],t1KsKpPim_kpim[4],t1KsKp[4];
455 double t2KsKpPim_kspim[4][4],t2KsKpPim_kpim[4][4],t2KpPipPim_kpim[4][4],t2KsPipPim_kspim[4][4],t2KpPipPim_pippim[4][4],t2KsPipPim_pippim[4][4];
458 calt1(Ks,Pim, t1KsPim);
459 calt1(Kp,Pim, t1KpPim);
460 calt1(Ks,Kp, t1KsKp);
461 calt1(Pip,Pim,t1PipPim);
462 calt1(pKsPim,Kp,t1KsKpPim_kspim);
463 calt1(pKpPim,Ks,t1KsKpPim_kpim);
464 calt1(pKsKp,Pip,t1KsKpPip_ksk);
465 calt1(pKsKp,Pim,t1KsKpPim_ksk);
466 calt1(pKsKp,pPipPim,t1KsKp_PipPim);
467 calt1(pKsKpPim,Pip,t1D);
469 calt2(pKsPim,Kp,t2KsKpPim_kspim);
470 calt2(pKpPim,Ks,t2KsKpPim_kpim);
471 calt2(pKpPim,Pip,t2KpPipPim_kpim);
472 calt2(pKsPim,Pip,t2KsPipPim_kspim);
473 calt2(pPipPim,Ks,t2KsPipPim_pippim);
474 calt2(pPipPim,Kp,t2KpPipPim_pippim);
476 double cof[2],amp_tmp[2],amp_PDF[2], PDF[2];
481 double temp_PDF,tmp1;
482 double pro[2],pro1[2],pro_kspim[2],pro_kpim[2],pro_ksk[2],pro_pippim[2],pro_kskpim_kspim[2],pro_kskpim_kpim[2];
483 double ispro_kspim=0,ispro_kpim=0,ispro_pippim=0;
484 double barr_kskpim_kspim=-1.0,barr_kskpim_kpim=-1.0,barr_kspim=-1.0,barr_kpim=-1.0,barr_pippim=-1.0,barr_kskp_pippim=-1,barr_ds_kskpim=-1,barr_kspippim_kspim2=-1,barr_kpippim_kpim2=-1,barr_kspippim_pippim2=-1,barr_kpippim_pippim2=-1,barr_ds_kspippim=-1,barr_ds_kpippim=-1,barr_ksk=-1,barr_kspippim_kspim=-1,barr_kpippim_kpim=-1;
486 double sKs2[2]={sKs,mass_Pion*mass_Pion};
487 double sKp2[2]={sKp,mass_Eta*mass_Eta};
488 double mass2sq,tt1,tt2,t2D[4][4];
490 for(
int i=0; i<nstates; i++)
492 temp_PDF=0; amp_tmp[0]=0; amp_tmp[1]=0; tmp1=0;
493 cof[0] = amp[i]*
cos(phase[i]);
494 cof[1] = amp[i]*
sin(phase[i]);
503 propagatorRBW(meta1475,Geta1475,sKsKpPim,sKsPim,sKp,rRes2,1,pro_kskpim_kspim);
504 propagatorRBW(mKstp,GKstp,sKsPim,sKs,sPim,rRes2,1,pro_kspim);
507 Com_Multi(pro_kskpim_kspim,pro_kspim,pro);
509 barr_kspim = barrier(1,sKsPim,sKs,sPim,rRes2);
510 barr_kskpim_kspim = barrier(1,sKsKpPim,sKsPim,sKp,rRes2);
511 for(
int a=0; a<4; a++)
513 temp_PDF += Kp[a]*t1KsPim[a]*G[a][a];
515 tmp1 = barr_kspim*barr_kskpim_kspim*temp_PDF;
521 propagatorRBW(meta1475,Geta1475,sKsKpPim,sKpPim,sKs,rRes2,1,pro_kskpim_kpim);
522 propagatorRBW(mKst0,GKst0,sKpPim,sKp,sPim,rRes2,1,pro_kpim);
524 Com_Multi(pro_kskpim_kpim,pro_kpim, pro);
526 barr_kpim = barrier(1,sKpPim,sKp,sPim,rRes2);
527 barr_kskpim_kpim = barrier(1,sKsKpPim,sKpPim,sKs,rRes2);
528 for(
int a=0; a<4; a++)
530 temp_PDF += Ks[a]*t1KpPim[a]*G[a][a];
532 tmp1 = barr_kpim*barr_kskpim_kpim*temp_PDF;
538 propagatorRBW(meta1475,Geta1475,sKsKpPim,sKsKp,sPim,rRes2,0,pro1);
539 propagatora0980(ma0_980,sKsKp,sKs2,sKp2,pro_ksk);
540 Com_Multi(pro1,pro_ksk,pro);
546 propagatorRBW(mK1270,GK1270,sKsPipPim,sPipPim,sKs,rRes2,0,pro1);
548 propagatorGS(mass2sq,mRho,GRho,sPipPim,sPip,sPim,rRes2,pro_pippim);
551 Com_Multi(pro1,pro_pippim,pro);
553 if(barr_pippim<0.0) barr_pippim = barrier(1,sPipPim,sPip,sPim,rRes2);
554 if(barr_ds_kspippim<0) barr_ds_kspippim = barrier(1,sD,sKsPipPim,sKp,rD2);
555 for(
int a=0; a<4; a++)
557 for(
int j=0; j<4; j++)
559 temp_PDF += t1D[a]*(pKsPipPim[a]*pKsPipPim[j]/sKsPipPim-G[a][j])*t1PipPim[j]*G[a][a]*G[j][j];
562 tmp1 = barr_pippim*barr_ds_kspippim*temp_PDF;
567 propagatorRBW(mK1270,GK1270,sKpPipPim,sPipPim,sKp,rRes2,0,pro1);
569 propagatorGS(mass2sq,mRho,GRho,sPipPim,sPip,sPim,rRes2,pro_pippim);
572 Com_Multi(pro1,pro_pippim,pro);
574 if(barr_pippim<0.0) barr_pippim = barrier(1,sPipPim,sPip,sPim,rRes2);
575 if(barr_ds_kpippim<0) barr_ds_kpippim = barrier(1,sD,sKpPipPim,sKs,rD2);
576 for(
int a=0; a<4; a++)
578 for(
int j=0; j<4; j++)
580 temp_PDF += t1D[a]*(pKpPipPim[a]*pKpPipPim[j]/sKpPipPim-G[a][j])*t1PipPim[j]*G[a][a]*G[j][j];
583 tmp1 = barr_pippim*barr_ds_kpippim*temp_PDF;
588 propagatorRBW(mK1400,GK1400,sKsPipPim,sKsPim,sPip,rRes2,0,pro1);
590 propagatorRBW(mKstp,GKstp,sKsPim,sKs,sPim,rRes2,1,pro_kspim);
593 Com_Multi(pro1,pro_kspim,pro);
595 if(barr_kspim<0.0) barr_kspim = barrier(1,sKsPim,sKs,sPim,rRes2);
596 if(barr_ds_kspippim<0.0) barr_ds_kspippim = barrier(1,sD,sKsPipPim,sKp,rD2);
597 for(
int a=0; a<4; a++)
599 for(
int j=0; j<4; j++)
601 temp_PDF += t1D[a]*(pKsPipPim[a]*pKsPipPim[j]/sKsPipPim-G[a][j])*t1KsPim[j]*G[a][a]*G[j][j];
604 tmp1 = barr_kspim*barr_ds_kspippim*temp_PDF;
609 propagatorRBW(mK1400,GK1400,sKpPipPim,sKpPim,sPip,rRes2,0,pro1);
611 propagatorRBW(mKst0,GKst0,sKpPim,sKp,sPim,rRes2,1,pro_kpim);
614 Com_Multi(pro1,pro_kpim,pro);
616 if(barr_kpim<0.0) barr_kpim = barrier(1,sKpPim,sKp,sPim,rRes2);
617 if(barr_ds_kpippim<0.0) barr_ds_kpippim = barrier(1,sD,sKpPipPim,sKs,rD2);
618 for(
int a=0; a<4; a++)
620 for(
int j=0; j<4; j++)
622 temp_PDF += t1D[a]*(pKpPipPim[a]*pKpPipPim[j]/sKpPipPim-G[a][j])*t1KpPim[j]*G[a][a]*G[j][j];
625 tmp1 = barr_kpim*barr_ds_kpippim*temp_PDF;
634 propagatorRBW(mP1680,GP1680,sKsKpPim,sKsPim,sKp,rRes2,1,pro1);
635 propagatorRBW(mKstp,GKstp,sKsPim,sKs,sPim,rRes2,1,pro_kpim);
636 Com_Multi(pro1,pro_kpim,pro);
638 barr_kspim = barrier(1,sKsPim,sKs,sPim,rRes2);
639 barr_kskpim_kspim= barrier(1,sKsKpPim,sKsPim,sKp,rRes2);
640 barr_ds_kskpim = barrier(1,sD,sKsKpPim,sPip,rD2);
641 for(
int a=0; a<4; a++)
643 for(
int j=0; j<4; j++)
645 for(
int k=0; k<4; k++)
647 for(
int l=0; l<4; l++)
649 temp_PDF += E[a][j][k][l]*pKsKpPim[a]*(pKsPim[j]-Kp[j])*Pip[k]*(Ks[l]-Pim[l])*G[a][a]*G[j][j]*G[k][k]*G[l][l];
654 tmp1 = barr_kspim*barr_kskpim_kspim*barr_ds_kskpim*temp_PDF;
658 if(modetype[i]==3||modetype[i]==4||modetype[i]==5||modetype[i]==7||modetype[i]==8||modetype[i]==11||modetype[i]==12||modetype[i]==17||modetype[i]==15){
659 amp_tmp[0] = tmp1*pro[0];
660 amp_tmp[1] = tmp1*pro[1];
669 Com_Multi(amp_tmp,cof,amp_PDF);
675 PDF[0] += amp_PDF[0];
676 PDF[1] += amp_PDF[1];
682 double value = PDF[0]*PDF[0] + PDF[1]*PDF[1];
683 if(value <=0) value = 1e-20;
double sin(const BesAngle a)
double cos(const BesAngle a)
TFile f("ana_bhabha660a_dqa_mcPat_zy_old.root")
*******INTEGER m_nBinMax INTEGER m_NdiMax !No of bins in histogram for cell exploration division $ !Last vertex $ !Last active cell $ !Last cell in buffer $ !No of sampling when dividing cell $ !No of function total $ !Flag for random ceel for $ !Flag for type of for WtMax $ !Flag which decides whether vertices are included in the sampling $ entire domain is hyp !Maximum effective eevents per saves r n generator level $ !Flag for chat level in !Latex Output unit
****INTEGER imax DOUBLE PRECISION m_pi *DOUBLE PRECISION m_amfin DOUBLE PRECISION m_Chfin DOUBLE PRECISION m_Xenph DOUBLE PRECISION m_sinw2 DOUBLE PRECISION m_GFermi DOUBLE PRECISION m_MfinMin DOUBLE PRECISION m_ta2 INTEGER m_out INTEGER m_KeyFSR INTEGER m_KeyQCD *COMMON c_Semalib $ !copy of input $ !CMS energy $ !beam mass $ !final mass $ !beam charge $ !final charge $ !smallest final mass $ !Z mass $ !Z width $ !EW mixing angle $ !Gmu Fermi $ alphaQED at q
void checkSpinDaughter(int d1, EvtSpinType::spintype sp)
void checkSpinParent(EvtSpinType::spintype sp)
void setProbMax(double prbmx)
void checkNDaug(int d1, int d2=-1)
void checkNArg(int a1, int a2=-1, int a3=-1, int a4=-1)
void setProb(double prob)
void getName(std::string &name)
void decay(EvtParticle *p)
virtual ~EvtDsToKSKpPipPim()
const EvtVector4R & getP4() const
EvtParticle * getDaug(int i)
double initializePhaseSpace(int numdaughter, EvtId *daughters, double poleSize=-1., int whichTwo1=0, int whichTwo2=1)