21 #ifndef EVTPARTICLE_HH
22 #define EVTPARTICLE_HH
26 #include "EvtGenBase/EvtVector4R.hh"
27 #include "EvtGenBase/EvtSpinDensity.hh"
28 #include "EvtGenBase/EvtId.hh"
29 #include "EvtGenBase/EvtSpinType.hh"
41 const int MAX_DAUG =100;
42 const int MAX_LEVEL=10;
43 const int MAX_TRIES=10000;
148 void deleteDaughters(
bool keepChannel=
false);
167 void makeDaughters(
unsigned int ndaug, std::vector<EvtId> idVector);
175 bool forceResetMasses=
false,
176 double poleSize=-1.,
int whichTwo1=0,
230 partptr->_parent=
this; }
240 void setFirstOrNot();
241 void resetFirstOrNot();
282 void setFSRP4toZero(){
283 _pBeforeFSR.set(0.0,0.0,0.0,0.0);
295 void resetNDaug() {_ndaug=0;
return;}
304 void printTreeRec(
unsigned int level)
const;
306 std::string treeStr()
const;
307 std::string treeStrRec(
unsigned int level)
const;
363 double gamma)
const=0;
383 void noLifeTime() { _genlifetime=0; }
386 void setId(
EvtId id) { _id=id;}
387 void initDecay(
bool useMinMass=
false);
388 bool generateMassTree();
390 double compMassProb();
393 void setMass(
double m) { _p=
EvtVector4R(m,0.0,0.0,0.0);}
403 bool isInitialized() {
return _isInit;}
404 bool hasValidP4() {
return _validP4;}
405 bool isDecayed() {
return _isDecayed;}
411 double* decayProb() {
return _decayProb;}
412 void setDecayProb(
double p);
415 std::string getName();
420 void setAttribute(std::string attName,
int attValue) {
421 _attributes[attName] = attValue;
425 int getAttribute(std::string attName);
429 void setp(
double e,
double px,
double py,
double pz) {
439 void setpart_num(
EvtId particle_number ) {
440 assert(_channel==-10||
441 _id.getId()==particle_number.getId()||
443 _id = particle_number;
448 typedef std::map<std::string, int> EvtAttributeMap;
450 EvtAttributeMap _attributes;
471 void makeStdHepRec(
int firstparent,
int lastparent,
EvtStdHep& stdhep,
473 void makeStdHepRec(
int firstparent,
int lastparent,
EvtStdHep& stdhep);
virtual EvtTensor4C epsTensorParent(int i) const
EvtSpinDensity getSpinDensityForward()
void setSpinDensityForward(const EvtSpinDensity &rho)
virtual EvtDiracSpinor sp(int) const
void setSpinDensityBackward(const EvtSpinDensity &rho)
EvtVector4R getP4Restframe() const
virtual EvtRaritaSchwinger spRSParent(int) const
const EvtVector4R & getP4() const
virtual void init(EvtId part_n, const EvtVector4R &p4)=0
EvtParticle * getDaug(int i)
virtual EvtDiracSpinor spParentNeutrino() const
EvtVector4R getP4Lab() const
void insertDaugPtr(int idaug, EvtParticle *partptr)
EvtSpinDensity getSpinDensityBackward()
virtual EvtVector4C epsParent(int i) const
void makeDaughters(unsigned int ndaug, EvtId *id)
virtual EvtVector4C epsPhoton(int i)
virtual EvtVector4C epsParentPhoton(int i)
virtual EvtDiracSpinor spNeutrino() const
EvtVector4R getP4LabBeforeFSR()
EvtVector4R get4Pos() const
virtual EvtVector4C eps(int i) const
double initializePhaseSpace(unsigned int numdaughter, EvtId *daughters, bool forceResetMasses=false, double poleSize=-1., int whichTwo1=0, int whichTwo2=1)
EvtParticle * getParent() const
virtual EvtSpinDensity rotateToHelicityBasis() const =0
void addDaug(EvtParticle *node)
EvtSpinType::spintype getSpinType() const
void setP4(const EvtVector4R &p4)
void printParticle() const
void setSpinDensityForwardHelicityBasis(const EvtSpinDensity &rho)
virtual EvtRaritaSchwinger spRS(int) const
int getSpinStates() const
void setDiagonalSpinDensity()
virtual EvtDiracSpinor spParent(int) const
void makeStdHep(EvtStdHep &stdhep, EvtSecondary &secondary, EvtId *stable_parent_ihep)
virtual EvtTensor4C epsTensor(int i) const
EvtParticle * nextIter(EvtParticle *rootOfTree=0)
void setVectorSpinDensity()