CGEM BOSS 6.6.5.h
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 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 ()
 

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 60 of file EvtParticle.cc.

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

◆ ~EvtParticle()

EvtParticle::~EvtParticle ( )
virtual

Destructor.

Definition at line 56 of file EvtParticle.cc.

56 {
57 delete _decayProb;
58}

Member Function Documentation

◆ addDaug()

void EvtParticle::addDaug ( EvtParticle * node)

Add another daughter to the particle

Definition at line 104 of file EvtParticle.cc.

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

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

◆ compMassProb()

double EvtParticle::compMassProb ( )

Definition at line 502 of file EvtParticle.cc.

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

Referenced by compMassProb(), and generateMassTree().

◆ decay()

void EvtParticle::decay ( )

Decay particle

Definition at line 404 of file EvtParticle.cc.

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

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

◆ decayProb()

double * EvtParticle::decayProb ( )
inline

Definition at line 376 of file EvtParticle.hh.

376{return _decayProb;}

◆ deleteDaughters()

void EvtParticle::deleteDaughters ( bool keepChannel = false)

Definition at line 538 of file EvtParticle.cc.

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

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 555 of file EvtParticle.cc.

555 {
556
557 this->deleteDaughters();
558
559 delete this;
560
561}
void deleteDaughters(bool keepChannel=false)

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

◆ dumpTree()

void EvtParticle::dumpTree ( ) const

Definition at line 976 of file EvtParticle.cc.

976 { //pingrg, Mar. 25,2008
977
978 report(INFO,"EvtGen") << "This is the current decay chain to dump"<<endl;
979 report(INFO,"") << "This top particle is "<<
980 EvtPDL::name(_id).c_str()<<endl;
981
982 this->dumpTreeRec(0,0);
983 report(INFO,"EvtGen") << "End of decay chain."<<endl;
984
985}
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

◆ dumpTreeRec()

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

Definition at line 946 of file EvtParticle.cc.

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

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 574 of file EvtParticle.cc.

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

Referenced by 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 563 of file EvtParticle.cc.

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

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 585 of file EvtParticle.cc.

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

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 596 of file EvtParticle.cc.

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

◆ 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 668 of file EvtParticle.cc.

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

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 655 of file EvtParticle.cc.

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

Referenced by 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 111 of file EvtParticle.cc.

111{ return _first;}

Referenced by EvtDecayBase::findMasses().

◆ generateMassTree()

void EvtParticle::generateMassTree ( )

Definition at line 461 of file EvtParticle.cc.

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

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

◆ get4Pos()

EvtVector4R EvtParticle::get4Pos ( )

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

Definition at line 704 of file EvtParticle.cc.

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

Referenced by makeStdHep(), and makeStdHep().

◆ getChannel()

int EvtParticle::getChannel ( ) const

◆ getDaug()

EvtParticle * EvtParticle::getDaug ( int i)

Get pointer the the i:th daugther.

Definition at line 85 of file EvtParticle.cc.

85{ return _daug[i]; }

Referenced by EvtbTosllScalarAmp::CalcAmp(), EvtbTosllVectorAmp::CalcAmp(), EvtSemiLeptonicBaryonAmp::CalcAmp(), EvtSemiLeptonicTensorAmp::CalcAmp(), EvtSemiLeptonicVectorAmp::CalcAmp(), EvtHypNonLepton::calcAmp(), EvtbTosllAmp::CalcMaxProb(), EvtSemiLeptonicAmp::CalcMaxProb(), EvtPsi3Sdecay::choseDecay(), compMassProb(), EvtSecondary::createSecondary(), EvtAngH2::decay(), EvtAngSam3::decay(), EvtAngSam::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(), EvtCBTo3piMPP::decay(), EvtCBTo3piP00::decay(), EvtChi0BB1::decay(), EvtChi0BB2::decay(), EvtChi1BB1::decay(), EvtChi1BB2::decay(), EvtChi2BB1::decay(), EvtChi2BB2::decay(), EvtConExc::decay(), EvtD0mixDalitz::decay(), EvtDDalitz::decay(), EvtDeBD::decay(), EvtDIY::decay(), EvtEtaDalitz::decay(), EvtFlatQ2::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(), 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(), decay(), EvtPhiDalitz::decay(), EvtPi0Dalitz::decay(), EvtPycont::decay(), EvtPyGaGa::decay(), EvtPythia::decay(), EvtRhoPi::decay(), EvtSingleParticle2::decay(), EvtSingleParticle::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(), EvtTauHadnu::decay(), EvtTaulnunu::decay(), EvtTauola::decay(), EvtTauScalarnu::decay(), EvtTauVectornu::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(), 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(), EvtCPUtil::OtherB(), EvtPsi3Sdecay::PHSPDecay(), EvtConExc::Rad1difXs(), EvtConExc::Rad2difXs(), 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 113 of file EvtParticle.cc.

