BOSS 7.1.0
BESIII Offline Software System
Loading...
Searching...
No Matches
EvtParticle Class Referenceabstract

#include <EvtParticle.hh>

+ Inheritance diagram for EvtParticle:

Public Member Functions

 EvtParticle ()
 
virtual ~EvtParticle ()
 
virtual EvtVector4C epsParent (int i) const
 
virtual EvtVector4C eps (int i) const
 
virtual EvtVector4C epsParentPhoton (int i)
 
virtual EvtVector4C epsPhoton (int i)
 
virtual EvtDiracSpinor spParent (int) const
 
virtual EvtDiracSpinor sp (int) const
 
virtual EvtDiracSpinor spParentNeutrino () const
 
virtual EvtDiracSpinor spNeutrino () const
 
virtual EvtTensor4C epsTensorParent (int i) const
 
virtual EvtTensor4C epsTensor (int i) const
 
virtual void init (EvtId part_n, const EvtVector4R &p4)=0
 
void addDaug (EvtParticle *node)
 
void decay ()
 
void deleteTree ()
 
void deleteDaughters (bool keepChannel=false)
 
void setChannel (int i)
 
void setGeneratorFlag (int flag)
 
int getGeneratorFlag ()
 
void setIntFlag (std::vector< int > vi)
 
std::vector< int > getIntFlag ()
 
void makeDaughters (int ndaug, EvtId *id)
 
double initializePhaseSpace (int numdaughter, EvtId *daughters, double poleSize=-1., int whichTwo1=0, int whichTwo2=1)
 
EvtParticlegetDaug (int i)
 
EvtParticlenextIter (EvtParticle *rootOfTree=0)
 
void makeStdHep (EvtStdHep &stdhep, EvtSecondary &secondary, EvtId *stable_parent_ihep)
 
void makeStdHep (EvtStdHep &stdhep)
 
EvtVector4R getP4Lab ()
 
EvtVector4R getP4Restframe ()
 
EvtVector4R get4Pos ()
 
EvtParticlegetParent ()
 
void insertDaugPtr (int idaug, EvtParticle *partptr)
 
double mass () const
 
int firstornot () const
 
void setFirstOrNot ()
 
void resetFirstOrNot ()
 
EvtId getId () const
 
EvtSpinType::spintype getSpinType () const
 
int getSpinStates () const
 
const EvtVector4RgetP4 () const
 
void setP4 (const EvtVector4R &p4)
 
int getChannel () const
 
int getNDaug () const
 
void resetNDaug ()
 
void printTree () const
 
void printTreeRec (int level) const
 
std::string writeTreeRec (std::string) const
 
void dumpTree () const
 
void dumpTreeRec (int level, int dj) const
 
std::string treeStr () const
 
std::string treeStrRec (int level) const
 
void printParticle () const
 
void setLifetime (double tau)
 
void setLifetime ()
 
double getLifetime ()
 
void setDiagonalSpinDensity ()
 
void setVectorSpinDensity ()
 
void setPolarizedSpinDensity (double r00, double r11, double r22)
 
void setSpinDensityForward (const EvtSpinDensity &rho)
 
void setSpinDensityForwardHelicityBasis (const EvtSpinDensity &rho)
 
void setSpinDensityForwardHelicityBasis (const EvtSpinDensity &rho, double alpha, double beta, double gamma)
 
virtual EvtSpinDensity rotateToHelicityBasis () const =0
 
virtual EvtSpinDensity rotateToHelicityBasis (double alpha, double beta, double gamma) const =0
 
EvtSpinDensity getSpinDensityForward ()
 
void setSpinDensityBackward (const EvtSpinDensity &rho)
 
EvtSpinDensity getSpinDensityBackward ()
 
void noLifeTime ()
 
void setId (EvtId id)
 
void initDecay (bool useMinMass=false)
 
void generateMassTree ()
 
double compMassProb ()
 
void setMass (double m)
 
bool isInitialized ()
 
bool hasValidP4 ()
 
bool isDecayed ()
 
double * decayProb ()
 
void setDecayProb (double p)
 
void setInclusiveMode (int im)
 
int getInclusiveMode ()
 

Static Public Attributes

static int _NextLevelDauNum =0
 
static EvtId _NextLevelId [20]
 
static EvtVector4R _NextLevelP4 [20]
 

Protected Member Functions

void setp (double e, double px, double py, double pz)
 
void setp (const EvtVector4R &p4)
 
void setpart_num (EvtId particle_number)
 

Protected Attributes

bool _validP4
 

Detailed Description

Definition at line 42 of file EvtParticle.hh.

Constructor & Destructor Documentation

◆ EvtParticle()

EvtParticle::EvtParticle ( )

Default constructor.

Definition at line 59 of file EvtParticle.cc.

59 {
60 _ndaug=0;
61 _parent=0;
62 _channel=-10;
63 _t=0.0;
64 _genlifetime=1;
65 _first=1;
66 _isInit=false;
67 _validP4=false;
68 _isDecayed=false;
69 _decayProb=0;
70 // _mix=false;
71}

◆ ~EvtParticle()

EvtParticle::~EvtParticle ( )
virtual

Destructor.

Definition at line 55 of file EvtParticle.cc.

55 {
56 delete _decayProb;
57}

Member Function Documentation

◆ addDaug()

void EvtParticle::addDaug ( EvtParticle node)

Add another daughter to the particle

Definition at line 103 of file EvtParticle.cc.

103 {
104 node->_daug[node->_ndaug++]=this;
105 _ndaug=0;
106 _parent=node;
107}

Referenced by EvtKstarstargamma::decay(), EvtPHOTOS::doRadCorr(), and makeDaughters().

◆ compMassProb()

double EvtParticle::compMassProb ( )

Definition at line 503 of file EvtParticle.cc.

503 {
504
505 EvtParticle *p=this;
506 //report(INFO,"EvtGen") << "compMassProb " << endl;
507 //p->printTree();
508 double mass=p->mass();
509 double parMass=0.;
510 if ( p->getParent()) {
511 parMass=p->getParent()->mass();
512 }
513
514 int nDaug=p->getNDaug();
515 double *dMasses=0;
516
517 int i;
518 if ( nDaug>0 ) {
519 dMasses=new double[nDaug];
520 for (i=0; i<nDaug; i++) dMasses[i]=p->getDaug(i)->mass();
521 }
522
523 double temp=1.0;
524 temp=EvtPDL::getMassProb(p->getId(), mass, parMass, nDaug, dMasses);
525
526 //report(INFO,"EvtGen") << temp << " " << EvtPDL::name(p->getId()) << endl;
527 //If the particle already has a mass, we dont need to include
528 //it in the probability calculation
529 if ( (!p->getParent() || _validP4 ) && temp>0.0 ) temp=1.;
530
531 delete [] dMasses;
532 // if ( temp < 0.9999999 )
533 for (i=0; i<nDaug; i++) {
534 temp*=p->getDaug(i)->compMassProb();
535 }
536 return temp;
537}
static double getMassProb(EvtId i, double mass, double massPar, int nDaug, double *massDau)
Definition: EvtPDL.hh:48
EvtId getId() const
Definition: EvtParticle.cc:112
EvtParticle * getParent()
Definition: EvtParticle.cc:86
double compMassProb()
Definition: EvtParticle.cc:503
int getNDaug() const
Definition: EvtParticle.cc:124
EvtParticle * getDaug(int i)
Definition: EvtParticle.cc:84
double mass() const
Definition: EvtParticle.cc:126

Referenced by compMassProb(), and generateMassTree().

◆ decay()

void EvtParticle::decay ( )

Decay particle

Definition at line 403 of file EvtParticle.cc.

403 {
404
405 //P is particle to decay, typically 'this' but sometime
406 //modified by mixing
407 EvtParticle* p=this;
408 //Did it mix?
409 //if ( p->getMixed() ) {
410 //should take C(p) - this should only
411 //happen the first time we call decay for this
412 //particle
413 //p->takeCConj();
414 // p->setUnMixed();
415 //}
416 EvtSpinDensity myRho; //pingrg test code
417 EvtDecayBase *decayer;
418 decayer = EvtDecayTable::getDecayFunc(p);
419 // if ( decayer ) {
420 // report(INFO,"EvtGen") << "calling decay for " << EvtPDL::name(p->getId()) << " " << p->mass() << " " << p->getP4() << " " << p->getNDaug() << " " << p << endl;
421 // report(INFO,"EvtGen") << "NDaug= " << decayer->getNDaug() << endl;
422 // int ti;
423 // for ( ti=0; ti<decayer->getNDaug(); ti++)
424 // report(INFO,"EvtGen") << "Daug " << ti << " " << EvtPDL::name(decayer->getDaug(ti)) << endl;
425 // }
426 //if (p->_ndaug>0) {
427 // report(INFO,"EvtGen") <<"Is decaying particle with daughters!!!!!"<<endl;
428 // ::abort();
429 //return;
430 //call initdecay first - April 29,2002 - Lange
431 //}
432
433 //if there are already daughters, then this step is already done!
434 // figure out the masses
435 if ( _ndaug == 0 ) generateMassTree();
436 static EvtId BS0=EvtPDL::getId("B_s0");
437 static EvtId BSB=EvtPDL::getId("anti-B_s0");
438 static EvtId BD0=EvtPDL::getId("B0");
439 static EvtId BDB=EvtPDL::getId("anti-B0");
440 if ( _ndaug==1 && (getId()==BS0||getId()==BSB||getId()==BD0||getId()==BDB) )
441 {getDaug(0)->decay();
442 std::cout<<"if ( _ndaug==1 && (getId()==BS0||getId()==BSB||getId()==BD0||getId()==BDB) )"<<endl;
443 }
444
445 else{
446 //now we have accepted a set of masses - time
447 if ( decayer ) {
448 decayer->makeDecay(p);
449 //p->printTree(); //for debugging
450 }
451 else{
452 p->_rhoBackward.SetDiag(p->getSpinStates());
453
454 }
455 }
456 _isDecayed=true;
457 return;
458}
virtual void makeDecay(EvtParticle *p)=0
static EvtDecayBase * getDecayFunc(EvtParticle *)
Definition: EvtId.hh:27
static EvtId getId(const std::string &name)
Definition: EvtPDL.cc:287
void decay()
Definition: EvtParticle.cc:403
int getSpinStates() const
Definition: EvtParticle.cc:117
void generateMassTree()
Definition: EvtParticle.cc:460
void SetDiag(int n)

Referenced by decay(), EvtJetSet::decay(), EvtLunda::decay(), EvtLundCharm::decay(), EvtPythia::decay(), EvtTauola::decay(), EvtGen::generateDecay(), EvtDecayAmp::makeDecay(), EvtDecayIncoherent::makeDecay(), and EvtDecayProb::makeDecay().

◆ decayProb()

double * EvtParticle::decayProb ( )
inline

Definition at line 395 of file EvtParticle.hh.

395{return _decayProb;}

◆ deleteDaughters()

void EvtParticle::deleteDaughters ( bool  keepChannel = false)

Definition at line 539 of file EvtParticle.cc.

539 {
540 int i;
541
542 for(i=0;i<_ndaug;i++){
543 _daug[i]->deleteTree();
544 }
545
546 _ndaug=0;
547 //if ( keepChannel ) report(INFO,"EvtGen") << "keeping \n";
548 if ( !keepChannel) _channel=-10;
549 //_t=0.0;
550 //_genlifetime=1;
551 _first=1;
552 _isInit=false;
553 //report(INFO,"EvtGen") << "calling deletedaughters " << EvtPDL::name(this->getId()) <<endl;
554}
void deleteTree()
Definition: EvtParticle.cc:556

Referenced by EvtJetSet::decay(), EvtLunda::decay(), EvtLundCharm::decay(), EvtPythia::decay(), EvtTauola::decay(), EvtVSSBMixCPT::decay(), deleteTree(), EvtConExc::gamHXSection(), and initializePhaseSpace().

◆ deleteTree()

void EvtParticle::deleteTree ( )

Delete a decay chain

Definition at line 556 of file EvtParticle.cc.

556 {
557
558 this->deleteDaughters();
559
560 delete this;
561
562}
void deleteDaughters(bool keepChannel=false)
Definition: EvtParticle.cc:539

Referenced by EvtbTosllAmp::CalcMaxProb(), EvtSemiLeptonicAmp::CalcMaxProb(), deleteDaughters(), EvtGen::generateDecay(), EvtGen::generateEvent(), EvtPsi3Sdecay::PHSPDecay(), and EvtConExc::~EvtConExc().

◆ dumpTree()

void EvtParticle::dumpTree ( ) const

Definition at line 977 of file EvtParticle.cc.

