35 model_name=
"DToKSpieta";
46 ma0 = 0.987; Ga0 = 0.0732;
47 mKn_1430 = 1.423; GKn_1430 = 0.1815;
48 mK1270 = 1.272; mK1400 = 1.403;
49 GK1270 = 0.09; GK1400 = 0.174;
87 int GG[4][4] = { {1,0,0,0}, {0,-1,0,0}, {0,0,-1,0}, {0,0,0,-1} };
89 { { {{0,0,0,0}, {0,0,0,0}, {0,0,0,0}, {0,0,0,0} },
90 {{0,0,0,0}, {0,0,0,0}, {0,0,0,1}, {0,0,-1,0}},
91 {{0,0,0,0}, {0,0,0,-1}, {0,0,0,0}, {0,1,0,0} },
92 {{0,0,0,0}, {0,0,1,0}, {0,-1,0,0}, {0,0,0,0} } },
93 { {{0,0,0,0}, {0,0,0,0}, {0,0,0,-1}, {0,0,1,0} },
94 {{0,0,0,0}, {0,0,0,0}, {0,0,0,0}, {0,0,0,0} },
95 {{0,0,0,1}, {0,0,0,0}, {0,0,0,0}, {-1,0,0,0}},
96 {{0,0,-1,0}, {0,0,0,0}, {1,0,0,0}, {0,0,0,0} } },
97 { {{0,0,0,0}, {0,0,0,1}, {0,0,0,0}, {0,-1,0,0}},
98 {{0,0,0,-1}, {0,0,0,0}, {0,0,0,0}, {1,0,0,0} },
99 {{0,0,0,0}, {0,0,0,0}, {0,0,0,0}, {0,0,0,0} },
100 {{0,1,0,0}, {-1,0,0,0}, {0,0,0,0}, {0,0,0,0} } },
101 { {{0,0,0,0}, {0,0,-1,0}, {0,1,0,0}, {0,0,0,0} },
102 {{0,0,1,0}, {0,0,0,0}, {-1,0,0,0}, {0,0,0,0} },
103 {{0,-1,0,0}, {1,0,0,0}, {0,0,0,0}, {0,0,0,0} },
104 {{0,0,0,0}, {0,0,0,0}, {0,0,0,0}, {0,0,0,0} } } };
105 for (
int i=0; i<4; i++) {
106 for (
int j=0; j<4; j++) {
108 for (
int k=0; k<4; k++) {
109 for (
int l=0; l<4; l++) {
110 E[i][j][k][l] = EE[i][j][k][l];
150 double Ks0[4],Pic[4],
Pi0[4];
151 Ks0[0] = ks0.
get(0); Pic[0] = pic.
get(0);
Pi0[0] = pi0.
get(0);
152 Ks0[1] = ks0.
get(1); Pic[1] = pic.
get(1);
Pi0[1] = pi0.
get(1);
153 Ks0[2] = ks0.
get(2); Pic[2] = pic.
get(2);
Pi0[2] = pi0.
get(2);
154 Ks0[3] = ks0.
get(3); Pic[3] = pic.
get(3);
Pi0[3] = pi0.
get(3);
157 calPDF(Ks0, Pic,
Pi0, value);
162double EvtDToKSpieta::calPDF(
double Ks0[],
double Pic[],
double Pi0[],
double & Result) {
163 double cof[2], amp_tmp1[2], amp_tmp2[2], amp_tmp[2], amp_PDF[2], PDF[2];
164 double flag[3], mass_R[2], width_R[2];
166 double sa[3], sb[3], sc[3], B[3];
167 double t1D[4], t1V[4], t1A[4];
168 double pS[4], pV[4], pD[4], pA[4];
169 double pro1[2], pro2[2],proKPi_S[2];
174 double mass1[2] ={ ma0, mKn_1430 };
175 double width1[2]={ Ga0, GKn_1430 };
176 double g0[2] ={ 3, 1 };
180 double P12[4], P23[4], P13[4];
181 double scpi, snpi, sks0;
183 for(
int i=0; i<4; i++){
184 P12[i] = Pic[i] + Ks0[i];
185 P13[i] =
Pi0[i] + Ks0[i];
186 P23[i] = Pic[i] +
Pi0[i];
188 scpi = SCADot(Pic,Pic);
190 sks0 = SCADot(Ks0,Ks0);
191 s12 = SCADot(P12,P12);
192 s13 = SCADot(P13,P13);
193 s23 = SCADot(P23,P23);
203 for(
int i=0; i<2; i++) {
206 mass1sq = mass1[i]*mass1[i];
207 cof[0] = rho[i]*
cos(phi[i]);
208 cof[1] = rho[i]*
sin(phi[i]);
210 if(modetype[i] == 23){
211 temp_PDF = DDalitz( Pic,
Pi0, Ks0, spin[i], mass1[i]);
212 if(g0[i]==1) propagatorRBW(mass1sq,mass1[i],width1[i],
s23,scpi,snpi,rRes,spin[i],pro);
213 if(g0[i]==2) KPiSLASS(
s23,scpi,snpi,pro);
214 if(g0[i]==3) propagatorFlatte(mass1[i],width1[i],
s23,scpi,snpi,0,pro);
219 amp_tmp[0] = temp_PDF*pro[0];
220 amp_tmp[1] = temp_PDF*pro[1];
222 if(modetype[i] == 12){
223 temp_PDF = DDalitz(Ks0, Pic,
Pi0, spin[i], mass1[i]);
224 if(g0[i]==1) propagatorRBW(mass1sq, mass1[i],width1[i],
s12,sks0,scpi,rRes,spin[i],pro);
225 if(g0[i]==2) {propagatorFlatte(mass1[i],width1[i],
s12,sks0,scpi,1,pro);
226 pro[0]=pro[0]*(0.01+0.990*0.990)/(0.01+
s12);
227 pro[1]=pro[1]*(0.01+0.990*0.990)/(0.01+
s12);
229 if(g0[i]==3) propagatorFlatte(mass1[i],width1[i],
s12,sks0,scpi,1,pro);
235 amp_tmp[0] = temp_PDF*pro[0];
236 amp_tmp[1] = temp_PDF*pro[1];
238 if(modetype[i] == 13){
239 temp_PDF = DDalitz(Ks0,
Pi0, Pic, spin[i], mass1[i]);
240 if(g0[i]==1) propagatorRBW(mass1sq, mass1[i],width1[i],s13,sks0,snpi,rRes,spin[i],pro);
242 double skm2[2]={sks0, mass_Ks *mass_Ks};
243 double spi2[2]={snpi, mass_Eta *mass_Eta};
244 propagatorKstr1430(mass1[i],s13,skm2,spi2,pro);
246 if(g0[i]==3) propagatorFlatte(mass1[i],width1[i],s13,sks0,snpi,1,pro);
251 amp_tmp[0] = temp_PDF*pro[0];
252 amp_tmp[1] = temp_PDF*pro[1];
254 if(modetype[i] == 132){
255 KPiSLASS(
s12,sks0,scpi,Amp_KPiS);
256 amp_tmp[0] = Amp_KPiS[0];
257 amp_tmp[1] = Amp_KPiS[1];
260 Com_Multi(amp_tmp,cof,amp_PDF);
261 PDF[0] += amp_PDF[0];
262 PDF[1] += amp_PDF[1];
268 double value = PDF[0]*PDF[0] + PDF[1]*PDF[1];
275void EvtDToKSpieta:: Com_Multi(
double a1[2],
double a2[2],
double res[2])
277 res[0] = a1[0]*a2[0]-a1[1]*a2[1];
278 res[1] = a1[1]*a2[0]+a1[0]*a2[1];
280void EvtDToKSpieta:: Com_Divide(
double a1[2],
double a2[2],
double res[2])
282 double tmp = a2[0]*a2[0]+a2[1]*a2[1];
283 res[0] = (a1[0]*a2[0]+a1[1]*a2[1])/tmp;
284 res[1] = (a1[1]*a2[0]-a1[0]*a2[1])/tmp;
287double EvtDToKSpieta:: SCADot(
double a1[4],
double a2[4])
289 double _cal = a1[0]*a2[0]-a1[1]*a2[1]-a1[2]*a2[2]-a1[3]*a2[3];
293double EvtDToKSpieta:: barrier(
int l,
double sa,
double sb,
double sc,
double r,
double mass)
295 double q = (sa+sb-sc)*(sa+sb-sc)/(4*sa)-sb;
301 double q0 = (sa0+sb-sc)*(sa0+sb-sc)/(4*sa0)-sb;
302 if(q0 < 0) q0 = 1e-16;
306 if(l == 1) F = sqrt((1+z0)/(1+z));
307 if(l == 2) F = sqrt((9+3*z0+z0*z0)/(9+3*z+z*z));
311double EvtDToKSpieta:: Barrier(
int l,
double sa,
double sb,
double sc,
double r2)
314 double tmp = sa+sb-sc;
315 double q = 0.25*tmp*tmp/sa-sb;
316 if (
q < 0)
q = 1e-16;
319 F = sqrt(2.0*z/(1.0+z));
323 F = sqrt(13.0*z2/(9.0+3.0*z+z2));
331void EvtDToKSpieta:: calt1(
double daug1[4],
double daug2[4],
double t1[4])
335 for(
int i=0; i<4; i++) {
336 pa[i] = daug1[i] + daug2[i];
337 qa[i] = daug1[i] - daug2[i];
342 for(
int i=0; i<4; i++) {
343 t1[i] = qa[i] - tmp*pa[i];
346void EvtDToKSpieta:: calt2(
double daug1[4],
double daug2[4],
double t2[4][4])
350 calt1(daug1,daug2,t1);
351 r = SCADot(t1,t1)/3.0;
352 for(
int i=0; i<4; i++) {
353 pa[i] = daug1[i] + daug2[i];
356 for(
int i=0; i<4; i++) {
357 for(
int j=0; j<4; j++) {
358 t2[i][j] = t1[i]*t1[j] - r*(G[i][j]-pa[i]*pa[j]/p);
363void EvtDToKSpieta:: propagator(
double mass2,
double mass,
double width,
double sx,
double prop[2])
370 Com_Divide(a,
b,prop);
372double EvtDToKSpieta:: wid(
double mass2,
double mass,
double sa,
double sb,
double sc,
double r2,
int l)
377 double tmp1 = sa+tmp;
378 double q = 0.25*tmp1*tmp1/sa-sb;
380 double tmp2 = mass2+tmp;
381 double q0 = 0.25*tmp2*tmp2/mass2-sb;
386 if(l == 0) {widm = sqrt(
t)*
mass/m;}
387 else if(l == 1) {widm =
t*sqrt(
t)*
mass/m*(1+z0)/(1+z);}
388 else if(l == 2) {widm =
t*
t*sqrt(
t)*
mass/m*(9+3*z0+z0*z0)/(9+3*z+z*z);}
391double EvtDToKSpieta:: widl1(
double mass2,
double mass,
double sa,
double sb,
double sc,
double r2)
396 double tmp1 = sa+tmp;
397 double q = 0.25*tmp1*tmp1/sa-sb;
399 double tmp2 = mass2+tmp;
400 double q0 = 0.25*tmp2*tmp2/mass2-sb;
404 double F = (1+z0)/(1+z);
406 widm =
t*sqrt(
t)*
mass/m*F;
409void EvtDToKSpieta:: propagatorRBW(
double mass2,
double mass,
double width,
double sa,
double sb,
double sc,
double r2,
int l,
double prop[2])
414 double q=0.25*(sa+sb-sc)*(sa+sb-sc)/sa-sb;
417 b[1] = -
mass*width*wid(mass2,
mass,sa,sb,sc,r2,l);
418 Com_Divide(a,
b,prop);
422void EvtDToKSpieta:: propagatorFlatte(
double mass,
double width,
double sa,
double sb,
double sc,
int r,
double prop[2]){
423 double q, qKsK,qetapi;
425 double rhoab[2], rhoKsK[2];
426 q = 0.25*(sa+sb-sc)*(sa+sb-sc)/sa-sb;
427 qetapi=0.25*(sa+0.547862-0.13957039)*(sa+0.547862-0.13957039)/sa-0.547862*0.547862;
428 if(r == 0) qKsK = 0.25*sa - 0.49368*0.49368;
429 if(r == 1) qKsK = 0.25*(sa+sb-sc)*(sa+sb-sc)/sa - sb;
431 rhoab[0] = 2*sqrt(qetapi/sa);
436 rhoab[1] = 2*sqrt(-qetapi/sa);
439 rhoKsK[0] = 2*sqrt(qKsK/sa);
444 rhoKsK[1] = 2*sqrt(-qKsK/sa);
449 b[0] =
mass*
mass - sa + 0.341*rhoab[1] + 0.892*0.341*rhoKsK[1];
450 b[1] = - (0.341*rhoab[0] + 0.892*0.341*rhoKsK[0]);
451 Com_Divide(a,
b,prop);
454void EvtDToKSpieta:: PiPiSWASS(
double sa,
double sb,
double sc,
double prop[2]) {
456 double tmp2 = sa+tmp;
457 double qs = 0.25*tmp2*tmp2/sa-sb;
459 double a0 = -0.11/mass_Pion;
460 prop[0] = 1/(1+a0*a0*
q*
q);
461 prop[1] = a0*
q/(1+a0*a0*
q*
q);
463void EvtDToKSpieta:: KPiSLASS(
double sa,
double sb,
double sc,
double prop[2]) {
464 const double m1430 = 1.441;
465 const double sa0 = 1.441*1.441;
466 const double w1430 = 0.193;
467 const double Lass1 = 0.25/sa0;
469 double tmp1 = sa0+tmp;
470 double q0 = Lass1*tmp1*tmp1-sb;
472 double tmp2 = sa+tmp;
473 double qs = 0.25*tmp2*tmp2/sa-sb;
475 double width = w1430*
q*m1430/sqrt(sa*q0);
476 double temp_R = atan(m1430*width/(sa0-sa));
477 if(temp_R<0) temp_R += math_pi;
478 double deltaR = -1.915 + temp_R;
479 double temp_F = atan(0.226*
q/(2.0-3.819*qs));
480 if(temp_F<0) temp_F += math_pi;
481 double deltaF = 0.002 + temp_F;
482 double deltaS = deltaR + 2.0*deltaF;
483 double t1 = 0.96*
sin(deltaF);
484 double t2 =
sin(deltaR);
490 prop[0] = t1*CF[0] + t2*
CS[0];
491 prop[1] = t1*CF[1] + t2*
CS[1];
494void EvtDToKSpieta:: Flatte_rhoab(
double sa,
double sb,
double sc,
double rho[2]){
495 double q = (sa+sb-sc)*(sa+sb-sc)/(4*sa)-sb;
497 rho[0]=2* sqrt(
q/sa);
502 rho[1]=2*sqrt(-
q/sa);
506void EvtDToKSpieta:: propagatorKstr1430(
double mass,
double sx,
double *sb,
double *sc,
double prop[2])
508 double unit[2]={1.0};
511 Flatte_rhoab(sx,sb[0],sc[0],rho1);
513 Flatte_rhoab(sx,sb[1],sc[1],rho2);
514 double gKPi_Kstr1430=0.2990, gEtaPK_Kstr1430=0.0529;
515 double tmp1[2]={gKPi_Kstr1430,0};
517 double tmp2[2]={gEtaPK_Kstr1430,0};
519 Com_Multi(tmp1,rho1,tmp11);
520 Com_Multi(tmp2,rho2,tmp22);
521 double tmp3[2]={tmp11[0]+tmp22[0],tmp11[1]+tmp22[1]};
523 Com_Multi(tmp3, ci,tmp31);
524 double tmp4[2]={
mass*
mass-sx-tmp31[0], -1.0*tmp31[1]};
525 Com_Divide(
unit,tmp4, prop);
527double EvtDToKSpieta:: DDalitz(
double P1[4],
double P2[4],
double P3[4],
int Ang,
double mass){
529 double temp_PDF, v_re;
532 double B[2], s1, s2, s3, sR, sD;
533 for(
int i=0; i<4; i++){
534 pR[i] = P1[i] + P2[i];
535 pD[i] = pR[i] + P3[i];
543 for(
int i=0; i!=4; i++){
544 for(
int j=0; j!=4; j++){
546 if(i==0) G[i][j] = 1;
558 B[0] = barrier(1,sR,s1,s2,3.0,
mass);
559 B[1] = barrier(1,sD,sR,s3,5.0,1.869);
566 for(
int i=0; i<4; i++){
567 temp_PDF += t1[i]*T1[i]*G[i][i];
571 B[0] = barrier(2,sR,s1,s2,3.0,
mass);
572 B[1] = barrier(2,sD,sR,s3,5.0,1.869);
575 double t2[4][4], T2[4][4];
579 for(
int i=0; i<4; i++){
580 for(
int j=0; j<4; j++){
581 temp_PDF += t2[i][j]*T2[j][i]*G[i][i]*G[j][j];
585 v_re = temp_PDF*
B[0]*
B[1];
double sin(const BesAngle a)
double cos(const BesAngle a)
*******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