113{ return _id;}

Referenced by EvtbTosllScalarAmp::CalcAmp(), EvtbTosllVectorAmp::CalcAmp(), EvtSemiLeptonicBaryonAmp::CalcAmp(), EvtSemiLeptonicTensorAmp::CalcAmp(), EvtSemiLeptonicVectorAmp::CalcAmp(), EvtPsi3Sdecay::choseDecay(), compMassProb(), EvtSecondary::createSecondary(), EvtAngH2::decay(), EvtBsquark::decay(), EvtBTo3piCP::decay(), EvtBtoXsll::decay(), EvtCBTo3piMPP::decay(), EvtCBTo3piP00::decay(), EvtConExc::decay(), EvtDDalitz::decay(), EvtDeBD::decay(), EvtDMix::decay(), EvtHypWK::decay(), EvtJetSet::decay(), EvtJscont::decay(), EvtKstarstargamma::decay(), EvtLNuGamma::decay(), EvtLunda::decay(), EvtLundCharm::decay(), EvtOpenCharm::decay(), decay(), EvtPycont::decay(), EvtPyGaGa::decay(), EvtPythia::decay(), EvtSVSCPiso::decay(), EvtSVSNONCPEIGEN::decay(), EvtSVVNONCPEIGEN::decay(), EvtTauHadnu::decay(), EvtTaulnunu::decay(), EvtTauola::decay(), EvtTauScalarnu::decay(), EvtTauVectornu::decay(), EvtVPHOtoVISR::decay(), EvtVPHOtoVISRHi::decay(), EvtVSSBMixCPT::decay(), EvtVSSMix::decay(), EvtPHOTOS::doRadCorr(), EvtDecayBase::findMass(), EvtDecayBase::findMasses(), EvtDecayBase::findMaxMass(), EvtConExc::findMaxXS(), EvtPsi3Sdecay::findMode(), EvtFSPick::FSPick(), EvtConExc::gamHXSection(), EvtDecayTable::getDecayFunc(), EvtParticleDecayList::getDecayModel(), initDecay(), initializePhaseSpace(), EvtDecayAmp::makeDecay(), EvtDecayProb::makeDecay(), makeStdHep(), makeStdHep(), EvtDecayTag::makeTag(), EvtCPUtil::OtherB(), EvtCPUtil::OtherB(), EvtPsi3Sdecay::PHSPDecay(), printTreeRec(), EvtDiracParticle::rotateToHelicityBasis(), EvtDiracParticle::rotateToHelicityBasis(), EvtHighSpinParticle::rotateToHelicityBasis(), EvtHighSpinParticle::rotateToHelicityBasis(), EvtRaritaSchwingerParticle::rotateToHelicityBasis(), EvtRaritaSchwingerParticle::rotateToHelicityBasis(), setLifetime(), treeStrRec(), and writeTreeRec().

◆ getInclusiveMode()

int EvtParticle::getInclusiveMode ( )
inline

Definition at line 380 of file EvtParticle.hh.

380{return _inclusiveMode;}

◆ getLifetime()

double EvtParticle::getLifetime ( )

Returns the lifetime.

Definition at line 99 of file EvtParticle.cc.

99 {
100
101 return _t;
102}

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

◆ getNDaug()

◆ getP4()

const EvtVector4R & EvtParticle::getP4 ( ) const

Returns 4momentum in parents restframe.

Definition at line 121 of file EvtParticle.cc.

