35 model_name =
"DToPiPi0Etap";
79 int GG[4][4] = { {1,0,0,0}, {0,-1,0,0}, {0,0,-1,0}, {0,0,0,-1} };
81 for (
int i=0; i<4; i++) {
82 for (
int j=0; j<4; j++) {
131 double P1[4], P2[4], P3[4];
133 P1[0] = D1.
get(0); P1[1] = D1.
get(1); P1[2] = D1.
get(2); P1[3] = D1.
get(3);
134 P2[0] = D2.
get(0); P2[1] = D2.
get(1); P2[2] = D2.
get(2); P2[3] = D2.
get(3);
135 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);
151void EvtDToPiPi0Etap::Com_Multi(
double a1[2],
double a2[2],
double res[2])
153 res[0] = a1[0]*a2[0]-a1[1]*a2[1];
154 res[1] = a1[1]*a2[0]+a1[0]*a2[1];
157void EvtDToPiPi0Etap::Com_Divide(
double a1[2],
double a2[2],
double res[2])
159 double tmp = a2[0]*a2[0]+a2[1]*a2[1];
160 res[0] = (a1[0]*a2[0]+a1[1]*a2[1])/tmp;
161 res[1] = (a1[1]*a2[0]-a1[0]*a2[1])/tmp;
164double EvtDToPiPi0Etap::SCADot(
double a1[4],
double a2[4])
166 double _cal = a1[0]*a2[0]-a1[1]*a2[1]-a1[2]*a2[2]-a1[3]*a2[3];
170double EvtDToPiPi0Etap::barrier(
int l,
double sa,
double sb,
double sc,
double r,
double mass)
172 double q = (sa+sb-sc)*(sa+sb-sc)/(4*sa)-sb;
178 double q0 = (sa0+sb-sc)*(sa0+sb-sc)/(4*sa0)-sb;
179 if(q0 < 0) q0 = -1*q0;
183 if(l == 1) F = sqrt((1+z0)/(1+z));
184 if(l == 2) F = sqrt((9+3*z0+z0*z0)/(9+3*z+z*z));
192void EvtDToPiPi0Etap::calt1(
double daug1[4],
double daug2[4],
double t1[4])
196 for(
int i=0; i<4; i++) {
197 pa[i] = daug1[i] + daug2[i];
198 qa[i] = daug1[i] - daug2[i];
203 for(
int i=0; i<4; i++) {
204 t1[i] = qa[i] - tmp*pa[i];
208void EvtDToPiPi0Etap::calt2(
double daug1[4],
double daug2[4],
double t2[4][4])
212 calt1(daug1,daug2,t1);
213 r = SCADot(t1,t1)/3.0;
214 for(
int i=0; i<4; i++) {
215 pa[i] = daug1[i] + daug2[i];
218 for(
int i=0; i<4; i++) {
219 for(
int j=0; j<4; j++) {
220 t2[i][j] = t1[i]*t1[j] - r*(G[i][j]-pa[i]*pa[j]/p);
229double EvtDToPiPi0Etap::wid(
double mass2,
double mass,
double sa,
double sb,
double sc,
double r2,
int l)
234 double tmp1 = sa+tmp;
235 double q = 0.25*tmp1*tmp1/sa-sb;
237 double tmp2 = mass2+tmp;
238 double q0 = 0.25*tmp2*tmp2/mass2-sb;
243 if(l == 0) {widm = sqrt(
t)*
mass/m;}
244 else if(l == 1) {widm =
t*sqrt(
t)*
mass/m*(1+z0)/(1+z);}
245 else if(l == 2) {widm =
t*
t*sqrt(
t)*
mass/m*(9+3*z0+z0*z0)/(9+3*z+z*z);}
249double EvtDToPiPi0Etap::widl1(
double mass2,
double mass,
double sa,
double sb,
double sc,
double r2)
254 double tmp1 = sa+tmp;
255 double q = 0.25*tmp1*tmp1/sa-sb;
257 double tmp2 = mass2+tmp;
258 double q0 = 0.25*tmp2*tmp2/mass2-sb;
262 double F = (1+z0)/(1+z);
264 widm =
t*sqrt(
t)*
mass/m*F;
268void EvtDToPiPi0Etap::propagatorRBW(
double mass2,
double mass,
double width,
double sa,
double sb,
double sc,
double r2,
int l,
double prop[2])
275 b[1] = -
mass*width*wid(mass2,mass,sa,sb,sc,r2,l);
276 Com_Divide(a,
b,prop);
279void EvtDToPiPi0Etap::propagatorGS(
double mass2,
double mass,
double width,
double sa,
double sb,
double sc,
double r2,
double prop[2])
283 double tmp1 = sa+tmp;
284 double q2 = 0.25*tmp1*tmp1/sa-sb;
287 double tmp2 = mass2+tmp;
288 double q02 = 0.25*tmp2*tmp2/mass2-sb;
289 if(q02<0) q02 = 1e-16;
292 double q0 = sqrt(q02);
295 double tmp3 = log(mass+2*q0) + 1.292621885;
297 double h = GS1*
q/m*(log(m+2*
q) + 1.292621885);
298 double h0 = GS1*q0/
mass*tmp3;
299 double dh = h0*(0.125/q02-0.5/mass2)+GS3/mass2;
300 double d = GS2/q02*tmp3+GS3*
mass/q0-GS4*
mass/q03;
301 double f = mass2/q03*(q2*(h-h0)+(mass2-sa)*q02*dh);
303 a[0] = 1.0+d*width/
mass;
305 b[0] = mass2-sa+width*
f;
306 b[1] = -
mass*width*widl1(mass2,mass,sa,sb,sc,r2);
307 Com_Divide(a,
b,prop);
310double EvtDToPiPi0Etap::DDalitz(
double P1[4],
double P2[4],
double P3[4],
int Ang,
double mass)
313 double temp_PDF, v_re;
316 double B[2], s1, s2, s3, sR, sD;
317 for(
int i=0; i<4; i++){
318 pR[i] = P1[i] + P2[i];
319 pD[i] = pR[i] + P3[i];
327 for(
int i=0; i!=4; i++){
328 for(
int j=0; j!=4; j++){
330 if(i==0) G[i][j] = 1;
344 B[0] = barrier(1,sR,s1,s2,3.0,mass);
345 B[1] = barrier(1,sD,sR,s3,5.0,massDp);
350 for(
int i=0; i<4; i++){
351 temp_PDF += t1[i]*T1[i]*G[i][i];
356 B[0] = barrier(2,sR,s1,s2,3.0,mass);
357 B[1] = barrier(2,sD,sR,s3,5.0,massDp);
358 double t2[4][4], T2[4][4];
362 for(
int i=0; i<4; i++){
363 for(
int j=0; j<4; j++){
364 temp_PDF += t2[i][j]*T2[j][i]*G[i][i]*G[j][j];
369 v_re = temp_PDF*
B[0]*
B[1];
377void EvtDToPiPi0Etap::calEva(
378 double* Pip,
double*
Pi0,
double* Etap,
double *
mass,
double *width,
379 double *amp,
double *phase,
int* g0,
int* spin,
int* modetype,
int nstates,
double & Result)
381 double P12[4], P23[4], P13[4];
382 double coEff[2], tempPDF[2], ultPDF[2];
385 double sPi0, sEtap, sPip;
388 for(
int i=0; i<4; i++){
389 P12[i] = Pip[i] +
Pi0[i];
390 P13[i] = Pip[i] + Etap[i];
391 P23[i] =
Pi0[i] + Etap[i];
394 sPip = SCADot(Pip,Pip);
396 sEtap = SCADot(Etap,Etap);
398 s12 = SCADot(P12,P12);
399 s13 = SCADot(P13,P13);
400 s23 = SCADot(P23,P23);
402 double prop[2], partAmp, tempAmp[2];
411 for(
int i = 0; i<nstates; i++) {
417 coEff[0] = amp[i]*
cos(phase[i]);
418 coEff[1] = amp[i]*
sin(phase[i]);
420 if(modetype[i] == 12){
421 partAmp = DDalitz(Pip,
Pi0, Etap, spin[i], mass[i]);
422 if(g0[i]==1) propagatorGS(massSq, mass[i], width[i],
s12, sPip, sPi0, rRes, prop);
427 tempAmp[0] = partAmp*prop[0];
428 tempAmp[1] = partAmp*prop[1];
431 if(modetype[i] == 13){
432 partAmp = DDalitz(Pip, Etap,
Pi0, spin[i], mass[i]);
433 if(g0[i]==1) propagatorRBW(massSq, mass[i], width[i], s13, sPip, sEtap, rRes, spin[i], prop);
438 tempAmp[0] = partAmp*prop[0];
439 tempAmp[1] = partAmp*prop[1];
442 if(modetype[i] == 23){
443 partAmp = DDalitz(
Pi0, Etap, Pip, spin[i], mass[i]);
444 if(g0[i]==1) propagatorRBW(massSq, mass[i], width[i],
s23, sPi0, sEtap, rRes, spin[i], prop);
449 tempAmp[0] = partAmp*prop[0];
450 tempAmp[1] = partAmp*prop[1];
453 if(modetype[i] == 1111) {
458 Com_Multi(tempAmp, coEff, tempPDF);
460 ultPDF[0] += tempPDF[0];
461 ultPDF[1] += tempPDF[1];
464 double value = ultPDF[0]*ultPDF[0] + ultPDF[1]*ultPDF[1];
466 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 ~EvtDToPiPi0Etap()
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