88 if ( etyp != 2 && mutyp != 2 && tautyp != 2 ) {
90 <<
"Expect two leptons of the same type in EvtBtoXsll.cc\n";
110 if ( lpos != 1 || lneg != 1 ) {
112 <<
"Expect 2nd and 3rd particles to be positive and negative leptons in EvtBtoXsll.cc\n";
135 m_calcprob = std::make_unique<EvtBtoXsllUtil>();
144 double smin = 4.0 * ml * ml;
146 double probMax = -10000.0;
147 double sProbMax = -10.0;
148 double uProbMax = -10.0;
150 for ( i = 0; i < nsteps; i++ ) {
151 s = smin + ( i + 0.002 ) * ( smax - smin ) / (double)nsteps;
153 if ( prob > probMax ) {
163 <<
"dGdsProbMax = " << probMax <<
" for s = " << sProbMax << endl;
171 for ( i = 0; i < nsteps; i++ ) {
172 s = smin + ( i + 0.002 ) * ( smax - smin ) / (double)nsteps;
175 for ( j = 0; j < nsteps; j++ ) {
176 double u = -umax + ( j + 0.002 ) * ( 2.0 * umax ) / (double)nsteps;
178 if ( prob > probMax ) {
190 <<
"dGdsdupProbMax = " << probMax <<
" for s = " << sProbMax
191 <<
" and u = " << uProbMax << endl;
212 double mB = p->
mass();
216 static thread_local int nmsg = 0;
218 double xhadronMass = -999.0;
231 while ( xhadronMass <
m_mxmin ) {
243 while ( mb <= 0.0 ) {
248 if ( mb > 0. && sqrt( mb ) -
m_ms < 2.0 * ml )
258 double smin = 4.0 * ml * ml;
259 double smax = ( mb -
m_ms ) * ( mb -
m_ms );
265 if ( !( prob >= 0.0 ) && !( prob <= 0.0 ) ) {
282 msdilep[1] = sqrt( s );
296 while ( tmp == 0.0 ) {
303 p4ll[0] =
boostTo( p4ll[0], p4sdilep[1] );
304 p4ll[1] =
boostTo( p4ll[1], p4sdilep[1] );
316 if ( !( prob >= 0.0 ) && !( prob <= 0.0 ) ) {
318 <<
"nan from dGdsProb " << prob <<
" " << mb <<
" " <<
m_ms
319 <<
" " << ml <<
" " << s <<
" " << u << std::endl;
323 <<
"d2gdsdup GT d2gdsdup_max:" << prob <<
" "
325 <<
" mb = " << mb << endl;
339 double sinth = sqrt( 1.0 - costh * costh );
343 EvtVector4R p4b( sqrt( mb * mb + pb * pb ), pb * sinth * sin( phi ),
344 pb * sinth * cos( phi ), pb * costh );
363 p4leptonp =
boostTo( p4ll[0], p4b );
364 p4leptonn =
boostTo( p4ll[1], p4b );
369 -p4b.
get( 2 ), -p4b.
get( 3 ) );
373 p4xhadron = p4s + p4q;
374 xhadronMass = p4xhadron.
mass();
EvtRaritaSchwinger boostTo(const EvtRaritaSchwinger &rs, const EvtVector4R p4)
std::ostream & EvtGenReport(EvtGenSeverity severity, const char *facility=nullptr)
void initProbMax() override
std::unique_ptr< EvtBtoXsllUtil > m_calcprob
void decay(EvtParticle *p) override
EvtDecayBase * clone() const override
std::string getName() const override
static const double twoPi
double getArg(unsigned int j)
static void findMasses(EvtParticle *p, int ndaugs, const EvtId daugs[10], double masses[10])
EvtId getDaug(int i) const
void checkNDaug(int d1, int d2=-1)
void checkNArg(int a1, int a2=-1, int a3=-1, int a4=-1)
const EvtId * getDaugs() const
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)
virtual void init(EvtId part_n, const EvtVector4R &p4)=0
EvtParticle * getDaug(const int i)
void makeDaughters(size_t ndaug, const EvtId *id)