121{ return _p;}

Referenced by EvtbTosllScalarAmp::CalcAmp(), EvtbTosllVectorAmp::CalcAmp(), EvtSemiLeptonicBaryonAmp::CalcAmp(), EvtSemiLeptonicTensorAmp::CalcAmp(), EvtSemiLeptonicVectorAmp::CalcAmp(), EvtPsi3Sdecay::choseDecay(), EvtAngSam3::decay(), EvtAngSam::decay(), EvtAngSamX::decay(), EvtAV2GV::decay(), EvtBHadronic::decay(), EvtBsquark::decay(), EvtBTo4piCP::decay(), EvtBtoKD3P::decay(), EvtChi0BB1::decay(), EvtChi0BB2::decay(), EvtChi1BB1::decay(), EvtChi1BB2::decay(), EvtChi2BB1::decay(), EvtChi2BB2::decay(), EvtConExc::decay(), EvtD0mixDalitz::decay(), EvtDDalitz::decay(), EvtDeBD::decay(), EvtDIY::decay(), EvtEtaDalitz::decay(), EvtFlatQ2::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(), EvtPi0Dalitz::decay(), EvtRhoPi::decay(), EvtSPL::decay(), EvtSSDCP::decay(), EvtSTS::decay(), EvtSTSCP::decay(), EvtSVPCP::decay(), EvtSVPHelAmp::decay(), EvtSVS::decay(), EvtSVSCP::decay(), EvtSVSNONCPEIGEN::decay(), EvtT2GV::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(), get4Pos(), getP4Lab(), EvtConExc::init(), EvtDecayAmp::makeDecay(), EvtPsi3Sdecay::PHSPDecay(), EvtConExc::Rad1difXs(), EvtConExc::Rad2difXs(), EvtDiracParticle::rotateToHelicityBasis(), EvtDiracParticle::rotateToHelicityBasis(), EvtRaritaSchwingerParticle::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 683 of file EvtParticle.cc.

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

Referenced by EvtAngH2::decay(), EvtBody3::decay(), EvtDeBD::decay(), EvtDIY::decay(), EvtLambdaP_BarGamma::decay(), EvtMassH1::decay(), EvtMassH2::decay(), EvtMBody3::decay(), EvtmH2::decay(), EvtmPhsp::decay(), EvtMultibody::decay(), EvtRhoPi::decay(), EvtSingleParticle2::decay(), EvtSingleParticle::decay(), EvtSPL::decay(), makeStdHep(), and makeStdHep().

◆ getP4Restframe()

EvtVector4R EvtParticle::getP4Restframe ( )

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

Definition at line 698 of file EvtParticle.cc.

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

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

◆ getParent()

EvtParticle * EvtParticle::getParent ( )

◆ getSpinDensityBackward()

EvtSpinDensity EvtParticle::getSpinDensityBackward ( )
inline

Get backward spin density matrix.

Definition at line 343 of file EvtParticle.hh.

343{return _rhoBackward;}

Referenced by EvtDecayAmp::makeDecay().

◆ getSpinDensityForward()

EvtSpinDensity EvtParticle::getSpinDensityForward ( )
inline

Get forward spin density matrix.

Definition at line 333 of file EvtParticle.hh.