977 { //pingrg, Mar. 25,2008
978
979 report(INFO,"EvtGen") << "This is the current decay chain to dump"<<endl;
980 report(INFO,"") << "This top particle is "<<
981 EvtPDL::name(_id).c_str()<<endl;
982
983 this->dumpTreeRec(0,0);
984 report(INFO,"EvtGen") << "End of decay chain."<<endl;
985
986}
ostream & report(Severity severity, const char *facility)
Definition: EvtReport.cc:36
@ INFO
Definition: EvtReport.hh:52
static std::string name(EvtId i)
Definition: EvtPDL.hh:64
void dumpTreeRec(int level, int dj) const
Definition: EvtParticle.cc:947

◆ dumpTreeRec()

void EvtParticle::dumpTreeRec ( int  level,
int  dj 
) const

Definition at line 947 of file EvtParticle.cc.

947 { //pingrg, Mar. 25,2008
948
949 int newlevel,i;
950 newlevel = level +1;
951
952
953 if (_ndaug!=0) {
954
955 int Ids= EvtPDL::getStdHep(_id);
956 std::string c1,cid;
957 if(Ids>0) c1="p";
958 if(Ids<0) {
959 c1="m";Ids=-1*Ids;
960 }
961
962 cid=c1+IntToStr(Ids);
963
964 report(INFO,"") <<newlevel<<" "<< cid<<" "<<dj;
965 report(INFO,"") << " = ";
966
967 int Nchannel=this->getChannel()+1;
968 report(INFO,"") <<Nchannel<<endl;
969
970 for(i=0;i<_ndaug;i++){
971 _daug[i]->dumpTreeRec(newlevel,i);
972 }
973 }
974}
std::string IntToStr(int a)
static int getStdHep(EvtId id)
Definition: EvtPDL.hh:56
int getChannel() const
Definition: EvtParticle.cc:122

Referenced by dumpTree(), and dumpTreeRec().

◆ eps()

EvtVector4C EvtParticle::eps ( int  i) const
virtual

Returns polarization vector in the particles own restframe.

Reimplemented in EvtVectorParticle.

Definition at line 575 of file EvtParticle.cc.

575 {
576 EvtVector4C temp;
578 report(ERROR,"EvtGen") << "and you have asked for the:"<<i
579 <<"th polarization vector."
580 <<" I.e. you thought it was a"
581 <<" vector particle!" << endl;
582 ::abort();
583 return temp;
584}
@ ERROR
Definition: EvtReport.hh:49
void printParticle() const
Definition: EvtParticle.cc:999

Referenced by EvtEDM::decay(), EvtJpipi::decay(), EvtOmegaDalitz::decay(), EvtSVPCP::decay(), EvtSVPHelAmp::decay(), EvtVll::decay(), EvtVPHOtoVISR::decay(), EvtVPHOtoVISRHi::decay(), EvtVSPPwave::decay(), EvtVSS::decay(), EvtVSSBMixCPT::decay(), EvtVSSMix::decay(), EvtVVP::decay(), EvtVVpipi::decay(), EvtVVPIPI_WEIGHTED::decay(), EvtVVSPwave::decay(), and EvtSVVHelAmp::SVVHel().

◆ epsParent()

EvtVector4C EvtParticle::epsParent ( int  i) const
virtual

Returns polarization vector in the parents restframe.

Reimplemented in EvtVectorParticle.

Definition at line 564 of file EvtParticle.cc.

564 {
565 EvtVector4C temp;
567 report(ERROR,"EvtGen") << "and you have asked for the:"<<i
568 <<"th polarization vector."
569 <<" I.e. you thought it was a"
570 <<" vector particle!" << endl;
571 ::abort();
572 return temp;
573}

Referenced by EvtbTosllVectorAmp::CalcAmp(), EvtSemiLeptonicVectorAmp::CalcAmp(), EvtBHadronic::decay(), EvtKstarnunu::decay(), EvtSSDCP::decay(), EvtVectorIsr::decay(), EvtVPHOtoVISR::decay(), EvtVPHOtoVISRHi::decay(), and EvtVVPIPI_WEIGHTED::decay().

◆ epsParentPhoton()

EvtVector4C EvtParticle::epsParentPhoton ( int  i)
virtual

Returns polarization vector in the parents restframe for a photon.

Reimplemented in EvtPhotonParticle.

Definition at line 586 of file EvtParticle.cc.

586 {
587 EvtVector4C temp;
589 report(ERROR,"EvtGen") << "and you have asked for the:"<<i
590 <<"th polarization vector of photon."
591 <<" I.e. you thought it was a"
592 <<" photon particle!" << endl;
593 ::abort();
594 return temp;
595}

Referenced by EvtLNuGamma::decay(), EvtSVPCP::decay(), EvtSVPHelAmp::decay(), EvtVectorIsr::decay(), EvtVSPPwave::decay(), and EvtVVP::decay().

◆ epsPhoton()

EvtVector4C EvtParticle::epsPhoton ( int  i)
virtual

Returns polarization vector in the particles own restframe for a photon.

Reimplemented in EvtPhotonParticle.

Definition at line 597 of file EvtParticle.cc.

597 {
598 EvtVector4C temp;
600 report(ERROR,"EvtGen") << "and you have asked for the:"<<i
601 <<"th polarization vector of a photon."
602 <<" I.e. you thought it was a"
603 <<" photon particle!" << endl;
604 ::abort();
605 return temp;
606}

◆ epsTensor()

EvtTensor4C EvtParticle::epsTensor ( int  i) const
virtual

Returns tensor in the particles own restframe for a spin 2 particle.

Reimplemented in EvtTensorParticle.

Definition at line 669 of file EvtParticle.cc.

669 {
670 int temp;
671 temp = i;
672 EvtTensor4C tempC;
674 report(ERROR,"EvtGen") << "and you have asked for the:"<<i
675 <<"th tensor."
676 <<" I.e. you thought it was a"
677 <<" Tensor particle!" << endl;
678 ::abort();
679 return tempC;
680}

Referenced by EvtTSS::decay(), and EvtTVSPwave::decay().

◆ epsTensorParent()

EvtTensor4C EvtParticle::epsTensorParent ( int  i) const
virtual

Returns tensor in the parents restframe for a spin 2 particle.

Reimplemented in EvtTensorParticle.

Definition at line 656 of file EvtParticle.cc.

656 {
657 int temp;
658 temp = i;
659 EvtTensor4C tempC;
661 report(ERROR,"EvtGen") << "and you have asked for the:"<<i
662 <<"th tensor."
663 <<" I.e. you thought it was a"
664 <<" Tensor particle!" << endl;
665 ::abort();
666 return tempC;
667}

Referenced by EvtSemiLeptonicTensorAmp::CalcAmp(), EvtBHadronic::decay(), EvtSSDCP::decay(), EvtSTS::decay(), and EvtSTSCP::decay().

◆ firstornot()

int EvtParticle::firstornot ( ) const

Used internally to decide if first time particle is decayed.

Definition at line 110 of file EvtParticle.cc.

110{ return _first;}

Referenced by EvtDecayBase::findMasses().

◆ generateMassTree()

void EvtParticle::generateMassTree ( )

Definition at line 460 of file EvtParticle.cc.

460 {
461 double massProb=1.;
462 double ranNum=2.;
463 int counter=0;
464 EvtParticle *p=this;
465 while (massProb<ranNum) {
466 //check it out the first time.
467 p->initDecay();
468 //report(INFO,"EvtGen") << "calling massProb \n";
469 massProb=p->compMassProb();
470 ranNum=EvtRandom::Flat();
471 // report(INFO,"EvtGen") << "end of iter " << massProb <<endl;
472 counter++;
473
474 if ( counter > 10000 ) {
475 if ( counter == 10001 ) {
476 report(INFO,"EvtGen") << "Too many iterations to determine the mass tree. Parent mass= "<< p->mass() << _p<<" " << massProb <<endl;
477 p->printTree();
478 report(INFO,"EvtGen") << "will take next combo with non-zero likelihood\n";
479 }
480 if ( massProb>0. ) massProb=2.0;
481 if ( counter > 20000 ) {
482 // one last try - take the minimum masses
483 p->initDecay(true);
484 p->printTree();
485 massProb=p->compMassProb();
486 if ( massProb>0. ) {
487 massProb=2.0;
488 report(INFO,"EvtGen") << "Taking the minimum mass of all particles in the chain\n";
489 }
490 else {
491 report(INFO,"EvtGen") << "Sorry, no luck finding a valid set of masses. This may be a pathological combo\n";
492 std::cout<<EvtPDL::name(p->getId())<<": Parent mass "<<p->getP4().mass()<<" with momentum "<<p->getP4()<<std::endl;
493 if(EvtGlobalSet::ConExcPythia){EvtGlobalSet::ConExcPythia=0;return;}else{abort();}
494 //assert(0);
495 }
496 }
497 }
498 }
499 // report(INFO,"EvtGen") << counter << endl;
500 // p->printTree();
501}
static bool ConExcPythia
Definition: EvtGlobalSet.hh:20
void initDecay(bool useMinMass=false)
Definition: EvtParticle.cc:236
const EvtVector4R & getP4() const
Definition: EvtParticle.cc:120
void printTree() const
Definition: EvtParticle.cc:896
static double Flat()
Definition: EvtRandom.cc:74
double mass() const
Definition: EvtVector4R.cc:39

Referenced by decay(), EvtBtoKD3P::decay(), and initializePhaseSpace().

◆ get4Pos()

EvtVector4R EvtParticle::get4Pos ( )

Returns the 4position of the particle in the lab frame.

Definition at line 705 of file EvtParticle.cc.

705 {
706
707 EvtVector4R temp,mom;
708 EvtParticle *ptemp;
709
710 temp.set(0.0,0.0,0.0,0.0);
711 ptemp=getParent();
712
713 if (ptemp==0) return temp;
714
715 temp=(ptemp->_t/ptemp->mass())*(ptemp->getP4());
716
717 while (ptemp->getParent()!=0) {
718 ptemp=ptemp->getParent();
719 mom=ptemp->getP4();
720 temp=boostTo(temp,mom);
721 temp=temp+(ptemp->_t/ptemp->mass())*(ptemp->getP4());
722 }
723
724 return temp;
725}
EvtDiracSpinor boostTo(const EvtDiracSpinor &sp, const EvtVector4R p4)
void set(int i, double d)
Definition: EvtVector4R.hh:183

Referenced by makeStdHep().

◆ getChannel()

int EvtParticle::getChannel ( ) const

◆ getDaug()

EvtParticle * EvtParticle::getDaug ( int  i)

Get pointer the the i:th daugther.

Definition at line 84 of file EvtParticle.cc.

84{ return _daug[i]; }

