BOSS 7.1.2
BESIII Offline Software System
Loading...
Searching...
No Matches
EvtFromParent_Lambda Class Reference

#include <EvtFromParent_Lambda.hh>

+ Inheritance diagram for EvtFromParent_Lambda:

Public Member Functions

 EvtFromParent_Lambda ()
 
virtual ~EvtFromParent_Lambda ()
 
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_Lambda.hh.

Constructor & Destructor Documentation

◆ EvtFromParent_Lambda()

EvtFromParent_Lambda::EvtFromParent_Lambda ( )
inline

Definition at line 34 of file EvtFromParent_Lambda.hh.

34{}

Referenced by clone().

◆ ~EvtFromParent_Lambda()

EvtFromParent_Lambda::~EvtFromParent_Lambda ( )
virtual

Definition at line 41 of file EvtFromParent_Lambda.cc.

41{}

Member Function Documentation

◆ clone()

EvtDecayBase * EvtFromParent_Lambda::clone ( )
virtual

Implements EvtDecayBase.

Definition at line 49 of file EvtFromParent_Lambda.cc.

49 {
50
51 return new EvtFromParent_Lambda;
52
53}

◆ decay()

void EvtFromParent_Lambda::decay ( EvtParticle * p)
virtual

Implements EvtDecayBase.

Definition at line 69 of file EvtFromParent_Lambda.cc.

69 {
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 std::cout<<"Lambda0's parent id:"<<p->getParent()->getId()<<" p4 ="<<p->getParent()->getP4Lab()<<std::endl;
88 std::cout<<"Lambda0's id:"<<p->getId()<<" p4 ="<<p->getP4Lab()<<std::endl;
89 //pi-
90 evtnumstable[numstable]=EvtPDL::evtIdFromStdHep(-211);
91 p4[numstable] = EvtParticle::_NextLevelP4[2];
92 std::cout<<"FromParent_Lambda: pi- p4[numstable] = "<<p4[numstable]<<std::endl;
93 numstable++;
94 //p
95 evtnumstable[numstable]=EvtPDL::evtIdFromStdHep(2212);
96 p4[numstable] = EvtParticle::_NextLevelP4[3];
97 std::cout<<"FromParent_Lambda: p+ p4[numstable] = "<<p4[numstable]<<std::endl;
98 numstable++;
99 }
100 if(p->getId()==antiLambdaId) {
101 std::cout<<"anti-Lambda0's parent id:"<<p->getParent()->getId()<<" p4 ="<<p->getParent()->getP4Lab()<<std::endl;
102 std::cout<<"anti-Lambda0's id:"<<p->getId()<<" p4 ="<<p->getP4Lab()<<std::endl;
103 //pi+
104 evtnumstable[numstable]=EvtPDL::evtIdFromStdHep(211);
105 p4[numstable] = EvtParticle::_NextLevelP4[0];
106 std::cout<<"FromParent_Lambda: pi+ p4[numstable] = "<<p4[numstable]<<std::endl;
107 numstable++;
108 //pbar
109 evtnumstable[numstable]=EvtPDL::evtIdFromStdHep(-2212);
110 p4[numstable] = EvtParticle::_NextLevelP4[1];
111 std::cout<<"FromParent_Lambda: anti-p- p4[numstable] = "<<p4[numstable]<<std::endl;
112 numstable++;
113 }
114 p->makeDaughters(numstable,evtnumstable);
115 int ndaugFound=0;
116 for(int i=0;i<numstable;i++){
117 p->getDaug(i)->init(evtnumstable[i],p4[i]);
118 ndaugFound++;
119 }
120 if ( ndaugFound == 0 ) {
121 report(ERROR,"EvtGen") << "Phokhara has failed to do a decay ";
122 report(ERROR,"EvtGen") << EvtPDL::name(p->getId()).c_str() << " " << p->mass()<<endl;
123 assert(0);
124 }
125 if(p->getId()==LambdaId) {
126 //int channel=EvtDecayTable::inChannelList(p->getId(),numstable,evtnumstable);
127 //more=(channel!=-1);
128 //if(more) { std::cout<<"EvtFromParent_Lambda:Existence of mode "<<channel<<" in exclusive decay list has the same final state as this one"<<std::endl;abort(); }
129
130 std::cout<<"EvtFromParent_Lambda Lambda0's parent id:"<<p->getParent()->getId()<<" p4 ="<<p->getParent()->getP4Lab()<<std::endl;
131 std::cout<<"EvtFromParent_Lambda SUMMARY: part p4"<<p->getP4Lab()<<std::endl;
132 std::cout<<"EvtFromParent_Lambda SUMMARY: Daug0 p4"<<p->getDaug(0)->getP4Lab()<<std::endl;
133 std::cout<<"EvtFromParent_Lambda SUMMARY: Daug1 p4"<<p->getDaug(1)->getP4Lab()<<std::endl;
134 }
135 if(p->getId()==antiLambdaId) {
136 //int channel=EvtDecayTable::inChannelList(p->getId(),numstable,evtnumstable);
137 //more=(channel!=-1);
138 //if(more) { std::cout<<"EvtFromParent_Lambda:Existence of mode "<<channel<<" in exclusive decay list has the same final state as this one"<<std::endl;abort(); }
139
140 std::cout<<"EvtFromParent_Lambda antiLambda0's parent id:"<<p->getParent()->getId()<<" p4 ="<<p->getParent()->getP4Lab()<<std::endl;
141 std::cout<<"EvtFromParent_Lambda SUMMARY: part p4"<<p->getP4Lab()<<std::endl;
142 std::cout<<"EvtFromParent_Lambda SUMMARY: Daug0 p4"<<p->getDaug(0)->getP4Lab()<<std::endl;
143 std::cout<<"EvtFromParent_Lambda SUMMARY: Daug1 p4"<<p->getDaug(1)->getP4Lab()<<std::endl;
144 }
145 }
146 return ;
147
148
149
150}
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
EvtParticle * getDaug(int i)
static EvtVector4R _NextLevelP4[20]
double mass() const
double double double * p4
Definition qcdloop1.h:77

◆ getName()

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

Implements EvtDecayBase.

Definition at line 43 of file EvtFromParent_Lambda.cc.

43 {
44
45 model_name="FromParent_Lambda";
46
47}

◆ init()

void EvtFromParent_Lambda::init ( )
virtual

Reimplemented from EvtDecayBase.

Definition at line 56 of file EvtFromParent_Lambda.cc.

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

◆ initProbMax()

void EvtFromParent_Lambda::initProbMax ( )
virtual

Reimplemented from EvtDecayBase.

Definition at line 63 of file EvtFromParent_Lambda.cc.

63 {
64
65 noProbMax();
66
67}

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