38 model_name=
"D0ToKSpi0eta";
111 mass_Pion2 = 0.0194797849;
112 mass_2Pion = 0.27914;
113 math_2pi = 6.2831852;
124 int GG[4][4] = { {1,0,0,0}, {0,-1,0,0}, {0,0,-1,0}, {0,0,0,-1} };
125 for (
int i=0; i<4; i++) {
126 for (
int j=0; j<4; j++) {
177 double P1[4], P2[4], P3[4];
178 P1[0] = D1.
get(0); P1[1] = D1.
get(1); P1[2] = D1.
get(2); P1[3] = D1.
get(3);
179 P2[0] = D2.
get(0); P2[1] = D2.
get(1); P2[2] = D2.
get(2); P2[3] = D2.
get(3);
180 P3[0] = D3.
get(0); P3[1] = D3.
get(1); P3[2] = D3.
get(2); P3[3] = D3.
get(3);
190 int g0[5]={3,1,1,2,0};
191 double r0[5]={3.0,3.0,3.0,3.0,3.0};
192 double r1[5]={5.0,5.0,5.0,5.0,5.0};
194 calEva(P1, P2, P3, mass, width, rho, phi, g0, spin, modetype, nstates, value,r0,r1);
202void EvtD0ToKSpi0eta::Com_Multi(
double a1[2],
double a2[2],
double res[2])
204 res[0] = a1[0]*a2[0]-a1[1]*a2[1];
205 res[1] = a1[1]*a2[0]+a1[0]*a2[1];
207void EvtD0ToKSpi0eta::Com_Divide(
double a1[2],
double a2[2],
double res[2])
209 double tmp = a2[0]*a2[0]+a2[1]*a2[1];
210 res[0] = (a1[0]*a2[0]+a1[1]*a2[1])/tmp;
211 res[1] = (a1[1]*a2[0]-a1[0]*a2[1])/tmp;
214double EvtD0ToKSpi0eta::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 EvtD0ToKSpi0eta::barrier(
int l,
double sa,
double sb,
double sc,
double r,
double mass)
221 double q = (sa+sb-sc)*(sa+sb-sc)/(4*sa)-sb;
227 double q0 = (sa0+sb-sc)*(sa0+sb-sc)/(4*sa0)-sb;
228 if(q0 < 0) q0 = 1e-16;
232 if(l == 1) F = sqrt((1+z0)/(1+z));
233 if(l == 2) F = sqrt((9+3*z0+z0*z0)/(9+3*z+z*z));
238void EvtD0ToKSpi0eta::calt1(
double daug1[4],
double daug2[4],
double t1[4])
242 for(
int i=0; i<4; i++) {
243 pa[i] = daug1[i] + daug2[i];
244 qa[i] = daug1[i] - daug2[i];
249 for(
int i=0; i<4; i++) {
250 t1[i] = qa[i] - tmp*pa[i];
253void EvtD0ToKSpi0eta::calt2(
double daug1[4],
double daug2[4],
double t2[4][4])
257 calt1(daug1,daug2,t1);
258 r = SCADot(t1,t1)/3.0;
259 for(
int i=0; i<4; i++) {
260 pa[i] = daug1[i] + daug2[i];
263 for(
int i=0; i<4; i++) {
264 for(
int j=0; j<4; j++) {
265 t2[i][j] = t1[i]*t1[j] - r*(G[i][j]-pa[i]*pa[j]/p);
270void EvtD0ToKSpi0eta::propagator(
double mass2,
double mass,
double width,
double sx,
double prop[2])
277 Com_Divide(a,
b,prop);
279double EvtD0ToKSpi0eta::wid(
double mass2,
double mass,
double sa,
double sb,
double sc,
double r2,
int l)
284 double tmp1 = sa+tmp;
285 double q = 0.25*tmp1*tmp1/sa-sb;
287 double tmp2 = mass2+tmp;
288 double q0 = 0.25*tmp2*tmp2/mass2-sb;
293 if(l == 0) {widm = sqrt(
t)*
mass/m;}
294 else if(l == 1) {widm =
t*sqrt(
t)*
mass/m*(1+z0)/(1+z);}
295 else if(l == 2) {widm =
t*
t*sqrt(
t)*
mass/m*(9+3*z0+z0*z0)/(9+3*z+z*z);}
298double EvtD0ToKSpi0eta::widl1(
double mass2,
double mass,
double sa,
double sb,
double sc,
double r2)
303 double tmp1 = sa+tmp;
304 double q = 0.25*tmp1*tmp1/sa-sb;
306 double tmp2 = mass2+tmp;
307 double q0 = 0.25*tmp2*tmp2/mass2-sb;
311 double F = (1+z0)/(1+z);
313 widm =
t*sqrt(
t)*
mass/m*F;
316void EvtD0ToKSpi0eta::propagatorRBW(
double mass,
double width,
double sa,
double sb,
double sc,
double r2,
int l,
double prop[2])
324 b[1] = -
mass*width*wid(mass2,mass,sa,sb,sc,r2,l);
325 Com_Divide(a,
b,prop);
328void EvtD0ToKSpi0eta::KPiSLASS(
double sa,
double sb,
double sc,
double prop[2]) {
329 const double m1430 = 1.441;
330 const double sa0 = 1.441*1.441;
331 const double w1430 = 0.193;
332 const double Lass1 = 0.25/sa0;
334 double tmp1 = sa0+tmp;
335 double q0 = Lass1*tmp1*tmp1-sb;
337 double tmp2 = sa+tmp;
338 double qs = 0.25*tmp2*tmp2/sa-sb;
340 double width = w1430*
q*m1430/sqrt(sa*q0);
341 double temp_R = atan(m1430*width/(sa0-sa));
342 if(temp_R<0) temp_R += math_pi;
343 double deltaR = -1.915 + temp_R;
344 double temp_F = atan(0.226*
q/(2.0-3.819*qs));
345 if(temp_F<0) temp_F += math_pi;
346 double deltaF = 0.002 + temp_F;
347 double deltaS = deltaR + 2.0*deltaF;
348 double t1 = 0.96*
sin(deltaF);
349 double t2 =
sin(deltaR);
355 prop[0] = t1*CF[0] + t2*
CS[0];
356 prop[1] = t1*CF[1] + t2*
CS[1];
359void EvtD0ToKSpi0eta::propagatorGS(
double mass2,
double mass,
double width,
double sa,
double sb,
double sc,
double r2,
double prop[2])
363 double tmp1 = sa+tmp;
364 double q2 = 0.25*tmp1*tmp1/sa-sb;
367 double tmp2 = mass2+tmp;
368 double q02 = 0.25*tmp2*tmp2/mass2-sb;
369 if(q02<0) q02 = 1e-16;
372 double q0 = sqrt(q02);
376 double tmp3 = log(mass+2*q0)+1.2926305904;
378 double h = GS1*
q/m*(log(m+2*
q)+1.2926305904);
379 double h0 = GS1*q0/
mass*tmp3;
380 double dh = h0*(0.125/q02-0.5/mass2)+GS3/mass2;
381 double d = GS2/q02*tmp3+GS3*
mass/q0-GS4*
mass/q03;
382 double f = mass2/q03*(q2*(h-h0)+(mass2-sa)*q02*dh);
384 a[0] = 1.0+d*width/
mass;
386 b[0] = mass2-sa+width*
f;
387 b[1] = -
mass*width*widl1(mass2,mass,sa,sb,sc,r2);
388 Com_Divide(a,
b,prop);
390void EvtD0ToKSpi0eta::propagatorFlatte(
double mass,
double width,
double sa,
double sb,
double sc,
int r,
double prop[2]){
391 double qKK,qetapi,qKSKS;
392 double rhoab[2], rhoKsK[2];
394 qetapi=0.25*(sa+0.547862*0.547862-0.1349768*0.1349768)*(sa+0.547862*0.547862-0.1349768*0.1349768)/sa-0.547862*0.547862;
395 qKK = 1-(2*0.49368/sa)*(2*0.49368/sa);
396 qKSKS = 1-(2*0.497614/sa)*(2*0.497614/sa);
399 rhoab[0] = 2*sqrt(qetapi/sa);
404 rhoab[1] = 2*sqrt(-qetapi/sa);
408 rhoKsK[0] = 0.5*(sqrt(qKK)+sqrt(qKSKS));
413 rhoKsK[1] = 0.5*(sqrt(-qKK)+sqrt(-qKSKS));
416 rhoKsK[0] = 0.5*sqrt(qKSKS);
417 rhoKsK[1] = 0.5*sqrt(-qKK);
420 rhoKsK[0] = 0.5*sqrt(qKK);
421 rhoKsK[1] = 0.5*sqrt(-qKSKS);
426 b[0] =
mass*
mass - sa + 0.341*rhoab[1] + 0.892*0.341*rhoKsK[1];
427 b[1] = - (0.341*rhoab[0] + 0.892*0.341*rhoKsK[0]);
428 Com_Divide(a,
b,prop);
432double EvtD0ToKSpi0eta::DDalitz(
double P1[4],
double P2[4],
double P3[4],
int Ang,
double mass){
434 double temp_PDF, v_re;
437 double B[2], s1, s2, s3, sR, sD;
438 for(
int i=0; i<4; i++){
439 pR[i] = P1[i] + P2[i];
440 pD[i] = pR[i] + P3[i];
448 for(
int i=0; i!=4; i++){
449 for(
int j=0; j!=4; j++){
451 if(i==0) G[i][j] = 1;
463 B[0] = barrier(1,sR,s1,s2,3.0,mass);
464 B[1] = barrier(1,sD,sR,s3,5.0,1.864);
469 for(
int i=0; i<4; i++){
470 temp_PDF += t1[i]*T1[i]*G[i][i];
474 B[0] = barrier(2,sR,s1,s2,3.0,mass);
475 B[1] = barrier(2,sD,sR,s3,5.0,1.864);
476 double t2[4][4], T2[4][4];
480 for(
int i=0; i<4; i++){
481 for(
int j=0; j<4; j++){
482 temp_PDF += t2[i][j]*T2[j][i]*G[i][i]*G[j][j];
486 v_re = temp_PDF*
B[0]*
B[1];
490void EvtD0ToKSpi0eta::calEva(
double* KS0,
double*
Pi0,
double* Eta,
double *mass1,
double *width1,
double *amp,
double *phase,
int* g0,
int* spin,
int* modetype,
int nstates,
double & Result ,
double*r0 ,
double*r1)
493 double P12[4], P23[4], P13[4];
494 double cof[2], amp_PDF[2], PDF[2];
495 double seta, spi0, sks0;
497 for(
int i=0; i<4; i++){
498 P12[i] = KS0[i] +
Pi0[i];
499 P13[i] = KS0[i] + Eta[i];
500 P23[i] =
Pi0[i] + Eta[i];
502 sks0 = SCADot(KS0,KS0);
504 seta = SCADot(Eta,Eta);
505 s12 = SCADot(P12,P12);
506 s13 = SCADot(P13,P13);
507 s23 = SCADot(P23,P23);
508 double pro[2], temp_PDF, amp_tmp[2];
517 for(
int i=0; i<nstates; i++) {
520 mass1sq = mass1[i]*mass1[i];
521 cof[0] = amp[i]*
cos(phase[i]);
522 cof[1] = amp[i]*
sin(phase[i]);
524 if(modetype[i] == 23){
525 temp_PDF = DDalitz(
Pi0, Eta, KS0, spin[i], mass1[i]);
527 if(g0[i]==1) propagatorRBW(mass1[i],width1[i],
s23,spi0,seta,rRes,spin[i],pro);
528 if(g0[i]==2) KPiSLASS(
s23,spi0,seta,pro);
529 if(g0[i]==3) propagatorFlatte(mass1[i],width1[i],
s23,spi0,seta,0,pro);
534 amp_tmp[0] = temp_PDF*pro[0];
535 amp_tmp[1] = temp_PDF*pro[1];
539 if(modetype[i] == 12){
540 temp_PDF = DDalitz(KS0,
Pi0, Eta, spin[i], mass1[i]);
541 if(g0[i]==1) propagatorRBW(mass1[i],width1[i],
s12,sks0,spi0,rRes,spin[i],pro);
542 if(g0[i]==2) KPiSLASS(
s12,sks0,spi0,pro);
548 amp_tmp[0] = temp_PDF*pro[0];
549 amp_tmp[1] = temp_PDF*pro[1];
553 if(modetype[i] == 13){
555 temp_PDF = DDalitz(KS0, Eta,
Pi0, spin[i], mass1[i]);
556 if(g0[i]==1) propagatorRBW(mass1[i],width1[i],s13,sks0,seta,rRes,spin[i],pro);
565 amp_tmp[0] = temp_PDF*pro[0];
566 amp_tmp[1] = temp_PDF*pro[1];
568 Com_Multi(amp_tmp,cof,amp_PDF);
569 PDF[0] += amp_PDF[0];
570 PDF[1] += amp_PDF[1];
573 double value = PDF[0]*PDF[0] + PDF[1]*PDF[1];
574 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")
****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 ~EvtD0ToKSpi0eta()
void getName(std::string &name)
void decay(EvtParticle *p)
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