35 model_name=
"DsToEtappipi0";
97 int GG[4][4] = { {1,0,0,0}, {0,-1,0,0}, {0,0,-1,0}, {0,0,0,-1} };
98 for (
int i=0; i<4; i++) {
99 for (
int j=0; j<4; j++) {
146 double P1[4], P2[4], P3[4];
147 P1[0] = D1.
get(0); P1[1] = D1.
get(1); P1[2] = D1.
get(2); P1[3] = D1.
get(3);
148 P2[0] = D2.
get(0); P2[1] = D2.
get(1); P2[2] = D2.
get(2); P2[3] = D2.
get(3);
149 P3[0] = D3.
get(0); P3[1] = D3.
get(1); P3[2] = D3.
get(2); P3[3] = D3.
get(3);
156 calEva(P1, P2, P3, mass, width, rho, phi, g0, spin, modetype, nstates, value);
163void EvtDsToEtappipi0::Com_Multi(
double a1[2],
double a2[2],
double res[2])
165 res[0] = a1[0]*a2[0]-a1[1]*a2[1];
166 res[1] = a1[1]*a2[0]+a1[0]*a2[1];
168void EvtDsToEtappipi0::Com_Divide(
double a1[2],
double a2[2],
double res[2])
170 double tmp = a2[0]*a2[0]+a2[1]*a2[1];
171 res[0] = (a1[0]*a2[0]+a1[1]*a2[1])/tmp;
172 res[1] = (a1[1]*a2[0]-a1[0]*a2[1])/tmp;
175double EvtDsToEtappipi0::SCADot(
double a1[4],
double a2[4])
177 double _cal = a1[0]*a2[0]-a1[1]*a2[1]-a1[2]*a2[2]-a1[3]*a2[3];
180double EvtDsToEtappipi0::barrier(
int l,
double sa,
double sb,
double sc,
double r,
double mass)
182 double q = (sa+sb-sc)*(sa+sb-sc)/(4*sa)-sb;
188 double q0 = (sa0+sb-sc)*(sa0+sb-sc)/(4*sa0)-sb;
189 if(q0 < 0) q0 = 1e-16;
193 if(l == 1) F = sqrt((1+z0)/(1+z));
194 if(l == 2) F = sqrt((9+3*z0+z0*z0)/(9+3*z+z*z));
198void EvtDsToEtappipi0::calt1(
double daug1[4],
double daug2[4],
double t1[4])
202 for(
int i=0; i<4; i++) {
203 pa[i] = daug1[i] + daug2[i];
204 qa[i] = daug1[i] - daug2[i];
209 for(
int i=0; i<4; i++) {
210 t1[i] = qa[i] - tmp*pa[i];
213void EvtDsToEtappipi0::calt2(
double daug1[4],
double daug2[4],
double t2[4][4])
217 calt1(daug1,daug2,t1);
218 r = SCADot(t1,t1)/3.0;
219 for(
int i=0; i<4; i++) {
220 pa[i] = daug1[i] + daug2[i];
223 for(
int i=0; i<4; i++) {
224 for(
int j=0; j<4; j++) {
225 t2[i][j] = t1[i]*t1[j] - r*(G[i][j]-pa[i]*pa[j]/p);
231double EvtDsToEtappipi0::wid(
double mass2,
double mass,
double sa,
double sb,
double sc,
double r2,
int l)
236 double tmp1 = sa+tmp;
237 double q = 0.25*tmp1*tmp1/sa-sb;
239 double tmp2 = mass2+tmp;
240 double q0 = 0.25*tmp2*tmp2/mass2-sb;
245 if(l == 0) {widm = sqrt(
t)*
mass/m;}
246 else if(l == 1) {widm =
t*sqrt(
t)*
mass/m*(1+z0)/(1+z);}
247 else if(l == 2) {widm =
t*
t*sqrt(
t)*
mass/m*(9+3*z0+z0*z0)/(9+3*z+z*z);}
250double EvtDsToEtappipi0::widl1(
double mass2,
double mass,
double sa,
double sb,
double sc,
double r2)
255 double tmp1 = sa+tmp;
256 double q = 0.25*tmp1*tmp1/sa-sb;
258 double tmp2 = mass2+tmp;
259 double q0 = 0.25*tmp2*tmp2/mass2-sb;
263 double F = (1+z0)/(1+z);
265 widm =
t*sqrt(
t)*
mass/m*F;
268void EvtDsToEtappipi0::propagatorRBW(
double mass2,
double mass,
double width,
double sa,
double sb,
double sc,
double r2,
int l,
double prop[2])
274 b[1] = -
mass*width*wid(mass2,mass,sa,sb,sc,r2,l);
275 Com_Divide(a,
b,prop);
278void EvtDsToEtappipi0::propagatorGS(
double mass2,
double mass,
double width,
double sa,
double sb,
double sc,
double r2,
double prop[2])
282 double tmp1 = sa+tmp;
283 double q2 = 0.25*tmp1*tmp1/sa-sb;
286 double tmp2 = mass2+tmp;
287 double q02 = 0.25*tmp2*tmp2/mass2-sb;
288 if(q02<0) q02 = 1e-16;
291 double q0 = sqrt(q02);
294 double tmp3 = log(mass+2*q0)+1.2926305904;
296 double h = GS1*
q/m*(log(m+2*
q)+1.2926305904);
297 double h0 = GS1*q0/
mass*tmp3;
298 double dh = h0*(0.125/q02-0.5/mass2)+GS3/mass2;
299 double d = GS2/q02*tmp3+GS3*
mass/q0-GS4*
mass/q03;
300 double f = mass2/q03*(q2*(h-h0)+(mass2-sa)*q02*dh);
302 a[0] = 1.0+d*width/
mass;
304 b[0] = mass2-sa+width*
f;
305 b[1] = -
mass*width*widl1(mass2,mass,sa,sb,sc,r2);
306 Com_Divide(a,
b,prop);
309void EvtDsToEtappipi0::PiPiSWASS(
double sa,
double sb,
double sc,
double prop[2]) {
311 double tmp2 = sa+tmp;
312 double qs = 0.25*tmp2*tmp2/sa-sb;
314 double a0 = -0.11/mass_Pion;
315 prop[0] = 1/(1+
a0*
a0*
q*
q);
319void EvtDsToEtappipi0::Flatte_rhoab(
double sa,
double sb,
double rho[2])
321 double q = 1.0-(4*sb/sa);
333void EvtDsToEtappipi0:: propagator980(
double mass,
double sx,
double *sb,
double prop[2])
336 double gpipi1 = 2.0/3.0*0.165;
337 double gpipi2 = 1.0/3.0*0.165;
338 double gKK1 = 0.5*0.69466;
339 double gKK2 = 0.5*0.69466;
341 double unit[2]={1.0};
344 Flatte_rhoab(sx,sb[0],rho1);
346 Flatte_rhoab(sx,sb[1],rho2);
348 Flatte_rhoab(sx,sb[2],rho3);
350 Flatte_rhoab(sx,sb[3],rho4);
352 double tmp1[2]={gpipi1,0};
354 double tmp2[2]={gpipi2,0};
356 double tmp3[2]={gKK1,0};
358 double tmp4[2]={gKK2,0};
361 Com_Multi(tmp1,rho1,tmp11);
362 Com_Multi(tmp2,rho2,tmp22);
363 Com_Multi(tmp3,rho3,tmp33);
364 Com_Multi(tmp4,rho4,tmp44);
366 double tmp5[2]={tmp11[0]+tmp22[0]+tmp33[0]+tmp44[0],tmp11[1]+tmp22[1]+tmp33[1]+tmp44[1]};
368 Com_Multi(tmp5, ci,tmp51);
369 double tmp6[2]={
mass*
mass-sx-tmp51[0], -1.0*tmp51[1]};
371 Com_Divide(
unit,tmp6, prop);
376double EvtDsToEtappipi0::DDalitz(
double P1[4],
double P2[4],
double P3[4],
int Ang,
double mass){
378 double temp_PDF, v_re;
381 double B[2], s1, s2, s3, sR, sD;
382 for(
int i=0; i<4; i++){
383 pR[i] = P1[i] + P2[i];
384 pD[i] = pR[i] + P3[i];
407 B[0] = barrier(1,sR,s1,s2,3.0,mass);
408 B[1] = barrier(1,sD,sR,s3,5.0,1.9683);
413 for(
int i=0; i<4; i++){
414 temp_PDF += t1[i]*T1[i]*G[i][i];
418 B[0] = barrier(2,sR,s1,s2,3.0,mass);
419 B[1] = barrier(2,sD,sR,s3,5.0,1.9683);
420 double t2[4][4], T2[4][4];
424 for(
int i=0; i<4; i++){
425 for(
int j=0; j<4; j++){
426 temp_PDF += t2[i][j]*T2[j][i]*G[i][i]*G[j][j];
430 v_re = temp_PDF*
B[0]*
B[1];
435void EvtDsToEtappipi0::calEva(
double* EtaP,
double* Pi,
double*
Pi0,
double *mass1,
double *width1,
double *amp,
double *phase,
int* g0,
int* spin,
int* modetype,
int nstates,
double & Result)
437 double P12[4], P23[4], P13[4];
438 double cof[2], amp_PDF[2], PDF[2];
439 double spi, spi0, setap;
441 for(
int i=0; i<4; i++){
442 P23[i] = Pi[i] +
Pi0[i];
443 P12[i] = EtaP[i] + Pi[i];
444 P13[i] = EtaP[i] +
Pi0[i];
446 setap = SCADot(EtaP,EtaP);
449 s12 = SCADot(P12,P12);
450 s13 = SCADot(P13,P13);
451 s23 = SCADot(P23,P23);
453 double pro[2], temp_PDF, amp_tmp[2];
461 for(
int i=0; i<nstates; i++) {
464 mass1sq = mass1[i]*mass1[i];
465 cof[0] = amp[i]*
cos(phase[i]);
466 cof[1] = amp[i]*
sin(phase[i]);
469 if(modetype[i] == 23){
470 temp_PDF = DDalitz(Pi,
Pi0, EtaP, spin[i], mass1[i]);
471 if(g0[i]==1) propagatorGS(mass1sq,mass1[i],width1[i],
s23,spi,spi0,9.0,pro);
472 if(g0[i]==12) PiPiSWASS(
s23,spi,spi0,pro);
479 amp_tmp[0] = temp_PDF*pro[0];
480 amp_tmp[1] = temp_PDF*pro[1];
483 Com_Multi(amp_tmp,cof,amp_PDF);
484 PDF[0] += amp_PDF[0];
485 PDF[1] += amp_PDF[1];
487 double value = PDF[0]*PDF[0] + PDF[1]*PDF[1];
double sin(const BesAngle a)
double cos(const BesAngle a)
TFile f("ana_bhabha660a_dqa_mcPat_zy_old.root")
character *LEPTONflag integer iresonances real zeta5 real a0
*******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)
virtual ~EvtDsToEtappipi0()
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)
double double double double * s12
double double double double double * s23