Referenced by EvtRexc::angularSampling(), EvtConExc::angularSampling(), EvtHypNonLepton::calcAmp(), EvtbTosllScalarAmp::CalcAmp(), EvtbTosllVectorAmp::CalcAmp(), EvtSemiLeptonicBaryonAmp::CalcAmp(), EvtSemiLeptonicTensorAmp::CalcAmp(), EvtSemiLeptonicVectorAmp::CalcAmp(), EvtbTosllAmp::CalcMaxProb(), EvtSemiLeptonicAmp::CalcMaxProb(), EvtConExc::checkdecay(), EvtPsi3Sdecay::choseDecay(), compMassProb(), EvtSecondary::createSecondary(), decay(), EvtAngH2::decay(), EvtAngSam::decay(), EvtAngSam3::decay(), EvtAngSamLab::decay(), EvtAngSamX::decay(), EvtAV2GV::decay(), EvtBHadronic::decay(), EvtBody3::decay(), EvtBsquark::decay(), EvtBTo3piCP::decay(), EvtBTo4piCP::decay(), EvtBtoKD3P::decay(), EvtBToKpipiCP::decay(), EvtBtoXsEtap::decay(), EvtBtoXsgamma::decay(), EvtBtoXsll::decay(), EvtCalHelAmp::decay(), EvtCBTo3piMPP::decay(), EvtCBTo3piP00::decay(), EvtChi0BB1::decay(), EvtChi0BB2::decay(), EvtChi1BB1::decay(), EvtChi1BB2::decay(), EvtChi2BB1::decay(), EvtChi2BB2::decay(), EvtConExc::decay(), EvtD0mixDalitz::decay(), EvtD0To2pip2pim::decay(), EvtD0Toa0enu::decay(), EvtD0ToKKpipi::decay(), EvtD0toKLpipiPlot::decay(), EvtD0ToKpiEtap::decay(), EvtD0toKpietaPlot::decay(), EvtD0toKpiomegaPlot::decay(), EvtD0ToKpipi0::decay(), EvtD0ToKpipi0pi0::decay(), EvtD0toKpipi0Plot::decay(), EvtD0ToKpipipi::decay(), EvtD0ToKSKK::decay(), EvtD0toKSpi0etaPlot::decay(), EvtD0toKSpi0omegaPlot::decay(), EvtD0ToKSpi0pi0::decay(), EvtD0ToKSpipi::decay(), EvtD0ToKSpipipi0::decay(), EvtD0ToKSpipipi0pi0::decay(), EvtD0toKSpipiPlot::decay(), EvtD0Topipienu::decay(), EvtD0TopipiEta::decay(), EvtD0topipietaPlot::decay(), EvtD0Topippim2pi0::decay(), EvtDDalitz::decay(), EvtDeBD::decay(), EvtDIY::decay(), EvtDToa0enu::decay(), EvtDtoKKpiPlot::decay(), EvtDToKmPipPipPi0::decay(), EvtDToKpienu::decay(), EvtDtoKpipiPlot::decay(), EvtDToKppipipi0::decay(), EvtDToKSKpi0::decay(), EvtDToKSKSpi::decay(), EvtDToKSpieta::decay(), EvtDtoKSpietaPlot::decay(), EvtDtoKSpiomegaPlot::decay(), EvtDToKSpipi0pi0::decay(), EvtDToKSpipipi::decay(), EvtDTopi0pi0enu::decay(), EvtDTopiEtaEta::decay(), EvtDtopietaetaPlot::decay(), EvtDTopipi0Eta::decay(), EvtDtopipi0etaPlot::decay(), EvtDTopipi0pi0::decay(), EvtDtopipi0pi0Plot::decay(), EvtDTopipienu::decay(), EvtDtopipipiPlot::decay(), EvtEDM::decay(), EvtEtaDalitz::decay(), EvtEtap2gpipi::decay(), EvtFDC::decay(), EvtFlatQ2::decay(), EvtFromParent::decay(), EvtFromParent_antiLambda::decay(), EvtFromParent_Lambda::decay(), EvtHAngSam3::decay(), EvtHelPPJ::decay(), EvtHypWK::decay(), EvtIntervalDecayAmp< T >::decay(), EvtJ2BB1::decay(), EvtJ2BB2::decay(), EvtJ2BB3::decay(), EvtJetSet::decay(), EvtJPE::decay(), EvtJpipi::decay(), EvtJscont::decay(), EvtJTO3P::decay(), EvtKstarnunu::decay(), EvtKstarstargamma::decay(), EvtLambdac2pKpi::decay(), EvtLambdaP_BarGamma::decay(), EvtLNuGamma::decay(), EvtLunda::decay(), EvtLundCharm::decay(), EvtMassH1::decay(), EvtMassH2::decay(), EvtMBody3::decay(), EvtmH2::decay(), EvtmPhsp::decay(), EvtMultibody::decay(), EvtOmegaDalitz::decay(), EvtOpenCharm::decay(), EvtP2GC0::decay(), EvtP2GC1::decay(), EvtP2GC2::decay(), EvtPhiDalitz::decay(), EvtPhokhara::decay(), EvtPhokhara_4pi::decay(), EvtPhokhara_etagam::decay(), EvtPhokhara_etapgam::decay(), EvtPhokhara_K0K0::decay(), EvtPhokhara_KK::decay(), EvtPhokhara_Lambda::decay(), EvtPhokhara_LLB::decay(), EvtPhokhara_nnbar::decay(), EvtPhokhara_pi0gam::decay(), EvtPhokhara_pi0pi0pipi::decay(), EvtPhokhara_pipi::decay(), EvtPhokhara_pipieta::decay(), EvtPhokhara_pipipi0::decay(), EvtPhokhara_ppbar::decay(), EvtPhsp::decay(), EvtPhspStepf::decay(), EvtPi0Dalitz::decay(), EvtPycont::decay(), EvtPyGaGa::decay(), EvtPythia::decay(), EvtRexc::decay(), EvtRhoPi::decay(), EvtSingleParticle::decay(), EvtSingleParticle2::decay(), EvtSinglePoint::decay(), EvtSll::decay(), EvtSLN::decay(), EvtSPL::decay(), EvtSSDCP::decay(), EvtSTS::decay(), EvtSTSCP::decay(), EvtSVPCP::decay(), EvtSVPHelAmp::decay(), EvtSVS::decay(), EvtSVSCP::decay(), EvtSVSCPiso::decay(), EvtSVSCPLH::decay(), EvtSVSNONCPEIGEN::decay(), EvtT2GV::decay(), EvtTauGamMu::decay(), EvtTauHadnu::decay(), EvtTaulnunu::decay(), EvtTauola::decay(), EvtTauScalarnu::decay(), EvtTauVectornu::decay(), EvtTrackGen::decay(), EvtTSS::decay(), EvtTVSPwave::decay(), EvtVectorIsr::decay(), EvtVll::decay(), EvtVPHOtoVISR::decay(), EvtVPHOtoVISRHi::decay(), EvtVSPPwave::decay(), EvtVSS::decay(), EvtVSSBMixCPT::decay(), EvtVSSMix::decay(), EvtVub::decay(), EvtVubHybrid::decay(), EvtVubNLO::decay(), EvtVVP::decay(), EvtVVpipi::decay(), EvtVVPIPI_WEIGHTED::decay(), EvtVVSPwave::decay(), EvtConExc::difgamXs(), EvtPHOTOS::doRadCorr(), EvtEvalHelAmp::evalAmp(), EvtLunda::ExclusiveDecay(), EvtDecayBase::findMass(), EvtDecayBase::findMasses(), EvtDecayBase::findMaxMass(), EvtConExc::findMaxXS(), EvtPsi3Sdecay::findMode(), EvtFSPick::FSPick(), EvtConExc::gamHXSection(), EvtGen::generateDecay(), initDecay(), initializePhaseSpace(), EvtDecayAmp::makeDecay(), EvtDecayIncoherent::makeDecay(), EvtDecayProb::makeDecay(), EvtDecayTag::makeTag(), EvtCPUtil::OtherB(), EvtConExc::photonSampling(), EvtPsi3Sdecay::PHSPDecay(), EvtConExc::Rad1difXs(), EvtConExc::Rad2difXs(), EvtConExc::SetP4(), EvtConExc::SetP4Rvalue(), and EvtSVVHelAmp::SVVHel().

◆ getGeneratorFlag()

int EvtParticle::getGeneratorFlag ( )
inline

get generator information; pingrg-2011-1-6

Definition at line 146 of file EvtParticle.hh.

146{ return _generatorFlag ;}

◆ getId()

EvtId EvtParticle::getId ( ) const

Returns Id of particle.

Definition at line 112 of file EvtParticle.cc.

112{ return _id;}

Referenced by EvtRexc::angularSampling(), EvtConExc::angularSampling(), EvtbTosllScalarAmp::CalcAmp(), EvtbTosllVectorAmp::CalcAmp(), EvtSemiLeptonicBaryonAmp::CalcAmp(), EvtSemiLeptonicTensorAmp::CalcAmp(), EvtSemiLeptonicVectorAmp::CalcAmp(), EvtConExc::checkdecay(), EvtPsi3Sdecay::choseDecay(), compMassProb(), EvtSecondary::createSecondary(), decay(), EvtAngH2::decay(), EvtBsquark::decay(), EvtBTo3piCP::decay(), EvtBtoXsll::decay(), EvtCalHelAmp::decay(), EvtCBTo3piMPP::decay(), EvtCBTo3piP00::decay(), EvtConExc::decay(), EvtD0Toa0enu::decay(), EvtD0ToKKpipi::decay(), EvtD0Topipienu::decay(), EvtDDalitz::decay(), EvtDeBD::decay(), EvtDMix::decay(), EvtDToa0enu::decay(), EvtDToKmPipPipPi0::decay(), EvtDToKpienu::decay(), EvtDToKSpipi0pi0::decay(), EvtDTopi0pi0enu::decay(), EvtDTopipienu::decay(), EvtFromParent::decay(), EvtFromParent_antiLambda::decay(), EvtFromParent_Lambda::decay(), EvtHypWK::decay(), EvtJetSet::decay(), EvtJscont::decay(), EvtKstarstargamma::decay(), EvtLambdac2pKpi::decay(), EvtLNuGamma::decay(), EvtLunda::decay(), EvtLundCharm::decay(), EvtOpenCharm::decay(), EvtPhokhara::decay(), EvtPhokhara_4pi::decay(), EvtPhokhara_etagam::decay(), EvtPhokhara_etapgam::decay(), EvtPhokhara_K0K0::decay(), EvtPhokhara_KK::decay(), EvtPhokhara_Lambda::decay(), EvtPhokhara_LLB::decay(), EvtPhokhara_nnbar::decay(), EvtPhokhara_pi0gam::decay(), EvtPhokhara_pi0pi0pipi::decay(), EvtPhokhara_pipi::decay(), EvtPhokhara_pipieta::decay(), EvtPhokhara_pipipi0::decay(), EvtPhokhara_ppbar::decay(), EvtPycont::decay(), EvtPyGaGa::decay(), EvtPythia::decay(), EvtRexc::decay(), EvtSVSCPiso::decay(), EvtSVSNONCPEIGEN::decay(), EvtSVVNONCPEIGEN::decay(), EvtTauHadnu::decay(), EvtTaulnunu::decay(), EvtTauola::decay(), EvtTauScalarnu::decay(), EvtTauVectornu::decay(), EvtTrackGen::decay(), EvtVPHOtoVISR::decay(), EvtVPHOtoVISRHi::decay(), EvtVSSBMixCPT::decay(), EvtVSSMix::decay(), EvtPHOTOS::doRadCorr(), EvtLunda::ExclusiveDecay(), EvtDecayBase::findMass(), EvtDecayBase::findMasses(), EvtDecayBase::findMaxMass(), EvtConExc::findMaxXS(), EvtPsi3Sdecay::findMode(), EvtFSPick::FSPick(), EvtConExc::gamHXSection(), generateMassTree(), EvtDecayTable::getDecayFunc(), EvtParticleDecayList::getDecayModel(), initDecay(), initializePhaseSpace(), EvtDecayAmp::makeDecay(), EvtDecayProb::makeDecay(), makeStdHep(), EvtDecayTag::makeTag(), EvtCPUtil::OtherB(), EvtConExc::photonSampling(), EvtPsi3Sdecay::PHSPDecay(), printTreeRec(), EvtDiracParticle::rotateToHelicityBasis(), EvtHighSpinParticle::rotateToHelicityBasis(), EvtRaritaSchwingerParticle::rotateToHelicityBasis(), EvtConExc::selectMode(), setLifetime(), EvtConExc::SetP4(), EvtConExc::SetP4Rvalue(), treeStrRec(), and writeTreeRec().

◆ getInclusiveMode()

int EvtParticle::getInclusiveMode ( )
inline

Definition at line 399 of file EvtParticle.hh.

399{return _inclusiveMode;}

◆ getIntFlag()

std::vector< int > EvtParticle::getIntFlag ( )
inline

get int flag for ConExc: pingrg-2015-2-7

Definition at line 163 of file EvtParticle.hh.

163 {
164 return _intFlag;
165 }

Referenced by EvtDecayTag::getModeTag().

◆ getLifetime()

double EvtParticle::getLifetime ( )

Returns the lifetime.

Definition at line 98 of file EvtParticle.cc.

98 {
99
100 return _t;
101}

Referenced by EvtVSSBMixCPT::decay(), EvtVSSMix::decay(), and EvtCPUtil::OtherB().

◆ getNDaug()

◆ getP4()

const EvtVector4R & EvtParticle::getP4 ( ) const

Returns 4momentum in parents restframe.

Definition at line 120 of file EvtParticle.cc.

120{ return _p;}

