HepMC3 event record library
Public Member Functions | Private Member Functions | Private Attributes
PhotosHepMC3Particle Class Reference
+ Inheritance diagram for PhotosHepMC3Particle:
+ Collaboration diagram for PhotosHepMC3Particle:

Public Member Functions

 PhotosHepMC3Particle ()
 
 PhotosHepMC3Particle (GenParticlePtr particle)
 
 PhotosHepMC3Particle (int pdg_id, int status, double mass)
 
 ~PhotosHepMC3Particle ()
 
GenParticlePtr getHepMC3 ()
 
void setMothers (std::vector< PhotosParticle * > mothers)
 
void setDaughters (std::vector< PhotosParticle * > daughters)
 
void addDaughter (PhotosParticle *daughter)
 
std::vector< PhotosParticle * > getMothers ()
 
std::vector< PhotosParticle * > getDaughters ()
 
std::vector< PhotosParticle * > getAllDecayProducts ()
 
void setPdgID (int pdg_id)
 
void setStatus (int statu)
 
void setMass (double mass)
 
int getPdgID ()
 
int getStatus ()
 
int getBarcode ()
 
bool checkMomentumConservation ()
 
PhotosHepMC3ParticlecreateNewParticle (int pdg_id, int status, double mass, double px, double py, double pz, double e)
 
void createHistoryEntry ()
 
void createSelfDecayVertex (PhotosParticle *out)
 
void print ()
 
double getPx ()
 
double getPy ()
 
double getPz ()
 
double getE ()
 
double getMass ()
 
void setPx (double px)
 
void setPy (double py)
 
void setPz (double pz)
 
void setE (double e)
 

Private Member Functions

void clear (std::vector< PhotosParticle * > v)
 

Private Attributes

GenParticlePtr m_particle
 
std::vector< PhotosParticle * > m_mothers
 
std::vector< PhotosParticle * > m_daughters
 
std::vector< PhotosParticle * > m_decay_products
 
std::vector< PhotosParticle * > m_created_particles
 

Detailed Description

Definition at line 34 of file PhotosHepMC3Particle.h.

Constructor & Destructor Documentation

General constructor

PhotosHepMC3Particle ( GenParticlePtr  particle)

Constructor which keeps a pointer to the GenParticle

PhotosHepMC3Particle ( int  pdg_id,
int  status,
double  mass 
)

Constructor which creates a new GenParticle and sets the properties pdg_id, statu and mass.

Destructor

Member Function Documentation

void addDaughter ( PhotosParticle *  daughter)

Add a new daughter to the end vertex of this particle

bool checkMomentumConservation ( )

check that the 4 momentum in conserved at the vertices producing and ending this particle

void clear ( std::vector< PhotosParticle * >  v)
private

Internal function used to clear particles from the vector

void createHistoryEntry ( )

Create history entry for HepMC event record. Creates copy of this particle with status = 3

PhotosHepMC3Particle* createNewParticle ( int  pdg_id,
int  status,
double  mass,
double  px,
double  py,
double  pz,
double  e 
)

Create a new particle of type PhotosHepMC3Particle, with the given properties. The new particle bares no relations to this particle, but it provides a way of creating a instance of this derived class. eg. createNewParticle() is used inside filhep_() so that a PhotosHepMC3Particle can be created without the method having explicit knowledge of the PhotosHepMC3Particle class

void createSelfDecayVertex ( PhotosParticle *  out)

Create a self-decay vertex for this particle with 'out' being the outgoing particle in new vertex

std::vector<PhotosParticle*> getAllDecayProducts ( )

Returns all particles in the decay tree of this particle via a vector of PhotosParticle

int getBarcode ( )

Get the barcode of this particle

std::vector<PhotosParticle*> getDaughters ( )

Returns the daughters of this particle via a vector of PhotosParticle IMPORTANT: this method will remeber list from the first call. Particles (e.g. photons) added later will be ignored

double getE ( )

Returns the energy component of the four vector

GenParticlePtr getHepMC3 ( )

return the GenParticlePtr

double getMass ( )

Returns the mass taken from event record

std::vector<PhotosParticle*> getMothers ( )

Returns the mothers of this particle via a vector of PhotosParticle

int getPdgID ( )

Get the PDG ID code of this particle

double getPx ( )

Returns the px component of the four vector

double getPy ( )

Returns the py component of the four vector

double getPz ( )

Returns the pz component of the four vector

int getStatus ( )

Get the status of this particle

void print ( )

Print some information about this particle to standard output

void setDaughters ( std::vector< PhotosParticle * >  daughters)

Set the daughters of this particle via a vector of PhotosParticle

void setE ( double  e)

Set the energy component of the four vector

void setMass ( double  mass)

Set the mass of this particle

void setMothers ( std::vector< PhotosParticle * >  mothers)

Set the mothers of this particle via a vector of PhotosParticle

void setPdgID ( int  pdg_id)

Set the PDG ID code of this particle

void setPx ( double  px)

Set the px component of the four vector

void setPy ( double  py)

Set the px component of the four vector

void setPz ( double  pz)

Set the pz component of the four vector

void setStatus ( int  statu)

Set the status of this particle

Field Documentation

std::vector<PhotosParticle*> m_created_particles
private

list to keep track of new particles which have been created from this one, so we can call their destructor later

Definition at line 163 of file PhotosHepMC3Particle.h.

std::vector<PhotosParticle*> m_daughters
private

A vector of this particles daughters

Definition at line 156 of file PhotosHepMC3Particle.h.

std::vector<PhotosParticle*> m_decay_products
private

A vector of all decay products of this particle

Definition at line 159 of file PhotosHepMC3Particle.h.

std::vector<PhotosParticle*> m_mothers
private

A vector of this particles mothers

Definition at line 153 of file PhotosHepMC3Particle.h.

GenParticlePtr m_particle
private

A pointer to the GenParticle particle

Definition at line 150 of file PhotosHepMC3Particle.h.


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