Belle II Software development
EvtPHSPBMix Class Reference

The class provides routine to decay vector-> particle particle with B0 mixing, handles states with only one neutral B. More...

#include <EvtPHSPBMix.h>

Inheritance diagram for EvtPHSPBMix:

Public Member Functions

 EvtPHSPBMix ()
 Default constructor.
 
virtual ~EvtPHSPBMix ()
 Default destructor.
 
std::string getName ()
 Get function Name

 
EvtDecayBase * clone ()
 Clone the decay

 
void decay (EvtParticle *p)
 Decay function.
 
void init ()
 Init function.
 
void initProbMax ()
 Init maximal prob.
 
int nRealDaughters ()
 Number of real daughters.
 

Private Attributes

double _freq {0}
 mixing frequency in hbar/mm
 
bool _print_info {false}
 Print evtgeninfo?
 

Detailed Description

The class provides routine to decay vector-> particle particle with B0 mixing, handles states with only one neutral B.

Definition at line 88 of file EvtPHSPBMix.h.

Constructor & Destructor Documentation

◆ EvtPHSPBMix()

EvtPHSPBMix ( )
inline

Default constructor.

Definition at line 93 of file EvtPHSPBMix.h.

93{}

◆ ~EvtPHSPBMix()

~EvtPHSPBMix ( )
virtual

Default destructor.

Definition at line 365 of file EvtPHSPBMix.cc.

365{}

Member Function Documentation

◆ clone()

EvtDecayBase * clone ( )

Clone the decay

Definition at line 373 of file EvtPHSPBMix.cc.

374{
375 return new EvtPHSPBMix;
376}
EvtPHSPBMix()
Default constructor.
Definition: EvtPHSPBMix.h:93

◆ decay()

void decay ( EvtParticle *  p)

Decay function.

Definition at line 456 of file EvtPHSPBMix.cc.

457{
458
459 // generate a final state according to phase space
460
461 // const bool BBpipi(getNDaug()!=4);//true if BBpipi, if not BBpi
462 if (_print_info) std::cout << "decay B_MIX (0)" << std::endl;
463 std::vector<EvtId> tempDaug(getNDaug() - 1);
464 tempDaug[0] = getDaug(0);
465 tempDaug[1] = getDaug(1);
466 tempDaug[2] = getDaug(2);
467 if (getNDaug() == 5)
468 tempDaug[3] = getDaug(3);
469
470 if (_print_info) std::cout << "decay B_MIX (1)" << std::endl;
471
472
473 p->initializePhaseSpace(getNDaug() - 1, tempDaug.data());
474
475 EvtParticle* s1;
476
477 s1 = p->getDaug(0);
478
479 //delete any daughters - if there are daughters, they
480 //are from the initialization and will be redone later
481 if (s1->getNDaug() > 0) { s1->deleteDaughters();}
482
483 EvtVector4R p1 = s1->getP4();
484
485 // throw 1 random numbers to decide whether B1 is B0 or B0B
486 const bool changed_flavor(EvtRandom::random() > 0.5); //Daug(0) becomes Daug(1)
487 if (_print_info) std::cout << "decay B_MIX (3)" << std::endl;
488 s1->init(changed_flavor ? getDaug(getNDaug() - 1) : getDaug(0), p1);
489
490 // choose a decay time for each final state particle using the
491 // lifetime (which must be the same for both particles) in pdt.table
492 // and calculate the lifetime difference for this event
493 s1->setLifetime();
494 if (_print_info) std::cout << "decay B_MIX (4)" << std::endl;
495 const double t1(s1->getLifetime());
496
497 // calculate the oscillation amplitude, based on whether this event is mixed or not
498 EvtComplex osc_amp(changed_flavor ? EvtComplex(0,
499 -sin(_freq * t1 / 2.)) : EvtComplex(cos(_freq * t1 / 2.))); //Amplitude return <B0(B)|B1>
500 if (_print_info) std::cout << "decay B_MIX (5)" << std::endl;
501 // store the amplitudes for each parent spin basis state
502 double norm = 1.0 / p1.d3mag();
503 if (_print_info) std::cout << "decay B_MIX (6)" << std::endl;
504 vertex(0, norm * osc_amp * p1 * (p->eps(0)));
505 vertex(1, norm * osc_amp * p1 * (p->eps(1)));
506 vertex(2, norm * osc_amp * p1 * (p->eps(2)));
507 if (_print_info) std::cout << "decay B_MIX (7)" << std::endl;
508 return ;
509}
bool _print_info
Print evtgeninfo?
Definition: EvtPHSPBMix.h:122
double _freq
mixing frequency in hbar/mm
Definition: EvtPHSPBMix.h:119