Referenced by EvtbTosllScalarAmp::CalcAmp(), EvtbTosllVectorAmp::CalcAmp(), EvtSemiLeptonicBaryonAmp::CalcAmp(), EvtSemiLeptonicTensorAmp::CalcAmp(), EvtSemiLeptonicVectorAmp::CalcAmp(), EvtPsi3Sdecay::choseDecay(), EvtAngSam::decay(), EvtAngSam3::decay(), EvtAngSamX::decay(), EvtAV2GV::decay(), EvtBHadronic::decay(), EvtBsquark::decay(), EvtBTo4piCP::decay(), EvtBtoKD3P::decay(), EvtCalHelAmp::decay(), EvtChi0BB1::decay(), EvtChi0BB2::decay(), EvtChi1BB1::decay(), EvtChi1BB2::decay(), EvtChi2BB1::decay(), EvtChi2BB2::decay(), EvtConExc::decay(), EvtD0mixDalitz::decay(), EvtD0To2pip2pim::decay(), EvtD0Toa0enu::decay(), EvtD0ToKKpipi::decay(), EvtD0ToKpiEtap::decay(), EvtD0ToKpipi0::decay(), EvtD0ToKpipi0pi0::decay(), EvtD0ToKpipipi::decay(), EvtD0ToKSKK::decay(), EvtD0ToKSpi0pi0::decay(), EvtD0ToKSpipi::decay(), EvtD0ToKSpipipi0::decay(), EvtD0ToKSpipipi0pi0::decay(), EvtD0Topipienu::decay(), EvtD0TopipiEta::decay(), EvtD0Topippim2pi0::decay(), EvtDDalitz::decay(), EvtDeBD::decay(), EvtDIY::decay(), EvtDToa0enu::decay(), EvtDToKmPipPipPi0::decay(), EvtDToKpienu::decay(), EvtDToKppipipi0::decay(), EvtDToKSKpi0::decay(), EvtDToKSKSpi::decay(), EvtDToKSpieta::decay(), EvtDToKSpipi0pi0::decay(), EvtDToKSpipipi::decay(), EvtDTopi0pi0enu::decay(), EvtDTopiEtaEta::decay(), EvtDTopipi0Eta::decay(), EvtDTopipi0pi0::decay(), EvtDTopipienu::decay(), EvtEDM::decay(), EvtEtaDalitz::decay(), EvtEtap2gpipi::decay(), EvtFlatQ2::decay(), EvtFromParent::decay(), EvtHAngSam3::decay(), EvtHelPPJ::decay(), EvtHypWK::decay(), EvtJ2BB1::decay(), EvtJ2BB2::decay(), EvtJ2BB3::decay(), EvtJPE::decay(), EvtJpipi::decay(), EvtJTO3P::decay(), EvtKstarnunu::decay(), EvtKstarstargamma::decay(), EvtLNuGamma::decay(), EvtMBody3::decay(), EvtOmegaDalitz::decay(), EvtOpenCharm::decay(), EvtP2GC0::decay(), EvtP2GC1::decay(), EvtP2GC2::decay(), EvtPhiDalitz::decay(), EvtPhsp::decay(), EvtPhspStepf::decay(), EvtPi0Dalitz::decay(), EvtRexc::decay(), EvtRhoPi::decay(), EvtSPL::decay(), EvtSSDCP::decay(), EvtSTS::decay(), EvtSTSCP::decay(), EvtSVPCP::decay(), EvtSVPHelAmp::decay(), EvtSVS::decay(), EvtSVSCP::decay(), EvtSVSCPLH::decay(), EvtSVSNONCPEIGEN::decay(), EvtT2GV::decay(), EvtTauGamMu::decay(), EvtTauHadnu::decay(), EvtTauScalarnu::decay(), EvtTSS::decay(), EvtVSPPwave::decay(), EvtVSS::decay(), EvtVSSBMixCPT::decay(), EvtVSSMix::decay(), EvtVVpipi::decay(), EvtVVPIPI_WEIGHTED::decay(), EvtVVSPwave::decay(), EvtConExc::difgamXs(), EvtPHOTOS::doRadCorr(), EvtVectorParticle::epsParent(), EvtPhotonParticle::epsParentPhoton(), EvtTensorParticle::epsTensorParent(), EvtEvalHelAmp::evalAmp(), EvtConExc::findMaxXS(), EvtConExc::gamHXSection(), generateMassTree(), get4Pos(), getP4Lab(), EvtDecayAmp::makeDecay(), EvtPsi3Sdecay::PHSPDecay(), EvtConExc::Rad1difXs(), EvtConExc::Rad2difXs(), EvtDiracParticle::rotateToHelicityBasis(), EvtRaritaSchwingerParticle::rotateToHelicityBasis(), and EvtSVVHelAmp::SVVHel().

◆ getP4Lab()

EvtVector4R EvtParticle::getP4Lab ( )

Gets 4vector in the labframe, i.e., the frame in which the root particles momentum is measured.

Definition at line 684 of file EvtParticle.cc.

684 {
685 EvtVector4R temp,mom;
686 EvtParticle *ptemp;
687
688 temp=this->getP4();
689 ptemp=this;
690
691 while (ptemp->getParent()!=0) {
692 ptemp=ptemp->getParent();
693 mom=ptemp->getP4();
694 temp=boostTo(temp,mom);
695 }
696 return temp;
697}

Referenced by EvtRexc::angularSampling(), EvtConExc::angularSampling(), EvtAngH2::decay(), EvtBody3::decay(), EvtD0To2pip2pim::decay(), EvtD0toKLpipiPlot::decay(), EvtD0toKpietaPlot::decay(), EvtD0toKpiomegaPlot::decay(), EvtD0toKpipi0Plot::decay(), EvtD0toKSpi0etaPlot::decay(), EvtD0toKSpi0omegaPlot::decay(), EvtD0ToKSpipi::decay(), EvtD0ToKSpipipi0::decay(), EvtD0toKSpipiPlot::decay(), EvtD0topipietaPlot::decay(), EvtD0Topippim2pi0::decay(), EvtDeBD::decay(), EvtDIY::decay(), EvtDtoKKpiPlot::decay(), EvtDtoKpipiPlot::decay(), EvtDToKSKpi0::decay(), EvtDtoKSpietaPlot::decay(), EvtDtoKSpiomegaPlot::decay(), EvtDtopietaetaPlot::decay(), EvtDtopipi0etaPlot::decay(), EvtDtopipi0pi0Plot::decay(), EvtDtopipipiPlot::decay(), EvtFDC::decay(), EvtFromParent::decay(), EvtFromParent_antiLambda::decay(), EvtFromParent_Lambda::decay(), EvtLambdaP_BarGamma::decay(), EvtMassH1::decay(), EvtMassH2::decay(), EvtMBody3::decay(), EvtmH2::decay(), EvtmPhsp::decay(), EvtMultibody::decay(), EvtPhokhara_Lambda::decay(), EvtRhoPi::decay(), EvtSingleParticle::decay(), EvtSingleParticle2::decay(), EvtSPL::decay(), makeStdHep(), and EvtConExc::photonSampling().

◆ getP4Restframe()

EvtVector4R EvtParticle::getP4Restframe ( )

Gets 4vector in the particles restframe, i.e. this functiont will return (m,0,0,0)

Definition at line 699 of file EvtParticle.cc.

699 {
700
701 return EvtVector4R(mass(),0.0,0.0,0.0);
702
703}

Referenced by EvtKstarstargamma::decay(), EvtSSDCP::decay(), EvtSVSCPLH::decay(), EvtVPHOtoVISR::decay(), and EvtVPHOtoVISRHi::decay().

◆ getParent()

◆ getSpinDensityBackward()

EvtSpinDensity EvtParticle::getSpinDensityBackward ( )
inline

Get backward spin density matrix.

Definition at line 362 of file EvtParticle.hh.

362{return _rhoBackward;}

Referenced by EvtDecayAmp::makeDecay().

◆ getSpinDensityForward()

EvtSpinDensity EvtParticle::getSpinDensityForward ( )
inline

Get forward spin density matrix.

Definition at line 352 of file EvtParticle.hh.

352{return _rhoForward;}

Referenced by EvtDecayAmp::makeDecay(), and EvtDecayIncoherent::makeDecay().

◆ getSpinStates()

int EvtParticle::getSpinStates ( ) const

Returns number of spin states of the particle.

Definition at line 117 of file EvtParticle.cc.

static EvtSpinType::spintype getSpinType(EvtId i)
Definition: EvtPDL.hh:61
static int getSpinStates(spintype stype)
Definition: EvtSpinType.hh:64

Referenced by EvtbTosllAmp::CalcMaxProb(), EvtSemiLeptonicAmp::CalcMaxProb(), decay(), EvtDecayIncoherent::makeDecay(), EvtDecayProb::makeDecay(), setDiagonalSpinDensity(), setPolarizedSpinDensity(), and setVectorSpinDensity().

◆ getSpinType()

EvtSpinType::spintype EvtParticle::getSpinType ( ) const

Returns particle type.

Definition at line 114 of file EvtParticle.cc.

115 { return EvtPDL::getSpinType(_id);}

◆ hasValidP4()

bool EvtParticle::hasValidP4 ( )
inline

Definition at line 388 of file EvtParticle.hh.

388{return _validP4;}

Referenced by EvtDecayBase::findMaxMass(), EvtParticleDecayList::getDecayModel(), and initDecay().

◆ init()

virtual void EvtParticle::init ( EvtId  part_n,
const EvtVector4R p4 
)
pure virtual

Initialiaze particle with id and 4momentum.

Implemented in EvtHighSpinParticle, EvtRaritaSchwingerParticle, EvtStringParticle, EvtScalarParticle, EvtVectorParticle, EvtDiracParticle, EvtNeutrinoParticle, EvtPhotonParticle, and EvtTensorParticle.

Referenced by EvtbTosllAmp::CalcMaxProb(), EvtSemiLeptonicAmp::CalcMaxProb(), EvtBTo3piCP::decay(), EvtBtoKD3P::decay(), EvtBToKpipiCP::decay(), EvtBtoXsEtap::decay(), EvtBtoXsgamma::decay(), EvtBtoXsll::decay(), EvtCBTo3piMPP::decay(), EvtCBTo3piP00::decay(), EvtFromParent::decay(), EvtFromParent_antiLambda::decay(), EvtFromParent_Lambda::decay(), EvtIntervalDecayAmp< T >::decay(), EvtJetSet::decay(), EvtJscont::decay(), EvtLambdac2pKpi::decay(), EvtLunda::decay(), EvtLundCharm::decay(), EvtOpenCharm::decay(), EvtPhokhara::decay(), EvtPhokhara_4pi::decay(), EvtPhokhara_etagam::decay(), EvtPhokhara_etapgam::decay(), EvtPhokhara_K0K0::decay(), EvtPhokhara_KK::decay(), EvtPhokhara_Lambda::decay(), EvtPhokhara_LLB::decay(), EvtPhokhara_nnbar::decay(), EvtPhokhara_pi0gam::decay(), EvtPhokhara_pi0pi0pipi::decay(), EvtPhokhara_pipi::decay(), EvtPhokhara_pipieta::decay(), EvtPhokhara_pipipi0::decay(), EvtPhokhara_ppbar::decay(), EvtPycont::decay(), EvtPyGaGa::decay(), EvtPythia::decay(), EvtSingleParticle::decay(), EvtSingleParticle2::decay(), EvtSinglePoint::decay(), EvtTauola::decay(), EvtTrackGen::decay(), EvtVectorIsr::decay(), EvtVPHOtoVISR::decay(), EvtVPHOtoVISRHi::decay(), EvtVSSBMixCPT::decay(), EvtVub::decay(), EvtVubHybrid::decay(), EvtVubNLO::decay(), initializePhaseSpace(), EvtConExc::SetP4(), and EvtConExc::SetP4Rvalue().

◆ initDecay()

void EvtParticle::initDecay ( bool  useMinMass = false)

Definition at line 236 of file EvtParticle.cc.

