47 double ratio = 1 / ( 1 + 0.65 * 0.65 );
55 double Abar2 =
real( Abarf ) *
real( Abarf ) +
imag( Abarf ) *
imag( Abarf );
58 double rbarf2 =
real( rbarf ) *
real( rbarf ) +
imag( rbarf ) *
imag( rbarf );
60 fract = ( Abar2 * ( 1 + rbarf2 + ( 1 - rbarf2 ) * ratio ) ) /
61 ( Abar2 * ( 1 + rbarf2 + ( 1 - rbarf2 ) * ratio ) +
62 A2 * ( 1 + rf2 + ( 1 - rf2 ) * ratio ) );
66 EvtComplex Abarfbar,
double deltam,
double beta,
int flip,
80 double gamma_B = deltam / xd;
81 double IAf, IAfbar, IAbarf, IAbarfbar;
83 double rf2, rfbar2, rbarf2, rbarfbar2;
84 double Af2, Afbar2, Abarf2, Abarfbar2;
87 rfbar =
EvtComplex(
cos( 2.0 * beta ),
sin( 2.0 * beta ) ) * Abarfbar / Afbar;
89 rbarfbar =
EvtComplex(
cos( -2.0 * beta ),
sin( -2.0 * beta ) ) * Afbar / Abarfbar;
94 rbarfbar2 =
real( rbarfbar ) *
real( rbarfbar ) +
imag( rbarfbar ) *
imag( rbarfbar );
99 Abarfbar2 =
real( Abarfbar ) *
real( Abarfbar ) +
imag( Abarfbar ) *
imag( Abarfbar );
105 IAf = ( Af2 / ( 2 * gamma_B ) ) * ( 1 + rf2 + ( 1 - rf2 ) / ( 1 + xd * xd ) );
106 IAfbar = ( Afbar2 / ( 2 * gamma_B ) ) * ( 1 + rfbar2 + ( 1 - rfbar2 ) / ( 1 + xd * xd ) );
107 IAbarf = ( Abarf2 / ( 2 * gamma_B ) ) * ( 1 + rbarf2 + ( 1 - rbarf2 ) / ( 1 + xd * xd ) );
108 IAbarfbar = ( Abarfbar2 / ( 2 * gamma_B ) ) *
109 ( 1 + rbarfbar2 + ( 1 - rbarfbar2 ) / ( 1 + xd * xd ) );
113 fract = IAbarf / ( IAbarf + IAf ) + flip * IAbarfbar / ( IAfbar + IAbarfbar );
121 static int entryCount = 0;
146 if ( p->
getId() == B0 ) otherb = B0B;
147 if ( p->
getId() == B0B ) otherb = B0;
153 if ( parent->
getDaug( 0 ) != p )
174 if ( other->getId().isAlias() )
181 if ( entryCount == 1 )
186 bool decayed = other->isDecayed();
193 if ( isB0 ) { scalar_part->
init( B0, p_init ); }
194 else { scalar_part->
init( B0B, p_init ); }
197 other->setDiagonalSpinDensity();
208 otherb = other->getId();
210 other->setLifetime();
213 otherb = other->getId();
217 report(
INFO,
"EvtGen" ) <<
"We have an error here!!!!" << endl;
218 otherb =
EvtId( -1, -1 );
237 static double ctau = ctauL < ctauH ? ctauH : ctauL;
240 if ( parent != 0 && ( parent->
getId() == BS0 || parent->
getId() == BSB ) )
242 if ( parent->
getId() == BS0 ) otherb = BSB;
243 if ( parent->
getId() == BSB ) otherb = BS0;
247 if ( p->
getId() == BS0 ) otherb = BSB;
248 if ( p->
getId() == BSB ) otherb = BS0;
259 if ( parent == 0 || parent->
getId() != UPS4 )
264 if ( p->
getId() == B0 ) otherb = B0B;
265 if ( p->
getId() == B0B ) otherb = B0;
266 if ( p->
getId() == BS0 ) otherb = BSB;
267 if ( p->
getId() == BSB ) otherb = BS0;
272 if ( parent->
getDaug( 0 ) != p )
292 stdHepNum =
abs( stdHepNum );
297 std::string hname = partName + std::string(
"H" );
298 std::string lname = partName + std::string(
"L" );
305 double ctau = 0.5 * ( ctauL + ctauH );
306 double y = ( ctauH - ctauL ) / ctau;
310 std::string qoverpParmName = std::string(
"qoverp_incohMix_" ) + partName;
311 std::string mdParmName = std::string(
"dm_incohMix_" ) + partName;
317 if (
id == partId ) { fac = 1.0 / ( qoverp * qoverp ); }
318 else { fac = qoverp * qoverp; }
320 double mixprob = ( x * x + y * y ) / ( x * x + y * y + fac * ( 2 + x * x - y * y ) );
330 prob = 1 +
exp( y *
t / ctau ) + mixsign * 2 *
exp( 0.5 * y *
t / ctau ) *
cos( x *
t );
335 if ( mixsign == -1 ) mix = 1;
double imag(const EvtComplex &c)
EvtComplex exp(const EvtComplex &c)
ostream & report(Severity severity, const char *facility)
double sin(const BesAngle a)
double cos(const BesAngle a)
static void fractB0nonCP(EvtComplex Af, EvtComplex Abarf, EvtComplex Afbar, EvtComplex Abarfbar, double deltam, double beta, int flip, double &fract)
static void fractB0CP(EvtComplex Af, EvtComplex Abarf, double deltam, double beta, double &fract)
static void incoherentMix(const EvtId id, double &t, int &mix)
static void OtherB(EvtParticle *p, double &t, EvtId &otherb)
static int getStdHep(EvtId id)
static EvtId evtIdFromStdHep(int stdhep)
static std::string name(EvtId i)
static EvtId getId(const std::string &name)
static double getctau(EvtId i)
void insertDaugPtr(int idaug, EvtParticle *partptr)
EvtParticle * getParent()
void setLifetime(double tau)
EvtParticle * getDaug(int i)
static double Flat(double min, double max)
void init(EvtId part_n, double e, double px, double py, double pz)
static std::string Get(const std::string &name, int &ierr)