37 model_name=
"D0ToKSpi0pi0";
54 phi[1] = 1.909216566958711;
55 phi[2] = -0.8081590353388339;
56 phi[3] = 2.126592957692503;
57 phi[4] = 0.7470081100599959;
58 phi[5] = -1.273770267344803;
59 phi[6] = 3.876999878268513;
60 phi[7] = 1.712738611706015;
61 phi[8] = 3.535638541429866;
64 rho[1] = -0.7991234523501731;
65 rho[2] = 1.610923317098042;
66 rho[3] = 2.517733001548718;
67 rho[4] = 1.872650170591211;
68 rho[5] = 3.852313089825635;
69 rho[6] = 1.604840470437296;
70 rho[7] = 3.12863961830903;
71 rho[8] = 2.195243023813692;
119 mass_Pion2 = 0.0194797849;
120 mass_2Pion = 0.27914;
121 math_2pi = 6.2831852;
131 int GG[4][4] = { {1,0,0,0}, {0,-1,0,0}, {0,0,-1,0}, {0,0,0,-1} };
132 for (
int i=0; i<4; i++) {
133 for (
int j=0; j<4; j++) {
183 double P1[4], P2[4], P3[4];
184 P1[0] = D1.
get(0); P1[1] = D1.
get(1); P1[2] = D1.
get(2); P1[3] = D1.
get(3);
185 P2[0] = D2.
get(0); P2[1] = D2.
get(1); P2[2] = D2.
get(2); P2[3] = D2.
get(3);
186 P3[0] = D3.
get(0); P3[1] = D3.
get(1); P3[2] = D3.
get(2); P3[3] = D3.
get(3);
190 int g0[9]={1,1,1,4,1,500,4,2,2};
191 int spin[9]={1,1,2,0,1,0,0,0,2};
192 double r0[9]={3.0,3.0,3.0,3.0,3.0,3.0,3.0,3.0,3.0};
193 double r1[9]={5.0,5.0,5.0,5.0,5.0,5.0,5.0,5.0,5.0};
195 calEva(P1, P2, P3, mass, width, rho, phi, g0, spin, modetype, nstates, value,r0,r1);
201void EvtD0ToKSpi0pi0::Com_Multi(
double a1[2],
double a2[2],
double res[2])
203 res[0] = a1[0]*a2[0]-a1[1]*a2[1];
204 res[1] = a1[1]*a2[0]+a1[0]*a2[1];
206void EvtD0ToKSpi0pi0::Com_Divide(
double a1[2],
double a2[2],
double res[2])
208 double tmp = a2[0]*a2[0]+a2[1]*a2[1];
209 res[0] = (a1[0]*a2[0]+a1[1]*a2[1])/tmp;
210 res[1] = (a1[1]*a2[0]-a1[0]*a2[1])/tmp;
214double EvtD0ToKSpi0pi0::SCADot(
double a1[4],
double a2[4])
216 double _cal = a1[0]*a2[0]-a1[1]*a2[1]-a1[2]*a2[2]-a1[3]*a2[3];
219double EvtD0ToKSpi0pi0::barrier(
int l,
double sa,
double sb,
double sc,
double r,
double mass)
221 double q = fabs((sa+sb-sc)*(sa+sb-sc)/(4*sa)-sb);
226 double q0 = fabs((sa0+sb-sc)*(sa0+sb-sc)/(4*sa0)-sb);
230 if(l == 1) F = sqrt((1+z0)/(1+z));
231 if(l == 2) F = sqrt((9+3*z0+z0*z0)/(9+3*z+z*z));
235void EvtD0ToKSpi0pi0::calt1(
double daug1[4],
double daug2[4],
double t1[4])
239 for(
int i=0; i<4; i++) {
240 pa[i] = daug1[i] + daug2[i];
241 qa[i] = daug1[i] - daug2[i];
246 for(
int i=0; i<4; i++) {
247 t1[i] = qa[i] - tmp*pa[i];
250void EvtD0ToKSpi0pi0::calt2(
double daug1[4],
double daug2[4],
double t2[4][4])
254 calt1(daug1,daug2,t1);
255 r = SCADot(t1,t1)/3.0;
256 for(
int i=0; i<4; i++) {
257 pa[i] = daug1[i] + daug2[i];
260 for(
int i=0; i<4; i++) {
261 for(
int j=0; j<4; j++) {
262 t2[i][j] = t1[i]*t1[j] - r*(G[i][j]-pa[i]*pa[j]/p);
267void EvtD0ToKSpi0pi0::propagator(
double mass2,
double mass,
double width,
double sx,
double prop[2])
274 Com_Divide(a,
b,prop);
276double EvtD0ToKSpi0pi0::wid(
double mass2,
double mass,
double sa,
double sb,
double sc,
double r2,
int l)
281 double tmp1 = sa+tmp;
282 double q = fabs(0.25*tmp1*tmp1/sa-sb);
283 double tmp2 = mass2+tmp;
284 double q0 = fabs(0.25*tmp2*tmp2/mass2-sb);
288 if(l == 0) {widm = sqrt(
t)*
mass/m;}
289 else if(l == 1) {widm =
t*sqrt(
t)*
mass/m*(1+z0)/(1+z);}
290 else if(l == 2) {widm =
t*
t*sqrt(
t)*
mass/m*(9+3*z0+z0*z0)/(9+3*z+z*z);}
293double EvtD0ToKSpi0pi0::widl1(
double mass2,
double mass,
double sa,
double sb,
double sc,
double r2)
298 double tmp1 = sa+tmp;
299 double q = fabs(0.25*tmp1*tmp1/sa-sb);
300 double tmp2 = mass2+tmp;
301 double q0 = fabs(0.25*tmp2*tmp2/mass2-sb);
304 double F = (1+z0)/(1+z);
306 widm =
t*sqrt(
t)*
mass/m*F;
309void EvtD0ToKSpi0pi0::propagatorRBW(
double mass,
double width,
double sa,
double sb,
double sc,
double r2,
int l,
double prop[2])
316 b[1] = -
mass*width*wid(mass2,mass,sa,sb,sc,r2,l);
317 Com_Divide(a,
b,prop);
320void EvtD0ToKSpi0pi0::propagatorFlatte(
double mass,
double width,
double sa,
double prop[2]){
322 double rhoPi[2], rhoKa[2];
324 q2_Pi = 0.25*sa-mPi*mPi;
325 q2_Ka = 0.25*sa-mKa*mKa;
328 rhoPi[0] = 2.0*sqrt(q2_Pi/sa);
333 rhoPi[1] = 2.0*sqrt(-q2_Pi/sa);
337 rhoKa[0] = 2.0*sqrt(q2_Ka/sa);
342 rhoKa[1] = 2.0*sqrt(-q2_Ka/sa);
348 b[0] =
mass*
mass - sa + 0.165*rhoPi[1] + 0.69465*rhoKa[1];
349 b[1] = - (0.165*rhoPi[0] + 0.69465*rhoKa[0]);
350 Com_Divide(a,
b,prop);
353void EvtD0ToKSpi0pi0::rhoab(
double sa,
double sb,
double sc,
double res[2]) {
354 double tmp = sa+sb-sc;
355 double q = 0.25*tmp*tmp/sa-sb;
357 res[0]=2.0*sqrt(
q/sa);
361 res[1]=2.0*sqrt(-
q/sa);
364void EvtD0ToKSpi0pi0::rho4Pi(
double sa,
double res[2]) {
365 double temp = 1.0-0.3116765584/sa;
367 res[0]=sqrt(temp)/(1.0+
exp(9.8-3.5*sa));
371 res[1]=sqrt(-temp)/(1.0+
exp(9.8-3.5*sa));
375void EvtD0ToKSpi0pi0::propagatorsigma500(
double sa,
double sb,
double sc,
double prop[2]) {
376 double f = 0.5843+1.6663*sa;
377 const double M = 0.9264;
378 const double mass2 = 0.85821696;
379 const double mpi2d2 = 0.00973989245;
380 double g1 =
f*(sa-mpi2d2)/(mass2-mpi2d2)*
exp((mass2-sa)/1.082);
381 double rho1s[2], rho1M[2], rho2s[2], rho2M[2], rho1[2], rho2[2];
382 rhoab(sa,sb,sc,rho1s);
383 rhoab(mass2,sb,sc,rho1M);
386 Com_Divide(rho1s,rho1M,rho1);
387 Com_Divide(rho2s,rho2M,rho2);
391 b[0] = mass2-sa+M*(
g1*rho1[1]+0.0024*rho2[1]);
392 b[1] = -M*(
g1*rho1[0]+0.0024*rho2[0]);
393 Com_Divide(a,
b,prop);
395void EvtD0ToKSpi0pi0::Flatte_rhoab(
double sa,
double sb,
double rho[2])
397 double q = 1.0-(4*sb/sa);
409void EvtD0ToKSpi0pi0::propagator980(
double mass,
double sx,
double *sb,
double prop[2])
411 double gpipi1 = 2.0/3.0*0.165;
412 double gpipi2 = 1.0/3.0*0.165;
413 double gKK1 = 0.5*0.69465;
414 double gKK2 = 0.5*0.69465;
416 double unit[2]={1.0};
419 Flatte_rhoab(sx,sb[0],rho1);
421 Flatte_rhoab(sx,sb[1],rho2);
423 Flatte_rhoab(sx,sb[2],rho3);
425 Flatte_rhoab(sx,sb[3],rho4);
427 double tmp1[2]={gpipi1,0};
429 double tmp2[2]={gpipi2,0};
431 double tmp3[2]={gKK1,0};
433 double tmp4[2]={gKK2,0};
436 Com_Multi(tmp1,rho1,tmp11);
437 Com_Multi(tmp2,rho2,tmp22);
438 Com_Multi(tmp3,rho3,tmp33);
439 Com_Multi(tmp4,rho4,tmp44);
441 double tmp5[2]={tmp11[0]+tmp22[0]+tmp33[0]+tmp44[0],tmp11[1]+tmp22[1]+tmp33[1]+tmp44[1]};
443 Com_Multi(tmp5, ci,tmp51);
444 double tmp6[2]={
mass*
mass-sx-tmp51[0], -1.0*tmp51[1]};
446 Com_Divide(
unit,tmp6, prop);
450void EvtD0ToKSpi0pi0::KPiSLASS(
double sa,
double sb,
double sc,
double prop[2])
452 const double m1430 = 1.441;
453 const double sa0 = 2.076481;
454 const double w1430 = 0.193;
455 const double Lass1 = 0.25/sa0;
457 double tmp1 = sa0+tmp;
458 double q0 = fabs(Lass1*tmp1*tmp1-sb);
459 double tmp2 = sa+tmp;
460 double qs = 0.25*tmp2*tmp2/sa-sb;
462 double width = w1430*
q*m1430/sqrt(sa*q0);
463 double temp_R = atan(m1430*width/(sa0-sa));
464 if(temp_R<0) temp_R += math_pi;
465 double deltaR = -109.7*math_pi/180.0 + temp_R;
466 double temp_F = atan(0.226*
q/(2.0-3.8194*qs));
467 if(temp_F<0) temp_F += math_pi;
468 double deltaF = 0.1*math_pi/180.0 + temp_F;
469 double deltaS = deltaR + 2.0*deltaF;
470 double t1 = 0.96*
sin(deltaF);
471 double t2 =
sin(deltaR);
477 prop[0] = t1*CF[0] + t2*
CS[0];
478 prop[1] = t1*CF[1] + t2*
CS[1];
481void EvtD0ToKSpi0pi0::propagatorGS(
double mass2,
double mass,
double width,
double sa,
double sb,
double sc,
double r2,
double prop[2])
485 double tmp1 = sa+tmp;
486 double q2 = fabs(0.25*tmp1*tmp1/sa-sb);
488 double tmp2 = mass2+tmp;
489 double q02 = fabs(0.25*tmp2*tmp2/mass2-sb);
492 double q0 = sqrt(q02);
495 double tmp3 = log(mass+2*q0)+1.2926305904;
497 double h = GS1*
q/m*(log(m+2*
q)+1.2926305904);
498 double h0 = GS1*q0/
mass*tmp3;
499 double dh = h0*(0.125/q02-0.5/mass2)+GS3/mass2;
500 double d = GS2/q02*tmp3+GS3*
mass/q0-GS4*
mass/q03;
501 double f = mass2/q03*(q2*(h-h0)+(mass2-sa)*q02*dh);
503 a[0] = 1.0+d*width/
mass;
505 b[0] = mass2-sa+width*
f;
506 b[1] = -
mass*width*widl1(mass2,mass,sa,sb,sc,r2);
507 Com_Divide(a,
b,prop);
510double EvtD0ToKSpi0pi0::DDalitz(
double P1[4],
double P2[4],
double P3[4],
int Ang,
double mass){
512 double temp_PDF, v_re;
515 double B[2], s1, s2, s3, sR, sD;
516 for(
int i=0; i<4; i++){
517 pR[i] = P1[i] + P2[i];
518 pD[i] = pR[i] + P3[i];
526 for(
int i=0; i!=4; i++){
527 for(
int j=0; j!=4; j++){
529 if(i==0) G[i][j] = 1;
541 B[0] = barrier(1,sR,s1,s2,3.0,mass);
542 B[1] = barrier(1,sD,sR,s3,5.0,mD0);
547 for(
int i=0; i<4; i++){
548 temp_PDF += t1[i]*T1[i]*G[i][i];
552 B[0] = barrier(2,sR,s1,s2,3.0,mass);
553 B[1] = barrier(2,sD,sR,s3,5.0,mD0);
554 double t2[4][4], T2[4][4];
558 for(
int i=0; i<4; i++){
559 for(
int j=0; j<4; j++){
560 temp_PDF += t2[i][j]*T2[j][i]*G[i][i]*G[j][j];
564 v_re = temp_PDF*
B[0]*
B[1];
568void EvtD0ToKSpi0pi0::calEva(
double* Ks0,
double* Pi01,
double* Pi02,
double *mass1,
double *width1,
double *amp,
double *phase,
int* g0,
int* spin,
int* modetype,
int nstates,
double & Result ,
double*r0 ,
double*r1)
571 double P12[4], P23[4], P13[4];
572 double cof[2], amp_PDF[2], PDF[2];
576 for(
int i=0; i<4; i++){
577 P12[i] = Ks0[i] + Pi01[i];
578 P13[i] = Ks0[i] + Pi02[i];
579 P23[i] = Pi01[i] + Pi02[i];
581 s1 = SCADot(Ks0,Ks0);
582 s2 = SCADot(Pi01,Pi01);
583 s3 = SCADot(Pi02,Pi02);
585 s12 = SCADot(P12,P12);
586 s13 = SCADot(P13,P13);
587 s23 = SCADot(P23,P23);
589 double pro[2], temp_PDF, pro1[2], temp_PDF1, pro2[2], temp_PDF2, amp_tmp[2];
597 for(
int i=0; i<nstates; i++) {
600 mass1sq = mass1[i]*mass1[i];
601 cof[0] = amp[i]*
cos(phase[i]);
602 cof[1] = amp[i]*
sin(phase[i]);
605 if(modetype[i] == 12){
606 temp_PDF1 = DDalitz(Ks0, Pi01, Pi02, spin[i], mass1[i]);
607 if(g0[i]==1) propagatorRBW(mass1[i],width1[i],
s12,s1,s2,rRes2,spin[i],pro1);
608 if(g0[i]==4) KPiSLASS(
s12,s1,s2,pro1);
614 temp_PDF2 = DDalitz(Ks0, Pi02, Pi01, spin[i], mass1[i]);
615 if(g0[i]==1) propagatorRBW(mass1[i],width1[i],s13,s1,s3,rRes2,spin[i],pro2);
616 if(g0[i]==4) KPiSLASS(s13,s1,s3,pro2);
621 amp_tmp[0] = temp_PDF1*pro1[0] + temp_PDF2*pro2[0];
622 amp_tmp[1] = temp_PDF1*pro1[1] + temp_PDF2*pro2[1];
625 if(modetype[i] == 23){
626 temp_PDF = DDalitz(Pi01, Pi02, Ks0, spin[i], mass1[i]);
627 if(g0[i]==4) propagatorFlatte(mass1[i],width1[i],
s23,pro);
628 if(g0[i]==2) propagatorRBW(mass1[i],width1[i],
s23,s2,s3,rRes2,spin[i],pro);
634 if(g0[i]==500) propagatorsigma500(
s23, s2, s3, pro);
635 if(g0[i]!=6) amp_tmp[0] = temp_PDF*pro[0];
636 if(g0[i]!=6) amp_tmp[1] = temp_PDF*pro[1];
639 if(modetype[i] == 132){
640 KPiSLASS(s13,s1,s3,Amp_KPiS);
641 amp_tmp[0] = Amp_KPiS[0];
642 amp_tmp[1] = Amp_KPiS[1];
645 Com_Multi(amp_tmp,cof,amp_PDF);
646 PDF[0] += amp_PDF[0];
647 PDF[1] += amp_PDF[1];
650 double value = PDF[0]*PDF[0] + PDF[1]*PDF[1];
651 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)
virtual ~EvtD0ToKSpi0pi0()
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)
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