33 model_name=
"D0ToKpiEtap";
47 phi[0] = 0.0; rho[0] = 1.0;
48 phi[1] = 3.5567 ; rho[1] = 2.0540e-01;
49 phi[2] = 0.61028; rho[2] = 1.5846e+00;
66 const double mk0 = 0.497614;
67 const double mass_Kaon = 0.49368;
68 const double mass_Pion = 0.13957;
69 const double mass_Pi0 = 0.1349766;
70 const double meta = 0.547862;
71 const double metap = 0.95778;
83 int GG[4][4] = { {1,0,0,0}, {0,-1,0,0}, {0,0,-1,0}, {0,0,0,-1} };
84 for (
int i=0; i<4; i++) {
for (
int j=0; j<4; j++) {
126 double P1[4], P2[4], P3[4];
127 P1[0] = D1.
get(0); P1[1] = D1.
get(1); P1[2] = D1.
get(2); P1[3] = D1.
get(3);
128 P2[0] = D2.
get(0); P2[1] = D2.
get(1); P2[2] = D2.
get(2); P2[3] = D2.
get(3);
129 P3[0] = D3.
get(0); P3[1] = D3.
get(1); P3[2] = D3.
get(2); P3[3] = D3.
get(3);
141 calEva(P1, P2, P3, mass, width, rho, phi, g0, spin, modetype, nstates, value);
148void EvtD0ToKpiEtap::Com_Multi(
double a1[2],
double a2[2],
double res[2])
150 res[0] = a1[0]*a2[0]-a1[1]*a2[1];
151 res[1] = a1[1]*a2[0]+a1[0]*a2[1];
153void EvtD0ToKpiEtap::Com_Divide(
double a1[2],
double a2[2],
double res[2])
155 double tmp = a2[0]*a2[0]+a2[1]*a2[1];
156 res[0] = (a1[0]*a2[0]+a1[1]*a2[1])/tmp;
157 res[1] = (a1[1]*a2[0]-a1[0]*a2[1])/tmp;
160double EvtD0ToKpiEtap::SCADot(
double a1[4],
double a2[4])
162 double _cal = a1[0]*a2[0]-a1[1]*a2[1]-a1[2]*a2[2]-a1[3]*a2[3];
165double EvtD0ToKpiEtap::barrier(
int l,
double sa,
double sb,
double sc,
double r,
double mass)
167 double q = (sa+sb-sc)*(sa+sb-sc)/(4*sa)-sb;
173 double q0 = (sa0+sb-sc)*(sa0+sb-sc)/(4*sa0)-sb;
174 if(q0 < 0) q0 = -1*q0;
178 if(l == 1) F = sqrt((1+z0)/(1+z));
179 if(l == 2) F = sqrt((9+3*z0+z0*z0)/(9+3*z+z*z));
182void EvtD0ToKpiEtap::calt1(
double daug1[4],
double daug2[4],
double t1[4])
186 for(
int i=0; i<4; i++) {
187 pa[i] = daug1[i] + daug2[i];
188 qa[i] = daug1[i] - daug2[i];
193 for(
int i=0; i<4; i++) {
194 t1[i] = qa[i] - tmp*pa[i];
197void EvtD0ToKpiEtap::calt2(
double daug1[4],
double daug2[4],
double t2[4][4])
201 calt1(daug1,daug2,t1);
202 r = SCADot(t1,t1)/3.0;
203 for(
int i=0; i<4; i++) {
204 pa[i] = daug1[i] + daug2[i];
207 for(
int i=0; i<4; i++) {
208 for(
int j=0; j<4; j++) {
209 t2[i][j] = t1[i]*t1[j] - r*(G[i][j]-pa[i]*pa[j]/p);
214double EvtD0ToKpiEtap::wid(
double mass2,
double mass,
double sa,
double sb,
double sc,
double r2,
int l)
219 double tmp1 = sa+tmp;
220 double q = 0.25*tmp1*tmp1/sa-sb;
222 double tmp2 = mass2+tmp;
223 double q0 = 0.25*tmp2*tmp2/mass2-sb;
228 if(l == 0) {widm = sqrt(
t)*
mass/m;}
229 else if(l == 1) {widm =
t*sqrt(
t)*
mass/m*(1+z0)/(1+z);}
230 else if(l == 2) {widm =
t*
t*sqrt(
t)*
mass/m*(9+3*z0+z0*z0)/(9+3*z+z*z);}
233double EvtD0ToKpiEtap::widl1(
double mass2,
double mass,
double sa,
double sb,
double sc,
double r2)
238 double tmp1 = sa+tmp;
239 double q = 0.25*tmp1*tmp1/sa-sb;
241 double tmp2 = mass2+tmp;
242 double q0 = 0.25*tmp2*tmp2/mass2-sb;
246 double F = (1+z0)/(1+z);
248 widm =
t*sqrt(
t)*
mass/m*F;
251void EvtD0ToKpiEtap::propagatorRBW(
double mass2,
double mass,
double width,
double sa,
double sb,
double sc,
double r2,
int l,
double prop[2])
256 double q=0.25*(sa+sb-sc)*(sa+sb-sc)/sa-sb;
259 b[1] = -
mass*width*wid(mass2,mass,sa,sb,sc,r2,l);
260 Com_Divide(a,
b,prop);
263void EvtD0ToKpiEtap::propagatorFlatte(
double mass,
double width,
double sa,
double sb,
double sc,
int r,
double prop[2]){
264 double q, qKsK,qetapi;
266 double rhoab[2], rhoKsK[2];
267 q = 0.25*(sa+sb-sc)*(sa+sb-sc)/sa-sb;
268 qetapi=0.25*(sa+0.547862-0.13957039)*(sa+0.547862-0.13957039)/sa-0.547862*0.547862;
269 if(r == 0) qKsK = 0.25*sa - 0.49368*0.49368;
270 if(r == 1) qKsK = 0.25*(sa+sb-sc)*(sa+sb-sc)/sa - sb;
272 rhoab[0] = 2*sqrt(qetapi/sa);
277 rhoab[1] = 2*sqrt(-qetapi/sa);
280 rhoKsK[0] = 2*sqrt(qKsK/sa);
285 rhoKsK[1] = 2*sqrt(-qKsK/sa);
290 b[0] =
mass*
mass - sa + 0.341*rhoab[1] + 0.892*0.341*rhoKsK[1];
291 b[1] = - (0.341*rhoab[0] + 0.892*0.341*rhoKsK[0]);
292 Com_Divide(a,
b,prop);
296void EvtD0ToKpiEtap::propagatorGS(
double mass2,
double mass,
double width,
double sa,
double sb,
double sc,
double r2,
double prop[2])
300 double tmp1 = sa+tmp;
301 double q2 = 0.25*tmp1*tmp1/sa-sb;
304 double tmp2 = mass2+tmp;
305 double q02 = 0.25*tmp2*tmp2/mass2-sb;
306 if(q02<0) q02 = 1e-16;
309 double q0 = sqrt(q02);
313 double tmp3 = log(mass+2*q0)+1.2926305904;
315 double h = GS1*
q/m*(log(m+2*
q)+1.2926305904);
316 double h0 = GS1*q0/
mass*tmp3;
317 double dh = h0*(0.125/q02-0.5/mass2)+GS3/mass2;
318 double d = GS2/q02*tmp3+GS3*
mass/q0-GS4*
mass/q03;
319 double f = mass2/q03*(q2*(h-h0)+(mass2-sa)*q02*dh);
321 a[0] = 1.0+d*width/
mass;
323 b[0] = mass2-sa+width*
f;
324 b[1] = -
mass*width*widl1(mass2,mass,sa,sb,sc,r2);
325 Com_Divide(a,
b,prop);
328void EvtD0ToKpiEtap::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];
358double EvtD0ToKpiEtap::DDalitz(
double P1[4],
double P2[4],
double P3[4],
int Ang,
double mass){
360 double temp_PDF, v_re;
363 double B[2], s1, s2, s3, sR, sD;
364 for(
int i=0; i<4; i++){
365 pR[i] = P1[i] + P2[i];
366 pD[i] = pR[i] + P3[i];
379 B[0] = barrier(1,sR,s1,s2,3.0,mass);
380 B[1] = barrier(1,sD,sR,s3,5.0,1.86484);
387 for(
int i=0; i<4; i++){
388 temp_PDF += t1[i]*T1[i]*G[i][i];
392 B[0] = barrier(2,sR,s1,s2,3.0,mass);
393 B[1] = barrier(2,sD,sR,s3,5.0,1.86484);
396 double t2[4][4], T2[4][4];
400 for(
int i=0; i<4; i++){
401 for(
int j=0; j<4; j++){
402 temp_PDF += t2[i][j]*T2[j][i]*G[i][i]*G[j][j];
406 v_re = temp_PDF*
B[0]*
B[1];
410void EvtD0ToKpiEtap::calEva(
double* Ks0,
double* Kc,
double*
Pi0,
double *mass1,
double *width1,
double *amp,
double *phase,
int* g0,
int* spin,
int* modetype,
int nstates,
double & Result)
412 double P12[4], P23[4], P13[4];
413 double cof[2], amp_PDF[2], PDF[2];
414 double snpi, sck, sks0;
416 for(
int i=0; i<4; i++){
417 P12[i] = Kc[i] + Ks0[i];
418 P13[i] =
Pi0[i] + Ks0[i];
419 P23[i] = Kc[i] +
Pi0[i];
423 sks0 = SCADot(Ks0,Ks0);
424 s12 = SCADot(P12,P12);
425 s13 = SCADot(P13,P13);
426 s23 = SCADot(P23,P23);
427 double pro[2], temp_PDF, amp_tmp[2],temp_PDF1 ,temp_PDF2,pro1[2],pro2[2];
435 for(
int i=0; i<nstates; i++) {
438 mass1sq = mass1[i]*mass1[i];
439 cof[0] = amp[i]*
cos(phase[i]);
440 cof[1] = amp[i]*
sin(phase[i]);
443 if(modetype[i] == 12){
444 temp_PDF = DDalitz(Ks0, Kc,
Pi0, spin[i], mass1[i]);
445 if(g0[i]==1) propagatorRBW(mass1sq, mass1[i],width1[i],
s12,sks0,sck,rRes,spin[i],pro);
447 if(g0[i]==2) {propagatorFlatte(mass1[i],width1[i],
s12,sks0,sck,1,pro);
448 pro[0]=pro[0]*(0.01+0.990*0.990)/(0.01+
s12);
449 pro[1]=pro[1]*(0.01+0.990*0.990)/(0.01+
s12);
453 if(g0[i]==3) propagatorFlatte(mass1[i],width1[i],
s12,sks0,sck,1,pro);
459 amp_tmp[0] = temp_PDF*pro[0];
460 amp_tmp[1] = temp_PDF*pro[1];
463 if(modetype[i] == 132){
464 KPiSLASS(
s12,sks0,sck,pro);
469 Com_Multi(amp_tmp,cof,amp_PDF);
470 PDF[0] += amp_PDF[0];
471 PDF[1] += amp_PDF[1];
474 double value = PDF[0]*PDF[0] + PDF[1]*PDF[1];
475 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
void decay(EvtParticle *p)
virtual ~EvtD0ToKpiEtap()
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