36 model_name=
"DsToKKpi";
65 mass[1] = 1.019461e+00;
71 width[0] = 4.7400e-02;
72 width[1] = 4.2660e-03;
74 width[3] = 2.7000e-01;
75 width[4] = 1.3500e-01;
76 width[5] = 2.6500e-01;
102 mass_Pi0 = 0.1349766;
107 int GG[4][4] = { {1,0,0,0}, {0,-1,0,0}, {0,0,-1,0}, {0,0,0,-1} };
108 for (
int i=0; i<4; i++) {
109 for (
int j=0; j<4; j++) {
147 double P1[4], P2[4], P3[4];
148 P1[1] = D1.
get(1); P1[2] = D1.
get(2); P1[3] = D1.
get(3);
149 P2[1] = D2.
get(1); P2[2] = D2.
get(2); P2[3] = D2.
get(3);
150 P3[1] = D3.
get(1); P3[2] = D3.
get(2); P3[3] = D3.
get(3);
153 int g0[6]={1,1,1,1,1,1};
155 calEvaMy(P1, P2, P3, mass, width, rho, phi, g0, modetype, nstates, value);
160void EvtDsToKKpi::MIP_LineShape(
double sa,
double pro[2]){
161 double m0 = mass[2], cKK = width[2];
162 pro[0] = sqrt(1/(((m0 * m0)-sa)*((m0 * m0)-sa) + (cKK*m0* sqrt(1 - 4 * mass_Kaon*mass_Kaon/sa) )*(cKK*m0* sqrt(1 - 4 * mass_Kaon*mass_Kaon/sa) ) ));
165void EvtDsToKKpi::calEvaMy(
double* pKm,
double* pKp,
double* pPi,
double *mass1,
double *width1,
double *amp,
double *phase,
int* g0,
int* modetype,
int nstates,
double & Result)
167 double pF0_980[4],pPhi1020[4], pKstr[4],pD[4],p23[4];
168 pKp[0] = sqrt( mass_Kaon*mass_Kaon + pKp[1]*pKp[1] + pKp[2]*pKp[2] + pKp[3]*pKp[3]);
169 pKm[0] = sqrt( mass_Kaon*mass_Kaon + pKm[1]*pKm[1] + pKm[2]*pKm[2] + pKm[3]*pKm[3]);
170 pPi[0] = sqrt( mass_Pion*mass_Pion + pPi[1]*pPi[1] + pPi[2]*pPi[2] + pPi[3]*pPi[3]);
171 for(
int u=0; u<4;u++){
172 pF0_980[u]=pKp[u]+pKm[u];
173 pPhi1020[u]=pKp[u]+pKm[u];
174 pKstr[u]=pKm[u]+pPi[u];
175 p23[u]=pKp[u]+pPi[u];
176 pD[u]=pKp[u]+pKm[u]+pPi[u];
178 double cof[2], amp_tmp1[2], amp_tmp2[2], amp_tmp[2], amp_PDF[2], PDF[2];
186 double temp_PDF, tmp1, tmp2, temp[2];
187 double pro[2], pro0[2], pro1[2];
188 double t1D[4],t2D[4][4],
B[3], t1Tm[4];
189 double t1kstr1[4],t1phi1020[4], t1D1[4],t1D2[4];
191 double sD, sF0_980, sF0_1710,sF0_1370, sKp, sKm, sPi, sKstr, sPhi1020, sKstr1430;
192 sF0_980=SCADot(pF0_980,pF0_980);
195 sKstr=SCADot(pKstr,pKstr);
198 sPhi1020=SCADot(pPhi1020,pPhi1020);
203 calt1(pKm,pPi,t1kstr1);
204 calt1(pKm,pKp,t1phi1020);
205 calt1(pKstr,pKp,t1D1);
206 calt1(pPhi1020,pPi,t1D2);
209 for(
int i=0; i<nstates; i++){
220 cof[0] = amp[i]*
cos(phase[i]);
221 cof[1] = amp[i]*
sin(phase[i]);
224 double amp_a0[2]={0};
225 double sa0_980=sF0_980;
226 double sKp2[2]={sKp,mass_Pion*mass_Pion};
227 double sKma2[2]={sKm,mass_Eta*mass_Eta};
229 MIP_LineShape(sa0_980, pro);
230 B[0]=barrier(0,sa0_980,sKp,sKm,rRes);
232 tmp1 = temp_PDF*
B[0];
233 amp_a0[0] = tmp1*pro[0];
234 amp_a0[1] = tmp1*pro[1];
235 amp_tmp1[0] = amp_a0[0] ;
236 amp_tmp1[1] = amp_a0[1] ;
238 else if(modetype[i]==0){
246 double sBC=SCADot(p23,p23);
248 if(g0[i] == 1) propagatorRBWNeoKstr892(mass1[i],width1[i],sKstr,sPi,sKm,rRes,1,pro);
249 B[0]=barrierNeo(1,sKstr,sPi,sKm,rRes,mass1[i]);
250 B[1]=barrierNeoDs(1,sD,sKstr,sKp,rD,mDs,mass1[i]);
251 temp_PDF=(sBC-sPhi1020+((sD-sKp)*(sKm-sPi)/(sKstr)));
254 if(g0[i] == 1) propagatorRBW(mass1[i],width1[i],sKstr,sKm,sPi,rRes,1,pro);
256 B[0]=barrier(1,sKstr,sKm,sPi,rRes);
257 B[1]=barrier(1,sD,sKstr,sKp,rD);
258 for(
int m=0; m<4; m++){
259 for(
int j=0; j<4; j++){
260 temp_PDF += t1D1[m]*t1kstr1[j]*G[m][j];
264 tmp1 = temp_PDF*
B[0]*
B[1];
265 amp_tmp1[0] = tmp1*pro[0];
266 amp_tmp1[1] = tmp1*pro[1];
268 else if(modetype[i]==1){
285 if(g0[i] == 1) propagatorRBWNeo(mass1[i],width1[i],sPhi1020,sKm,sKp,rRes,1,pro);
286 B[0]=barrierNeo(1,sPhi1020,sKp,sKm,rRes,mass1[i]);
287 B[1]=barrierNeoDs(1,sD,sPhi1020,sPi,rD,mDs,mass1[i]);
288 double sBC=SCADot(p23,p23);
289 temp_PDF=(sKstr-sBC+((sD-sPi)*(sKp-sKm)/(sKstr)));
292 if(g0[i] == 1) propagatorRBW(mass1[i],width1[i],sPhi1020,sKm,sKp,rRes,1,pro);
293 B[0]=barrier(1,sPhi1020,sKp,sKm,rRes);
294 B[1]=barrier(1,sD,sPhi1020,sPi,rD);
295 for(
int m=0; m<4; m++){
296 for(
int j=0; j<4; j++){
297 temp_PDF += t1D2[m]*t1phi1020[j]*G[m][j];
303 tmp1 = temp_PDF*
B[0]*
B[1];
304 amp_tmp1[0] = tmp1*pro[0];
305 amp_tmp1[1] = tmp1*pro[1];
307 else if(modetype[i]==3){
314 double sKm2[2]={sKm, mass_EtaP *mass_EtaP};
315 double sPi2[2]={sPi, mass_Kaon *mass_Kaon};
316 propagatorKstr1430(mass1[i],sKstr1430,sKm2,sPi2,pro);
318 B[0]=barrier(0,sPhi1020,sKp,sKm,rRes);
320 amp_tmp1[0] = tmp1*pro[0];
321 amp_tmp1[1] = tmp1*pro[1];
331 else if(modetype[i]==4){
333 if(g0[i] == 1) propagatorRBWNeo(mass1[i],width1[i],sF0_1710,sKp,sKm,rRes,0,pro);
340 B[0]=barrier(0,sF0_1710,sKp,sKm,rRes);
342 tmp1= temp_PDF*
B[0];
343 amp_tmp1[0] = tmp1*pro[0];
344 amp_tmp1[1] = tmp1*pro[1];
347 const bool debug89=
false;
349 else if(modetype[i]==5){
351 if(g0[i] == 1) propagatorRBWNeo(mass1[i],width1[i],sF0_1370,sKp,sKm,rRes,0,pro);
358 B[0]=barrier(0,sF0_1370,sKp,sKm,rRes);
360 amp_tmp1[0] = tmp1*pro[0];
361 amp_tmp1[1] = tmp1*pro[1];
363 amp_tmp[0] = amp_tmp1[0];
364 amp_tmp[1] = amp_tmp1[1];
365 Com_Multi(amp_tmp,cof,amp_PDF);
367 PDF[0] += amp_PDF[0];
368 PDF[1] += amp_PDF[1];
369 double valTmp=amp_PDF[0] * amp_PDF[0] + amp_PDF[1] * amp_PDF[1];
372 double value = PDF[0]*PDF[0] + PDF[1]*PDF[1];
380void EvtDsToKKpi::Com_Multi(
double a1[2],
double a2[2],
double res[2]){
381 res[0] = a1[0]*a2[0]-a1[1]*a2[1];
382 res[1] = a1[1]*a2[0]+a1[0]*a2[1];
384void EvtDsToKKpi::Com_Divide(
double a1[2],
double a2[2],
double res[2]){
385 res[0] = (a1[0]*a2[0]+a1[1]*a2[1])/(a2[0]*a2[0]+a2[1]*a2[1]);
386 res[1] = (a1[1]*a2[0]-a1[0]*a2[1])/(a2[0]*a2[0]+a2[1]*a2[1]);
389double EvtDsToKKpi::SCADot(
double a1[4],
double a2[4])
392 _cal = a1[0]*a2[0]-a1[1]*a2[1]-a1[2]*a2[2]-a1[3]*a2[3];
395double EvtDsToKKpi::barrier(
int l,
double sa,
double sb,
double sc,
double r)
397 double q = (sa+sb-sc)*(sa+sb-sc)/(4*sa)-sb;
403 if(l == 1) F = sqrt(2*z/(1+z));
404 if(l == 2) F = sqrt(13*z*z/(9+3*z+z*z));
407double EvtDsToKKpi::barrierNeo(
int l,
double sa,
double sb,
double sc,
double r,
double mR)
409 double pAB=( (sa-sb-sc)*(sa-sb-sc)/4.0 -(sb*sc))/sa;
410 double pR =( (mR*mR-sb-sc)*(mR*mR-sb-sc)/4.0 -(sb*sc))/(mR*mR);
411 double q = (sa+sb-sc)*(sa+sb-sc)/(4*sa)-sb;
416 if(l == 1) F = sqrt((1+zR)/(1+zAB));
417 if(l == 2) F = sqrt((9+3*zAB+zAB*zAB)/(9+3*zAB+zAB*zAB));
420double EvtDsToKKpi::barrierNeoDs(
int l,
double sa,
double sb,
double sc,
double r,
double mR,
double mb)
422 double pAB=( (sa-sb-sc)*(sa-sb-sc)/4.0 -(sb*sc))/sa;
423 double pR =( (sa-mb*mb-sc)*(sa-mb*mb-sc)/4.0 -(mb*mb*sc))/(mR*mR);
424 double q = (sa+sb-sc)*(sa+sb-sc)/(4*sa)-sb;
429 if(l == 1) F = sqrt((1+zR)/(1+zAB));
430 if(l == 2) F = sqrt((9+3*zAB+zAB*zAB)/(9+3*zAB+zAB*zAB));
434void EvtDsToKKpi::calt1(
double daug1[4],
double daug2[4],
double t1[4]){
437 for(
int i=0; i<4; i++){
438 pa[i] = daug1[i] + daug2[i];
439 qa[i] = daug1[i] - daug2[i];
443 for(
int i=0; i<4; i++){
444 t1[i] = qa[i] - pq/p*pa[i];
447void EvtDsToKKpi::calt2(
double daug1[4],
double daug2[4],
double t2[4][4]){
450 calt1(daug1,daug2,t1);
452 for(
int i=0; i<4; i++){
453 pa[i] = daug1[i] + daug2[i];
456 for(
int i=0; i<4; i++){
457 for(
int j=0; j<4; j++){
458 t2[i][j] = t1[i]*t1[j] - 1.0/3*r*(G[i][j]-pa[i]*pa[j]/p);
463void EvtDsToKKpi::propagator(
double mass,
double width,
double sx,
double prop[2]){
469 Com_Divide(a,
b,prop);
471double EvtDsToKKpi::wid(
double mass,
double sa,
double sb,
double sc,
double r,
int l){
477 q = (sa+sb-sc)*(sa+sb-sc)/(4*sa)-sb;
479 q0 = (sa0+sb-sc)*(sa0+sb-sc)/(4*sa0)-sb;
486 if(l == 1) F = sqrt((1+z0)/(1+z));
487 if(l == 2) F = sqrt((9+3*z0+z0*z0)/(9+3*z+z*z));
489 widm = pow(
t,l+0.5)*
mass/m*F*F;
493void EvtDsToKKpi::Flatte_rhoab(
double sa,
double sb,
double sc,
double rho[2])
495 double q = (sa+sb-sc)*(sa+sb-sc)/(4*sa)-sb;
498 rho[0]=2* sqrt(
q/sa);
503 rho[1]=2*sqrt(-
q/sa);
507void EvtDsToKKpi::propagatorFlatte(
double mass,
double width,
double sx,
double *sb,
double *sc,
double prop[2])
509 double unit[2]={1.0};
512 Flatte_rhoab(sx,sb[0],sc[0],rho1);
514 Flatte_rhoab(sx,sb[1],sc[1],rho2);
515 double g1_f980=0.165, g2_f980=0.69465;
516 double tmp1[2]={g1_f980,0};
518 double tmp2[2]={g2_f980,0};
520 Com_Multi(tmp1,rho1,tmp11);
521 Com_Multi(tmp2,rho2,tmp22);
522 double tmp3[2]={tmp11[0]+tmp22[0],tmp11[1]+tmp22[1]};
524 Com_Multi(tmp3, ci,tmp31);
525 double tmp4[2]={
mass*
mass-sx- tmp31[0], -1.0*tmp3[1]};
526 Com_Divide(
unit,tmp4, prop);
528void EvtDsToKKpi::propagator980(
double mass,
double sx,
double *sb,
double *sc,
double prop[2])
530 double unit[2]={1.0};
533 Flatte_rhoab(sx,sb[0],sc[0],rho1);
535 Flatte_rhoab(sx,sb[1],sc[1],rho2);
536 double gK_f980=0.69466, gPi_f980=0.165;
537 double tmp1[2]={gK_f980,0};
539 double tmp2[2]={gPi_f980,0};
541 Com_Multi(tmp1,rho1,tmp11);
542 Com_Multi(tmp2,rho2,tmp22);
543 double tmp3[2]={tmp11[0]+tmp22[0],tmp11[1]+tmp22[1]};
545 Com_Multi(tmp3, ci,tmp31);
546 double tmp4[2]={
mass*
mass-sx-tmp31[0], -1.0*tmp31[1]};
547 Com_Divide(
unit,tmp4, prop);
550void EvtDsToKKpi::propagatora0980(
double mass,
double sx,
double *sb,
double *sc,
double prop[2])
552 double unit[2]={1.0};
555 Flatte_rhoab(sx,sb[0],sc[0],rho1);
557 Flatte_rhoab(sx,sb[1],sc[1],rho2);
558 double gKK_a980=0.892*0.341, gPiEta_a980=0.341;
559 double tmp1[2]={gKK_a980,0};
561 double tmp2[2]={gPiEta_a980,0};
563 Com_Multi(tmp1,rho1,tmp11);
564 Com_Multi(tmp2,rho2,tmp22);
565 double tmp3[2]={tmp11[0]+tmp22[0],tmp11[1]+tmp22[1]};
567 Com_Multi(tmp3, ci,tmp31);
568 double tmp4[2]={
mass*
mass-sx-tmp31[0], -1.0*tmp31[1]};
569 Com_Divide(
unit,tmp4, prop);
572void EvtDsToKKpi::propagatorKstr1430(
double mass,
double sx,
double *sb,
double *sc,
double prop[2])
574 double unit[2]={1.0};
577 Flatte_rhoab(sx,sb[0],sc[0],rho1);
579 Flatte_rhoab(sx,sb[1],sc[1],rho2);
580 double gKPi_Kstr1430=0.2990, gEtaPK_Kstr1430=0.0529;
581 double tmp1[2]={gKPi_Kstr1430,0};
583 double tmp2[2]={gEtaPK_Kstr1430,0};
585 Com_Multi(tmp1,rho1,tmp11);
586 Com_Multi(tmp2,rho2,tmp22);
587 double tmp3[2]={tmp11[0]+tmp22[0],tmp11[1]+tmp22[1]};
589 Com_Multi(tmp3, ci,tmp31);
590 double tmp4[2]={
mass*
mass-sx-tmp31[0], -1.0*tmp31[1]};
591 Com_Divide(
unit,tmp4, prop);
594void EvtDsToKKpi::propagatorRBW(
double mass,
double width,
double sa,
double sb,
double sc,
double r,
int l,
double prop[2]){
599 b[1] = -
mass*width*wid(mass,sa,sb,sc,r,l);
600 Com_Divide(a,
b,prop);
603void EvtDsToKKpi::propagatorRBWNeo(
double mass,
double width,
double sa,
double sb,
double sc,
double r,
int l,
double prop[2]){
608 double tmp1=(sa-sb-sc);
610 double pAB=sqrt( (tmp1*tmp1/4.0 -tmp2)/sa);
611 double pR =sqrt(( (mass*mass-sb-sc)*(mass*mass-sb-sc)/4.0 -(sb*sc))/(mass*mass));
612 double fR=sqrt(1.0+1.5*1.5*pR*pR)/sqrt(1.0+1.5*1.5*pAB*pAB);
621 double gammaAB= width*pow(pAB/pR,power)*(
mass/sqrt(sa))*fR*fR;
622 b[1] = -
mass*gammaAB;
623 Com_Divide(a,
b,prop);
626void EvtDsToKKpi::propagatorRBWNeoKstr892(
double mass,
double width,
double sa,
double sb,
double sc,
double r,
int l,
double prop[2]){
631 double tmp1=(sa-sb-sc);
633 double pAB=sqrt( (tmp1*tmp1/4.0 -tmp2)/sa);
634 double pR =sqrt(( (mass*mass-sb-sc)*(mass*mass-sb-sc)/4.0 -(sb*sc))/(mass*mass));
635 double fR=sqrt(1.0+1.5*1.5*pR*pR)/sqrt(1.0+1.5*1.5*pAB*pAB);
643 double gammaAB= width*pow(pAB/pR,power)*(
mass/sqrt(sa))*fR*fR;
644 b[1] = -
mass*gammaAB;
645 Com_Divide(a,
b,prop);
649double EvtDsToKKpi::h(
double m,
double q){
650 double h = 2/math_pi*
q/m*log((m+2*
q)/(2*mass_Pion));
653double EvtDsToKKpi::dh(
double mass,
double q0){
654 double dh = h(mass,q0)*(1.0/(8*q0*q0)-1.0/(2*
mass*
mass))+1.0/(2*math_pi*mass*mass);
657double EvtDsToKKpi::f(
double mass,
double sx,
double q0,
double q){
659 double f =
mass*
mass/(pow(q0,3))*(
q*
q*(h(m,
q)-h(mass,q0))+(mass*mass-sx)*q0*q0*dh(mass,q0));
662double EvtDsToKKpi::d(
double mass,
double q0){
663 double d = 3.0/math_pi*mass_Pion*mass_Pion/(q0*q0)*log((mass+2*q0)/(2*mass_Pion))+
mass/(2*math_pi*q0)
664 - (mass_Pion*mass_Pion*mass)/(math_pi*pow(q0,3));
669void EvtDsToKKpi::propagatorGS(
double mass,
double width,
double sa,
double sb,
double sc,
double r,
int l,
double prop[2]){
671 double q = (sa+sb-sc)*(sa+sb-sc)/(4*sa)-sb;
673 double q0 = (sa0+sb-sc)*(sa0+sb-sc)/(4*sa0)-sb;
678 a[0] = 1+d(mass,q0)*width/
mass;
681 b[1] = -
mass*width*wid(mass,sa,sb,sc,r,l);
682 Com_Divide(a,
b,prop);
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 decay(EvtParticle *p)
void getName(std::string &name)
const EvtVector4R & getP4() const
EvtParticle * getDaug(int i)
double initializePhaseSpace(int numdaughter, EvtId *daughters, double poleSize=-1., int whichTwo1=0, int whichTwo2=1)