11 #include "HepMC/GenVertex.h" 12 #include "HepMC/GenParticle.h" 13 #include "HepMC/GenEvent.h" 14 #include "HepMC/Search/FindParticles.h" 15 #include "HepMC/Setup.h" 16 #include "HepMC/Attribute.h" 46 if( p->end_vertex() ) p->end_vertex()->remove_particle_in(p);
48 p->m_end_vertex =
m_this.lock();
64 if( p->production_vertex() ) p->production_vertex()->remove_particle_out(p);
66 p->m_production_vertex =
m_this.lock();
73 p->m_end_vertex.reset();
79 p->m_production_vertex.reset();
96 if(v)
return v->position();
125 return vector<string>();
const vector< GenParticlePtr > & particles_out() const
Get list of outgoing particles.
GenVertexData m_data
Vertex data.
string attribute_as_string(const string &name, int id=0) const
Get attribute of any type as string.
void remove_attribute(string name)
Remove attribute.
vector< string > attribute_names() const
Get list of names of attributes assigned to this particle.
void remove_attribute(const string &name, int id=0)
Remove attribute.
static const FourVector & ZERO_VECTOR()
Static null FourVector = (0,0,0,0)
string attribute_as_string(string name) const
Get attribute of any type as string.
GenVertex(const FourVector &position=FourVector::ZERO_VECTOR())
Default constructor.
Smart pointer for HepMC objects.
bool has_set_position() const
Check if position of this vertex is set.
void remove_particle_out(GenParticlePtr p)
Remove outgoing particle.
vector< GenParticlePtr > m_particles_in
Incoming particle list.
weak_ptr< GenVertex > m_this
Pointer to shared pointer managing this vertex.
const FourVector & position() const
Get vertex position.
GenEvent * parent_event() const
Stores serializable vertex information.
void add_particle_in(GenParticlePtr p)
Add incoming particle.
const vector< GenParticlePtr > particles(Relationship range) const
std::vector< string > attribute_names(int id=0) const
Get list of attribute names.
vector< GenParticlePtr > m_particles_out
Outgoing particle list.
void add_attribute(const string &name, const shared_ptr< Attribute > &att, int id=0)
Add event attribute to event.
void add_particle(GenParticlePtr p)
Add particle.
const vector< GenParticlePtr > & particles_in() const
Get list of incoming particles.
vector< GenParticlePtr > findParticles(const GenEvent &evt, FilterEvent filter_type, FilterList filter_list=FilterList())
Find from GenEvent.
FourVector position
Position in time-space.
GenEvent * m_event
Parent event.
void add_particle_out(GenParticlePtr p)
Add outgoing particle.
const FourVector & event_pos() const
Vertex representing the overall event position.
Definition of template class SmartPointer.
void remove_particle_in(GenParticlePtr p)
Remove incoming particle.
bool add_attribute(string name, shared_ptr< Attribute > att)
Add event attribute to this vertex.
void set_position(const FourVector &new_pos)
Set vertex position.
SmartPointer< class GenVertex > GenVertexPtr
Smart pointer to GenVertex.
Relationship
List of methods of searching starting from a particle or vertex.