BOSS 8.0.0
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 33 of file EvtFromParent_Lambda.hh.

33{}

Referenced by clone().

◆ ~EvtFromParent_Lambda()

EvtFromParent_Lambda::~EvtFromParent_Lambda ( )
virtual

Definition at line 40 of file EvtFromParent_Lambda.cc.

40{}

Member Function Documentation

◆ clone()

EvtDecayBase * EvtFromParent_Lambda::clone ( )
virtual

Implements EvtDecayBase.

Definition at line 47 of file EvtFromParent_Lambda.cc.

◆ decay()

void EvtFromParent_Lambda::decay ( EvtParticle * p)
virtual

Implements EvtDecayBase.

Definition at line 57 of file EvtFromParent_Lambda.cc.

57 {
58 // p->printTree();
59 // std::cout<<"FromParent:p->getId() = "<<p->getId()<<std::endl;
60 EvtId LambdaId = EvtPDL::getId( "Lambda0" );
61 // std::cout<<"LambdaId = "<<LambdaId<<std::endl;
62 EvtId antiLambdaId = EvtPDL::getId( "anti-Lambda0" );
63 // std::cout<<"antiLambdaId = "<<antiLambdaId<<std::endl;
64 if ( p->getId() != LambdaId && p->getId() != antiLambdaId )
65 {
66 std::cout << "Parent particle is required to be Lambda0 or antiLambda0" << std::endl;
67 abort();
68 }
69 int more = 0;
70 int numstable = 0;
71 EvtId evtnumstable[100];
72 EvtVector4R p4[20];
73 /*if(EvtParticle::_NextLevelDauNum == 0) {
74 report(ERROR,"EvtGen") << "EvtParticle failed to store the info of NextLevel";
75 ::abort();
76 }*/
78 {
79 if ( p->getId() == LambdaId )
80 {
81 std::cout << "Lambda0's parent id:" << p->getParent()->getId()
82 << " p4 =" << p->getParent()->getP4Lab() << std::endl;
83 std::cout << "Lambda0's id:" << p->getId() << " p4 =" << p->getP4Lab() << std::endl;
84 // pi-
85 evtnumstable[numstable] = EvtPDL::evtIdFromStdHep( -211 );
86 p4[numstable] = EvtParticle::_NextLevelP4[2];
87 std::cout << "FromParent_Lambda: pi- p4[numstable] = " << p4[numstable] << std::endl;
88 numstable++;
89 // p
90 evtnumstable[numstable] = EvtPDL::evtIdFromStdHep( 2212 );
91 p4[numstable] = EvtParticle::_NextLevelP4[3];
92 std::cout << "FromParent_Lambda: p+ p4[numstable] = " << p4[numstable] << std::endl;
93 numstable++;
94 }
95 if ( p->getId() == antiLambdaId )
96 {
97 std::cout << "anti-Lambda0's parent id:" << p->getParent()->getId()
98 << " p4 =" << p->getParent()->getP4Lab() << std::endl;
99 std::cout << "anti-Lambda0's id:" << p->getId() << " p4 =" << p->getP4Lab() << std::endl;
100 // pi+
101 evtnumstable[numstable] = EvtPDL::evtIdFromStdHep( 211 );
102 p4[numstable] = EvtParticle::_NextLevelP4[0];
103 std::cout << "FromParent_Lambda: pi+ p4[numstable] = " << p4[numstable] << std::endl;
104 numstable++;
105 // pbar
106 evtnumstable[numstable] = EvtPDL::evtIdFromStdHep( -2212 );
107 p4[numstable] = EvtParticle::_NextLevelP4[1];
108 std::cout << "FromParent_Lambda: 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 {
115 p->getDaug( i )->init( evtnumstable[i], p4[i] );
116 ndaugFound++;
117 }
118 if ( ndaugFound == 0 )
119 {
120 report( ERROR, "EvtGen" ) << "Phokhara has failed to do a decay ";
121 report( ERROR, "EvtGen" ) << EvtPDL::name( p->getId() ).c_str() << " " << p->mass()
122 << endl;
123 assert( 0 );
124 }
125 if ( p->getId() == LambdaId )
126 {
127 // int channel=EvtDecayTable::inChannelList(p->getId(),numstable,evtnumstable);
128 // more=(channel!=-1);
129 // if(more) { std::cout<<"EvtFromParent_Lambda:Existence of mode "<<channel<<" in
130 // exclusive decay list has the same final state as this one"<<std::endl;abort(); }
131
132 std::cout << "EvtFromParent_Lambda Lambda0's parent id:" << p->getParent()->getId()
133 << " p4 =" << p->getParent()->getP4Lab() << std::endl;
134 std::cout << "EvtFromParent_Lambda SUMMARY: part p4" << p->getP4Lab() << std::endl;
135 std::cout << "EvtFromParent_Lambda SUMMARY: Daug0 p4" << p->getDaug( 0 )->getP4Lab()
136 << std::endl;
137 std::cout << "EvtFromParent_Lambda SUMMARY: Daug1 p4" << p->getDaug( 1 )->getP4Lab()
138 << std::endl;
139 }
140 if ( p->getId() == antiLambdaId )
141 {
142 // int channel=EvtDecayTable::inChannelList(p->getId(),numstable,evtnumstable);
143 // more=(channel!=-1);
144 // if(more) { std::cout<<"EvtFromParent_Lambda:Existence of mode "<<channel<<" in
145 // exclusive decay list has the same final state as this one"<<std::endl;abort(); }
146
147 std::cout << "EvtFromParent_Lambda antiLambda0's parent id:" << p->getParent()->getId()
148 << " p4 =" << p->getParent()->getP4Lab() << std::endl;
149 std::cout << "EvtFromParent_Lambda SUMMARY: part p4" << p->getP4Lab() << std::endl;
150 std::cout << "EvtFromParent_Lambda SUMMARY: Daug0 p4" << p->getDaug( 0 )->getP4Lab()
151 << std::endl;
152 std::cout << "EvtFromParent_Lambda SUMMARY: Daug1 p4" << p->getDaug( 1 )->getP4Lab()
153 << std::endl;
154 }
155 }
156 return;
157}
ostream & report(Severity severity, const char *facility)
Definition EvtReport.cc:34
@ ERROR
Definition EvtReport.hh:49
static EvtId evtIdFromStdHep(int stdhep)
Definition EvtPDL.cc:232
static std::string name(EvtId i)
Definition EvtPDL.hh:70
static EvtId getId(const std::string &name)
Definition EvtPDL.cc:272
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

◆ getName()

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

Implements EvtDecayBase.

Definition at line 42 of file EvtFromParent_Lambda.cc.

42 {
43
44 model_name = "FromParent_Lambda";
45}

◆ init()

void EvtFromParent_Lambda::init ( )
virtual

Reimplemented from EvtDecayBase.

Definition at line 49 of file EvtFromParent_Lambda.cc.

49 {
50
51 // check that there are 0 arguments
52 checkNArg( 0 );
53}
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 55 of file EvtFromParent_Lambda.cc.

55{ noProbMax(); }

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