333{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 118 of file EvtParticle.cc.

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

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 115 of file EvtParticle.cc.

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

◆ hasValidP4()

bool EvtParticle::hasValidP4 ( )
inline

Definition at line 369 of file EvtParticle.hh.

369{return _validP4;}

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

◆ init()

◆ initDecay()

void EvtParticle::initDecay ( bool useMinMass = false)

Definition at line 237 of file EvtParticle.cc.

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

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 1069 of file EvtParticle.cc.

1071 {
1072
1073 double m_b;
1074 int i;
1075 //lange
1076 // this->makeDaughters(numdaughter,daughters);
1077
1078 static EvtVector4R p4[100];
1079 static double mass[100];
1080
1081 m_b = this->mass();
1082
1083 //lange - Jan2,2002 - Need to check to see if the daughters of the parent
1084 // have changed. If so, delete them and start over.
1085 //report(INFO,"EvtGen") << "the parent is\n";
1086 //if ( this->getParent() ) {
1087 // if ( this->getParent()->getParent() ) this->getParent()->getParent()->printTree();
1088 // this->getParent()->printTree();
1089 //}
1090 //report(INFO,"EvtGen") << "and this is\n";
1091 //if ( this) this->printTree();
1092 bool resetDaughters=false;
1093 if ( numdaughter != this->getNDaug() && this->getNDaug() > 0 ) resetDaughters=true;
1094 if ( numdaughter == this->getNDaug() )
1095 for (i=0; i<numdaughter;i++) {
1096 if ( this->getDaug(i)->getId() != daughters[i] ) resetDaughters=true;
1097 //report(INFO,"EvtGen") << this->getDaug(i)->getId() << " " << daughters[i] << endl;
1098 }
1099
1100 if ( resetDaughters ) {
1101 // report(INFO,"EvtGen") << "reseting daughters\n";
1102 //for (i=0; i<numdaughter;i++) {
1103 // report(INFO,"EvtGen") << "reset " <<i<< " "<< EvtPDL::name(this->getDaug(i)->getId()) << " " << EvtPDL::name(daughters[i]) << endl;
1104 //}
1105 bool t1=true;
1106 //but keep the decay channel of the parent.
1107 this->deleteDaughters(t1);
1108 this->makeDaughters(numdaughter,daughters);
1109 this->generateMassTree();
1110 }
1111
1112 double weight=0.;
1113 // EvtDecayBase::findMasses( this, numdaughter, daughters, mass );
1114 //get the list of masses
1115 //report(INFO,"EvtGen") << "mpar= " << m_b << " " << this <<endl;
1116 for (i=0; i<numdaughter;i++) {
1117 mass[i]=this->getDaug(i)->mass();
1118 // report(INFO,"EvtGen") << "mass " << i << " " << mass[i] << " " << this->getDaug(i) << endl;
1119 }
1120
1121 if ( poleSize<-0.1) {
1122 EvtGenKine::PhaseSpace( numdaughter, mass, p4, m_b );
1123 for(i=0;i<numdaughter;i++){
1124 this->getDaug(i)->init(daughters[i],p4[i]);
1125 }
1126
1127 }
1128 else {
1129 if ( numdaughter != 3 ) {
1130 report(ERROR,"EvtGen") << "Only can generate pole phase space "
1131 << "distributions for 3 body final states"
1132 << endl<<"Will terminate."<<endl;
1133 ::abort();
1134 }
1135 bool ok=false;
1136 if ( (whichTwo1 == 1 && whichTwo2 == 0 ) ||
1137 (whichTwo1 == 0 && whichTwo2 == 1 ) ) {
1139 poleSize, p4);
1140 //report(INFO,"EvtGen") << "here " << weight << " " << poleSize << endl;
1141 this->getDaug(0)->init(daughters[0],p4[0]);
1142 this->getDaug(1)->init(daughters[1],p4[1]);
1143 this->getDaug(2)->init(daughters[2],p4[2]);
1144 ok=true;
1145 }
1146 if ( (whichTwo1 == 1 && whichTwo2 == 2 ) ||
1147 (whichTwo1 == 2 && whichTwo2 == 1 ) ) {
1149 poleSize, p4);
1150 this->getDaug(0)->init(daughters[0],p4[2]);
1151 this->getDaug(1)->init(daughters[1],p4[1]);
1152 this->getDaug(2)->init(daughters[2],p4[0]);
1153 ok=true;
1154 }
1155 if ( (whichTwo1 == 0 && whichTwo2 == 2 ) ||
1156 (whichTwo1 == 2 && whichTwo2 == 0 ) ) {
1158 poleSize, p4);
1159 this->getDaug(0)->init(daughters[0],p4[1]);
1160 this->getDaug(1)->init(daughters[1],p4[0]);
1161 this->getDaug(2)->init(daughters[2],p4[2]);
1162 ok=true;
1163 }
1164 if ( !ok) {
1165 report(ERROR,"EvtGen") << "Invalid pair of particle to generate a pole dist"
1166 << whichTwo1 << " " << whichTwo2
1167 << endl<<"Will terminate."<<endl;
1168 ::abort();
1169 }
1170 }
1171
1172 return weight;
1173}
*********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])
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

