43 if( p->end_vertex() ) p->end_vertex()->remove_particle_in(p);
45 p->m_end_vertex = shared_from_this();
59 if( p->production_vertex() ) p->production_vertex()->remove_particle_out(p);
61 p->m_production_vertex = shared_from_this();
69 p->m_end_vertex.reset();
77 p->m_production_vertex.reset();
88 return *(
reinterpret_cast<const std::vector<ConstGenParticlePtr>*
>(&
m_particles_in));
92 return *(
reinterpret_cast<const std::vector<ConstGenParticlePtr>*
>(&
m_particles_out));
104 if (!cycles||cycles->value()==0)
108 ConstGenVertexPtr v = p->production_vertex();
109 if(v)
return v->position();
138 return std::vector<std::string>();
bool add_attribute(const std::string &name, std::shared_ptr< Attribute > att)
Add event attribute to this vertex.
Definition of class GenParticle.
void remove_attribute(const std::string &name)
Remove attribute.
FourVector position
Position in time-space.
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.
void set_position(const FourVector &new_pos)
Set vertex position.
Definition of class GenVertex.
GenEvent * parent_event()
Get parent event.
void add_particle(GenParticlePtr p)
Add particle.
std::vector< GenParticlePtr > m_particles_out
Outgoing particle list.
void add_attribute(const std::string &name, const std::shared_ptr< Attribute > &att, const int &id=0)
Add event attribute to event.
std::vector< std::string > attribute_names() const
Get list of names of attributes assigned to this particle.
const FourVector & event_pos() const
Vertex representing the overall event position.
const std::vector< GenParticlePtr > & particles_in()
Get list of incoming particles.
GenVertex(const FourVector &position=FourVector::ZERO_VECTOR())
Default constructor.
void add_particle_in(GenParticlePtr p)
Add incoming particle.
GenVertexData m_data
Vertex data.
std::string attribute_as_string(const std::string &name, const int &id=0) const
Get attribute of any type as string.
Stores serializable vertex information.
GenEvent * m_event
Parent event.
const std::vector< GenParticlePtr > & particles_out()
Get list of outgoing particles.
Definition of class Setup.
void add_particle_out(GenParticlePtr p)
Add outgoing particle.
std::shared_ptr< T > attribute(const std::string &name, const int &id=0) const
Get attribute of type T.
void remove_attribute(const std::string &name, const int &id=0)
Remove attribute.
std::string attribute_as_string(const std::string &name) const
Get attribute of any type as string.
void remove_particle_in(GenParticlePtr p)
Remove incoming particle.
std::vector< std::string > attribute_names(const int &id=0) const
Get list of attribute names.
void remove_particle_out(GenParticlePtr p)
Remove outgoing particle.
Definition of class GenEvent.
Annotation for function names.
Definition of class Attribute, class IntAttribute and class StringAttribute.
std::vector< GenParticlePtr > m_particles_in
Incoming particle list.
void set_id(int id)
set the vertex identifier
const FourVector & position() const
Get vertex position.
Attribute that holds an Integer implemented as an int.