196 {
197
199
203
205
207
208 double mB = p->
mass();
210 double pb;
211
212 int im = 0;
213 static int nmsg = 0;
214 double xhadronMass = -999.0;
215
219
220
221
222
223
224
225
226
227 while (xhadronMass < _mxmin)
228 {
229 im++;
230
231
232
233
234
235
236
237
238 double mb = 0.0;
239
240 double xbox, ybox;
241
242 while (mb <= 0.0)
243 {
245
246
247 mb = mB*mB + _mq*_mq - 2.0*mB*sqrt(pb*pb + _mq*_mq);
248 }
249 mb = sqrt(mb);
250
251
252
253
254
256 double smin = 4.0 * ml * ml;
257 double smax = (mb - _ms)*(mb - _ms);
258
260 {
263 if (ybox < _calcprob->dGdsProb(mb, _ms, ml, xbox)) {
s = xbox;}
264 }
265
266
267
268
269
270
271
273
274 double msdilep[2];
275 msdilep[0] = _ms;
276 msdilep[1] = sqrt(
s);
277
279
280
281
283
284 double mll[2];
285 mll[0] = ml;
286 mll[1] = ml;
287
288 double tmp = 0.0;
289
290 while (tmp == 0.0)
291 {
292
293
295
296
297
298 p4ll[0] =
boostTo(p4ll[0], p4sdilep[1]);
299 p4ll[1] =
boostTo(p4ll[1], p4sdilep[1]);
300
301
302
305
307
309
310 double prob = _calcprob->
dGdsdupProb(mb, _ms, ml,
s, u);
311 if (prob > _dGdsdupProbMax && nmsg < 20)
312 {
313 report(
INFO,
"EvtGen") <<
"d2gdsdup GT d2gdsdup_max:" << prob
314 << " " << _dGdsdupProbMax
315 <<
" for s = " <<
s <<
" u = " << u <<
" mb = " << mb << endl;
316 nmsg++;
317 }
318 if (ybox < prob)
319 {
320 tmp = 1.0;
321
322
323 }
324 }
325
326
327
330 double sinth = sqrt(1.0 - costh*costh);
331
332
333
337 pb*costh);
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
356 p4leptonp =
boostTo(p4ll[0], p4b);
357 p4leptonn =
boostTo(p4ll[1], p4b);
358
359
360
361 EvtVector4R p4q( sqrt(pb*pb + _mq*_mq), -p4b.get(1), -p4b.get(2), -p4b.get(3) );
362
363
364
365 p4xhadron = p4s + p4q;
366 xhadronMass = p4xhadron.
mass();
367
368
369 }
370
371
372
374
375
376
379 {
382 }
383
384
385
386 else
387 {
390 }
391
392 return ;
393}
EvtDiracSpinor boostTo(const EvtDiracSpinor &sp, const EvtVector4R p4)
ostream & report(Severity severity, const char *facility)
double sin(const BesAngle a)
double cos(const BesAngle a)
double FermiMomentum(double pf)
double dGdsdupProb(double mb, double ms, double ml, double s, double u)
static const double twoPi
static void findMasses(EvtParticle *p, int ndaugs, EvtId daugs[10], double masses[10])
static double PhaseSpace(int ndaug, double mass[30], EvtVector4R p4[30], double mp)
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)