30#define PRECISION ( 1.e-3 )
45 , _massFirst( dp.m( first( pairRes ) ) )
46 , _massSecond( dp.m( second( pairRes ) ) )
54 , _kmatrix_index( -1 )
77 double m0_mix,
double g0_mix,
double delta_mix,
86 , _massFirst( dp.m( first( pairRes ) ) )
87 , _massSecond( dp.m( second( pairRes ) ) )
90 , _delta_mix( delta_mix )
95 , _kmatrix_index( -1 )
120 , _pairAng( pairAng )
121 , _pairRes( pairRes )
126 , _massFirst( dp.m( first( pairRes ) ) )
127 , _massSecond( dp.m( second( pairRes ) ) )
134 , _coupling2( coupling2 )
135 , _kmatrix_index( -1 )
136 , _fr12prod( 0., 0. )
137 , _fr13prod( 0., 0. )
138 , _fr14prod( 0., 0. )
139 , _fr15prod( 0., 0. )
154 assert( _typeN !=
LASS );
155 assert( _typeN !=
NBW );
163 , _pairRes( pairRes )
167 , _massFirst( dp.m( first( pairRes ) ) )
168 , _massSecond( dp.m( second( pairRes ) ) )
176 , _kmatrix_index( -1 )
177 , _fr12prod( fr12prod )
178 , _fr13prod( fr13prod )
179 , _fr14prod( fr14prod )
180 , _fr15prod( fr15prod )
190 if ( nameIndex ==
"Pole1" ) _kmatrix_index = 1;
191 else if ( nameIndex ==
"Pole2" ) _kmatrix_index = 2;
192 else if ( nameIndex ==
"Pole3" ) _kmatrix_index = 3;
193 else if ( nameIndex ==
"Pole4" ) _kmatrix_index = 4;
194 else if ( nameIndex ==
"Pole5" ) _kmatrix_index = 5;
195 else if ( nameIndex ==
"f11prod" ) _kmatrix_index = 6;
201 double a,
double r,
double B,
double phiB,
double R,
204 , _pairRes( pairRes )
208 , _massFirst( dp.m( first( pairRes ) ) )
209 , _massSecond( dp.m( second( pairRes ) ) )
217 , _kmatrix_index( -1 )
218 , _fr12prod( 0., 0. )
219 , _fr13prod( 0., 0. )
220 , _fr14prod( 0., 0. )
221 , _fr15prod( 0., 0. )
236 , _pairAng( other._pairAng )
237 , _pairRes( other._pairRes )
238 , _spin( other._spin )
239 , _typeN( other._typeN )
244 , _massFirst( other._massFirst )
245 , _massSecond( other._massSecond )
246 , _m0_mix( other._m0_mix )
247 , _g0_mix( other._g0_mix )
248 , _delta_mix( other._delta_mix )
249 , _amp_mix( other._amp_mix )
252 , _coupling2( other._coupling2 )
253 , _kmatrix_index( other._kmatrix_index )
254 , _fr12prod( other._fr12prod )
255 , _fr13prod( other._fr13prod )
256 , _fr14prod( other._fr14prod )
257 , _fr15prod( other._fr15prod )
258 , _s0prod( other._s0prod )
261 , _Blass( other._Blass )
262 , _phiB( other._phiB )
264 , _phiR( other._phiR ) {}
269 double m = sqrt( x.q( _pairRes ) );
273 return Fvector( m * m, _kmatrix_index );
275 if ( _typeN ==
LASS )
return lass( m * m );
279 if ( _dp.bigM() != x.bigM() )
285 if ( _typeN ==
NBW ) { prop = propBreitWigner( _m0, _g0, m ); }
287 { prop = propGauss( _m0, _g0, m ); }
294 ( _g0 <= 0. || _vd.pD() <= 0. ) ? -_g0 : _g0 * _vd.widthFactor( vd );
299 assert( _massFirst == _massSecond );
300 prop = propGounarisSakurai( _m0, fabs( _g0 ), _vd.pD(), m, g, vd.
p() );
305 prop = propBreitWignerRel( _m0, g, m );
312 switch ( _coupling2 )
315 G1 = _g1 * _g1 * psFactor( _massFirst, _massSecond, m );
317 G2 = _g2 * _g2 * psFactor( mPic, mPic, m );
321 G1 = _g1 * _g1 * psFactor( _massFirst, _massSecond, m );
323 G2 = _g2 * _g2 * psFactor( mPiz, mPiz, m );
327 G1 = _g1 * _g1 * psFactor( _massFirst, _massSecond, m );
330 G2 = _g2 * _g2 * psFactor( mPic, mPic, mPiz, mPiz, m );
334 G1 = _g1 * _g1 * psFactor( _massFirst, _massSecond, m );
336 G2 = _g2 * _g2 * psFactor( mKc, mKc, m );
340 G1 = _g1 * _g1 * psFactor( _massFirst, _massSecond, m );
342 G2 = _g2 * _g2 * psFactor( mKz, mKz, m );
346 G1 = _g1 * _g1 * psFactor( _massFirst, _massSecond, m );
349 G2 = _g2 * _g2 * psFactor( mKc, mKc, mKz, mKz, m );
353 G1 = _g1 * _g1 * psFactor( _massFirst, _massSecond, m );
356 G2 = _g2 * _g2 * psFactor( mEta, mPic, m );
360 G1 = _g1 * _g1 * psFactor( _massFirst, _massSecond, m );
363 G2 = _g2 * _g2 * psFactor( mEta, mPiz, m );
369 G1 = _g1 * psFactor( mPic, mPic, m );
373 G2 = _g2 * psFactor( mKc, mKc, mKz, mKz, m );
377 std::cout <<
"EvtDalitzReso:evaluate(): PANIC, wrong coupling2 state." << std::endl;
382 if ( _coupling2 !=
WA76 ) prop = _g1 * propBreitWignerRelCoupled( _m0, G1, G2, m );
388 amp *= _vb.formFactor( vb );
389 amp *= _vd.formFactor( vd );
392 amp *= numerator( x, vb, vd );
398 if ( _typeN ==
NBW ) { prop_mix = propBreitWigner( _m0_mix, _g0_mix, m ); }
402 double g_mix = _g0_mix * _vd.widthFactor( vd );
403 prop_mix = propBreitWignerRel( _m0_mix, g_mix, m );
405 amp *= mixFactor( prop, prop_mix );
411EvtComplex EvtDalitzReso::psFactor(
double& ma,
double& mb,
double& m ) {
412 if ( m > ( ma + mb ) )
421 double phaseFactor_analyticalCont =
422 -0.5 * ( sqrt( 4 * ma * ma /
s - 1 ) + sqrt( 4 * mb * mb /
s - 1 ) );
423 return EvtComplex( phaseFactor_analyticalCont, 0 );
427EvtComplex EvtDalitzReso::psFactor(
double& ma1,
double& mb1,
double& ma2,
double& mb2,
429 return 0.5 * ( psFactor( ma1, mb1, m ) + psFactor( ma2, mb2, m ) );
432EvtComplex EvtDalitzReso::propGauss(
const double& m0,
const double& s0,
const double& m ) {
435 1. / sqrt(
EvtConst::twoPi ) / s0 *
exp( -( m - m0 ) * ( m - m0 ) / 2. / ( s0 * s0 ) );
436 return EvtComplex( gauss, 0. );
439EvtComplex EvtDalitzReso::propBreitWigner(
const double& m0,
const double& g0,
442 return sqrt( g0 /
EvtConst::twoPi ) / ( m - m0 - EvtComplex( 0.0, g0 / 2. ) );
445EvtComplex EvtDalitzReso::propBreitWignerRel(
const double& m0,
const double& g0,
448 return 1. / ( m0 * m0 - m * m - EvtComplex( 0., m0 * g0 ) );
454 return 1. / ( m0 * m0 - m * m - EvtComplex( 0., m0 ) * g0 );
460 return 1. / ( m0 * m0 - m * m - (
g1 + g2 ) );
463EvtComplex EvtDalitzReso::propGounarisSakurai(
const double& m0,
const double& g0,
464 const double& k0,
const double& m,
465 const double& g,
const double& k ) {
469 return ( 1. + GS_d( m0, k0 ) * g0 / m0 ) /
470 ( m0 * m0 - m * m - EvtComplex( 0., m * g ) + GS_f( m0, g0, k0, m, k ) );
473inline double EvtDalitzReso::GS_f(
const double& m0,
const double& g0,
const double& k0,
474 const double& m,
const double& k ) {
479 return g0 * m0 * m0 / ( k0 * k0 * k0 ) *
480 ( k * k * ( GS_h( m, k ) - GS_h( m0, k0 ) ) +
481 ( m0 * m0 - m * m ) * k0 * k0 * GS_dhods( m0, k0 ) );
484inline double EvtDalitzReso::GS_h(
const double& m,
const double& k ) {
485 return 2. /
EvtConst::pi * k / m * log( ( m + 2. * k ) / ( 2. * _massFirst ) );
488inline double EvtDalitzReso::GS_dhods(
const double& m0,
const double& k0 ) {
489 return GS_h( m0, k0 ) * ( 0.125 / ( k0 * k0 ) - 0.5 / ( m0 * m0 ) ) +
493inline double EvtDalitzReso::GS_d(
const double& m0,
const double& k0 ) {
494 return 3. /
EvtConst::pi * _massFirst * _massFirst / ( k0 * k0 ) *
495 log( ( m0 + 2. * k0 ) / ( 2. * _massFirst ) ) +
497 _massFirst * _massFirst * m0 / (
EvtConst::pi * k0 * k0 * k0 );
502 EvtComplex ret( 0., 0. );
505 if (
NBW == _typeN ) { ret = angDep(
x ); }
522 else if (
RBW_KUEHN == _typeN ) { ret = _m0 * _m0 * angDep(
x ); }
535 double mA =
x.m( iA );
536 double mB =
x.m( iB );
537 double mC =
x.m( iC );
538 double qAB =
x.q(
combine( iA, iB ) );
539 double qBC =
x.q(
combine( iB, iC ) );
540 double qCA =
x.q(
combine( iC, iA ) );
547 double mA2 = mA * mA;
548 double mB2 = mB * mB;
549 double mC2 = mC * mC;
553 { ret = qCA - qBC + ( M2 - mC2 ) * ( mB2 - mA2 ) / m02; }
556 double x1 = qBC - qCA + ( M2 - mC2 ) * ( mA2 - mB2 ) / m02;
557 double x2 = M2 - mC2;
558 double x3 = qAB - 2 * M2 - 2 * mC2 + x2 * x2 / m02;
559 double x4 = mA2 - mB2;
560 double x5 = qAB - 2 * mB2 - 2 * mA2 + x4 * x4 / m02;
561 ret = x1 * x1 - x3 * x5 / 3.;
573 x.cosTh( _pairAng, _pairRes );
574 if ( fabs( cosTh ) > 1. )
576 report(
INFO,
"EvtGen" ) <<
"cosTh " << cosTh << std::endl;
585 double Delta = _delta_mix * ( _m0 + _m0_mix );
586 return 1 / ( 1 - Delta * Delta * prop * prop_mix ) * ( 1 + _amp_mix * Delta * prop_mix );
589EvtComplex EvtDalitzReso::Fvector(
double s,
int index ) {
590 assert( index >= 1 && index <= 6 );
611 std::cout <<
"EvtDalitzReso::Fvector() error. Kmatrix solution incorrectly chosen ! "
658 else if ( solution == 1 )
700 else if ( solution == 2 )
744 double rho1sq, rho2sq, rho4sq, rho5sq;
749 double mpi = 0.13957;
750 double mK = 0.493677;
751 double meta = 0.54775;
752 double metap = 0.95778;
756 for (
int i = 0; i < 5; i++ )
758 for (
int j = 0; j < 5; j++ )
760 K[i][j] = EvtComplex( 0, 0 );
766 double s_scatt = 0.0;
767 if ( solution == 3 ) s_scatt = -3.92637;
768 else if ( solution == 1 ) s_scatt = -5.0;
769 else if ( solution == 2 ) s_scatt = -5.0;
780 else if ( solution == 1 )
788 else if ( solution == 2 )
803 rho1sq = 1. - pow(
mpi +
mpi, 2 ) /
s;
804 if ( rho1sq >= 0 ) rho[0] = EvtComplex( sqrt( rho1sq ), 0 );
805 else rho[0] = EvtComplex( 0, sqrt( -rho1sq ) );
807 rho2sq = 1. - pow( mK + mK, 2 ) /
s;
808 if ( rho2sq >= 0 ) rho[1] = EvtComplex( sqrt( rho2sq ), 0 );
809 else rho[1] = EvtComplex( 0, sqrt( -rho2sq ) );
815 double real = 1.2274 + .00370909 / (
s *
s ) - .111203 /
s - 6.39017 *
s +
816 16.8358 *
s *
s - 21.8845 *
s *
s *
s + 11.3153 *
s *
s *
s *
s;
817 double cont32 = sqrt( 1.0 - ( 16.0 *
mpi *
mpi ) );
818 rho[2] = EvtComplex( cont32 *
real, 0 );
820 else rho[2] = EvtComplex( sqrt( 1. - 16. *
mpi *
mpi /
s ), 0 );
823 if ( rho4sq >= 0 ) rho[3] = EvtComplex( sqrt( rho4sq ), 0 );
824 else rho[3] = EvtComplex( 0, sqrt( -rho4sq ) );
826 rho5sq = 1. - pow(
meta + metap, 2 ) /
s;
827 if ( rho5sq >= 0 ) rho[4] = EvtComplex( sqrt( rho5sq ), 0 );
828 else rho[4] = EvtComplex( 0, sqrt( -rho5sq ) );
830 double smallTerm = 1;
833 for (
int pole = 0; pole < 5; pole++ )
834 if ( fabs( pow( ma[pole], 2 ) -
s ) <
PRECISION ) smallTerm = pow( ma[pole], 2 ) -
s;
838 for (
int i = 0; i < 5; i++ )
840 for (
int j = 0; j < 5; j++ )
842 for (
int pole_index = 0; pole_index < 5; pole_index++ )
844 double A = g[pole_index][i] * g[pole_index][j];
845 double B = ma[pole_index] * ma[pole_index] -
s;
847 if ( fabs( B ) <
PRECISION ) K[i][j] += EvtComplex( A, 0 );
848 else K[i][j] += EvtComplex( A / B, 0 ) * smallTerm;
854 for (
int i = 0; i < 5; i++ )
856 for (
int j = 0; j < 5; j++ )
858 double C =
f[i][j] * ( 1.0 - s_scatt );
859 double D = (
s - s_scatt );
860 K[i][j] += EvtComplex(
C / D, 0 ) * smallTerm;
866 for (
int i = 0; i < 5; i++ )
868 for (
int j = 0; j < 5; j++ )
870 double E = (
s - ( sa *
mpi *
mpi * 0.5 ) ) * ( 1.0 - sa_0 );
871 double F = (
s - sa_0 );
872 K[i][j] *= EvtComplex( E / F, 0 );
878 static EvtMatrix<EvtComplex> mat;
881 for (
int row = 0; row < 5; row++ )
882 for (
int col = 0; col < 5; col++ )
884 ( row == col ) * smallTerm - EvtComplex( 0., 1. ) * K[row][col] * rho[col];
886 EvtMatrix<EvtComplex>* matInverse =
889 vector<EvtComplex> U1j;
890 for (
int j = 0; j < 5; j++ ) U1j.push_back( ( *matInverse )[0][j] );
895 EvtComplex value( 0, 0 );
899 for (
int j = 0; j < 5; j++ )
901 EvtComplex top = U1j[j] * g[index - 1][j];
902 double bottom = ma[index - 1] * ma[index - 1] -
s;
904 if ( fabs( bottom ) <
PRECISION ) value += top;
905 else value += top / bottom * smallTerm;
912 value += U1j[1] * _fr12prod;
913 value += U1j[2] * _fr13prod;
914 value += U1j[3] * _fr14prod;
915 value += U1j[4] * _fr15prod;
917 value *= ( 1 - _s0prod ) / (
s - _s0prod ) * smallTerm;
925 EvtTwoBodyKine vd( _massFirst, _massSecond, sqrt(
s ) );
927 double GammaM = _g0 * _vd.widthFactor( vd );
930 double cot_deltaB = 1.0 / ( _a *
q ) + 0.5 * _r *
q;
931 double deltaB = atan( 1.0 / cot_deltaB );
932 double totalB = deltaB + _phiB;
935 double deltaR = atan( ( _m0 * GammaM / ( _m0 * _m0 -
s ) ) );
936 double totalR = deltaR + _phiR;
939 EvtComplex bkgB, resT;
940 bkgB = EvtComplex( _Blass *
sin( totalB ), 0 ) * EvtComplex(
cos( totalB ),
sin( totalB ) );
941 resT = EvtComplex( _R *
sin( deltaR ), 0 ) * EvtComplex(
cos( totalR ),
sin( totalR ) ) *
942 EvtComplex(
cos( 2 * totalB ),
sin( 2 * totalB ) );
943 EvtComplex T = bkgB + resT;
TFile f("ana_bhabha660a_dqa_mcPat_zy_old.root")
EvtComplex exp(const EvtComplex &c)
ostream & report(Severity severity, const char *facility)
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
***************************************************************************************Pseudo Class RRes *****************************************************************************************Parameters and physical constants **Maarten sept ************************************************************************DOUBLE PRECISION xsmu **************************************************************************PARTICLE DATA all others are from PDG *Only resonances with known widths into electron pairs are sept ************************************************************************C Declarations C
static const double twoPi
EvtComplex evaluate(const EvtDalitzPoint &p)
static double getMass(EvtId i)
static EvtId getId(const std::string &name)
static int getSpin2(spintype stype)
double p(Index i=AB) const
static double d(int j, int m1, int m2, double theta)
Index common(Pair i, Pair j)
Pair combine(Index i, Index j)
Index other(Index i, Index j)