37 model_name=
"DTopipi0pi0";
53 phi[0] = 0.286656178602813;
54 phi[1] = -0.888625014448000;
55 phi[2] = -2.453879234281807;
56 phi[3] = -2.975162215957068;
58 phi[5] = 2.704379334027896;
60 rho[0] = 3.492106794347418;
61 rho[1] = 0.727208768061443;
62 rho[2] = 0.419996095917039;
63 rho[3] = 1.057515286243158;
65 rho[5] = 0.912113205640503;
102 mass_Pi0 = 0.1349766;
113 int GG[4][4] = { {1,0,0,0}, {0,-1,0,0}, {0,0,-1,0}, {0,0,0,-1} };
114 for (
int i=0; i<4; i++) {
115 for (
int j=0; j<4; j++) {
165 double P1[4], P2[4], P3[4];
166 P1[0] = D1.
get(0); P1[1] = D1.
get(1); P1[2] = D1.
get(2); P1[3] = D1.
get(3);
167 P2[0] = D2.
get(0); P2[1] = D2.
get(1); P2[2] = D2.
get(2); P2[3] = D2.
get(3);
168 P3[0] = D3.
get(0); P3[1] = D3.
get(1); P3[2] = D3.
get(2); P3[3] = D3.
get(3);
171 int g0[6]={2,3,1,1,2,2};
172 int spin[6]={0,0,0,2,1,1};
174 double r0[6]={3,3,3,3,3,3};
175 double r1[6]={5,5,5,5,5,5};
177 calEva(P1, P2, P3, mass, width, rho, phi, g0, spin, modetype, nstates, value,r0,r1);
183void EvtDTopipi0pi0::Com_Multi(
double a1[2],
double a2[2],
double res[2])
185 res[0] = a1[0]*a2[0]-a1[1]*a2[1];
186 res[1] = a1[1]*a2[0]+a1[0]*a2[1];
188void EvtDTopipi0pi0::Com_Divide(
double a1[2],
double a2[2],
double res[2])
190 double tmp = a2[0]*a2[0]+a2[1]*a2[1];
191 res[0] = (a1[0]*a2[0]+a1[1]*a2[1])/tmp;
192 res[1] = (a1[1]*a2[0]-a1[0]*a2[1])/tmp;
194double EvtDTopipi0pi0::SCADot(
double a1[4],
double a2[4])
196 double _cal = a1[0]*a2[0]-a1[1]*a2[1]-a1[2]*a2[2]-a1[3]*a2[3];
199double EvtDTopipi0pi0::barrier(
int l,
double sa,
double sb,
double sc,
double r,
double mass)
201 double q = (sa+sb-sc)*(sa+sb-sc)/(4*sa)-sb;
207 double q0 = (sa0+sb-sc)*(sa0+sb-sc)/(4*sa0)-sb;
208 if(q0 < 0) q0 = 1e-16;
212 if(l == 1) F = sqrt((1+z0)/(1+z));
213 if(l == 2) F = sqrt((9+3*z0+z0*z0)/(9+3*z+z*z));
217void EvtDTopipi0pi0::calt1(
double daug1[4],
double daug2[4],
double t1[4])
221 for(
int i=0; i<4; i++) {
222 pa[i] = daug1[i] + daug2[i];
223 qa[i] = daug1[i] - daug2[i];
228 for(
int i=0; i<4; i++) {
229 t1[i] = qa[i] - tmp*pa[i];
232void EvtDTopipi0pi0::calt2(
double daug1[4],
double daug2[4],
double t2[4][4])
236 calt1(daug1,daug2,t1);
237 r = SCADot(t1,t1)/3.0;
238 for(
int i=0; i<4; i++) {
239 pa[i] = daug1[i] + daug2[i];
242 for(
int i=0; i<4; i++) {
243 for(
int j=0; j<4; j++) {
244 t2[i][j] = t1[i]*t1[j] - r*(G[i][j]-pa[i]*pa[j]/p);
249void EvtDTopipi0pi0::propagator(
double mass2,
double mass,
double width,
double sx,
double prop[2])
256 Com_Divide(a,
b,prop);
258double EvtDTopipi0pi0::wid(
double mass2,
double mass,
double sa,
double sb,
double sc,
double r2,
int l)
263 double tmp1 = sa+tmp;
264 double q = 0.25*tmp1*tmp1/sa-sb;
266 double tmp2 = mass2+tmp;
267 double q0 = 0.25*tmp2*tmp2/mass2-sb;
272 if(l == 0) {widm = sqrt(
t)*
mass/m;}
273 else if(l == 1) {widm =
t*sqrt(
t)*
mass/m*(1+z0)/(1+z);}
274 else if(l == 2) {widm =
t*
t*sqrt(
t)*
mass/m*(9+3*z0+z0*z0)/(9+3*z+z*z);}
277double EvtDTopipi0pi0::widl1(
double mass2,
double mass,
double sa,
double sb,
double sc,
double r2)
282 double tmp1 = sa+tmp;
283 double q = 0.25*tmp1*tmp1/sa-sb;
285 double tmp2 = mass2+tmp;
286 double q0 = 0.25*tmp2*tmp2/mass2-sb;
290 double F = (1+z0)/(1+z);
292 widm =
t*sqrt(
t)*
mass/m*F;
295void EvtDTopipi0pi0::propagatorRBW(
double mass2,
double mass,
double width,
double sa,
double sb,
double sc,
double r2,
int l,
double prop[2])
301 b[1] = -
mass*width*wid(mass2,mass,sa,sb,sc,r2,l);
302 Com_Divide(a,
b,prop);
305void EvtDTopipi0pi0::propagatorFlatte(
double mass,
double width,
double sa,
double sb,
double sc,
int r,
double prop[2]){
307 double rhoab[2], rhoKsK[2];
308 q = 0.25*(sa+sb-sc)*(sa+sb-sc)/sa-sb;
309 if(r == 0) qKsK = 0.25*sa - 0.49368*0.49368;
310 if(r == 1) qKsK = 0.25*(sa + 3.899750596e-03)*(sa + 3.899750596e-03)/sa - 0.497614*0.497614;
312 rhoab[0] = 2*sqrt(
q/sa);
317 rhoab[1] = 2*sqrt(-
q/sa);
320 rhoKsK[0] = 2*sqrt(qKsK/sa);
325 rhoKsK[1] = 2*sqrt(-qKsK/sa);
330 b[0] =
mass*
mass - sa + 0.341*rhoab[1] + 0.892*0.341*rhoKsK[1];
331 b[1] = - (0.341*rhoab[0] + 0.892*0.341*rhoKsK[0]);
332 Com_Divide(a,
b,prop);
335void EvtDTopipi0pi0::rhoab(
double sa,
double sb,
double sc,
double res[2]) {
336 double tmp = sa+sb-sc;
337 double q = 0.25*tmp*tmp/sa-sb;
339 res[0]=2.0*sqrt(
q/sa);
343 res[1]=2.0*sqrt(-
q/sa);
346void EvtDTopipi0pi0::rho4Pi(
double sa,
double res[2]) {
347 double temp = 1.0-0.3116765584/sa;
349 res[0]=sqrt(temp)/(1.0+
exp(9.8-3.5*sa));
353 res[1]=sqrt(-temp)/(1.0+
exp(9.8-3.5*sa));
357void EvtDTopipi0pi0::propagatorsigma500(
double sa,
double sb,
double sc,
double prop[2]) {
358 double f = 0.5843+1.6663*sa;
359 const double M = 0.9264;
360 const double mass2 = 0.85821696;
361 const double mpi2d2 = 0.00973989245;
362 double g1 =
f*(sa-mpi2d2)/(mass2-mpi2d2)*
exp((mass2-sa)/1.082);
363 double rho1s[2], rho1M[2], rho2s[2], rho2M[2], rho1[2], rho2[2];
364 rhoab(sa,sb,sc,rho1s);
365 rhoab(mass2,sb,sc,rho1M);
368 Com_Divide(rho1s,rho1M,rho1);
369 Com_Divide(rho2s,rho2M,rho2);
373 b[0] = mass2-sa+M*(
g1*rho1[1]+0.0024*rho2[1]);
374 b[1] = -M*(
g1*rho1[0]+0.0024*rho2[0]);
375 Com_Divide(a,
b,prop);
377void EvtDTopipi0pi0::Flatte_rhoab(
double sa,
double sb,
double rho[2])
379 double q = 1.0-(4*sb/sa);
391void EvtDTopipi0pi0::propagator980(
double mass,
double sx,
double *sb,
double prop[2])
393 double gpipi1 = 2.0/3.0*0.165;
394 double gpipi2 = 1.0/3.0*0.165;
395 double gKK1 = 0.5*0.69465;
396 double gKK2 = 0.5*0.69465;
398 double unit[2]={1.0};
401 Flatte_rhoab(sx,sb[0],rho1);
403 Flatte_rhoab(sx,sb[1],rho2);
405 Flatte_rhoab(sx,sb[2],rho3);
407 Flatte_rhoab(sx,sb[3],rho4);
409 double tmp1[2]={gpipi1,0};
411 double tmp2[2]={gpipi2,0};
413 double tmp3[2]={gKK1,0};
415 double tmp4[2]={gKK2,0};
418 Com_Multi(tmp1,rho1,tmp11);
419 Com_Multi(tmp2,rho2,tmp22);
420 Com_Multi(tmp3,rho3,tmp33);
421 Com_Multi(tmp4,rho4,tmp44);
423 double tmp5[2]={tmp11[0]+tmp22[0]+tmp33[0]+tmp44[0],tmp11[1]+tmp22[1]+tmp33[1]+tmp44[1]};
425 Com_Multi(tmp5, ci,tmp51);
426 double tmp6[2]={
mass*
mass-sx-tmp51[0], -1.0*tmp51[1]};
428 Com_Divide(
unit,tmp6, prop);
432void EvtDTopipi0pi0::propagatorGS(
double mass2,
double mass,
double width,
double sa,
double sb,
double sc,
double r2,
double prop[2])
436 double tmp1 = sa+tmp;
437 double q2 = 0.25*tmp1*tmp1/sa-sb;
440 double tmp2 = mass2+tmp;
441 double q02 = 0.25*tmp2*tmp2/mass2-sb;
442 if(q02<0) q02 = 1e-16;
445 double q0 = sqrt(q02);
448 double tmp3 = log(mass+2*q0)+1.2926305904;
450 double h = GS1*
q/m*(log(m+2*
q)+1.2926305904);
451 double h0 = GS1*q0/
mass*tmp3;
452 double dh = h0*(0.125/q02-0.5/mass2)+GS3/mass2;
453 double d = GS2/q02*tmp3+GS3*
mass/q0-GS4*
mass/q03;
454 double f = mass2/q03*(q2*(h-h0)+(mass2-sa)*q02*dh);
456 a[0] = 1.0+d*width/
mass;
458 b[0] = mass2-sa+width*
f;
459 b[1] = -
mass*width*widl1(mass2,mass,sa,sb,sc,r2);
460 Com_Divide(a,
b,prop);
463double EvtDTopipi0pi0::DDalitz(
double P1[4],
double P2[4],
double P3[4],
int Ang,
double mass,
double rRES0,
double rRES1){
465 double temp_PDF, v_re;
468 double B[2], s1, s2, s3, sR, sD;
469 for(
int i=0; i<4; i++){
470 pR[i] = P1[i] + P2[i];
471 pD[i] = pR[i] + P3[i];
479 for(
int i=0; i!=4; i++){
480 for(
int j=0; j!=4; j++){
482 if(i==0) G[i][j] = 1;
494 B[0] = barrier(1,sR,s1,s2,rRES0,mass);
495 B[1] = barrier(1,sD,sR,s3,rRES1,1.86966);
500 for(
int i=0; i<4; i++){
501 temp_PDF += t1[i]*T1[i]*G[i][i];
505 B[0] = barrier(2,sR,s1,s2,rRES0,mass);
506 B[1] = barrier(2,sD,sR,s3,rRES1,1.86966);
507 double t2[4][4], T2[4][4];
511 for(
int i=0; i<4; i++){
512 for(
int j=0; j<4; j++){
513 temp_PDF += t2[i][j]*T2[j][i]*G[i][i]*G[j][j];
517 v_re = temp_PDF*
B[0]*
B[1];
521void EvtDTopipi0pi0::calEva(
double* Pic,
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)
523 double P12[4], P23[4], P13[4];
525 double cof[2], amp_PDF[2], PDF[2];
526 double spi01, spi02, scpi;
528 for(
int i=0; i<4; i++){
529 P23[i] = Pi01[i] + Pi02[i];
530 P12[i] = Pic[i] + Pi01[i];
531 P13[i] = Pic[i] + Pi02[i];
533 scpi = SCADot(Pic,Pic);
534 spi01 = SCADot(Pi01,Pi01);
535 spi02 = SCADot(Pi02,Pi02);
536 s23 = SCADot(P23,P23);
537 s12 = SCADot(P12,P12);
538 s13 = SCADot(P13,P13);
539 double spi012[4]={mass_Pion*mass_Pion,spi02,mass_Kaon*mass_Kaon,mk0*mk0};
545 double pro[2], temp_PDF, pro1[2], temp_PDF1, pro2[2], temp_PDF2, amp_tmp[2];
553 for(
int i=0; i<nstates; i++) {
556 mass1sq = mass1[i]*mass1[i];
557 cof[0] = amp[i]*
cos(phase[i]);
558 cof[1] = amp[i]*
sin(phase[i]);
560 if(modetype[i] == 23){
561 temp_PDF = DDalitz(Pi01, Pi02, Pic, spin[i], mass1[i], r0[i],r1[i]);
562 if(g0[i]==2) propagatorsigma500(
s23,spi01,spi02,pro);
563 if(g0[i]==1) propagatorRBW(mass1sq, mass1[i],width1[i],
s23,spi01,spi02,r0[i]*r0[i],spin[i],pro);
564 if(g0[i]==3) propagator980(mass1[i],
s23,spi012,pro);
570 amp_tmp[0] = temp_PDF*pro[0];
571 amp_tmp[1] = temp_PDF*pro[1];
573 if(modetype[i] == 12){
574 temp_PDF1 = DDalitz(Pic, Pi01, Pi02, spin[i], mass1[i], r0[i], r1[i]);
575 if(g0[i]==1) propagatorRBW(mass1sq, mass1[i],width1[i],
s12,scpi,spi01,r0[i]*r0[i],spin[i],pro1);
576 if(g0[i]==2) propagatorGS(mass1sq,mass1[i],width1[i],
s12,scpi,spi01,r0[i]*r0[i],pro1);
582 temp_PDF2 = DDalitz(Pic, Pi02, Pi01, spin[i], mass1[i], r0[i], r1[i]);
583 if(g0[i]==1) propagatorRBW(mass1sq, mass1[i],width1[i],s13,scpi,spi02,r0[i]*r0[i],spin[i],pro2);
584 if(g0[i]==2) propagatorGS(mass1sq,mass1[i],width1[i],s13,scpi,spi02,r0[i]*r0[i],pro2);
589 amp_tmp[0] = temp_PDF1*pro1[0] + temp_PDF2*pro2[0];
590 amp_tmp[1] = temp_PDF1*pro1[1] + temp_PDF2*pro2[1];
593 Com_Multi(amp_tmp,cof,amp_PDF);
594 PDF[0] += amp_PDF[0];
595 PDF[1] += amp_PDF[1];
598 double value = PDF[0]*PDF[0] + PDF[1]*PDF[1];
599 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
virtual ~EvtDTopipi0pi0()
void decay(EvtParticle *p)
void getName(std::string &name)
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