236 {
237
238 EvtParticle* p=this;
239 // carefull - the parent mass might be fixed in stone..
240 EvtParticle* par=p->getParent();
241 double parMass=-1.;
242 if ( par != 0 ) {
243 if ( par->hasValidP4() ) parMass=par->mass();
244 int i;
245 for ( i=0;i<par->getNDaug();i++) {
246 EvtParticle *tDaug=par->getDaug(i);
247 if ( p != tDaug )
248 parMass-=EvtPDL::getMinMass(tDaug->getId());
249 }
250 }
251
252 if ( _isInit ) {
253 //we have already been here - just reroll the masses!
254 if ( _ndaug>0) {
255 int ii;
256 for(ii=0;ii<_ndaug;ii++){
257 if ( _ndaug==1 || EvtPDL::getWidth(p->getDaug(ii)->getId()) > 0.0000001)
258 p->getDaug(ii)->initDecay(useMinMass);
259 else p->getDaug(ii)->setMass(EvtPDL::getMeanMass(p->getDaug(ii)->getId()));
260 }
261 }
262
263 int j;
264 EvtId *dauId=0;
265 double *dauMasses=0;
266 if ( _ndaug > 0) {
267 dauId=new EvtId[_ndaug];
268 dauMasses=new double[_ndaug];
269 for (j=0;j<_ndaug;j++) {
270 dauId[j]=p->getDaug(j)->getId();
271 dauMasses[j]=p->getDaug(j)->mass();
272 }
273 }
274 EvtId *parId=0;
275 EvtId *othDauId=0;
276 EvtParticle *tempPar=p->getParent();
277 if (tempPar) {
278 parId=new EvtId(tempPar->getId());
279 if ( tempPar->getNDaug()==2 ) {
280 if ( tempPar->getDaug(0) == this ) othDauId=new EvtId(tempPar->getDaug(1)->getId());
281 else othDauId=new EvtId(tempPar->getDaug(0)->getId());
282 }
283 }
284 if ( p->getParent() && _validP4==false ) {
285 if ( !useMinMass ) p->setMass(EvtPDL::getRandMass(p->getId(),parId,_ndaug,dauId,othDauId,parMass,dauMasses));
286 else p->setMass(EvtPDL::getMinMass(p->getId()));
287 }
288 if ( parId) delete parId;
289 if ( othDauId) delete othDauId;
290 if ( dauId) delete [] dauId;
291 if ( dauMasses) delete [] dauMasses;
292 return;
293 }
294
295
296 //Will include effects of mixing here
297 //added by Lange Jan4,2000
298 static EvtId BS0=EvtPDL::getId("B_s0");
299 static EvtId BSB=EvtPDL::getId("anti-B_s0");
300 static EvtId BD0=EvtPDL::getId("B0");
301 static EvtId BDB=EvtPDL::getId("anti-B0");
302
303 //only makes sense if there is no parent particle
304 if ( (getNDaug()==0 && getParent()==0) && (getId()==BS0||getId()==BSB||getId()==BD0||getId()==BDB)){
305 double t;
306 int mix;
308 setLifetime(t);
309
310 if (mix) {
311
312 EvtScalarParticle* scalar_part;
313
314 scalar_part=new EvtScalarParticle;
315 if (getId()==BS0) {
316 EvtVector4R p_init(EvtPDL::getMass(BSB),0.0,0.0,0.0);
317 scalar_part->init(BSB,p_init);
318 }
319 else if (getId()==BSB) {
320 EvtVector4R p_init(EvtPDL::getMass(BS0),0.0,0.0,0.0);
321 scalar_part->init(BS0,p_init);
322 }
323 else if (getId()==BD0) {
324 EvtVector4R p_init(EvtPDL::getMass(BDB),0.0,0.0,0.0);
325 scalar_part->init(BDB,p_init);
326 }
327 else if (getId()==BDB) {
328 EvtVector4R p_init(EvtPDL::getMass(BD0),0.0,0.0,0.0);
329 scalar_part->init(BD0,p_init);
330 }
331
332 scalar_part->setLifetime(0);
333
334 scalar_part->setDiagonalSpinDensity();
335
336 insertDaugPtr(0,scalar_part);
337
338 _ndaug=1;
339 _isInit=true;
340 p=scalar_part;
341 p->initDecay(useMinMass);
342 return;
343
344
345 }
346 }
347 if ( _ndaug==1 ) std::cout << "hi " << EvtPDL::name(this->getId()) << std::endl;
348
349 EvtDecayBase *decayer;
350 decayer = EvtDecayTable::getDecayFunc(p);
351
352 if ( decayer ) {
353 p->makeDaughters(decayer->nRealDaughters(),decayer->getDaugs());
354 // report(INFO,"EvtGen") << "has found decay " << decayer->nRealDaughters() << endl;
355 //then loop over the daughters and init their decay
356 int i;
357 for(i=0;i<p->getNDaug();i++){
358 if ( EvtPDL::getWidth(p->getDaug(i)->getId()) > 0.0000001)
359 p->getDaug(i)->initDecay(useMinMass);
360 else p->getDaug(i)->setMass(EvtPDL::getMeanMass(p->getDaug(i)->getId()));
361 // report(INFO,"EvtGen") << "has inited " << EvtPDL::name(p->getDaug(i)->getId()) <<
362 // " " << EvtPDL::name(p->getId()) << endl;
363 }
364 }
365 //figure masses in separate step...
366 // if ( p->getParent() && _validP4==false ) EvtDecayBase::findMass(p);
367
368 int j;
369 EvtId *dauId=0;
370 double *dauMasses=0;
371 int nDaugT=p->getNDaug();
372 if ( nDaugT > 0) {
373 dauId=new EvtId[nDaugT];
374 dauMasses=new double[nDaugT];
375 for (j=0;j<nDaugT;j++) {
376 dauId[j]=p->getDaug(j)->getId();
377 dauMasses[j]=p->getDaug(j)->mass();
378 }
379 }
380
381 EvtId *parId=0;
382 EvtId *othDauId=0;
383 EvtParticle *tempPar=p->getParent();
384 if (tempPar) {
385 parId=new EvtId(tempPar->getId());
386 if ( tempPar->getNDaug()==2 ) {
387 if ( tempPar->getDaug(0) == this ) othDauId=new EvtId(tempPar->getDaug(1)->getId());
388 else othDauId=new EvtId(tempPar->getDaug(0)->getId());
389 }
390 }
391 if ( p->getParent() && p->hasValidP4()==false ) {
392 if ( !useMinMass ) p->setMass(EvtPDL::getRandMass(p->getId(),parId,p->getNDaug(),dauId,othDauId,parMass,dauMasses));
393 else p->setMass(EvtPDL::getMinMass(p->getId()));
394 }
395 if ( parId) delete parId;
396 if ( othDauId) delete othDauId;
397 if ( dauId) delete [] dauId;
398 if ( dauMasses) delete [] dauMasses;
399 _isInit=true;
400}
TTree * t
Definition: binning.cxx:23
static void incoherentMix(const EvtId id, double &t, int &mix)
Definition: EvtCPUtil.cc:294
virtual int nRealDaughters()
EvtId * getDaugs()
Definition: EvtDecayBase.hh:65
static double getWidth(EvtId i)
Definition: EvtPDL.hh:54
static double getRandMass(EvtId i, EvtId *parId, int nDaug, EvtId *dauId, EvtId *othDaugId, double maxMass, double *dauMasses)
Definition: EvtPDL.hh:47
static double getMeanMass(EvtId i)
Definition: EvtPDL.hh:45
static double getMinMass(EvtId i)
Definition: EvtPDL.hh:51
static double getMass(EvtId i)
Definition: EvtPDL.hh:46
void setMass(double m)
Definition: EvtParticle.hh:377
void makeDaughters(int ndaug, EvtId *id)
void insertDaugPtr(int idaug, EvtParticle *partptr)
Definition: EvtParticle.hh:225
bool hasValidP4()
Definition: EvtParticle.hh:388
void setLifetime()
Definition: EvtParticle.cc:92
void setDiagonalSpinDensity()
Definition: EvtParticle.cc:132
void setLifetime(double tau)
Definition: EvtParticle.cc:88
void init(EvtId part_n, double e, double px, double py, double pz)

Referenced by generateMassTree(), and initDecay().

◆ initializePhaseSpace()

double EvtParticle::initializePhaseSpace ( int  numdaughter,
EvtId daughters,
double  poleSize = -1.,
int  whichTwo1 = 0,
int  whichTwo2 = 1 
)

Similar to the routine above except that here momentum is generated according to phase space daughters are filled with this momentum.

Definition at line 1070 of file EvtParticle.cc.

1072 {
1073
1074 double m_b;
1075 int i;
1076 //lange
1077 // this->makeDaughters(numdaughter,daughters);
1078
1079 static EvtVector4R p4[100];
1080 static double mass[100];
1081
1082 m_b = this->mass();
1083
1084 //lange - Jan2,2002 - Need to check to see if the daughters of the parent
1085 // have changed. If so, delete them and start over.
1086 //report(INFO,"EvtGen") << "the parent is\n";
1087 //if ( this->getParent() ) {
1088 // if ( this->getParent()->getParent() ) this->getParent()->getParent()->printTree();
1089 // this->getParent()->printTree();
1090 //}
1091 //report(INFO,"EvtGen") << "and this is\n";
1092 //if ( this) this->printTree();
1093 bool resetDaughters=false;
1094 if ( numdaughter != this->getNDaug() && this->getNDaug() > 0 ) resetDaughters=true;
1095 if ( numdaughter == this->getNDaug() )
1096 for (i=0; i<numdaughter;i++) {
1097 if ( this->getDaug(i)->getId() != daughters[i] ) resetDaughters=true;
1098 //report(INFO,"EvtGen") << this->getDaug(i)->getId() << " " << daughters[i] << endl;
1099 }
1100
1101 if ( resetDaughters ) {
1102 // report(INFO,"EvtGen") << "reseting daughters\n";
1103 //for (i=0; i<numdaughter;i++) {
1104 // report(INFO,"EvtGen") << "reset " <<i<< " "<< EvtPDL::name(this->getDaug(i)->getId()) << " " << EvtPDL::name(daughters[i]) << endl;
1105 //}
1106 bool t1=true;
1107 //but keep the decay channel of the parent.
1108 this->deleteDaughters(t1);
1109 this->makeDaughters(numdaughter,daughters);
1110 this->generateMassTree();
1111 }
1112
1113 double weight=0.;
1114 // EvtDecayBase::findMasses( this, numdaughter, daughters, mass );
1115 //get the list of masses
1116 //report(INFO,"EvtGen") << "mpar= " << m_b << " " << this <<endl;
1117 for (i=0; i<numdaughter;i++) {
1118 mass[i]=this->getDaug(i)->mass();
1119 // report(INFO,"EvtGen") << "mass " << i << " " << mass[i] << " " << this->getDaug(i) << endl;
1120 }
1121
1122 if ( poleSize<-0.1) {
1123 EvtGenKine::PhaseSpace( numdaughter, mass, p4, m_b );
1124 for(i=0;i<numdaughter;i++){
1125 this->getDaug(i)->init(daughters[i],p4[i]);
1126 }
1127
1128 }
1129 else {
1130 if ( numdaughter != 3 ) {
1131 report(ERROR,"EvtGen") << "Only can generate pole phase space "
1132 << "distributions for 3 body final states"
1133 << endl<<"Will terminate."<<endl;
1134 ::abort();
1135 }
1136 bool ok=false;
1137 if ( (whichTwo1 == 1 && whichTwo2 == 0 ) ||
1138 (whichTwo1 == 0 && whichTwo2 == 1 ) ) {
1140 poleSize, p4);
1141 //report(INFO,"EvtGen") << "here " << weight << " " << poleSize << endl;
1142 this->getDaug(0)->init(daughters[0],p4[0]);
1143 this->getDaug(1)->init(daughters[1],p4[1]);
1144 this->getDaug(2)->init(daughters[2],p4[2]);
1145 ok=true;
1146 }
1147 if ( (whichTwo1 == 1 && whichTwo2 == 2 ) ||
1148 (whichTwo1 == 2 && whichTwo2 == 1 ) ) {
1150 poleSize, p4);
1151 this->getDaug(0)->init(daughters[0],p4[2]);
1152 this->getDaug(1)->init(daughters[1],p4[1]);
1153 this->getDaug(2)->init(daughters[2],p4[0]);
1154 ok=true;
1155 }
1156 if ( (whichTwo1 == 0 && whichTwo2 == 2 ) ||
1157 (whichTwo1 == 2 && whichTwo2 == 0 ) ) {
1159 poleSize, p4);
1160 this->getDaug(0)->init(daughters[0],p4[1]);
1161 this->getDaug(1)->init(daughters[1],p4[0]);
1162 this->getDaug(2)->init(daughters[2],p4[2]);
1163 ok=true;
1164 }
1165 if ( !ok) {
1166 report(ERROR,"EvtGen") << "Invalid pair of particle to generate a pole dist"
1167 << whichTwo1 << " " << whichTwo2
1168 << endl<<"Will terminate."<<endl;
1169 ::abort();
1170 }
1171 }
1172
1173 return weight;
1174}
*********DOUBLE PRECISION m_pi INTEGER m_lenwt !max no of aux weights INTEGER m_phmax !maximum photon multiplicity ISR FSR *DOUBLE COMPLEX m_Pauli4 DOUBLE COMPLEX m_AmpBorn DOUBLE COMPLEX m_AmpBoxy DOUBLE COMPLEX m_AmpBorn1 DOUBLE COMPLEX m_AmpBorn2 DOUBLE COMPLEX m_AmpExpo2p DOUBLE COMPLEX m_Rmat DOUBLE COMPLEX m_BoxGZut !DOUBLE COMPLEX m_F1finPair2 !DOUBLE PRECISION m_Vcut DOUBLE PRECISION m_Alfinv DOUBLE PRECISION m_Lorin1 DOUBLE PRECISION m_Lorin2 DOUBLE PRECISION m_b
Definition: GPS.h:30
*********Class see also m_nmax DOUBLE PRECISION m_MasPhot DOUBLE PRECISION m_phsu DOUBLE PRECISION m_Xenph DOUBLE PRECISION m_r2 DOUBLE PRECISION m_WtMass INTEGER m_nmax INTEGER m_Nevgen INTEGER m_IsFSR INTEGER m_MarTot *COMMON c_KarFin $ !Output file $ !Event serial number $ !alpha QED at Thomson limit $ !minimum energy at CMS for remooval $ !infrared dimensionless $ !dummy photon IR regulator $ !crude photon multiplicity enhancement factor *EVENT $ !MC crude volume of PhhSpace *Sfactors $ !YFS formfactor IR part only $ !YFS formfactor non IR finite part $ !mass weight
Definition: KarFin.h:34
static double PhaseSpacePole(double M, double m1, double m2, double m3, double a, EvtVector4R p4[10])
Definition: EvtGenKine.cc:272
static double PhaseSpace(int ndaug, double mass[30], EvtVector4R p4[30], double mp)
Definition: EvtGenKine.cc:50
virtual void init(EvtId part_n, const EvtVector4R &p4)=0
double double double * p4
Definition: qcdloop1.h:77

