34 model_name=
"DToKSKSK";
84 mass_Pion2 = 0.0194797849;
137 double P1[4], P2[4], P3[4];
138 P1[0] = D1.
get(0); P1[1] = D1.
get(1); P1[2] = D1.
get(2); P1[3] = D1.
get(3);
139 P2[0] = D2.
get(0); P2[1] = D2.
get(1); P2[2] = D2.
get(2); P2[3] = D2.
get(3);
140 P3[0] = D3.
get(0); P3[1] = D3.
get(1); P3[2] = D3.
get(2); P3[3] = D3.
get(3);
146 calEva(P1, P2, P3, mass, width, rho, phi, g0, spin, modetype, nstates, value);
152void EvtDToKSKSK::Com_Multi(
double a1[2],
double a2[2],
double res[2])
154 res[0] = a1[0]*a2[0]-a1[1]*a2[1];
155 res[1] = a1[1]*a2[0]+a1[0]*a2[1];
157void EvtDToKSKSK::Com_Divide(
double a1[2],
double a2[2],
double res[2])
159 double tmp = a2[0]*a2[0]+a2[1]*a2[1];
160 res[0] = (a1[0]*a2[0]+a1[1]*a2[1])/tmp;
161 res[1] = (a1[1]*a2[0]-a1[0]*a2[1])/tmp;
164double EvtDToKSKSK::SCADot(
double a1[4],
double a2[4])
166 double _cal = a1[0]*a2[0]-a1[1]*a2[1]-a1[2]*a2[2]-a1[3]*a2[3];
169double EvtDToKSKSK::barrier(
int l,
double sa,
double sb,
double sc,
double r,
double mass)
171 double q = (sa+sb-sc)*(sa+sb-sc)/(4*sa)-sb;
177 double q0 = (sa0+sb-sc)*(sa0+sb-sc)/(4*sa0)-sb;
182 if(l == 1) F = sqrt((1+z0)/(1+z));
183 if(l == 2) F = sqrt((9+3*z0+z0*z0)/(9+3*z+z*z));
187void EvtDToKSKSK::calt1(
double daug1[4],
double daug2[4],
double t1[4])
191 for(
int i=0; i<4; i++) {
192 pa[i] = daug1[i] + daug2[i];
193 qa[i] = daug1[i] - daug2[i];
198 for(
int i=0; i<4; i++) {
199 t1[i] = qa[i] - tmp*pa[i];
203void EvtDToKSKSK::calt2(
double daug1[4],
double daug2[4],
double t2[4][4])
207 calt1(daug1,daug2,t1);
208 r = SCADot(t1,t1)/3.0;
209 for(
int i=0; i<4; i++) {
210 pa[i] = daug1[i] + daug2[i];
213 for(
int i=0; i<4; i++) {
214 for(
int j=0; j<4; j++) {
215 t2[i][j] = t1[i]*t1[j] - r*(G[i][j]-pa[i]*pa[j]/p);
220 void EvtDToKSKSK::propagatorCBW(
double mass,
double width,
double sx,
double prop[2])
227 Com_Divide(a,
b,prop);
231double EvtDToKSKSK::wid(
double mass2,
double mass,
double sa,
double sb,
double sc,
double r2,
int l)
236 double tmp1 = sa+tmp;
237 double q = fabs(0.25*tmp1*tmp1/sa-sb);
238 double tmp2 = mass2+tmp;
239 double q0 = fabs(0.25*tmp2*tmp2/mass2-sb);
244 if(l == 0) {widm = sqrt(
t)*
mass/m;}
245 else if(l == 1) {widm =
t*sqrt(
t)*
mass/m*(1+z0)/(1+z);}
246 else if(l == 2) {widm =
t*
t*sqrt(
t)*
mass/m*(9+3*z0+z0*z0)/(9+3*z+z*z);}
249double EvtDToKSKSK::widl1(
double mass2,
double mass,
double sa,
double sb,
double sc,
double r2)
254 double tmp1 = sa+tmp;
255 double q = fabs(0.25*tmp1*tmp1/sa-sb);
256 double tmp2 = mass2+tmp;
257 double q0 = fabs(0.25*tmp2*tmp2/mass2-sb);
260 double F = (1+z0)/(1+z);
262 widm =
t*sqrt(
t)*
mass/m*F;
266 void EvtDToKSKSK::propagatorRBW(
double mass,
double width,
double sa,
double sb,
double sc,
double r2,
int l,
double prop[2])
274 b[1] = -
mass*width*wid(mass2,mass,sa,sb,sc,r2,l);
275 Com_Divide(a,
b,prop);
278void EvtDToKSKSK::propagatorFlatte(
double mass,
double width,
double sa,
double sb,
double sc,
double prop[2]){
280 rhoab=1.0/sa*sqrt((sa-(0.547862+0.139570)*(0.547862+0.139570))*(sa-(0.547862-0.139570)*(0.547862-0.139570)));
281 rhoKK=1.0/sa*sqrt((sa-(0.497611+0.493677)*(0.497611+0.493677))*(sa-(0.497611-0.493677)*(0.497611-0.493677)));
286 b[1] = - (0.324*0.324*rhoab+ 1.03*0.324*0.324*rhoKK);
287 Com_Divide(a,
b,prop);
290 void EvtDToKSKSK::propagatorGS(
double mass,
double width,
double sa,
double sb,
double sc,
double r2,
double prop[2])
295 double tmp1 = sa+tmp;
296 double q2 = fabs(0.25*tmp1*tmp1/sa-sb);
297 double tmp2 = mass2+tmp;
298 double q02 = fabs(0.25*tmp2*tmp2/mass2-sb);
300 double q0 = sqrt(q02);
303 double tmp3 = log(mass+2*q0)+0.0087501713;
304 double h = GS1*
q/m*(log(m+2*
q)+0.0087501713);
305 double h0 = GS1*q0/
mass*tmp3;
306 double dh = h0*(0.125/q02-0.5/mass2)+GS3/mass2;
307 double d = GS2/q02*tmp3+GS3*
mass/q0-GS4*
mass/q03;
308 double f = mass2/q03*(q2*(h-h0)+(mass2-sa)*q02*dh);
309 a[0] = 1.0+d*width/
mass;
311 b[0] = mass2-sa+width*
f;
312 b[1] = -
mass*width*widl1(mass2,mass,sa,sb,sc,r2);
313 Com_Divide(a,
b,prop);
316 void EvtDToKSKSK::PiPiSWASS(
double sa,
double sb,
double sc,
double prop[2]) {
318 double tmp2 = sa+tmp;
319 double qs = 0.25*tmp2*tmp2/sa-sb;
321 double a0 = -0.11/mass_Pion;
322 prop[0] = 1/(1+
a0*
a0*
q*
q);
326 void EvtDToKSKSK::KPiSLASS(
double sa,
double sb,
double sc,
double prop[2]) {
327 const double m1430 = 1.441;
328 const double sa0 = 2.076481;
329 const double w1430 = 0.193;
330 const double Lass1 = 0.25/sa0;
332 double tmp1 = sa0+tmp;
333 double q0 = fabs(Lass1*tmp1*tmp1-sb);
334 double tmp2 = sa+tmp;
335 double qs = 0.25*tmp2*tmp2/sa-sb;
337 double width = w1430*
q*m1430/sqrt(sa*q0);
338 double temp_R = atan(m1430*width/(sa0-sa));
339 if(temp_R<0) temp_R += math_K;
340 double deltaR = -109.7*math_K/180.0 + temp_R;
341 double temp_F = atan(0.226*
q/(2.0-3.8194*qs));
342 if(temp_F<0) temp_F += math_K;
343 double deltaF = 0.1*math_K/180.0 + temp_F;
344 double deltaS = deltaR + 2.0*deltaF;
345 double t1 = 0.96*
sin(deltaF);
346 double t2 =
sin(deltaR);
352 prop[0] = t1*CF[0] + t2*
CS[0];
353 prop[1] = t1*CF[1] + t2*
CS[1];
356 void EvtDToKSKSK::Flatte_rhoab(
double sa,
double sb,
double sc,
double rho[2]){
357 double q = (sa+sb-sc)*(sa+sb-sc)/(4*sa)-sb;
359 rho[0]=2* sqrt(
q/sa);
364 rho[1]=2*sqrt(-
q/sa);
368 void EvtDToKSKSK::propagatorKstr1430(
double mass,
double sx,
double *sb,
double *sc,
double prop[2])
370 double unit[2]={1.0};
373 Flatte_rhoab(sx,sb[0],sc[0],rho1);
375 Flatte_rhoab(sx,sb[1],sc[1],rho2);
376 double gKPi_Kstr1430=0.2990, gEtaPK_Kstr1430=0.0529;
377 double tmp1[2]={gKPi_Kstr1430,0};
379 double tmp2[2]={gEtaPK_Kstr1430,0};
381 Com_Multi(tmp1,rho1,tmp11);
382 Com_Multi(tmp2,rho2,tmp22);
383 double tmp3[2]={tmp11[0]+tmp22[0],tmp11[1]+tmp22[1]};
385 Com_Multi(tmp3, ci,tmp31);
386 double tmp4[2]={
mass*
mass-sx-tmp31[0], -1.0*tmp31[1]};
387 Com_Divide(
unit,tmp4, prop);
389 void EvtDToKSKSK::rhoab(
double sa,
double sb,
double sc,
double res[2]) {
390 double tmp = sa+sb-sc;
391 double q = 0.25*tmp*tmp/sa-sb;
393 res[0]=2.0*sqrt(
q/sa);
397 res[1]=2.0*sqrt(-
q/sa);
400 void EvtDToKSKSK::rho4Pi(
double sa,
double res[2]) {
401 double temp = 1.0-0.3116765584/sa;
403 res[0]=sqrt(temp)/(1.0+
exp(9.8-3.5*sa));
407 res[1]=sqrt(-temp)/(1.0+
exp(9.8-3.5*sa));
411 void EvtDToKSKSK::propagatorsigma500(
double sa,
double sb,
double sc,
double prop[2]) {
412 double f = 0.5843+1.6663*sa;
413 const double M = 0.9264;
414 const double mass2 = 0.85821696;
415 const double mpi2d2 = 0.00973989245;
416 double g1 =
f*(sa-mpi2d2)/(mass2-mpi2d2)*
exp((mass2-sa)/1.082);
417 double rho1s[2], rho1M[2], rho2s[2], rho2M[2], rho1[2], rho2[2];
418 rhoab(sa,sb,sc,rho1s);
419 rhoab(mass2,sb,sc,rho1M);
422 Com_Divide(rho1s,rho1M,rho1);
423 Com_Divide(rho2s,rho2M,rho2);
427 b[0] = mass2-sa+M*(
g1*rho1[1]+0.0024*rho2[1]);
428 b[1] = -M*(
g1*rho1[0]+0.0024*rho2[0]);
429 Com_Divide(a,
b,prop);
432 void EvtDToKSKSK::getprop(
double sa,
double sb,
double sc,
double mass,
double width,
double prop[2]){
433 double prop1[2], prop2[2];
434 propagatorGS(mass,width,sa,sb,sc,9.0,prop1);
435 propagatorRBW(0.783,0.008,sa,sb,sc,3.0,1,prop2);
436 double coef_omega[2];
437 coef_omega[0] = rho_omega*
cos(phi_omega),
438 coef_omega[1] = rho_omega*
sin(phi_omega);
441 Com_Multi(coef_omega,prop2,temp);
442 temp[0] =
one[0] + 0.783*0.783*temp[0];
443 temp[1] =
one[1] + 0.783*0.783*temp[1];
444 Com_Multi(prop1,temp,prop);
447double EvtDToKSKSK::DDalitz(
double P1[4],
double P2[4],
double P3[4],
int Ang,
double mass){
449 double temp_PDF, v_re;
452 double B[2], s1, s2, s3, sR, sD;
453 for(
int i=0; i<4; i++){
454 pR[i] = P1[i] + P2[i];
455 pD[i] = pR[i] + P3[i];
463 for(
int i=0; i!=4; i++){
464 for(
int j=0; j!=4; j++){
466 if(i==0) G[i][j] = 1;
478 B[0] = barrier(1,sR,s1,s2,3.0,mass);
479 B[1] = barrier(1,sD,sR,s3,5.0,mD0);
484 for(
int i=0; i<4; i++){
485 temp_PDF += t1[i]*T1[i]*G[i][i];
489 B[0] = barrier(2,sR,s1,s2,3.0,mass);
490 B[1] = barrier(2,sD,sR,s3,5.0,mD0);
491 double t2[4][4], T2[4][4];
495 for(
int i=0; i<4; i++){
496 for(
int j=0; j<4; j++){
497 temp_PDF += t2[i][j]*T2[j][i]*G[i][i]*G[j][j];
501 v_re = temp_PDF*
B[0]*
B[1];
507void EvtDToKSKSK::calEva(
double* Ks01,
double* Ks02,
double* Kp,
double *mass1,
double *width1,
double *amp,
double *phase,
int* g0,
int* spin,
int* modetype,
int nstates,
double & Result)
510 double P23[4], P13[4], P12[4];
512 double cof[2], amp_PDF[2], PDF[2];
514 for(
int i=0; i<4; i++){
515 P12[i] = Ks01[i] + Ks02[i];
516 P13[i] = Ks01[i] + Kp[i];
517 P23[i] = Ks02[i]+ Kp[i];
519 s12 = SCADot(P12,P12);
520 s13 = SCADot(P13,P13);
521 s23 = SCADot(P23,P23);
523 s1 = SCADot(Ks01,Ks01);
524 s2 = SCADot(Ks02,Ks02);
526 double pro[2], temp_PDF, amp_tmp[2];
527 double pro1[2], temp_PDF1,pro2[2], temp_PDF2;
528 double pro3[2], temp_PDF3,pro4[2], temp_PDF4;
529 double pro5[2], temp_PDF5,pro6[2], temp_PDF6;
530 double pro7[2], temp_PDF7,pro8[2], temp_PDF8;
531 double pro9[2], temp_PDF9,pro10[2], temp_PDF10;
539 for(
int i=0; i<3; i++) {
542 cof[0] = amp[i]*
cos(phase[i]);
543 cof[1] = amp[i]*
sin(phase[i]);
545 if(modetype[i] == 12){
546 temp_PDF1 = DDalitz(Ks01, Kp, Ks02, spin[i], mass1[i]);
547 if(g0[i]==1) propagatorFlatte(mass1[i],width1[i],s13,s1,s3,pro1);
550 double skm2[2]={s1, mass_EtaP *mass_EtaP};
551 double spi2[2]={s2, mass_Kaon *mass_Kaon};
552 propagatorKstr1430(mass1[i],
s12,skm2,spi2,pro1);
554 if(g0[i]==4) KPiSLASS(
s12,s1,s2,pro1);
560 temp_PDF2 = DDalitz(Ks02, Kp, Ks01, spin[i], mass1[i]);
561 if(g0[i]==1) propagatorFlatte(mass1[i],width1[i],
s23,s2,s3,pro2);
564 double skm2[2]={s1, mass_EtaP *mass_EtaP};
565 double spi2[2]={s3, mass_Kaon *mass_Kaon};
566 propagatorKstr1430(mass1[i],s13,skm2,spi2,pro2);
568 if(g0[i]==4) KPiSLASS(s13,s1,s3,pro2);
573 amp_tmp[0] = temp_PDF1*pro1[0] + temp_PDF2*pro2[0];
574 amp_tmp[1] = temp_PDF1*pro1[1] + temp_PDF2*pro2[1];
578 if(modetype[i] == 123){
579 temp_PDF3 = DDalitz(Ks01, Kp, Ks02, spin[i], mass1[i]);
580 if(g0[i]==1) propagatorGS(mass1[i],width1[i],s13,s1,s3,9.0,pro3);
582 double skm2[2]={s1, mass_EtaP *mass_EtaP};
583 double spi2[2]={s2, mass_Kaon *mass_Kaon};
584 propagatorKstr1430(mass1[i],
s12,skm2,spi2,pro3);
586 if(g0[i]==4) KPiSLASS(
s12,s1,s2,pro3);
592 temp_PDF4 = DDalitz(Ks02, Kp, Ks01, spin[i], mass1[i]);
593 if(g0[i]==1) propagatorGS(mass1[i],width1[i],
s23,s2,s3,9.0,pro4);
596 double skm2[2]={s1, mass_EtaP *mass_EtaP};
597 double spi2[2]={s3, mass_Kaon *mass_Kaon};
598 propagatorKstr1430(mass1[i],s13,skm2,spi2,pro2);
600 if(g0[i]==4) KPiSLASS(s13,s1,s3,pro2);
605 amp_tmp[0] = temp_PDF3*pro3[0] + temp_PDF4*pro4[0];
606 amp_tmp[1] = temp_PDF3*pro3[1] + temp_PDF4*pro4[1];
609 if(modetype[i] == 122){
614 Com_Multi(amp_tmp,cof,amp_PDF);
615 PDF[0] += amp_PDF[0];
616 PDF[1] += amp_PDF[1];
620 double value = PDF[0]*PDF[0] + PDF[1]*PDF[1];
622 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")
character *LEPTONflag integer iresonances real zeta5 real a0
EvtComplex exp(const EvtComplex &c)
*******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 getName(std::string &name)
void decay(EvtParticle *p)
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)
const EvtVector4R & getP4() const
EvtParticle * getDaug(int i)
double initializePhaseSpace(int numdaughter, EvtId *daughters, double poleSize=-1., int whichTwo1=0, int whichTwo2=1)
double double double double * s12
double double double double double * s23
double precision pisqo6 one