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

33{}

Referenced by clone().

◆ ~EvtFromParent()

EvtFromParent::~EvtFromParent ( )
virtual

Definition at line 39 of file EvtFromParent.cc.

39{}

Member Function Documentation

◆ clone()

EvtDecayBase * EvtFromParent::clone ( )
virtual

Implements EvtDecayBase.

Definition at line 43 of file EvtFromParent.cc.

43{ return new EvtFromParent; }

◆ decay()

void EvtFromParent::decay ( EvtParticle * p)
virtual

Implements EvtDecayBase.

Definition at line 53 of file EvtFromParent.cc.

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

◆ getName()

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

Implements EvtDecayBase.

Definition at line 41 of file EvtFromParent.cc.

41{ model_name = "FromParent"; }

◆ init()

void EvtFromParent::init ( )
virtual

Reimplemented from EvtDecayBase.

Definition at line 45 of file EvtFromParent.cc.

45 {
46
47 // check that there are 0 arguments
48 checkNArg( 0 );
49}
void checkNArg(int a1, int a2=-1, int a3=-1, int a4=-1)

◆ initProbMax()

void EvtFromParent::initProbMax ( )
virtual

Reimplemented from EvtDecayBase.

Definition at line 51 of file EvtFromParent.cc.

51{ noProbMax(); }

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