Referenced by EvtPsi3Sdecay::choseDecay(), EvtAngH2::decay(), EvtAngSam::decay(), EvtAngSam3::decay(), EvtAngSamLab::decay(), EvtAngSamX::decay(), EvtAV2GV::decay(), EvtBHadronic::decay(), EvtBody3::decay(), EvtBsquark::decay(), EvtBto2piCPiso::decay(), EvtBTo4piCP::decay(), EvtBtoKD3P::decay(), EvtBtoKpiCPiso::decay(), EvtbTosllAli::decay(), EvtbTosllBall::decay(), EvtCalHelAmp::decay(), EvtChi0BB1::decay(), EvtChi0BB2::decay(), EvtChi1BB1::decay(), EvtChi1BB2::decay(), EvtChi2BB1::decay(), EvtChi2BB2::decay(), EvtConExc::decay(), EvtD0mixDalitz::decay(), EvtD0To2pip2pim::decay(), EvtD0Toa0enu::decay(), EvtD0ToKKpipi::decay(), EvtD0toKLpipiPlot::decay(), EvtD0ToKpiEtap::decay(), EvtD0toKpietaPlot::decay(), EvtD0toKpiomegaPlot::decay(), EvtD0ToKpipi0::decay(), EvtD0ToKpipi0pi0::decay(), EvtD0toKpipi0Plot::decay(), EvtD0ToKpipipi::decay(), EvtD0ToKSKK::decay(), EvtD0toKSpi0etaPlot::decay(), EvtD0toKSpi0omegaPlot::decay(), EvtD0ToKSpi0pi0::decay(), EvtD0ToKSpipi::decay(), EvtD0ToKSpipipi0::decay(), EvtD0ToKSpipipi0pi0::decay(), EvtD0toKSpipiPlot::decay(), EvtD0Topipienu::decay(), EvtD0TopipiEta::decay(), EvtD0topipietaPlot::decay(), EvtD0Topippim2pi0::decay(), EvtDDalitz::decay(), EvtDeBD::decay(), EvtDIY::decay(), EvtDMix::decay(), EvtDToa0enu::decay(), EvtDtoKKpiPlot::decay(), EvtDToKmPipPipPi0::decay(), EvtDToKpienu::decay(), EvtDtoKpipiPlot::decay(), EvtDToKppipipi0::decay(), EvtDToKSKpi0::decay(), EvtDToKSKSpi::decay(), EvtDToKSpieta::decay(), EvtDtoKSpietaPlot::decay(), EvtDtoKSpiomegaPlot::decay(), EvtDToKSpipi0pi0::decay(), EvtDToKSpipipi::decay(), EvtDTopi0pi0enu::decay(), EvtDTopiEtaEta::decay(), EvtDtopietaetaPlot::decay(), EvtDTopipi0Eta::decay(), EvtDtopipi0etaPlot::decay(), EvtDTopipi0pi0::decay(), EvtDtopipi0pi0Plot::decay(), EvtDTopipienu::decay(), EvtDtopipipiPlot::decay(), EvtEDM::decay(), EvtEtaDalitz::decay(), EvtEtap2gpipi::decay(), EvtFDC::decay(), EvtFlatQ2::decay(), EvtHAngSam3::decay(), EvtHelAmp::decay(), EvtHelPPJ::decay(), EvtHQET::decay(), EvtHQET2::decay(), EvtHypNonLepton::decay(), EvtHypWK::decay(), EvtISGW::decay(), EvtISGW2::decay(), EvtJ2BB1::decay(), EvtJ2BB2::decay(), EvtJ2BB3::decay(), EvtJPE::decay(), EvtJpipi::decay(), EvtJTO3P::decay(), EvtKKLambdaC::decay(), EvtKstarnunu::decay(), EvtKstarstargamma::decay(), EvtLambdac2pKpi::decay(), EvtLambdaP_BarGamma::decay(), EvtLNuGamma::decay(), EvtMassH1::decay(), EvtMassH2::decay(), EvtMBody3::decay(), EvtMelikhov::decay(), EvtmH2::decay(), EvtmPhsp::decay(), EvtMultibody::decay(), EvtOmegaDalitz::decay(), EvtP2GC0::decay(), EvtP2GC1::decay(), EvtP2GC2::decay(), EvtPartWave::decay(), EvtPBB1::decay(), EvtPBB2::decay(), EvtPhiDalitz::decay(), EvtPhsp::decay(), EvtPhspStepf::decay(), EvtPi0Dalitz::decay(), EvtRexc::decay(), EvtRhoPi::decay(), EvtS2GV::decay(), EvtSLBKPole::decay(), EvtSll::decay(), EvtSLN::decay(), EvtSLPole::decay(), EvtSPL::decay(), EvtSSDCP::decay(), EvtSSSCP::decay(), EvtSSSCPpng::decay(), EvtSSSCPT::decay(), EvtSTS::decay(), EvtSTSCP::decay(), EvtSVPCP::decay(), EvtSVPHelAmp::decay(), EvtSVS::decay(), EvtSVSCP::decay(), EvtSVSCPiso::decay(), EvtSVSCPLH::decay(), EvtSVSNONCPEIGEN::decay(), EvtSVVNONCPEIGEN::decay(), EvtT2GV::decay(), EvtTauGamMu::decay(), EvtTauHadnu::decay(), EvtTaulnunu::decay(), EvtTauScalarnu::decay(), EvtTauVectornu::decay(), EvtTrackGen::decay(), EvtTSS::decay(), EvtTVSPwave::decay(), EvtVectorIsr::decay(), EvtVll::decay(), EvtVSPPwave::decay(), EvtVSS::decay(), EvtVSSBMixCPT::decay(), EvtVSSMix::decay(), EvtVub::decay(), EvtVubHybrid::decay(), EvtVubNLO::decay(), EvtVVP::decay(), EvtVVpipi::decay(), EvtVVPIPI_WEIGHTED::decay(), EvtVVSPwave::decay(), EvtLunda::ExclusiveDecay(), EvtConExc::findMaxXS(), EvtConExc::gamHXSection(), EvtPsi3Sdecay::PHSPDecay(), and EvtSVVHelAmp::SVVHel().

◆ insertDaugPtr()

void EvtParticle::insertDaugPtr ( int  idaug,
EvtParticle partptr 
)
inline

Makes partptr the idaug:th daugther.

Definition at line 225 of file EvtParticle.hh.

225 { _daug[idaug]=partptr;
226 partptr->_parent=this; }

Referenced by initDecay(), and EvtCPUtil::OtherB().

◆ isDecayed()

bool EvtParticle::isDecayed ( )
inline

Definition at line 389 of file EvtParticle.hh.

389{return _isDecayed;}

◆ isInitialized()

bool EvtParticle::isInitialized ( )
inline

Definition at line 387 of file EvtParticle.hh.

387{return _isInit;}

Referenced by EvtDecayBase::findMaxMass().

◆ makeDaughters()

void EvtParticle::makeDaughters ( int  ndaug,
EvtId id 
)

Creates the daughters in the list of ids and adds them to the parent. Note that momentum is left uninitialized, this is only creation.

Definition at line 1176 of file EvtParticle.cc.

1176 {
1177
1178 int i;
1179 if ( _channel < 0 ) {
1180 //report(INFO,"EvtGen") << "setting channel " << EvtPDL::name(this->getId()) << endl;
1181 setChannel(0);
1182 }
1183 EvtParticle* pdaug;
1184 if (_ndaug!=0 ){
1185 if (_ndaug!=ndaugstore){
1186 report(ERROR,"EvtGen") << "Asking to make a different number of "
1187 << "daughters than what was previously created."
1188 << endl<<"Will terminate."<<endl;
1189 ::abort();
1190 }
1191 }
1192 else{
1193 for(i=0;i<ndaugstore;i++){
1195 pdaug->setId(id[i]);
1196 pdaug->addDaug(this);
1197 }
1198
1199 } //else
1200} //makeDaughters
static EvtParticle * particleFactory(EvtSpinType::spintype spinType)
void setChannel(int i)
Definition: EvtParticle.cc:80
void addDaug(EvtParticle *node)
Definition: EvtParticle.cc:103
void setId(EvtId id)
Definition: EvtParticle.hh:370

Referenced by EvtbTosllAmp::CalcMaxProb(), EvtSemiLeptonicAmp::CalcMaxProb(), EvtPsi3Sdecay::choseDecay(), EvtBTo3piCP::decay(), EvtBToKpipiCP::decay(), EvtBtoXsEtap::decay(), EvtBtoXsgamma::decay(), EvtBtoXsll::decay(), EvtCBTo3piMPP::decay(), EvtCBTo3piP00::decay(), EvtConExc::decay(), EvtFromParent::decay(), EvtFromParent_antiLambda::decay(), EvtFromParent_Lambda::decay(), EvtJetSet::decay(), EvtJscont::decay(), EvtLunda::decay(), EvtLundCharm::decay(), EvtOpenCharm::decay(), EvtPhokhara::decay(), EvtPhokhara_4pi::decay(), EvtPhokhara_etagam::decay(), EvtPhokhara_etapgam::decay(), EvtPhokhara_K0K0::decay(), EvtPhokhara_KK::decay(), EvtPhokhara_Lambda::decay(), EvtPhokhara_LLB::decay(), EvtPhokhara_nnbar::decay(), EvtPhokhara_pi0gam::decay(), EvtPhokhara_pi0pi0pipi::decay(), EvtPhokhara_pipi::decay(), EvtPhokhara_pipieta::decay(), EvtPhokhara_pipipi0::decay(), EvtPhokhara_ppbar::decay(), EvtPycont::decay(), EvtPyGaGa::decay(), EvtPythia::decay(), EvtRexc::decay(), EvtSingleParticle::decay(), EvtSingleParticle2::decay(), EvtSinglePoint::decay(), EvtTauola::decay(), EvtLunda::ExclusiveDecay(), EvtConExc::findMaxXS(), EvtConExc::gamHXSection(), initDecay(), initializePhaseSpace(), and EvtPsi3Sdecay::PHSPDecay().

◆ makeStdHep() [1/2]

void EvtParticle::makeStdHep ( EvtStdHep stdhep)

Definition at line 794 of file EvtParticle.cc.