Referenced by EvtPsi3Sdecay::choseDecay(), EvtAngH2::decay(), EvtAngSam3::decay(), EvtAngSam::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(), EvtChi0BB1::decay(), EvtChi0BB2::decay(), EvtChi1BB1::decay(), EvtChi1BB2::decay(), EvtChi2BB1::decay(), EvtChi2BB2::decay(), EvtConExc::decay(), EvtD0mixDalitz::decay(), EvtDDalitz::decay(), EvtDeBD::decay(), EvtDIY::decay(), EvtDMix::decay(), EvtEtaDalitz::decay(), EvtFlatQ2::decay(), EvtHAngSam3::decay(), EvtHelAmp::decay(), EvtHelPPJ::decay(), EvtHQET2::decay(), EvtHQET::decay(), EvtHypNonLepton::decay(), EvtHypWK::decay(), EvtISGW2::decay(), EvtISGW::decay(), EvtJ2BB1::decay(), EvtJ2BB2::decay(), EvtJ2BB3::decay(), EvtJPE::decay(), EvtJpipi::decay(), EvtJTO3P::decay(), EvtKKLambdaC::decay(), EvtKstarnunu::decay(), EvtKstarstargamma::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(), EvtPi0Dalitz::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(), EvtTauHadnu::decay(), EvtTaulnunu::decay(), EvtTauScalarnu::decay(), EvtTauVectornu::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(), 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 206 of file EvtParticle.hh.

206 { _daug[idaug]=partptr;
207 partptr->_parent=this; }

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

◆ isDecayed()

bool EvtParticle::isDecayed ( )
inline

Definition at line 370 of file EvtParticle.hh.

370{return _isDecayed;}

◆ isInitialized()

bool EvtParticle::isInitialized ( )
inline

Definition at line 368 of file EvtParticle.hh.

