34 model_name=
"DToKSKSpi";
51 rho[0] = 0.964140442071117;
53 phi[0] = -3.654242163321078;
115 double P1[4], P2[4], P3[4];
116 P1[0] = D1.
get(0); P1[1] = D1.
get(1); P1[2] = D1.
get(2); P1[3] = D1.
get(3);
117 P2[0] = D2.
get(0); P2[1] = D2.
get(1); P2[2] = D2.
get(2); P2[3] = D2.
get(3);
118 P3[0] = D3.
get(0); P3[1] = D3.
get(1); P3[2] = D3.
get(2); P3[3] = D3.
get(3);
124 calEva(P1, P2, P3, mass, width, rho, phi, g0, spin, modetype, nstates, value);
130void EvtDToKSKSpi::Com_Multi(
double a1[2],
double a2[2],
double res[2])
132 res[0] = a1[0]*a2[0]-a1[1]*a2[1];
133 res[1] = a1[1]*a2[0]+a1[0]*a2[1];
135void EvtDToKSKSpi::Com_Divide(
double a1[2],
double a2[2],
double res[2])
137 double tmp = a2[0]*a2[0]+a2[1]*a2[1];
138 res[0] = (a1[0]*a2[0]+a1[1]*a2[1])/tmp;
139 res[1] = (a1[1]*a2[0]-a1[0]*a2[1])/tmp;
142double EvtDToKSKSpi::SCADot(
double a1[4],
double a2[4])
144 double _cal = a1[0]*a2[0]-a1[1]*a2[1]-a1[2]*a2[2]-a1[3]*a2[3];
147double EvtDToKSKSpi::barrier(
int l,
double sa,
double sb,
double sc,
double r,
double mass)
149 double q = (sa+sb-sc)*(sa+sb-sc)/(4*sa)-sb;
155 double q0 = (sa0+sb-sc)*(sa0+sb-sc)/(4*sa0)-sb;
156 if(q0 < 0) q0 = 1e-16;
160 if(l == 1) F = sqrt((1+z0)/(1+z));
161 if(l == 2) F = sqrt((9+3*z0+z0*z0)/(9+3*z+z*z));
165void EvtDToKSKSpi::calt1(
double daug1[4],
double daug2[4],
double t1[4])
169 for(
int i=0; i<4; i++) {
170 pa[i] = daug1[i] + daug2[i];
171 qa[i] = daug1[i] - daug2[i];
176 for(
int i=0; i<4; i++) {
177 t1[i] = qa[i] - tmp*pa[i];
181void EvtDToKSKSpi::calt2(
double daug1[4],
double daug2[4],
double t2[4][4])
185 calt1(daug1,daug2,t1);
186 r = SCADot(t1,t1)/3.0;
187 for(
int i=0; i<4; i++) {
188 pa[i] = daug1[i] + daug2[i];
191 for(
int i=0; i<4; i++) {
192 for(
int j=0; j<4; j++) {
193 t2[i][j] = t1[i]*t1[j] - r*(G[i][j]-pa[i]*pa[j]/p);
198double EvtDToKSKSpi::wid(
double mass2,
double mass,
double sa,
double sb,
double sc,
double r2,
int l)
203 double tmp1 = sa+tmp;
204 double q = 0.25*tmp1*tmp1/sa-sb;
206 double tmp2 = mass2+tmp;
207 double q0 = 0.25*tmp2*tmp2/mass2-sb;
212 if(l == 0) {widm = sqrt(
t)*
mass/m;}
213 else if(l == 1) {widm =
t*sqrt(
t)*
mass/m*(1+z0)/(1+z);}
214 else if(l == 2) {widm =
t*
t*sqrt(
t)*
mass/m*(9+3*z0+z0*z0)/(9+3*z+z*z);}
217double EvtDToKSKSpi::widl1(
double mass2,
double mass,
double sa,
double sb,
double sc,
double r2)
222 double tmp1 = sa+tmp;
223 double q = 0.25*tmp1*tmp1/sa-sb;
225 double tmp2 = mass2+tmp;
226 double q0 = 0.25*tmp2*tmp2/mass2-sb;
230 double F = (1+z0)/(1+z);
232 widm =
t*sqrt(
t)*
mass/m*F;
235void EvtDToKSKSpi::propagatorRBW(
double mass2,
double mass,
double width,
double sa,
double sb,
double sc,
double r2,
int l,
double prop[2])
241 b[1] = -
mass*width*wid(mass2,mass,sa,sb,sc,r2,l);
242 Com_Divide(a,
b,prop);
245void EvtDToKSKSpi::propagatorGS(
double mass2,
double mass,
double width,
double sa,
double sb,
double sc,
double r2,
double prop[2])
249 double tmp1 = sa+tmp;
250 double q2 = 0.25*tmp1*tmp1/sa-sb;
253 double tmp2 = mass2+tmp;
254 double q02 = 0.25*tmp2*tmp2/mass2-sb;
255 if(q02<0) q02 = 1e-16;
258 double q0 = sqrt(q02);
261 double tmp3 = log(mass+2*q0)+1.2926305904;
263 double h = GS1*
q/m*(log(m+2*
q)+1.2926305904);
264 double h0 = GS1*q0/
mass*tmp3;
265 double dh = h0*(0.125/q02-0.5/mass2)+GS3/mass2;
266 double d = GS2/q02*tmp3+GS3*
mass/q0-GS4*
mass/q03;
267 double f = mass2/q03*(q2*(h-h0)+(mass2-sa)*q02*dh);
269 a[0] = 1.0+d*width/
mass;
271 b[0] = mass2-sa+width*
f;
272 b[1] = -
mass*width*widl1(mass2,mass,sa,sb,sc,r2);
273 Com_Divide(a,
b,prop);
277void EvtDToKSKSpi::KPiSLASS(
double sa,
double sb,
double sc,
double prop[2]) {
278 const double m1430 = 1.441;
279 const double sa0 = 1.441*1.441;
280 const double w1430 = 0.193;
281 const double Lass1 = 0.25/sa0;
283 double tmp1 = sa0+tmp;
284 double q0 = Lass1*tmp1*tmp1-sb;
286 double tmp2 = sa+tmp;
287 double qs = 0.25*tmp2*tmp2/sa-sb;
289 double width = w1430*
q*m1430/sqrt(sa*q0);
290 double temp_R = atan(m1430*width/(sa0-sa));
291 if(temp_R<0) temp_R += math_pi;
292 double deltaR = -109.7 + temp_R;
293 double temp_F = atan(0.226*
q/(2.0-3.819*qs));
294 if(temp_F<0) temp_F += math_pi;
295 double deltaF = 0.1 + temp_F;
296 double deltaS = deltaR + 2.0*deltaF;
297 double t1 = 0.96*
sin(deltaF);
298 double t2 =
sin(deltaR);
304 prop[0] = t1*CF[0] + t2*
CS[0];
305 prop[1] = t1*CF[1] + t2*
CS[1];
308double EvtDToKSKSpi::DDalitz(
double P1[4],
double P2[4],
double P3[4],
int Ang,
double mass){
310 double temp_PDF, v_re;
313 double B[2], s1, s2, s3, sR, sD;
314 for(
int i=0; i<4; i++){
315 pR[i] = P1[i] + P2[i];
316 pD[i] = pR[i] + P3[i];
324 int G[4][4] = { {1,0,0,0}, {0,-1,0,0}, {0,0,-1,0}, {0,0,0,-1} };
332 B[0] = barrier(1,sR,s1,s2,3.0,mass);
333 B[1] = barrier(1,sD,sR,s3,5.0,1.86966);
338 for(
int i=0; i<4; i++){
339 temp_PDF += t1[i]*T1[i]*G[i][i];
343 B[0] = barrier(2,sR,s1,s2,3.0,mass);
344 B[1] = barrier(2,sD,sR,s3,5.0,1.86966);
345 double t2[4][4], T2[4][4];
349 for(
int i=0; i<4; i++){
350 for(
int j=0; j<4; j++){
351 temp_PDF += t2[i][j]*T2[j][i]*G[i][i]*G[j][j];
355 v_re = temp_PDF*
B[0]*
B[1];
359void EvtDToKSKSpi::calEva(
double* Ks01,
double* Ks02,
double* Pic,
double *mass1,
double *width1,
double *amp,
double *phase,
int* g0,
int* spin,
int* modetype,
int nstates,
double & Result)
363 double P12[4], P23[4], P13[4];
364 double cof[2], amp_PDF[2], PDF[2];
365 double scpi, sks02, sks01;
367 for(
int i=0; i<4; i++){
368 P12[i] = Ks01[i] + Ks02[i];
369 P13[i] = Ks01[i] + Pic[i];
370 P23[i] = Ks02[i] + Pic[i];
372 sks01 = SCADot(Ks01,Ks01);
373 sks02 = SCADot(Ks02,Ks02);
374 scpi = SCADot(Pic,Pic);
375 s12 = SCADot(P12,P12);
376 s13 = SCADot(P13,P13);
377 s23 = SCADot(P23,P23);
378 double pro[2], temp_PDF, amp_tmp[2],temp_PDF1 ,temp_PDF2,pro1[2],pro2[2];
386 for(
int i=0; i<nstates; i++) {
389 mass1sq = mass1[i]*mass1[i];
390 cof[0] = amp[i]*
cos(phase[i]);
391 cof[1] = amp[i]*
sin(phase[i]);
393 if(modetype[i] == 12){
394 temp_PDF = DDalitz(Ks01, Ks02, Pic, spin[i], mass1[i]);
395 if(g0[i]==1) propagatorRBW(mass1sq, mass1[i],width1[i],
s12,sks01,sks02,rRes,spin[i],pro);
396 if(g0[i]==12) KPiSLASS(
s12,sks01,sks02,pro);
401 amp_tmp[0] = temp_PDF*pro[0];
402 amp_tmp[1] = temp_PDF*pro[1];
404 if(modetype[i] == 13){
405 temp_PDF1 = DDalitz(Ks01, Pic, Ks02, spin[i], mass1[i]);
406 if(g0[i]==1) propagatorRBW(mass1sq, mass1[i],width1[i],s13,sks01,scpi,rRes,spin[i],pro1);
407 if(g0[i]==12) KPiSLASS(s13,sks01,scpi,pro1);
412 temp_PDF2 = DDalitz(Ks02, Pic, Ks01, spin[i], mass1[i]);
413 if(g0[i]==1) propagatorRBW(mass1sq, mass1[i],width1[i],
s23,sks02,scpi,rRes,spin[i],pro2);
414 if(g0[i]==12) KPiSLASS(
s23,sks02,scpi,pro2);
419 amp_tmp[0] = ( temp_PDF1*pro1[0]+temp_PDF2*pro2[0]);
420 amp_tmp[1] = ( temp_PDF1*pro1[1]+temp_PDF2*pro2[1]);
422 Com_Multi(amp_tmp,cof,amp_PDF);
423 PDF[0] += amp_PDF[0];
424 PDF[1] += amp_PDF[1];
427 double value = PDF[0]*PDF[0] + PDF[1]*PDF[1];
428 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 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