◆ getName()

std::string getName ( )

Get function Name

Definition at line 367 of file EvtPHSPBMix.cc.

368{
369 return "PHSP_B_MIX";
370}

◆ init()

void init ( )

Init function.

Definition at line 378 of file EvtPHSPBMix.cc.

379{
380 // check that there we are provided exactly one parameter
381 //One arg: Delta m
382 const unsigned short int narg(1);
383 if (getNArg() != narg) {
384 EvtGenReport(EVTGEN_ERROR, "EvtGen") << "EvtPHSPBMix generator expected "
385 << " " << narg
386 << " argument(s) (delta m) but found:"
387 << getNArg() << endl;
388 EvtGenReport(EVTGEN_ERROR, "EvtGen") << "Will terminate execution!" << endl;
389 ::abort();
390 }
391
392
393 //report(DEBUG,"EvtGen") << "EvtPHSPBMIX::init point (2)"<<std::endl;
394 //usage: mixing P0 P- pi+ : 4 arg. -> P0 P- pi+ P0b PHSP_B_MIX dm;
395 // : mixing P0 P- pi+ pi : 5 arg. -> P0 P- pi+ pi0 P0b PHSP_B_MIX dm;
396
397
398 checkNDaug(4, 5);
399 // report(DEBUG,"EvtGen") << "EvtPHSPBMIX::init point (3)"<<std::endl;
400
401 bool BBpipi(getNDaug() == 5);
402
403 if (!(EvtPDL::chargeConj(getDaug(0)) == getDaug(getNDaug() - 1))) {
404 EvtGenReport(EVTGEN_ERROR, "EvtGen") << "EvtPHSPBMix generator expected two first particles "
405 << "to be charge conjugate." << endl
406 << " Found " << EvtPDL::name(getDaug(0)).c_str()
407 << "," << EvtPDL::name(getDaug(getNDaug() - 1)).c_str() << endl;
408 EvtGenReport(EVTGEN_ERROR, "EvtGen") << "Will terminate execution!" << endl;
409 ::abort();
410 }
411 //parameters for mixing of particle1
412
413 _freq = getArg(0) / EvtConst::c;
414
415 //double gamma= 1/EvtPDL::getctau(getDaug(0)); // gamma/c (1/mm)
416
417 double tau = 1e12 * EvtPDL::getctau(getDaug(0)) / EvtConst::c; // in ps
418 double dm = 1e-12 * getArg(0); // B0/anti-B0 mass difference in hbar/ps
419 double x = dm * tau;
420
421 std::ostringstream sss;
422 sss << " " << EvtPDL::name(getParentId()).c_str() << " --> "
423 << EvtPDL::name(getDaug(0)).c_str() << " + "
424 << EvtPDL::name(getDaug(1)).c_str();
425 sss << " + " << EvtPDL::name(getDaug(2)).c_str();
426 if (BBpipi)
427 sss << " + " << EvtPDL::name(getDaug(3)).c_str();
428
429 EvtGenReport(EVTGEN_INFO, "EvtGen") << "PHSP_B_MIX will generate mixing :"
430 << endl << endl
431 << sss.str() << endl << endl
432 << "using parameters:" << endl << endl
433 << " delta(m) = " << dm << " hbar/ps" << endl
434 << " _freq = " << _freq << " hbar/mm" << endl
435 << " dgog = " << 0 << endl
436 << " dGamma = " << 0 << " hbar/mm" << endl
437 << " q/p = " << 1 << endl
438 << " tau = " << tau << " ps" << endl
439 << " x = " << x << endl
440 << endl;
441
442}

◆ initProbMax()

void initProbMax ( )

Init maximal prob.

function

Definition at line 449 of file EvtPHSPBMix.cc.

450{
451 // this value is ok for reasonable values of all the parameters
452 setProbMax(4.0);
453 //noProbMax();
454}

◆ nRealDaughters()

int nRealDaughters ( )

Number of real daughters.

Definition at line 444 of file EvtPHSPBMix.cc.

445{
446 return getNDaug() - 1;
447}

Member Data Documentation

◆ _freq

double _freq {0}
private

mixing frequency in hbar/mm

Definition at line 119 of file EvtPHSPBMix.h.

◆ _print_info

bool _print_info {false}
private

Print evtgeninfo?

Definition at line 122 of file EvtPHSPBMix.h.


The documentation for this class was generated from the following files: