BOSS 7.1.1
BESIII Offline Software System
Loading...
Searching...
No Matches
EvtFromParent Class Reference

#include <EvtFromParent.hh>

+ Inheritance diagram for EvtFromParent:

Public Member Functions

 EvtFromParent ()
 
virtual ~EvtFromParent ()
 
void getName (std::string &name)
 
EvtDecayBaseclone ()
 
void initProbMax ()
 
void init ()
 
void decay (EvtParticle *p)
 
- Public Member Functions inherited from EvtDecayIncoherent
void makeDecay (EvtParticle *p)
 
virtual ~EvtDecayIncoherent ()
 
void setDaughterSpinDensity (int daughter)
 
int isDaughterSpinDensitySet (int daughter)
 
- Public Member Functions inherited from EvtDecayBase
virtual std::string commandName ()
 
virtual void command (std::string cmd)
 
double getProbMax (double prob)
 
double resetProbMax (double prob)
 
 EvtDecayBase ()
 
virtual ~EvtDecayBase ()
 
virtual bool matchingDecay (const EvtDecayBase &other) const
 
EvtId getParentId ()
 
double getBranchingFraction ()
 
void disableCheckQ ()
 
void checkQ ()
 
int getNDaug ()
 
EvtIdgetDaugs ()
 
EvtId getDaug (int i)
 
int getNArg ()
 
int getPHOTOS ()
 
void setPHOTOS ()
 
void setVerbose ()
 
void setSummary ()
 
double * getArgs ()
 
std::string * getArgsStr ()
 
double getArg (int j)
 
std::string getArgStr (int j)
 
std::string getModelName ()
 
int getDSum ()
 
int summary ()
 
int verbose ()
 
void saveDecayInfo (EvtId ipar, int ndaug, EvtId *daug, int narg, std::vector< std::string > &args, std::string name, double brfr)
 
void printSummary ()
 
void setProbMax (double prbmx)
 
void noProbMax ()
 
void checkNArg (int a1, int a2=-1, int a3=-1, int a4=-1)
 
void checkNDaug (int d1, int d2=-1)
 
void checkSpinParent (EvtSpinType::spintype sp)
 
void checkSpinDaughter (int d1, EvtSpinType::spintype sp)
 
virtual int nRealDaughters ()
 

Additional Inherited Members

- Static Public Member Functions inherited from EvtDecayBase
static void findMasses (EvtParticle *p, int ndaugs, EvtId daugs[10], double masses[10])
 
static void findMass (EvtParticle *p)
 
static double findMaxMass (EvtParticle *p)
 
- Protected Member Functions inherited from EvtDecayBase
bool daugsDecayedByParentModel ()
 
- Protected Attributes inherited from EvtDecayBase
bool _daugsDecayedByParentModel
 

Detailed Description

Definition at line 30 of file EvtFromParent.hh.

Constructor & Destructor Documentation

◆ EvtFromParent()

EvtFromParent::EvtFromParent ( )
inline

Definition at line 34 of file EvtFromParent.hh.

34{}

Referenced by clone().

◆ ~EvtFromParent()

EvtFromParent::~EvtFromParent ( )
virtual

Definition at line 40 of file EvtFromParent.cc.

40{}

Member Function Documentation

◆ clone()

EvtDecayBase * EvtFromParent::clone ( )
virtual

Implements EvtDecayBase.

Definition at line 48 of file EvtFromParent.cc.

48 {
49
50 return new EvtFromParent;
51
52}

◆ decay()

void EvtFromParent::decay ( EvtParticle * p)
virtual

Implements EvtDecayBase.

Definition at line 68 of file EvtFromParent.cc.

68 {
69 bool debug=0;
70 //p->printTree();
71 //std::cout<<"FromParent:p->getId() = "<<p->getId()<<std::endl;
72 EvtId LambdaId = EvtPDL::getId("Lambda0");
73 //std::cout<<"LambdaId = "<<LambdaId<<std::endl;
74 EvtId antiLambdaId = EvtPDL::getId("anti-Lambda0");
75 //std::cout<<"antiLambdaId = "<<antiLambdaId<<std::endl;
76 if(p->getId()!=LambdaId&&p->getId()!=antiLambdaId){std::cout<<"Parent particle is required to be Lambda0 or antiLambda0"<<std::endl;abort();}
77 int more=0;
78 int numstable=0;
79 EvtId evtnumstable[100];
80 EvtVector4R p4[20];
81 /*if(EvtParticle::_NextLevelDauNum == 0) {
82 report(ERROR,"EvtGen") << "EvtParticle failed to store the info of NextLevel";
83 ::abort();
84 }*/
86 if(p->getId()==LambdaId) {
87 //pi-
88 evtnumstable[numstable]=EvtPDL::evtIdFromStdHep(-211);
89 p4[numstable] = EvtParticle::_NextLevelP4[2];
90 if (debug) std::cout<<"FromParent: pi- p4[numstable] = "<<p4[numstable]<<std::endl;
91 numstable++;
92 //p
93 evtnumstable[numstable]=EvtPDL::evtIdFromStdHep(2212);
94 p4[numstable] = EvtParticle::_NextLevelP4[3];
95 if (debug) std::cout<<"FromParent: p+ p4[numstable] = "<<p4[numstable]<<std::endl;
96 numstable++;
97 }
98 if(p->getId()==antiLambdaId) {
99 if (debug) std::cout<<"anti-Lambda0's parent id:"<<p->getParent()->getId()<<" p4 ="<<p->getParent()->getP4()<<std::endl;
100 //pi+
101 evtnumstable[numstable]=EvtPDL::evtIdFromStdHep(211);
102 p4[numstable] = EvtParticle::_NextLevelP4[0];
103 if (debug) std::cout<<"FromParent: pi+ p4[numstable] = "<<p4[numstable]<<std::endl;
104 numstable++;
105 //pbar
106 evtnumstable[numstable]=EvtPDL::evtIdFromStdHep(-2212);
107 p4[numstable] = EvtParticle::_NextLevelP4[1];
108 if (debug) std::cout<<"FromParent: anti-p- p4[numstable] = "<<p4[numstable]<<std::endl;
109 numstable++;
110 }
111 p->makeDaughters(numstable,evtnumstable);
112 int ndaugFound=0;
113 for(int i=0;i<numstable;i++){
114 p->getDaug(i)->init(evtnumstable[i],p4[i]);
115 ndaugFound++;
116 }
117 if ( ndaugFound == 0 ) {
118 report(ERROR,"EvtGen") << "Phokhara has failed to do a decay ";
119 report(ERROR,"EvtGen") << EvtPDL::name(p->getId()).c_str() << " " << p->mass()<<endl;
120 assert(0);
121 }
122 if(p->getId()==LambdaId) {
123 //int channel=EvtDecayTable::inChannelList(p->getId(),numstable,evtnumstable);
124 //more=(channel!=-1)&&(channel!=0);
125 //if(more) { std::cout<<"EvtFromParent:Existence of mode "<<channel<<" in exclusive decay list has the same final state as this one"<<std::endl;abort(); }
126
127 if (debug)std::cout<<"EvtFromParent Lambda0's parent id:"<<p->getParent()->getId()<<" p4 ="<<p->getParent()->getP4Lab()<<std::endl;
128 if (debug)std::cout<<"EvtFromParent SUMMARY: part p4"<<p->getP4Lab()<<std::endl;
129 if (debug)std::cout<<"EvtFromParent SUMMARY: Daug0 p4"<<p->getDaug(0)->getP4Lab()<<std::endl;
130 if (debug)std::cout<<"EvtFromParent SUMMARY: Daug1 p4"<<p->getDaug(1)->getP4Lab()<<std::endl;
131 }
132 if(p->getId()==antiLambdaId) {
133 // int channel=EvtDecayTable::inChannelList(p->getId(),numstable,evtnumstable);
134 //more=(channel!=0);
135 //if(more) { std::cout<<"EvtFromParent:Existence of mode "<<channel<<" in exclusive decay list has the same final state as this one"<<std::endl;abort(); }
136
137 if (debug)std::cout<<"EvtFromParent antiLambda0's parent id:"<<p->getParent()->getId()<<" p4 ="<<p->getParent()->getP4Lab()<<std::endl;
138 if (debug)std::cout<<"EvtFromParent SUMMARY: part p4"<<p->getP4Lab()<<std::endl;
139 if (debug)std::cout<<"EvtFromParent SUMMARY: Daug0 p4"<<p->getDaug(0)->getP4Lab()<<std::endl;
140 if (debug)std::cout<<"EvtFromParent SUMMARY: Daug1 p4"<<p->getDaug(1)->getP4Lab()<<std::endl;
141 }
142 }
143 return ;
144
145
146
147}
ostream & report(Severity severity, const char *facility)
Definition EvtReport.cc:36
@ ERROR
Definition EvtReport.hh:49
Definition EvtId.hh:27
static EvtId evtIdFromStdHep(int stdhep)
Definition EvtPDL.cc:244
static std::string name(EvtId i)
Definition EvtPDL.hh:64
static EvtId getId(const std::string &name)
Definition EvtPDL.cc:287
void makeDaughters(int ndaug, EvtId *id)
virtual void init(EvtId part_n, const EvtVector4R &p4)=0
EvtVector4R getP4Lab()
EvtId getId() const
EvtParticle * getParent()
static int _NextLevelDauNum
const EvtVector4R & getP4() const
EvtParticle * getDaug(int i)
static EvtVector4R _NextLevelP4[20]
double mass() const
double double double * p4
Definition qcdloop1.h:77

◆ getName()

void EvtFromParent::getName ( std::string & name)
virtual

Implements EvtDecayBase.

Definition at line 42 of file EvtFromParent.cc.

42 {
43
44 model_name="FromParent";
45
46}

◆ init()

void EvtFromParent::init ( )
virtual

Reimplemented from EvtDecayBase.

Definition at line 55 of file EvtFromParent.cc.

55 {
56
57 // check that there are 0 arguments
58 checkNArg(0);
59
60}
void checkNArg(int a1, int a2=-1, int a3=-1, int a4=-1)

◆ initProbMax()

void EvtFromParent::initProbMax ( )
virtual

Reimplemented from EvtDecayBase.

Definition at line 62 of file EvtFromParent.cc.

62 {
63
64 noProbMax();
65
66}

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