794 {
795
796 //first add particle to the stdhep list;
797 stdhep.createParticle(getP4Lab(),get4Pos(),-1,-1,
799
800 int i;
801 for(i=0;i<_ndaug;i++){
802 stdhep.createParticle(_daug[i]->getP4Lab(),_daug[i]->get4Pos(),0,0,
803 EvtPDL::getStdHep(_daug[i]->getId()));
804 }
805
806 for(i=0;i<_ndaug;i++){
807 _daug[i]->makeStdHepRec(1+i,1+i,stdhep);
808 }
809 return;
810
811}
EvtVector4R getP4Lab()
Definition: EvtParticle.cc:684
EvtVector4R get4Pos()
Definition: EvtParticle.cc:705
void createParticle(EvtVector4R p4, EvtVector4R x, int prntfirst, int prntlast, int id)
Definition: EvtStdHep.cc:41

◆ makeStdHep() [2/2]

void EvtParticle::makeStdHep ( EvtStdHep stdhep,
EvtSecondary secondary,
EvtId stable_parent_ihep 
)

Makes stdhep list

Definition at line 758 of file EvtParticle.cc.

759 {
760
761 //first add particle to the stdhep list;
762 stdhep.createParticle(getP4Lab(),get4Pos(),-1,-1,
764
765 int ii=0;
766
767 //lets see if this is a longlived particle and terminate the
768 //list building!
769
770 while (list_of_stable[ii]!=EvtId(-1,-1)) {
771 if (getId()==list_of_stable[ii]){
772 secondary.createSecondary(0,this);
773 return;
774 }
775 ii++;
776 }
777
778
779
780
781 int i;
782 for(i=0;i<_ndaug;i++){
783 stdhep.createParticle(_daug[i]->getP4Lab(),_daug[i]->get4Pos(),0,0,
784 EvtPDL::getStdHep(_daug[i]->getId()));
785 }
786
787 for(i=0;i<_ndaug;i++){
788 _daug[i]->makeStdHepRec(1+i,1+i,stdhep,secondary,list_of_stable);
789 }
790 return;
791
792}
void createSecondary(int stdhepindex, EvtParticle *prnt)
Definition: EvtSecondary.cc:40

Referenced by EvtGen::generateDecay(), and EvtGen::generateEvent().

◆ mass()

double EvtParticle::mass ( ) const

Returns mass of particle.

Definition at line 126 of file EvtParticle.cc.

126 {
127
128 return _p.mass();
129}

Referenced by EvtbTosllScalarAmp::CalcAmp(), EvtbTosllVectorAmp::CalcAmp(), EvtSemiLeptonicBaryonAmp::CalcAmp(), EvtSemiLeptonicTensorAmp::CalcAmp(), EvtSemiLeptonicVectorAmp::CalcAmp(), EvtbTosllAmp::CalcMaxProb(), EvtSemiLeptonicAmp::CalcMaxProb(), EvtConExc::checkdecay(), EvtPsi3Sdecay::choseDecay(), compMassProb(), EvtBHadronic::decay(), EvtBsquark::decay(), EvtBtoXsEtap::decay(), EvtBtoXsgamma::decay(), EvtBtoXsll::decay(), EvtConExc::decay(), EvtDDalitz::decay(), EvtEDM::decay(), EvtEtaDalitz::decay(), EvtFromParent::decay(), EvtFromParent_antiLambda::decay(), EvtFromParent_Lambda::decay(), EvtHypWK::decay(), EvtJetSet::decay(), EvtJpipi::decay(), EvtJscont::decay(), EvtKstarnunu::decay(), EvtLunda::decay(), EvtLundCharm::decay(), EvtOmegaDalitz::decay(), EvtOpenCharm::decay(), EvtPhokhara::decay(), EvtPhokhara_4pi::decay(), EvtPhokhara_etagam::decay(), EvtPhokhara_etapgam::decay(), EvtPhokhara_K0K0::decay(), EvtPhokhara_KK::decay(), EvtPhokhara_Lambda::decay(), EvtPhokhara_LLB::decay(), EvtPhokhara_nnbar::decay(), EvtPhokhara_pi0gam::decay(), EvtPhokhara_pi0pi0pipi::decay(), EvtPhokhara_pipi::decay(), EvtPhokhara_pipieta::decay(), EvtPhokhara_pipipi0::decay(), EvtPhokhara_ppbar::decay(), EvtPycont::decay(), EvtPyGaGa::decay(), EvtPythia::decay(), EvtRexc::decay(), EvtSll::decay(), EvtSLN::decay(), EvtSSDCP::decay(), EvtSTS::decay(), EvtSTSCP::decay(), EvtSVS::decay(), EvtSVSCPLH::decay(), EvtSVSNONCPEIGEN::decay(), EvtTauola::decay(), EvtTVSPwave::decay(), EvtVectorIsr::decay(), EvtVll::decay(), EvtVPHOtoVISR::decay(), EvtVPHOtoVISRHi::decay(), EvtVSPPwave::decay(), EvtVub::decay(), EvtVubHybrid::decay(), EvtVubNLO::decay(), EvtVVpipi::decay(), EvtVVPIPI_WEIGHTED::decay(), EvtPHOTOS::doRadCorr(), EvtLunda::ExclusiveDecay(), EvtDecayBase::findMass(), EvtDecayBase::findMasses(), EvtDecayBase::findMaxMass(), generateMassTree(), get4Pos(), EvtParticleDecayList::getDecayModel(), getP4Restframe(), EvtRaritaSchwingerParticle::init(), EvtDiracParticle::init(), EvtPhokhara::init_evt(), EvtPhokhara::init_mode(), initDecay(), initializePhaseSpace(), EvtDecayAmp::makeDecay(), EvtDecayProb::makeDecay(), EvtPsi3Sdecay::PHSPDecay(), printTreeRec(), EvtDiracParticle::rotateToHelicityBasis(), and EvtRaritaSchwingerParticle::rotateToHelicityBasis().

◆ nextIter()

EvtParticle * EvtParticle::nextIter ( EvtParticle rootOfTree = 0)

Iterates over the particles in a decay chain.

Definition at line 728 of file EvtParticle.cc.

728 {
729
730 EvtParticle *bpart;
731 EvtParticle *current;
732
733 current=this;
734 int i;
735
736 if (_ndaug!=0) return _daug[0];
737
738 do{
739 bpart=current->_parent;
740 if (bpart==0) return 0;
741 i=0;
742 while (bpart->_daug[i]!=current) {i++;}
743
744 if ( bpart==rootOfTree ) {
745 if ( i== bpart->_ndaug-1 ) return 0;
746 }
747
748 i++;
749 current=bpart;
750
751 }while(i>=bpart->_ndaug);
752
753 return bpart->_daug[i];
754
755}

◆ noLifeTime()

void EvtParticle::noLifeTime ( )
inline

Definition at line 367 of file EvtParticle.hh.

367{ _genlifetime=0; }

Referenced by EvtbTosllAmp::CalcMaxProb(), and EvtSemiLeptonicAmp::CalcMaxProb().

◆ printParticle()

void EvtParticle::printParticle ( ) const

Prints information for the particle.

Definition at line 999 of file EvtParticle.cc.

999 {
1000
1001 switch (EvtPDL::getSpinType(_id)){
1003 report(INFO,"EvtGen") << "This is a scalar particle:"<<EvtPDL::name(_id).c_str()<<"\n";
1004 break;
1006 report(INFO,"EvtGen") << "This is a vector particle:"<<EvtPDL::name(_id).c_str()<<"\n";
1007 break;
1009 report(INFO,"EvtGen") << "This is a tensor particle:"<<EvtPDL::name(_id).c_str()<<"\n";
1010 break;
1011 case EvtSpinType::DIRAC:
1012 report(INFO,"EvtGen") << "This is a dirac particle:"<<EvtPDL::name(_id).c_str()<<"\n";
1013 break;
1015 report(INFO,"EvtGen") << "This is a photon:"<<EvtPDL::name(_id).c_str()<<"\n";
1016 break;
1018 report(INFO,"EvtGen") << "This is a neutrino:"<<EvtPDL::name(_id).c_str()<<"\n";
1019 break;
1021 report(INFO,"EvtGen") << "This is a raritaschwinger:"<<EvtPDL::name(_id).c_str()<<"\n";
1022 break;
1024 report(INFO,"EvtGen") << "This is a string:"<<EvtPDL::name(_id).c_str()<<"\n";
1025 break;
1026 default:
1027 report(INFO,"EvtGen") <<"Unknown particle type in EvtParticle::printParticle()"<<endl;
1028 break;
1029 }
1030 report(INFO,"EvtGen") << "Number of daughters:"<<_ndaug<<"\n";
1031
1032
1033}

Referenced by eps(), epsParent(), epsParentPhoton(), epsPhoton(), epsTensor(), epsTensorParent(), sp(), spNeutrino(), spParent(), and spParentNeutrino().

◆ printTree()

void EvtParticle::printTree ( ) const

Prints out the particle "tree" of a given particle. The tree consists of all daughters (and their daughters, etc) and their properties.

Definition at line 896 of file EvtParticle.cc.

896 {
897
898 report(INFO,"EvtGen") << "This is the current decay chain"<<endl;
899 report(INFO,"") << "This top particle is "<<
900 EvtPDL::name(_id).c_str()<<endl;
901
902 this->printTreeRec(0);
903 report(INFO,"EvtGen") << "End of decay chain."<<endl;
904
905}
void printTreeRec(int level) const
Definition: EvtParticle.cc:869

Referenced by EvtConExc::decay(), EvtDecayBase::findMass(), and generateMassTree().

◆ printTreeRec()

void EvtParticle::printTreeRec ( int  level) const

Definition at line 869 of file EvtParticle.cc.

869 {
870
871 int newlevel,i;
872 newlevel = level +1;
873
874
875 if (_ndaug!=0) {
876 if ( level > 0 ) {
877 for (i=0;i<(5*level);i++) {
878 report(INFO,"") <<" ";
879 }
880 }
881 report(INFO,"") << EvtPDL::name(_id).c_str();
882 report(INFO,"") << " -> ";
883 for(i=0;i<_ndaug;i++){
884 report(INFO,"") << EvtPDL::name(_daug[i]->getId()).c_str()<<" ";
885 }
886 for(i=0;i<_ndaug;i++){
887 report(INFO,"") << _daug[i]->mass()<<" ";
888 }
889 report(INFO,"")<<endl;
890 for(i=0;i<_ndaug;i++){
891 _daug[i]->printTreeRec(newlevel);
892 }
893 }
894}

Referenced by printTree(), and printTreeRec().

◆ resetFirstOrNot()

void EvtParticle::resetFirstOrNot ( )

Definition at line 76 of file EvtParticle.cc.

76 {
77 _first=1;
78}

Referenced by EvtGen::generateDecay().

◆ resetNDaug()

void EvtParticle::resetNDaug ( )
inline

Definition at line 274 of file EvtParticle.hh.

274{_ndaug=0; return;}

Referenced by EvtOpenCharm::decay(), and EvtGen::generateDecay().

◆ rotateToHelicityBasis() [1/2]

virtual EvtSpinDensity EvtParticle::rotateToHelicityBasis ( ) const
pure virtual

Returns a rotation matrix need to rotate the basis state to the helicity basis. The EvtSpinDensity matrix is just use as a matrix here. This function is to be implemented in each derived class.

Implemented in EvtDiracParticle, EvtHighSpinParticle, EvtNeutrinoParticle, EvtPhotonParticle, EvtRaritaSchwingerParticle, EvtScalarParticle, EvtStringParticle, EvtTensorParticle, and EvtVectorParticle.

Referenced by EvtMultibody::decay(), and setSpinDensityForwardHelicityBasis().

◆ rotateToHelicityBasis() [2/2]

virtual EvtSpinDensity EvtParticle::rotateToHelicityBasis ( double  alpha,
double  beta,
double  gamma 
) const
pure virtual

◆ setChannel()

void EvtParticle::setChannel ( int  i)

Should only be used internally.

Definition at line 80 of file EvtParticle.cc.

80 {
81 _channel=i;
82}

Referenced by EvtParticleDecayList::getDecayModel(), and makeDaughters().

◆ setDecayProb()

void EvtParticle::setDecayProb ( double  p)

Definition at line 1203 of file EvtParticle.cc.

1203 {
1204
1205 if ( _decayProb == 0 ) _decayProb=new double;
1206 *_decayProb=prob;
1207}

Referenced by EvtDecayAmp::makeDecay(), EvtDecayIncoherent::makeDecay(), and EvtDecayProb::makeDecay().

◆ setDiagonalSpinDensity()

void EvtParticle::setDiagonalSpinDensity ( )

Set diagonal spindensity matrix.

Definition at line 132 of file EvtParticle.cc.

132 {
133
134 _rhoForward.SetDiag(getSpinStates());
135}

Referenced by EvtbTosllAmp::CalcMaxProb(), EvtSemiLeptonicAmp::CalcMaxProb(), EvtJetSet::decay(), EvtLunda::decay(), EvtLundCharm::decay(), EvtPythia::decay(), EvtTauola::decay(), and initDecay().

◆ setFirstOrNot()

void EvtParticle::setFirstOrNot ( )

Definition at line 73 of file EvtParticle.cc.

73 {
74 _first=0;
75}

Referenced by EvtDecayBase::findMasses().

◆ setGeneratorFlag()

void EvtParticle::setGeneratorFlag ( int  flag)
inline

set generator information; pingrg-2011-1-6

Definition at line 141 of file EvtParticle.hh.

141{_generatorFlag = flag;}

Referenced by EvtLundCharm::decay(), and EvtOpenCharm::decay().

◆ setId()

void EvtParticle::setId ( EvtId  id)
inline

Definition at line 370 of file EvtParticle.hh.

370{ _id=id;}

Referenced by makeDaughters().

◆ setInclusiveMode()

void EvtParticle::setInclusiveMode ( int  im)
inline

Definition at line 398 of file EvtParticle.hh.

398{_inclusiveMode=im ;}

◆ setIntFlag()

void EvtParticle::setIntFlag ( std::vector< int >  vi)
inline

set int flag for ConExc: pingrg-2015-2-7

Definition at line 156 of file EvtParticle.hh.

156 {
157 _intFlag=vi;
158 }

Referenced by EvtConExc::decay().

◆ setLifetime() [1/2]

void EvtParticle::setLifetime ( )

Generate lifetime according to pure exponential.

Definition at line 92 of file EvtParticle.cc.

92 {
93 if (_genlifetime){
95 }
96}
static double getctau(EvtId i)
Definition: EvtPDL.hh:55

Referenced by EvtHighSpinParticle::init(), EvtRaritaSchwingerParticle::init(), EvtDiracParticle::init(), EvtNeutrinoParticle::init(), EvtTensorParticle::init(), EvtPhotonParticle::init(), EvtScalarParticle::init(), EvtVectorParticle::init(), and initDecay().

◆ setLifetime() [2/2]

void EvtParticle::setLifetime ( double  tau)

Set lifetime of the particle in parents restframe.

Definition at line 88 of file EvtParticle.cc.

88 {
89 _t=tau;
90}

Referenced by EvtD0mixDalitz::decay(), EvtDMix::decay(), EvtVSSBMixCPT::decay(), EvtVSSMix::decay(), EvtVub::decay(), EvtVubHybrid::decay(), initDecay(), and EvtCPUtil::OtherB().

◆ setMass()

◆ setp() [1/2]

void EvtParticle::setp ( const EvtVector4R p4)
inlineprotected

Definition at line 404 of file EvtParticle.hh.

404{ _p =p4; }

◆ setp() [2/2]

void EvtParticle::setp ( double  e,
double  px,
double  py,
double  pz 
)
inlineprotected

◆ setP4()

void EvtParticle::setP4 ( const EvtVector4R p4)
inline

Sets the 4momentum in the parents restframe.

Definition at line 263 of file EvtParticle.hh.

263{_p=p4;}

Referenced by EvtPHOTOS::doRadCorr().

◆ setpart_num()

void EvtParticle::setpart_num ( EvtId  particle_number)
inlineprotected

Definition at line 405 of file EvtParticle.hh.

406 {
407 assert(_channel==-10||
408 _id.getId()==particle_number.getId()||
409 _id.getId()==-1);
410 _id = particle_number;
411 }
int getId() const
Definition: EvtId.hh:41

Referenced by EvtHighSpinParticle::init(), EvtRaritaSchwingerParticle::init(), EvtStringParticle::init(), EvtDiracParticle::init(), EvtNeutrinoParticle::init(), EvtPhotonParticle::init(), EvtScalarParticle::init(), EvtTensorParticle::init(), and EvtVectorParticle::init().

◆ setPolarizedSpinDensity()

void EvtParticle::setPolarizedSpinDensity ( double  r00,
double  r11,
double  r22 
)

Definition at line 156 of file EvtParticle.cc.

156 {
157
158 if (getSpinStates()!=3) {
159 report(ERROR,"EvtGen")<<"Error in EvtParticle::setVectorSpinDensity"<<endl;
160 report(ERROR,"EvtGen")<<"spin_states:"<<getSpinStates()<<endl;
161 report(ERROR,"EvtGen")<<"particle:"<<EvtPDL::name(_id).c_str()<<endl;
162 ::abort();
163 }
164
165 EvtSpinDensity rho;
166
167 //Set helicity +1 and -1 to 1.
168 rho.SetDiag(getSpinStates());
169 rho.Set(0,0,EvtComplex(r00,0.));
170 rho.Set(1,1,EvtComplex(r11,0.));
171 rho.Set(2,2,EvtComplex(r22,0.));
173
174}
void setSpinDensityForwardHelicityBasis(const EvtSpinDensity &rho)
Definition: EvtParticle.cc:177
void Set(int i, int j, const EvtComplex &rhoij)

◆ setSpinDensityBackward()

void EvtParticle::setSpinDensityBackward ( const EvtSpinDensity rho)
inline

Set backward spin density matrix.

Definition at line 357 of file EvtParticle.hh.

357{_rhoBackward=rho;}

Referenced by EvtDecayAmp::makeDecay(), EvtDecayIncoherent::makeDecay(), and EvtDecayProb::makeDecay().

◆ setSpinDensityForward()

void EvtParticle::setSpinDensityForward ( const EvtSpinDensity rho)
inline

Set forward spin density matrix.

Definition at line 326 of file EvtParticle.hh.

326{_rhoForward=rho;}

Referenced by EvtVectorIsr::decay(), EvtDecayAmp::makeDecay(), EvtDecayIncoherent::makeDecay(), EvtDecayProb::makeDecay(), and EvtParticleFactory::particleFactory().

◆ setSpinDensityForwardHelicityBasis() [1/2]

void EvtParticle::setSpinDensityForwardHelicityBasis ( const EvtSpinDensity rho)

Set forward spin density matrix according to the density matrix rho in the helicity amplitude basis.

Definition at line 177 of file EvtParticle.cc.

177 {
178
180
181 assert(R.GetDim()==rho.GetDim());
182
183 int n=rho.GetDim();
184
185 _rhoForward.SetDim(n);
186
187 int i,j,k,l;
188
189 for(i=0;i<n;i++){
190 for(j=0;j<n;j++){
191 EvtComplex tmp=0.0;
192 for(k=0;k<n;k++){
193 for(l=0;l<n;l++){
194 tmp+=R.Get(l,i)*rho.Get(l,k)*conj(R.Get(k,j));
195 }
196 }
197 _rhoForward.Set(i,j,tmp);
198 }
199 }
200
201 //report(INFO,"EvtGen") << "_rhoForward:"<<_rhoForward<<endl;
202
203}
const Int_t n
Evt3Rank3C conj(const Evt3Rank3C &t2)
Definition: Evt3Rank3C.cc:175
virtual EvtSpinDensity rotateToHelicityBasis() const =0
int GetDim() const
const EvtComplex & Get(int i, int j) const
void SetDim(int n)
complex_t R(double Q2, double M2, double G, double Mp2, double Mm2)
Definition: TUtil.h:27

Referenced by setPolarizedSpinDensity(), and setVectorSpinDensity().

◆ setSpinDensityForwardHelicityBasis() [2/2]

void EvtParticle::setSpinDensityForwardHelicityBasis ( const EvtSpinDensity rho,
double  alpha,
double  beta,
double  gamma 
)

Definition at line 205 of file EvtParticle.cc.

208 {
209
211
212 assert(R.GetDim()==rho.GetDim());
213
214 int n=rho.GetDim();
215
216 _rhoForward.SetDim(n);
217
218 int i,j,k,l;
219
220 for(i=0;i<n;i++){
221 for(j=0;j<n;j++){
222 EvtComplex tmp=0.0;
223 for(k=0;k<n;k++){
224 for(l=0;l<n;l++){
225 tmp+=R.Get(l,i)*rho.Get(l,k)*conj(R.Get(k,j));
226 }
227 }
228 _rhoForward.Set(i,j,tmp);
229 }
230 }
231
232 //report(INFO,"EvtGen") << "_rhoForward:"<<_rhoForward<<endl;
233
234}
const double alpha

◆ setVectorSpinDensity()

void EvtParticle::setVectorSpinDensity ( )

Set spindensity matrix for e+e- -> V

Definition at line 137 of file EvtParticle.cc.

137 {
138
139 if (getSpinStates()!=3) {
140 report(ERROR,"EvtGen")<<"Error in EvtParticle::setVectorSpinDensity"<<endl;
141 report(ERROR,"EvtGen")<<"spin_states:"<<getSpinStates()<<endl;
142 report(ERROR,"EvtGen")<<"particle:"<<EvtPDL::name(_id).c_str()<<endl;
143 ::abort();
144 }
145
146 EvtSpinDensity rho;
147
148 //Set helicity +1 and -1 to 1.
149 rho.SetDiag(getSpinStates());
150 rho.Set(1,1,EvtComplex(0.0,0.0));
152
153}

Referenced by EvtGen::generateEvent().

◆ sp()

EvtDiracSpinor EvtParticle::sp ( int  i) const
virtual

Returns Dirac spinor in the particles own restframe for a Dirac particle.

Reimplemented in EvtDiracParticle.

Definition at line 621 of file EvtParticle.cc.

621 {
622 EvtDiracSpinor tempD;
623 int temp;
624 temp = i;
626 report(ERROR,"EvtGen") << "and you have asked for the:"<<i
627 <<"th dirac spinor."
628 <<" I.e. you thought it was a"
629 <<" Dirac particle!" << endl;
630 ::abort();
631 return tempD;
632}

Referenced by EvtHypNonLepton::calcAmp(), EvtSemiLeptonicBaryonAmp::CalcAmp(), EvtTauHadnu::decay(), EvtTaulnunu::decay(), EvtTauScalarnu::decay(), and EvtTauVectornu::decay().

◆ spNeutrino()

EvtDiracSpinor EvtParticle::spNeutrino ( ) const
virtual

Returns Dirac spinor in the particles own restframe for a Neutrino particle.

Reimplemented in EvtNeutrinoParticle.

Definition at line 645 of file EvtParticle.cc.

645 {
646 EvtDiracSpinor tempD;
648 report(ERROR,"EvtGen") << "and you have asked for the "
649 <<"dirac spinor."
650 <<" I.e. you thought it was a"
651 <<" neutrino particle!" << endl;
652 ::abort();
653 return tempD;
654}

◆ spParent()

EvtDiracSpinor EvtParticle::spParent ( int  i) const
virtual

Returns Dirac spinor in the parents restframe for a Dirac particle.

Reimplemented in EvtDiracParticle.

Definition at line 608 of file EvtParticle.cc.

608 {
609 EvtDiracSpinor tempD;
610 int temp;
611 temp = i;
613 report(ERROR,"EvtGen") << "and you have asked for the:"<<i
614 <<"th dirac spinor."
615 <<" I.e. you thought it was a"
616 <<" Dirac particle!" << endl;
617 ::abort();
618 return tempD;
619}

Referenced by EvtHypNonLepton::calcAmp(), EvtbTosllScalarAmp::CalcAmp(), EvtbTosllVectorAmp::CalcAmp(), EvtSemiLeptonicBaryonAmp::CalcAmp(), EvtSemiLeptonicTensorAmp::CalcAmp(), EvtSemiLeptonicVectorAmp::CalcAmp(), EvtBsquark::decay(), EvtEDM::decay(), EvtLNuGamma::decay(), EvtSll::decay(), EvtSLN::decay(), EvtTaulnunu::decay(), and EvtVll::decay().

◆ spParentNeutrino()

EvtDiracSpinor EvtParticle::spParentNeutrino ( ) const
virtual

Returns Dirac spinor in the parents restframe for a Neutrino particle.

Reimplemented in EvtNeutrinoParticle.

Definition at line 634 of file EvtParticle.cc.

634 {
635 EvtDiracSpinor tempD;
637 report(ERROR,"EvtGen") << "and you have asked for the "
638 <<"dirac spinor."
639 <<" I.e. you thought it was a"
640 <<" neutrino particle!" << endl;
641 ::abort();
642 return tempD;
643}

Referenced by EvtSemiLeptonicBaryonAmp::CalcAmp(), EvtSemiLeptonicTensorAmp::CalcAmp(), EvtSemiLeptonicVectorAmp::CalcAmp(), EvtKstarnunu::decay(), EvtLNuGamma::decay(), EvtSLN::decay(), EvtTauHadnu::decay(), EvtTaulnunu::decay(), EvtTauScalarnu::decay(), and EvtTauVectornu::decay().

◆ treeStr()

std::string EvtParticle::treeStr ( ) const

Definition at line 989 of file EvtParticle.cc.

989 {
990
991 std::string retval=EvtPDL::name(_id);
992 retval+=" -> ";
993
994 retval+=treeStrRec(0);
995
996 return retval;
997}
std::string treeStrRec(int level) const
Definition: EvtParticle.cc:907

◆ treeStrRec()

std::string EvtParticle::treeStrRec ( int  level) const

Definition at line 907 of file EvtParticle.cc.

907 {
908
909 int newlevel,i;
910 newlevel = level +1;
911
912 std::string retval="";
913
914 for(i=0;i<_ndaug;i++){
915 retval+=EvtPDL::name(_daug[i]->getId());
916 if ( _daug[i]->getNDaug() > 0 ) {
917 retval+= " (";
918 retval+= _daug[i]->treeStrRec(newlevel);
919 retval+= ") ";
920 }
921 else{
922 if ( i!=_ndaug-1) retval+=" ";
923 }
924 }
925
926 return retval;
927}

Referenced by treeStr(), and treeStrRec().

◆ writeTreeRec()

std::string EvtParticle::writeTreeRec ( std::string  resonance) const

Definition at line 929 of file EvtParticle.cc.

929 { //pingrg, Jun. 6, 2008
930 std::string retval="";
931
932 if (resonance == EvtPDL::name(_id).c_str() && _ndaug!=0) {
933 retval=resonance+": "+IntToStr(_ndaug)+" ";
934 for(int i=0;i<_ndaug;i++){
935 retval += EvtPDL::name(_daug[i]->getId()).c_str();
936 retval += " ";
937 }
938 }
939
940 for(int i=0;i<_ndaug;i++){
941 _daug[i]->writeTreeRec(resonance);
942 }
943 std::cout<<retval;
944 return retval;
945}
std::string writeTreeRec(std::string) const
Definition: EvtParticle.cc:929
char * c_str(Index i)
Definition: EvtCyclic3.cc:252

Referenced by writeTreeRec().

Member Data Documentation

◆ _NextLevelDauNum

int EvtParticle::_NextLevelDauNum =0
static

◆ _NextLevelId

EvtId EvtParticle::_NextLevelId
static

Definition at line 150 of file EvtParticle.hh.

Referenced by EvtPhokhara_Lambda::decay().

◆ _NextLevelP4

◆ _validP4


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