9 #ifndef HEPMC3_GENVERTEX_H
10 #define HEPMC3_GENVERTEX_H
12 #include "HepMC3/GenParticle_fwd.h"
13 #include "HepMC3/GenVertex_fwd.h"
26 class GenVertex :
public std::enable_shared_from_this<GenVertex> {
55 bool in_event()
const {
return parent_event() !=
nullptr; }
60 int id()
const {
return m_id; }
66 int status()
const {
return m_data.status; }
74 void add_particle_in ( GenParticlePtr p);
76 void add_particle_out( GenParticlePtr p);
78 void remove_particle_in ( GenParticlePtr p);
80 void remove_particle_out( GenParticlePtr p);
83 const std::vector<GenParticlePtr>&
particles_in() {
return m_particles_in; }
85 const std::vector<ConstGenParticlePtr>& particles_in()
const;
87 const std::vector<GenParticlePtr>&
particles_out() {
return m_particles_out; }
89 const std::vector<ConstGenParticlePtr>& particles_out()
const;
109 bool add_attribute(
const std::string&
name, std::shared_ptr<Attribute> att);
112 std::vector<std::string> attribute_names()
const;
115 void remove_attribute(
const std::string&
name);
119 std::shared_ptr<T> attribute(
const std::string&
name)
const;
122 std::string attribute_as_string(
const std::string&
name)
const;
162 return parent_event()?
163 parent_event()->attribute<T>(name, id()): std::shared_ptr<T>();
Definition of class GenVertexData.
void add_particle_in(GenParticle *p)
Stores vertex-related information.
static const FourVector & ZERO_VECTOR()
Static null FourVector = (0,0,0,0)
bool has_set_position() const
Check if position of this vertex is set.
int status() const
Get vertex status code.
GenEvent * parent_event()
Get parent event.
Stores particle-related information.
std::vector< GenParticlePtr > m_particles_out
Outgoing particle list.
const std::vector< GenParticlePtr > & particles_in()
Get list of incoming particles.
GenVertexData m_data
Vertex data.
Stores event-related information.
Stores serializable vertex information.
GenEvent * m_event
Parent event.
const std::vector< GenParticlePtr > & particles_out()
Get list of outgoing particles.
void add_particle_out(GenParticle *p)
void set_status(int stat)
Set vertex status code.
Definition of class GenEvent.
const GenEvent * parent_event() const
Get parent event.
Annotation for function names.
bool in_event() const
Check if this vertex belongs to an event.
std::vector< GenParticlePtr > m_particles_in
Incoming particle list.
const GenVertexData & data() const
Get vertex data.
Definition of class FourVector.
std::shared_ptr< T > attribute(const std::string &name) const
Get attribute of type T.