22#include "EvtGenBase/EvtPatches.hh"
25#include "EvtGenBase/EvtRandom.hh"
26#include "EvtGenBase/EvtParticle.hh"
27#include "EvtGenBase/EvtGenKine.hh"
28#include "EvtGenBase/EvtPDL.hh"
29#include "EvtGenBase/EvtReport.hh"
30#include "EvtGenModels/EvtbTosllAmp.hh"
31#include "EvtGenModels/EvtBtoXsll.hh"
32#include "EvtGenModels/EvtBtoXsllUtil.hh"
33#include "EvtGenBase/EvtConst.hh"
34#include "EvtGenBase/EvtId.hh"
81 if ( etyp != 2 && mutyp != 2 && tautyp != 2 ) {
83 report(
ERROR,
"EvtGen") <<
"Expect two leptons of the same type in EvtBtoXsll.cc\n";
99 if ( lpos != 1 || lneg != 1 ) {
101 report(
ERROR,
"EvtGen") <<
"Expect 2nd and 3rd particles to be positive and negative leptons in EvtBtoXsll.cc\n";
136 double smin = 4.0 * ml * ml;
137 double smax = (_mb - _ms)*(_mb - _ms);
138 double probMax = -10000.0;
139 double sProbMax = -10.0;
140 double uProbMax = -10.0;
142 for (i=0;i<nsteps;i++)
144 s = smin + (i+0.0005)*(smax - smin)/(double)nsteps;
145 double prob = _calcprob->
dGdsProb(_mb, _ms, ml,
s);
153 _dGdsProbMax = probMax;
156 report(
INFO,
"EvtGen") <<
"dGdsProbMax = " << probMax <<
" for s = " << sProbMax << endl;
164 for (i=0;i<nsteps;i++)
166 s = smin + (i+0.0005)*(smax - smin)/(double)nsteps;
167 double umax = sqrt((
s - (_mb + _ms)*(_mb + _ms)) * (
s - (_mb - _ms)*(_mb - _ms)));
168 for (j=0;j<nsteps;j++)
170 double u = -umax + (j+0.0005)*(2.0*umax)/(double)nsteps;
171 double prob = _calcprob->
dGdsdupProb(_mb, _ms, ml,
s, u);
181 _dGdsdupProbMax = probMax;
184 report(
INFO,
"EvtGen") <<
"dGdsdupProbMax = " << probMax <<
" for s = " << sProbMax
185 <<
" and u = " << uProbMax << endl;
208 double mB = p->
mass();
214 double xhadronMass = -999.0;
227 while (xhadronMass < _mxmin)
247 mb = mB*mB + _mq*_mq - 2.0*mB*sqrt(pb*pb + _mq*_mq);
256 double smin = 4.0 * ml * ml;
257 double smax = (mb - _ms)*(mb - _ms);
263 if (ybox < _calcprob->dGdsProb(mb, _ms, ml, xbox)) {
s = xbox;}
276 msdilep[1] = sqrt(
s);
298 p4ll[0] =
boostTo(p4ll[0], p4sdilep[1]);
299 p4ll[1] =
boostTo(p4ll[1], p4sdilep[1]);
310 double prob = _calcprob->
dGdsdupProb(mb, _ms, ml,
s, u);
311 if (prob > _dGdsdupProbMax && nmsg < 20)
313 report(
INFO,
"EvtGen") <<
"d2gdsdup GT d2gdsdup_max:" << prob
314 <<
" " << _dGdsdupProbMax
315 <<
" for s = " <<
s <<
" u = " << u <<
" mb = " << mb << endl;
330 double sinth = sqrt(1.0 - costh*costh);
356 p4leptonp =
boostTo(p4ll[0], p4b);
357 p4leptonn =
boostTo(p4ll[1], p4b);
361 EvtVector4R p4q( sqrt(pb*pb + _mq*_mq), -p4b.get(1), -p4b.get(2), -p4b.get(3) );
365 p4xhadron = p4s + p4q;
366 xhadronMass = p4xhadron.
mass();
double sin(const BesAngle a)
double cos(const BesAngle a)
EvtDiracSpinor boostTo(const EvtDiracSpinor &sp, const EvtVector4R p4)
ostream & report(Severity severity, const char *facility)
double dGdsProb(double mb, double ms, double ml, double s)
double FermiMomentum(double pf)
double dGdsdupProb(double mb, double ms, double ml, double s, double u)
void decay(EvtParticle *p)
void getName(std::string &name)
static const double twoPi
static void findMasses(EvtParticle *p, int ndaugs, EvtId daugs[10], double masses[10])
void checkNDaug(int d1, int d2=-1)
void checkNArg(int a1, int a2=-1, int a3=-1, int a4=-1)
static double PhaseSpace(int ndaug, double mass[30], EvtVector4R p4[30], double mp)
static double getMeanMass(EvtId i)
static EvtId getId(const std::string &name)
void makeDaughters(int ndaug, EvtId *id)
virtual void init(EvtId part_n, const EvtVector4R &p4)=0
EvtParticle * getDaug(int i)