22#include "EvtGenBase/EvtPatches.hh"
23#include "EvtGenBase/EvtPatches.hh"
24#include "EvtGenBase/EvtParticle.hh"
25#include "EvtGenBase/EvtScalarParticle.hh"
26#include "EvtGenBase/EvtRandom.hh"
27#include "EvtGenBase/EvtCPUtil.hh"
28#include "EvtGenBase/EvtPDL.hh"
29#include "EvtGenBase/EvtReport.hh"
30#include "EvtGenBase/EvtSymTable.hh"
31#include "EvtGenBase/EvtConst.hh"
42 double deltam,
double beta,
double &fract) {
49 double ratio = 1/(1 + 0.65*0.65);
62 fract = (Abar2*(1+ rbarf2 + (1 - rbarf2)*ratio))/(Abar2*(1+ rbarf2 + (1 - rbarf2)*ratio) + A2*(1+ rf2 + (1 - rf2)*ratio));
68 double deltam,
double beta,
69 int flip,
double &fract) {
82 double gamma_B = deltam/xd;
83 double IAf, IAfbar, IAbarf, IAbarfbar;
85 double rf2, rfbar2, rbarf2, rbarfbar2;
86 double Af2, Afbar2, Abarf2, Abarfbar2;
109 IAf = (Af2/(2*gamma_B))*(1+rf2+(1-rf2)/(1+xd*xd));
110 IAfbar = (Afbar2/(2*gamma_B))*(1+rfbar2+(1-rfbar2)/(1+xd*xd));
111 IAbarf = (Abarf2/(2*gamma_B))*(1+rbarf2+(1-rbarf2)/(1+xd*xd));
112 IAbarfbar = (Abarfbar2/(2*gamma_B))*(1+rbarfbar2+(1-rbarfbar2)/(1+xd*xd));
116 fract = IAbarf/(IAbarf+IAf) + flip*IAbarfbar/(IAfbar+IAbarfbar);
125 static int entryCount=0;
149 if (p->
getId()==B0) otherb=B0B;
150 if (p->
getId()==B0B) otherb=B0;
173 if ( other->getId().isAlias() ) {
184 bool decayed = other->isDecayed();
192 scalar_part->
init(B0,p_init);
195 scalar_part->
init(B0B,p_init);
199 other->setDiagonalSpinDensity();
210 otherb=other->getId();
212 other->setLifetime();
215 otherb = other->getId();
219 report(
INFO,
"EvtGen") <<
"We have an error here!!!!"<<endl;
220 otherb =
EvtId(-1,-1);
241 static double ctau=ctauL<ctauH?ctauH:ctauL;
244 if (parent!=0&&(parent->
getId()==BS0||parent->
getId()==BSB)){
245 if (parent->
getId()==BS0) otherb=BSB;
246 if (parent->
getId()==BSB) otherb=BS0;
250 if (p->
getId()==BS0) otherb=BSB;
251 if (p->
getId()==BSB) otherb=BS0;
266 if (parent==0||parent->
getId()!=UPS4) {
270 if (p->
getId()==B0) otherb=B0B;
271 if (p->
getId()==B0B) otherb=B0;
272 if (p->
getId()==BS0) otherb=BSB;
273 if (p->
getId()==BSB) otherb=BS0;
297 stdHepNum=
abs(stdHepNum);
302 std::string hname=partName+std::string(
"H");
303 std::string lname=partName+std::string(
"L");
310 double ctau=0.5*(ctauL+ctauH);
311 double y=(ctauH-ctauL)/ctau;
315 std::string qoverpParmName=std::string(
"qoverp_incohMix_")+partName;
316 std::string mdParmName=std::string(
"dm_incohMix_")+partName;
323 fac=1.0/(qoverp*qoverp);
344 if (mixsign==-1) mix=1;
double sin(const BesAngle a)
double cos(const BesAngle a)
double imag(const EvtComplex &c)
EvtComplex exp(const EvtComplex &c)
ostream & report(Severity severity, const char *facility)
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)
void init(EvtId part_n, double e, double px, double py, double pz)
static std::string Get(const std::string &name, int &ierr)