9#ifndef HEPMC3_GENVERTEX_H
10#define HEPMC3_GENVERTEX_H
12#include "HepMC3/GenParticle_fwd.h"
13#include "HepMC3/GenVertex_fwd.h"
26class GenVertex :
public std::enable_shared_from_this<GenVertex> {
91 const std::vector<ConstGenParticlePtr>&
particles_in()
const;
95 const std::vector<ConstGenParticlePtr>&
particles_out()
const;
115 bool add_attribute(
const std::string& name, std::shared_ptr<Attribute> att);
125 std::shared_ptr<T>
attribute(
const std::string& name)
const;
Definition of class FourVector.
Definition of class GenEvent.
Definition of class GenVertexData.
bool is_zero() const
Check if the length of this vertex is zero.
static const FourVector & ZERO_VECTOR()
Static null FourVector = (0,0,0,0)
Stores event-related information.
std::shared_ptr< T > attribute(const std::string &name, const int &id=0) const
Get attribute of type T.
Stores particle-related information.
Stores vertex-related information.
void remove_particle_out(GenParticlePtr p)
Remove outgoing particle.
GenVertexData m_data
Vertex data.
const std::vector< GenParticlePtr > & particles_out()
Get list of outgoing particles.
std::shared_ptr< T > attribute(const std::string &name) const
Get attribute of type T.
void remove_particle_in(GenParticlePtr p)
Remove incoming particle.
std::vector< GenParticlePtr > m_particles_in
Incoming particle list.
GenEvent * m_event
Parent event.
void add_particle_in(GenParticlePtr p)
Add incoming particle.
void remove_attribute(const std::string &name)
Remove attribute.
int particles_in_size() const
Number of incoming particles, HepMC2 compatiility.
void set_position(const FourVector &new_pos)
Set vertex position.
std::vector< GenParticlePtr > m_particles_out
Outgoing particle list.
bool add_attribute(const std::string &name, std::shared_ptr< Attribute > att)
Add event attribute to this vertex.
void add_particle_out(GenParticle *p)
std::vector< std::string > attribute_names() const
Get list of names of attributes assigned to this particle.
const GenVertexData & data() const
Get vertex data.
void set_id(int id)
set the vertex identifier
const FourVector & position() const
Get vertex position.
int status() const
Get vertex status code.
void add_particle_in(GenParticle *p)
GenEvent * parent_event()
Get parent event.
void set_status(int stat)
Set vertex status code.
bool in_event() const
Check if this vertex belongs to an event.
bool has_set_position() const
Check if position of this vertex is set.
int particles_out_size() const
Number of outgoing particles, HepMC2 compatiility.
const GenEvent * parent_event() const
Get parent event.
void add_particle_out(GenParticlePtr p)
Add outgoing particle.
const std::vector< GenParticlePtr > & particles_in()
Get list of incoming particles.
std::string attribute_as_string(const std::string &name) const
Get attribute of any type as string.
Stores serializable vertex information.
FourVector position
Position in time-space.