75 int GG[4][4] = { { 1, 0, 0, 0 }, { 0, -1, 0, 0 }, { 0, 0, -1, 0 }, { 0, 0, 0, -1 } };
77 for (
int i = 0; i < 4; i++ )
79 for (
int j = 0; j < 4; j++ ) { G[i][j] = GG[i][j]; }
125 double P1[4], P2[4], P3[4];
141 int g0[2] = { 1, 0 };
142 int spin[2] = { 1, 2 };
144 calEva( P1, P2, P3, mass, width, rho, phi, g0, spin, modetype, nstates, value );
154void EvtDToPiPi0Etap::Com_Multi(
double a1[2],
double a2[2],
double res[2] ) {
155 res[0] = a1[0] * a2[0] - a1[1] * a2[1];
156 res[1] = a1[1] * a2[0] + a1[0] * a2[1];
159void EvtDToPiPi0Etap::Com_Divide(
double a1[2],
double a2[2],
double res[2] ) {
160 double tmp = a2[0] * a2[0] + a2[1] * a2[1];
161 res[0] = ( a1[0] * a2[0] + a1[1] * a2[1] ) / tmp;
162 res[1] = ( a1[1] * a2[0] - a1[0] * a2[1] ) / tmp;
165double 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,
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;
180 double z0 = q0 * r * r;
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] ) {
195 for (
int i = 0; i < 4; i++ )
197 pa[i] = daug1[i] + daug2[i];
198 qa[i] = daug1[i] - daug2[i];
200 p = SCADot( pa, pa );
201 pq = SCADot( pa, qa );
203 for (
int i = 0; i < 4; i++ ) { t1[i] = qa[i] - tmp * pa[i]; }
206void EvtDToPiPi0Etap::calt2(
double daug1[4],
double daug2[4],
double t2[4][4] ) {
209 calt1( daug1, daug2, t1 );
210 r = SCADot( t1, t1 ) / 3.0;
211 for (
int i = 0; i < 4; i++ ) { pa[i] = daug1[i] + daug2[i]; }
212 p = SCADot( pa, pa );
213 for (
int i = 0; i < 4; i++ )
215 for (
int j = 0; j < 4; j++ )
216 { t2[i][j] = t1[i] * t1[j] - r * ( G[i][j] - pa[i] * pa[j] / p ); }
224double EvtDToPiPi0Etap::wid(
double mass2,
double mass,
double sa,
double sb,
double sc,
227 double m = sqrt( sa );
228 double tmp = sb - sc;
229 double tmp1 = sa + tmp;
230 double q = 0.25 * tmp1 * tmp1 / sa - sb;
232 double tmp2 = mass2 + tmp;
233 double q0 = 0.25 * tmp2 * tmp2 / mass2 - sb;
234 if ( q0 < 0 ) q0 = -q0;
238 if ( l == 0 ) { widm = sqrt(
t ) * mass / m; }
239 else if ( l == 1 ) { widm =
t * sqrt(
t ) * mass / m * ( 1 + z0 ) / ( 1 + z ); }
241 { widm =
t *
t * sqrt(
t ) * mass / m * ( 9 + 3 * z0 + z0 * z0 ) / ( 9 + 3 * z + z * z ); }
245double EvtDToPiPi0Etap::widl1(
double mass2,
double mass,
double sa,
double sb,
double sc,
248 double m = sqrt( sa );
249 double tmp = sb - sc;
250 double tmp1 = sa + tmp;
251 double q = 0.25 * tmp1 * tmp1 / sa - sb;
253 double tmp2 = mass2 + tmp;
254 double q0 = 0.25 * tmp2 * tmp2 / mass2 - sb;
255 if ( q0 < 0 ) q0 = -q0;
258 double F = ( 1 + z0 ) / ( 1 + z );
260 widm =
t * sqrt(
t ) * mass / m * F;
264void EvtDToPiPi0Etap::propagatorRBW(
double mass2,
double mass,
double width,
double sa,
265 double sb,
double sc,
double r2,
int l,
double prop[2] ) {
271 b[1] = -mass * width * wid( mass2, mass, sa, sb, sc, r2, l );
272 Com_Divide( a, b, prop );
275void EvtDToPiPi0Etap::propagatorGS(
double mass2,
double mass,
double width,
double sa,
276 double sb,
double sc,
double r2,
double prop[2] ) {
278 double tmp = sb - sc;
279 double tmp1 = sa + tmp;
280 double q2 = 0.25 * tmp1 * tmp1 / sa - sb;
281 if ( q2 < 0 ) q2 = 1e-16;
283 double tmp2 = mass2 + tmp;
284 double q02 = 0.25 * tmp2 * tmp2 / mass2 - sb;
285 if ( q02 < 0 ) q02 = 1e-16;
287 double q = sqrt( q2 );
288 double q0 = sqrt( q02 );
289 double m = sqrt( sa );
290 double q03 = q0 * q02;
291 double tmp3 = log( mass + 2 * q0 ) + 1.292621885;
293 double h = GS1 *
q / m * ( log( m + 2 *
q ) + 1.292621885 );
294 double h0 = GS1 * q0 / mass * tmp3;
295 double dh = h0 * ( 0.125 / q02 - 0.5 / mass2 ) + GS3 / mass2;
296 double d = GS2 / q02 * tmp3 + GS3 * mass / q0 - GS4 * mass / q03;
297 double f = mass2 / q03 * ( q2 * ( h - h0 ) + ( mass2 - sa ) * q02 * dh );
299 a[0] = 1.0 + d * width / mass;
301 b[0] = mass2 - sa + width *
f;
302 b[1] = -mass * width * widl1( mass2, mass, sa, sb, sc, r2 );
303 Com_Divide( a, b, prop );
306double EvtDToPiPi0Etap::DDalitz(
double P1[4],
double P2[4],
double P3[4],
int Ang,
309 double temp_PDF, v_re;
312 double B[2], s1, s2, s3, sR, sD;
313 for (
int i = 0; i < 4; i++ )
315 pR[i] = P1[i] + P2[i];
316 pD[i] = pR[i] + P3[i];
318 s1 = SCADot( P1, P1 );
319 s2 = SCADot( P2, P2 );
320 s3 = SCADot( P3, P3 );
321 sR = SCADot( pR, pR );
322 sD = SCADot( pD, pD );
324 for (
int i = 0; i != 4; i++ )
326 for (
int j = 0; j != 4; j++ )
330 if ( i == 0 ) G[i][j] = 1;
346 B[0] = barrier( 1, sR, s1, s2, 3.0, mass );
347 B[1] = barrier( 1, sD, sR, s3, 5.0, massDp );
352 for (
int i = 0; i < 4; i++ ) { temp_PDF += t1[i] * T1[i] * G[i][i]; }
357 B[0] = barrier( 2, sR, s1, s2, 3.0, mass );
358 B[1] = barrier( 2, sD, sR, s3, 5.0, massDp );
359 double t2[4][4], T2[4][4];
363 for (
int i = 0; i < 4; i++ )
365 for (
int j = 0; j < 4; j++ ) { 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(
double* Pip,
double*
Pi0,
double* Etap,
double*
mass,
378 double* width,
double* amp,
double* phase,
int* g0,
int* spin,
379 int* modetype,
int nstates,
double& Result ) {
380 double P12[4], P23[4], P13[4];
381 double coEff[2], tempPDF[2], ultPDF[2];
384 double sPi0, sEtap, sPip;
385 double s12, s13, s23;
387 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 );
395 sPi0 = SCADot( Pi0, Pi0 );
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 massSq = mass[i] * mass[i];
418 coEff[0] = amp[i] *
cos( phase[i] );
419 coEff[1] = amp[i] *
sin( phase[i] );
421 if ( modetype[i] == 12 )
423 partAmp = DDalitz( Pip, Pi0, Etap, spin[i], mass[i] );
424 if ( g0[i] == 1 ) propagatorGS( massSq, mass[i], width[i], s12, sPip, sPi0, rRes, prop );
430 tempAmp[0] = partAmp * prop[0];
431 tempAmp[1] = partAmp * prop[1];
434 if ( modetype[i] == 13 )
436 partAmp = DDalitz( Pip, Etap, Pi0, spin[i], mass[i] );
438 propagatorRBW( massSq, mass[i], width[i], s13, sPip, sEtap, rRes, spin[i], prop );
444 tempAmp[0] = partAmp * prop[0];
445 tempAmp[1] = partAmp * prop[1];
448 if ( modetype[i] == 23 )
450 partAmp = DDalitz( Pi0, Etap, Pip, spin[i], mass[i] );
452 propagatorRBW( massSq, mass[i], width[i], s23, sPi0, sEtap, rRes, spin[i], prop );
458 tempAmp[0] = partAmp * prop[0];
459 tempAmp[1] = partAmp * prop[1];
462 if ( modetype[i] == 1111 )
468 Com_Multi( tempAmp, coEff, tempPDF );
470 ultPDF[0] += tempPDF[0];
471 ultPDF[1] += tempPDF[1];
474 double value = ultPDF[0] * ultPDF[0] + ultPDF[1] * ultPDF[1];
476 if ( value <= 0 ) value = 1e-20;
TFile f("ana_bhabha660a_dqa_mcPat_zy_old.root")
double sin(const BesAngle a)
double cos(const BesAngle a)
****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)