368{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 1175 of file EvtParticle.cc.

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

Referenced by EvtbTosllAmp::CalcMaxProb(), EvtSemiLeptonicAmp::CalcMaxProb(), EvtPsi3Sdecay::choseDecay(), EvtBTo3piCP::decay(), EvtBToKpipiCP::decay(), EvtBtoXsEtap::decay(), EvtBtoXsgamma::decay(), EvtBtoXsll::decay(), EvtCBTo3piMPP::decay(), EvtCBTo3piP00::decay(), EvtConExc::decay(), EvtJetSet::decay(), EvtJscont::decay(), EvtLunda::decay(), EvtLundCharm::decay(), EvtOpenCharm::decay(), EvtPycont::decay(), EvtPyGaGa::decay(), EvtPythia::decay(), EvtSingleParticle2::decay(), EvtSingleParticle::decay(), EvtSinglePoint::decay(), EvtTauola::decay(), EvtConExc::findMaxXS(), EvtConExc::gamHXSection(), initDecay(), initializePhaseSpace(), and EvtPsi3Sdecay::PHSPDecay().

◆ makeStdHep() [1/2]

void EvtParticle::makeStdHep ( EvtStdHep & stdhep)

Definition at line 793 of file EvtParticle.cc.

793 {
794
795 //first add particle to the stdhep list;
796 stdhep.createParticle(getP4Lab(),get4Pos(),-1,-1,
798
799 int i;
800 for(i=0;i<_ndaug;i++){
801 stdhep.createParticle(_daug[i]->getP4Lab(),_daug[i]->get4Pos(),0,0,
802 EvtPDL::getStdHep(_daug[i]->getId()));
803 }
804
805 for(i=0;i<_ndaug;i++){
806 _daug[i]->makeStdHepRec(1+i,1+i,stdhep);
807 }
808 return;
809
810}
EvtVector4R getP4Lab()
EvtVector4R get4Pos()
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 757 of file EvtParticle.cc.

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

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

◆ mass()

double EvtParticle::mass ( ) const

Returns mass of particle.

Definition at line 127 of file EvtParticle.cc.

127 {
128
129 return _p.mass();
130}
double mass() const

Referenced by EvtbTosllScalarAmp::CalcAmp(), EvtbTosllVectorAmp::CalcAmp(), EvtSemiLeptonicBaryonAmp::CalcAmp(), EvtSemiLeptonicTensorAmp::CalcAmp(), EvtSemiLeptonicVectorAmp::CalcAmp(), EvtbTosllAmp::CalcMaxProb(), EvtSemiLeptonicAmp::CalcMaxProb(), EvtPsi3Sdecay::choseDecay(), compMassProb(), EvtBHadronic::decay(), EvtBsquark::decay(), EvtBtoXsEtap::decay(), EvtBtoXsgamma::decay(), EvtBtoXsll::decay(), EvtDDalitz::decay(), EvtEtaDalitz::decay(), EvtHypWK::decay(), EvtJetSet::decay(), EvtJpipi::decay(), EvtJscont::decay(), EvtKstarnunu::decay(), EvtLunda::decay(), EvtLundCharm::decay(), EvtOmegaDalitz::decay(), EvtOpenCharm::decay(), EvtPycont::decay(), EvtPyGaGa::decay(), EvtPythia::decay(), EvtSll::decay(), EvtSLN::decay(), EvtSSDCP::decay(), EvtSTS::decay(), EvtSTSCP::decay(), EvtSVS::decay(), EvtSVSCPLH::decay(), EvtSVSNONCPEIGEN::decay(), EvtTauola::decay(), EvtTauVectornu::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(), EvtDecayBase::findMass(), EvtDecayBase::findMasses(), EvtDecayBase::findMaxMass(), generateMassTree(), get4Pos(), EvtParticleDecayList::getDecayModel(), getP4Restframe(), EvtDiracParticle::init(), EvtRaritaSchwingerParticle::init(), initDecay(), initializePhaseSpace(), EvtDecayAmp::makeDecay(), EvtDecayProb::makeDecay(), EvtPsi3Sdecay::PHSPDecay(), printTreeRec(), EvtDiracParticle::rotateToHelicityBasis(), EvtDiracParticle::rotateToHelicityBasis(), EvtRaritaSchwingerParticle::rotateToHelicityBasis(), and EvtRaritaSchwingerParticle::rotateToHelicityBasis().

◆ nextIter()

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

Iterates over the particles in a decay chain.

Definition at line 727 of file EvtParticle.cc.

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

◆ noLifeTime()

void EvtParticle::noLifeTime ( )
inline

Definition at line 348 of file EvtParticle.hh.

348{ _genlifetime=0; }

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

◆ printParticle()

void EvtParticle::printParticle ( ) const

Prints information for the particle.

Definition at line 998 of file EvtParticle.cc.

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

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 895 of file EvtParticle.cc.

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

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

◆ printTreeRec()

void EvtParticle::printTreeRec ( int level) const

Definition at line 868 of file EvtParticle.cc.

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

Referenced by printTree(), and printTreeRec().

◆ resetFirstOrNot()

void EvtParticle::resetFirstOrNot ( )

Definition at line 77 of file EvtParticle.cc.

77 {
78 _first=1;
79}

Referenced by EvtGen::generateDecay().

◆ resetNDaug()

void EvtParticle::resetNDaug ( )
inline

Definition at line 255 of file EvtParticle.hh.

255{_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(), setSpinDensityForwardHelicityBasis(), 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 81 of file EvtParticle.cc.

81 {
82 _channel=i;
83}

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

◆ setDecayProb()

void EvtParticle::setDecayProb ( double p)

Definition at line 1202 of file EvtParticle.cc.

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

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

◆ setDiagonalSpinDensity()

void EvtParticle::setDiagonalSpinDensity ( )

Set diagonal spindensity matrix.

Definition at line 133 of file EvtParticle.cc.

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

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 74 of file EvtParticle.cc.

74 {
75 _first=0;
76}

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 351 of file EvtParticle.hh.

351{ _id=id;}

Referenced by makeDaughters().

◆ setInclusiveMode()

void EvtParticle::setInclusiveMode ( int im)
inline

Definition at line 379 of file EvtParticle.hh.

379{_inclusiveMode=im ;}

◆ setLifetime() [1/2]

void EvtParticle::setLifetime ( )

◆ setLifetime() [2/2]

void EvtParticle::setLifetime ( double tau)

Set lifetime of the particle in parents restframe.

Definition at line 89 of file EvtParticle.cc.

89 {
90 _t=tau;
91}

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

◆ setMass()

void EvtParticle::setMass ( double m)
inline

◆ setp() [1/2]

void EvtParticle::setp ( const EvtVector4R & p4)
inlineprotected

Definition at line 385 of file EvtParticle.hh.

385{ _p =p4; }

◆ setp() [2/2]

◆ setP4()

void EvtParticle::setP4 ( const EvtVector4R & p4)
inline

Sets the 4momentum in the parents restframe.

Definition at line 244 of file EvtParticle.hh.

244{_p=p4;}

Referenced by EvtPHOTOS::doRadCorr().

◆ setpart_num()

void EvtParticle::setpart_num ( EvtId particle_number)
inlineprotected

◆ setPolarizedSpinDensity()

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

Definition at line 157 of file EvtParticle.cc.

157 {
158
159 if (getSpinStates()!=3) {
160 report(ERROR,"EvtGen")<<"Error in EvtParticle::setVectorSpinDensity"<<endl;
161 report(ERROR,"EvtGen")<<"spin_states:"<<getSpinStates()<<endl;
162 report(ERROR,"EvtGen")<<"particle:"<<EvtPDL::name(_id).c_str()<<endl;
163 ::abort();
164 }
165
166 EvtSpinDensity rho;
167
168 //Set helicity +1 and -1 to 1.
169 rho.SetDiag(getSpinStates());
170 rho.Set(0,0,EvtComplex(r00,0.));
171 rho.Set(1,1,EvtComplex(r11,0.));
172 rho.Set(2,2,EvtComplex(r22,0.));
174
175}
void setSpinDensityForwardHelicityBasis(const EvtSpinDensity &rho)
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 338 of file EvtParticle.hh.

338{_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 307 of file EvtParticle.hh.

307{_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 178 of file EvtParticle.cc.

178 {
179
181
182 assert(R.GetDim()==rho.GetDim());
183
184 int n=rho.GetDim();
185
186 _rhoForward.SetDim(n);
187
188 int i,j,k,l;
189
190 for(i=0;i<n;i++){
191 for(j=0;j<n;j++){
192 EvtComplex tmp=0.0;
193 for(k=0;k<n;k++){
194 for(l=0;l<n;l++){
195 tmp+=R.Get(l,i)*rho.Get(l,k)*conj(R.Get(k,j));
196 }
197 }
198 _rhoForward.Set(i,j,tmp);
199 }
200 }
201
202 //report(INFO,"EvtGen") << "_rhoForward:"<<_rhoForward<<endl;
203
204}
const Int_t n
Evt3Rank3C conj(const Evt3Rank3C &t2)
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 206 of file EvtParticle.cc.

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

◆ setVectorSpinDensity()

void EvtParticle::setVectorSpinDensity ( )

Set spindensity matrix for e+e- -> V

Definition at line 138 of file EvtParticle.cc.

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

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 620 of file EvtParticle.cc.

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

Referenced by EvtSemiLeptonicBaryonAmp::CalcAmp(), EvtHypNonLepton::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 644 of file EvtParticle.cc.

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

◆ 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 607 of file EvtParticle.cc.

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

Referenced by EvtbTosllScalarAmp::CalcAmp(), EvtbTosllVectorAmp::CalcAmp(), EvtSemiLeptonicBaryonAmp::CalcAmp(), EvtSemiLeptonicTensorAmp::CalcAmp(), EvtSemiLeptonicVectorAmp::CalcAmp(), EvtHypNonLepton::calcAmp(), EvtBsquark::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 633 of file EvtParticle.cc.

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

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 988 of file EvtParticle.cc.

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

◆ treeStrRec()

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

Definition at line 906 of file EvtParticle.cc.

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

Referenced by treeStr(), and treeStrRec().

◆ writeTreeRec()

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

Definition at line 928 of file EvtParticle.cc.

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

Referenced by writeTreeRec().

Member Data Documentation

◆ _validP4


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