9 #ifndef HEPMC3_GENVERTEX_H 10 #define HEPMC3_GENVERTEX_H 27 class GenVertex :
public std::enable_shared_from_this<GenVertex>{
56 bool in_event()
const {
return parent_event() !=
nullptr; }
61 int id()
const {
return m_id; }
67 int status()
const {
return m_data.status; }
75 void add_particle_in ( GenParticlePtr p);
77 void add_particle_out( GenParticlePtr p);
79 void remove_particle_in ( GenParticlePtr p);
81 void remove_particle_out( GenParticlePtr p);
84 const vector<GenParticlePtr>&
particles_in() {
return m_particles_in; }
86 const vector<ConstGenParticlePtr>& particles_in()
const;
88 const vector<GenParticlePtr>&
particles_out() {
return m_particles_out; }
90 const vector<ConstGenParticlePtr>& particles_out()
const;
110 bool add_attribute(
const string& name, shared_ptr<Attribute> att);
113 vector<string> attribute_names()
const;
116 void remove_attribute(
const string& name);
120 shared_ptr<T> attribute(
const string& name)
const;
123 string attribute_as_string(
const string& name)
const;
163 return parent_event()?
164 parent_event()->attribute<T>(name, id()): shared_ptr<T>();
Definition of class GenVertexData.
void add_particle_in(GenParticle *p)
Implementation of error and warning macros.
int status() const
Get vertex status code.
Stores vertex-related information.
static const FourVector & ZERO_VECTOR()
Static null FourVector = (0,0,0,0)
vector< GenParticlePtr > m_particles_in
Incoming particle list.
const vector< GenParticlePtr > & particles_in()
Get list of incoming particles.
GenEvent * parent_event()
Get parent event.
Stores particle-related information.
bool in_event() const
Check if this vertex belongs to an event.
const vector< GenParticlePtr > & particles_out()
Get list of outgoing particles.
GenVertexData m_data
Vertex data.
Stores event-related information.
vector< GenParticlePtr > m_particles_out
Outgoing particle list.
Stores serializable vertex information.
GenEvent * m_event
Parent event.
Minimal forward declarations for GenParticle.
Minimal forward declarations for GenVertex.
const GenVertexData & data() const
Get vertex data.
void add_particle_out(GenParticle *p)
shared_ptr< T > attribute(const string &name) const
Get attribute of type T.
void set_status(int stat)
Set vertex status code.
const GenEvent * parent_event() const
Get parent event.
Definition of class GenEvent.
Definition of class FourVector.
bool has_set_position() const
Check if position of this vertex is set.