34 model_name=
"DToKSKSK";
115 double P1[4], P2[4], P3[4];
116 P1[0] = D1.
get(0); P1[1] = D1.
get(1); P1[2] = D1.
get(2); P1[3] = D1.
get(3);
117 P2[0] = D2.
get(0); P2[1] = D2.
get(1); P2[2] = D2.
get(2); P2[3] = D2.
get(3);
118 P3[0] = D3.
get(0); P3[1] = D3.
get(1); P3[2] = D3.
get(2); P3[3] = D3.
get(3);
124 calEva(P1, P2, P3, mass, width, rho, phi, g0, spin, modetype, nstates, value);
130void EvtDToKSKSK::Com_Multi(
double a1[2],
double a2[2],
double res[2])
132 res[0] = a1[0]*a2[0]-a1[1]*a2[1];
133 res[1] = a1[1]*a2[0]+a1[0]*a2[1];
135void EvtDToKSKSK::Com_Divide(
double a1[2],
double a2[2],
double res[2])
137 double tmp = a2[0]*a2[0]+a2[1]*a2[1];
138 res[0] = (a1[0]*a2[0]+a1[1]*a2[1])/tmp;
139 res[1] = (a1[1]*a2[0]-a1[0]*a2[1])/tmp;
142double EvtDToKSKSK::SCADot(
double a1[4],
double a2[4])
144 double _cal = a1[0]*a2[0]-a1[1]*a2[1]-a1[2]*a2[2]-a1[3]*a2[3];
147double EvtDToKSKSK::barrier(
int l,
double sa,
double sb,
double sc,
double r,
double mass)
149 double q = (sa+sb-sc)*(sa+sb-sc)/(4*sa)-sb;
155 double q0 = (sa0+sb-sc)*(sa0+sb-sc)/(4*sa0)-sb;
160 if(l == 1) F = sqrt((1+z0)/(1+z));
161 if(l == 2) F = sqrt((9+3*z0+z0*z0)/(9+3*z+z*z));
165void EvtDToKSKSK::calt1(
double daug1[4],
double daug2[4],
double t1[4])
169 for(
int i=0; i<4; i++) {
170 pa[i] = daug1[i] + daug2[i];
171 qa[i] = daug1[i] - daug2[i];
176 for(
int i=0; i<4; i++) {
177 t1[i] = qa[i] - tmp*pa[i];
181void EvtDToKSKSK::calt2(
double daug1[4],
double daug2[4],
double t2[4][4])
185 calt1(daug1,daug2,t1);
186 r = SCADot(t1,t1)/3.0;
187 for(
int i=0; i<4; i++) {
188 pa[i] = daug1[i] + daug2[i];
191 for(
int i=0; i<4; i++) {
192 for(
int j=0; j<4; j++) {
193 t2[i][j] = t1[i]*t1[j] - r*(G[i][j]-pa[i]*pa[j]/p);
198 void EvtDToKSKSK::propagatorCBW(
double mass,
double width,
double sx,
double prop[2])
205 Com_Divide(a,
b,prop);
209double EvtDToKSKSK::wid(
double mass2,
double mass,
double sa,
double sb,
double sc,
double r2,
int l)
214 double tmp1 = sa+tmp;
215 double q = fabs(0.25*tmp1*tmp1/sa-sb);
216 double tmp2 = mass2+tmp;
217 double q0 = fabs(0.25*tmp2*tmp2/mass2-sb);
222 if(l == 0) {widm = sqrt(
t)*
mass/m;}
223 else if(l == 1) {widm =
t*sqrt(
t)*
mass/m*(1+z0)/(1+z);}
224 else if(l == 2) {widm =
t*
t*sqrt(
t)*
mass/m*(9+3*z0+z0*z0)/(9+3*z+z*z);}
227double EvtDToKSKSK::widl1(
double mass2,
double mass,
double sa,
double sb,
double sc,
double r2)
232 double tmp1 = sa+tmp;
233 double q = fabs(0.25*tmp1*tmp1/sa-sb);
234 double tmp2 = mass2+tmp;
235 double q0 = fabs(0.25*tmp2*tmp2/mass2-sb);
238 double F = (1+z0)/(1+z);
240 widm =
t*sqrt(
t)*
mass/m*F;
244 void EvtDToKSKSK::propagatorRBW(
double mass,
double width,
double sa,
double sb,
double sc,
double r2,
int l,
double prop[2])
252 b[1] = -
mass*width*wid(mass2,mass,sa,sb,sc,r2,l);
253 Com_Divide(a,
b,prop);
256void EvtDToKSKSK::propagatorFlatte(
double mass,
double width,
double sa,
double sb,
double sc,
double prop[2]){
258 rhoab=1.0/sa*sqrt((sa-(0.547862+0.139570)*(0.547862+0.139570))*(sa-(0.547862-0.139570)*(0.547862-0.139570)));
259 rhoKK=1.0/sa*sqrt((sa-(0.497611+0.493677)*(0.497611+0.493677))*(sa-(0.497611-0.493677)*(0.497611-0.493677)));
264 b[1] = - (0.324*0.324*rhoab+ 1.03*0.324*0.324*rhoKK);
265 Com_Divide(a,
b,prop);
268 void EvtDToKSKSK::propagatorGS(
double mass,
double width,
double sa,
double sb,
double sc,
double r2,
double prop[2])
273 double tmp1 = sa+tmp;
274 double q2 = fabs(0.25*tmp1*tmp1/sa-sb);
275 double tmp2 = mass2+tmp;
276 double q02 = fabs(0.25*tmp2*tmp2/mass2-sb);
278 double q0 = sqrt(q02);
281 double tmp3 = log(mass+2*q0)+0.0087501713;
282 double h = GS1*
q/m*(log(m+2*
q)+0.0087501713);
283 double h0 = GS1*q0/
mass*tmp3;
284 double dh = h0*(0.125/q02-0.5/mass2)+GS3/mass2;
285 double d = GS2/q02*tmp3+GS3*
mass/q0-GS4*
mass/q03;
286 double f = mass2/q03*(q2*(h-h0)+(mass2-sa)*q02*dh);
287 a[0] = 1.0+d*width/
mass;
289 b[0] = mass2-sa+width*
f;
290 b[1] = -
mass*width*widl1(mass2,mass,sa,sb,sc,r2);
291 Com_Divide(a,
b,prop);
294 void EvtDToKSKSK::PiPiSWASS(
double sa,
double sb,
double sc,
double prop[2]) {
296 double tmp2 = sa+tmp;
297 double qs = 0.25*tmp2*tmp2/sa-sb;
299 double a0 = -0.11/mass_Pion;
300 prop[0] = 1/(1+a0*a0*
q*
q);
301 prop[1] = a0*
q/(1+a0*a0*
q*
q);
304 void EvtDToKSKSK::KPiSLASS(
double sa,
double sb,
double sc,
double prop[2]) {
305 const double m1430 = 1.441;
306 const double sa0 = 2.076481;
307 const double w1430 = 0.193;
308 const double Lass1 = 0.25/sa0;
310 double tmp1 = sa0+tmp;
311 double q0 = fabs(Lass1*tmp1*tmp1-sb);
312 double tmp2 = sa+tmp;
313 double qs = 0.25*tmp2*tmp2/sa-sb;
315 double width = w1430*
q*m1430/sqrt(sa*q0);
316 double temp_R = atan(m1430*width/(sa0-sa));
317 if(temp_R<0) temp_R += math_K;
318 double deltaR = -109.7*math_K/180.0 + temp_R;
319 double temp_F = atan(0.226*
q/(2.0-3.8194*qs));
320 if(temp_F<0) temp_F += math_K;
321 double deltaF = 0.1*math_K/180.0 + temp_F;
322 double deltaS = deltaR + 2.0*deltaF;
323 double t1 = 0.96*
sin(deltaF);
324 double t2 =
sin(deltaR);
330 prop[0] = t1*CF[0] + t2*
CS[0];
331 prop[1] = t1*CF[1] + t2*
CS[1];
334 void EvtDToKSKSK::Flatte_rhoab(
double sa,
double sb,
double sc,
double rho[2]){
335 double q = (sa+sb-sc)*(sa+sb-sc)/(4*sa)-sb;
337 rho[0]=2* sqrt(
q/sa);
342 rho[1]=2*sqrt(-
q/sa);
346 void EvtDToKSKSK::propagatorKstr1430(
double mass,
double sx,
double *sb,
double *sc,
double prop[2])
348 double unit[2]={1.0};
351 Flatte_rhoab(sx,sb[0],sc[0],rho1);
353 Flatte_rhoab(sx,sb[1],sc[1],rho2);
354 double gKPi_Kstr1430=0.2990, gEtaPK_Kstr1430=0.0529;
355 double tmp1[2]={gKPi_Kstr1430,0};
357 double tmp2[2]={gEtaPK_Kstr1430,0};
359 Com_Multi(tmp1,rho1,tmp11);
360 Com_Multi(tmp2,rho2,tmp22);
361 double tmp3[2]={tmp11[0]+tmp22[0],tmp11[1]+tmp22[1]};
363 Com_Multi(tmp3, ci,tmp31);
364 double tmp4[2]={
mass*
mass-sx-tmp31[0], -1.0*tmp31[1]};
365 Com_Divide(
unit,tmp4, prop);
367 void EvtDToKSKSK::rhoab(
double sa,
double sb,
double sc,
double res[2]) {
368 double tmp = sa+sb-sc;
369 double q = 0.25*tmp*tmp/sa-sb;
371 res[0]=2.0*sqrt(
q/sa);
375 res[1]=2.0*sqrt(-
q/sa);
378 void EvtDToKSKSK::rho4Pi(
double sa,
double res[2]) {
379 double temp = 1.0-0.3116765584/sa;
381 res[0]=sqrt(temp)/(1.0+
exp(9.8-3.5*sa));
385 res[1]=sqrt(-temp)/(1.0+
exp(9.8-3.5*sa));
389 void EvtDToKSKSK::propagatorsigma500(
double sa,
double sb,
double sc,
double prop[2]) {
390 double f = 0.5843+1.6663*sa;
391 const double M = 0.9264;
392 const double mass2 = 0.85821696;
393 const double mpi2d2 = 0.00973989245;
394 double g1 =
f*(sa-mpi2d2)/(mass2-mpi2d2)*
exp((mass2-sa)/1.082);
395 double rho1s[2], rho1M[2], rho2s[2], rho2M[2], rho1[2], rho2[2];
396 rhoab(sa,sb,sc,rho1s);
397 rhoab(mass2,sb,sc,rho1M);
400 Com_Divide(rho1s,rho1M,rho1);
401 Com_Divide(rho2s,rho2M,rho2);
405 b[0] = mass2-sa+M*(
g1*rho1[1]+0.0024*rho2[1]);
406 b[1] = -M*(
g1*rho1[0]+0.0024*rho2[0]);
407 Com_Divide(a,
b,prop);
410 void EvtDToKSKSK::getprop(
double sa,
double sb,
double sc,
double mass,
double width,
double prop[2]){
411 double prop1[2], prop2[2];
412 propagatorGS(mass,width,sa,sb,sc,9.0,prop1);
413 propagatorRBW(0.783,0.008,sa,sb,sc,3.0,1,prop2);
414 double coef_omega[2];
415 coef_omega[0] = rho_omega*
cos(phi_omega),
416 coef_omega[1] = rho_omega*
sin(phi_omega);
419 Com_Multi(coef_omega,prop2,temp);
420 temp[0] =
one[0] + 0.783*0.783*temp[0];
421 temp[1] =
one[1] + 0.783*0.783*temp[1];
422 Com_Multi(prop1,temp,prop);
425double EvtDToKSKSK::DDalitz(
double P1[4],
double P2[4],
double P3[4],
int Ang,
double mass){
427 double temp_PDF, v_re;
430 double B[2], s1, s2, s3, sR, sD;
431 for(
int i=0; i<4; i++){
432 pR[i] = P1[i] + P2[i];
433 pD[i] = pR[i] + P3[i];
441 for(
int i=0; i!=4; i++){
442 for(
int j=0; j!=4; j++){
444 if(i==0) G[i][j] = 1;
456 B[0] = barrier(1,sR,s1,s2,3.0,mass);
457 B[1] = barrier(1,sD,sR,s3,5.0,mD0);
462 for(
int i=0; i<4; i++){
463 temp_PDF += t1[i]*T1[i]*G[i][i];
467 B[0] = barrier(2,sR,s1,s2,3.0,mass);
468 B[1] = barrier(2,sD,sR,s3,5.0,mD0);
469 double t2[4][4], T2[4][4];
473 for(
int i=0; i<4; i++){
474 for(
int j=0; j<4; j++){
475 temp_PDF += t2[i][j]*T2[j][i]*G[i][i]*G[j][j];
479 v_re = temp_PDF*
B[0]*
B[1];
485void 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)
488 double P23[4], P13[4], P12[4];
490 double cof[2], amp_PDF[2], PDF[2];
492 for(
int i=0; i<4; i++){
493 P12[i] = Ks01[i] + Ks02[i];
494 P13[i] = Ks01[i] + Kp[i];
495 P23[i] = Ks02[i]+ Kp[i];
497 s12 = SCADot(P12,P12);
498 s13 = SCADot(P13,P13);
499 s23 = SCADot(P23,P23);
501 s1 = SCADot(Ks01,Ks01);
502 s2 = SCADot(Ks02,Ks02);
504 double pro[2], temp_PDF, amp_tmp[2];
505 double pro1[2], temp_PDF1,pro2[2], temp_PDF2;
506 double pro3[2], temp_PDF3,pro4[2], temp_PDF4;
507 double pro5[2], temp_PDF5,pro6[2], temp_PDF6;
508 double pro7[2], temp_PDF7,pro8[2], temp_PDF8;
509 double pro9[2], temp_PDF9,pro10[2], temp_PDF10;
517 for(
int i=0; i<3; i++) {
520 cof[0] = amp[i]*
cos(phase[i]);
521 cof[1] = amp[i]*
sin(phase[i]);
523 if(modetype[i] == 12){
524 temp_PDF1 = DDalitz(Ks01, Kp, Ks02, spin[i], mass1[i]);
525 if(g0[i]==1) propagatorFlatte(mass1[i],width1[i],s13,s1,s3,pro1);
528 double skm2[2]={s1, mass_EtaP *mass_EtaP};
529 double spi2[2]={s2, mass_Kaon *mass_Kaon};
530 propagatorKstr1430(mass1[i],
s12,skm2,spi2,pro1);
532 if(g0[i]==4) KPiSLASS(
s12,s1,s2,pro1);
538 temp_PDF2 = DDalitz(Ks02, Kp, Ks01, spin[i], mass1[i]);
539 if(g0[i]==1) propagatorFlatte(mass1[i],width1[i],
s23,s2,s3,pro2);
542 double skm2[2]={s1, mass_EtaP *mass_EtaP};
543 double spi2[2]={s3, mass_Kaon *mass_Kaon};
544 propagatorKstr1430(mass1[i],s13,skm2,spi2,pro2);
546 if(g0[i]==4) KPiSLASS(s13,s1,s3,pro2);
551 amp_tmp[0] = temp_PDF1*pro1[0] + temp_PDF2*pro2[0];
552 amp_tmp[1] = temp_PDF1*pro1[1] + temp_PDF2*pro2[1];
556 if(modetype[i] == 123){
557 temp_PDF3 = DDalitz(Ks01, Kp, Ks02, spin[i], mass1[i]);
558 if(g0[i]==1) propagatorGS(mass1[i],width1[i],s13,s1,s3,9.0,pro3);
560 double skm2[2]={s1, mass_EtaP *mass_EtaP};
561 double spi2[2]={s2, mass_Kaon *mass_Kaon};
562 propagatorKstr1430(mass1[i],
s12,skm2,spi2,pro3);
564 if(g0[i]==4) KPiSLASS(
s12,s1,s2,pro3);
570 temp_PDF4 = DDalitz(Ks02, Kp, Ks01, spin[i], mass1[i]);
571 if(g0[i]==1) propagatorGS(mass1[i],width1[i],
s23,s2,s3,9.0,pro4);
574 double skm2[2]={s1, mass_EtaP *mass_EtaP};
575 double spi2[2]={s3, mass_Kaon *mass_Kaon};
576 propagatorKstr1430(mass1[i],s13,skm2,spi2,pro2);
578 if(g0[i]==4) KPiSLASS(s13,s1,s3,pro2);
583 amp_tmp[0] = temp_PDF3*pro3[0] + temp_PDF4*pro4[0];
584 amp_tmp[1] = temp_PDF3*pro3[1] + temp_PDF4*pro4[1];
587 if(modetype[i] == 122){
592 Com_Multi(amp_tmp,cof,amp_PDF);
593 PDF[0] += amp_PDF[0];
594 PDF[1] += amp_PDF[1];
598 double value = PDF[0]*PDF[0] + PDF[1]*PDF[1];
600 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")
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