|
HepMC3 event record library
|
Stores vertex-related information.
Definition at line 27 of file GenVertex.h.
#include <GenVertex.h>
Public Member Functions | |
Constructors | |
| GenVertex (const FourVector &position=FourVector::ZERO_VECTOR()) | |
| Default constructor. | |
| GenVertex (const GenVertexData &data) | |
| Constructor based on vertex data. | |
Accessors | |
| GenEvent * | parent_event () |
| Get parent event. | |
| const GenEvent * | parent_event () const |
| Get parent event. | |
| bool | in_event () const |
| Check if this vertex belongs to an event. | |
| int | id () const |
| void | set_id (int id) |
| set the vertex identifier | |
| int | status () const |
| Get vertex status code. | |
| void | set_status (int stat) |
| Set vertex status code. | |
| const GenVertexData & | data () const |
| Get vertex data. | |
| void | add_particle_in (GenParticlePtr p) |
| Add incoming particle. | |
| void | add_particle_out (GenParticlePtr p) |
| Add outgoing particle. | |
| void | remove_particle_in (GenParticlePtr p) |
| Remove incoming particle. | |
| void | remove_particle_out (GenParticlePtr p) |
| Remove outgoing particle. | |
| const vector< GenParticlePtr > & | particles_in () |
| Get list of incoming particles. | |
| const vector< ConstGenParticlePtr > & | particles_in () const |
| Get list of incoming particles (for const access). | |
| const vector< GenParticlePtr > & | particles_out () |
| Get list of outgoing particles. | |
| const vector< ConstGenParticlePtr > & | particles_out () const |
| Get list of outgoing particles (for const access). | |
| const FourVector & | position () const |
| Get vertex position. | |
| bool | has_set_position () const |
| Check if position of this vertex is set. | |
| void | set_position (const FourVector &new_pos) |
| Set vertex position. | |
| bool | add_attribute (const string &name, shared_ptr< Attribute > att) |
| Add event attribute to this vertex. | |
| vector< string > | attribute_names () const |
| Get list of names of attributes assigned to this particle. | |
| void | remove_attribute (const string &name) |
| Remove attribute. | |
| template<class T> | |
| shared_ptr< T > | attribute (const string &name) const |
| Get attribute of type T. | |
| string | attribute_as_string (const string &name) const |
| Get attribute of any type as string. | |
Deprecated functionality | |
| void | add_particle_in (GenParticle *p) |
| void | add_particle_out (GenParticle *p) |
Private Attributes | |
Fields | |
| GenEvent * | m_event |
| Parent event. | |
| int | m_id |
| Vertex id. | |
| GenVertexData | m_data |
| Vertex data. | |
| vector< GenParticlePtr > | m_particles_in |
| Incoming particle list. | |
| vector< GenParticlePtr > | m_particles_out |
| Outgoing particle list. | |
Friends | |
| class | GenEvent |
| GenVertex | ( | const FourVector & | position = FourVector::ZERO_VECTOR() | ) |
Default constructor.
Definition at line 21 of file GenVertex.cc.
| GenVertex | ( | const GenVertexData & | data | ) |
Constructor based on vertex data.
Definition at line 28 of file GenVertex.cc.
Add event attribute to this vertex.
This will overwrite existing attribute if an attribute with the same name is present. The attribute will be stored in the parent_event().
Definition at line 121 of file GenVertex.cc.
References GenEvent::add_attribute(), and parent_event().
|
inline |
Add incoming particle by raw pointer
Definition at line 131 of file GenVertex.h.
References add_particle_in().
| void add_particle_in | ( | GenParticlePtr | p | ) |
Add incoming particle.
Definition at line 35 of file GenVertex.cc.
References m_event, m_particles_in, and particles_in().
|
inline |
Add outgoing particle by raw pointer
Definition at line 135 of file GenVertex.h.
References add_particle_out().
| void add_particle_out | ( | GenParticlePtr | p | ) |
Add outgoing particle.
Definition at line 51 of file GenVertex.cc.
References m_event, m_particles_out, and particles_out().
| shared_ptr< T > attribute | ( | const string & | name | ) | const |
Get attribute of type T.
Definition at line 162 of file GenVertex.h.
References GenEvent::attribute(), id(), and parent_event().
Get attribute of any type as string.
Definition at line 131 of file GenVertex.cc.
References GenEvent::attribute_as_string(), and parent_event().
| vector< string > attribute_names | ( | ) | const |
Get list of names of attributes assigned to this particle.
Definition at line 135 of file GenVertex.cc.
References GenEvent::attribute_names(), and parent_event().
|
inline |
|
inline |
Check if position of this vertex is set.
Definition at line 100 of file GenVertex.h.
References m_data.
|
inline |
|
inline |
Check if this vertex belongs to an event.
Definition at line 56 of file GenVertex.h.
References parent_event().
|
inline |
|
inline |
|
inline |
Get list of incoming particles.
Definition at line 84 of file GenVertex.h.
References m_particles_in.
| const vector< ConstGenParticlePtr > & particles_in | ( | ) | const |
Get list of incoming particles (for const access).
Definition at line 87 of file GenVertex.cc.
References m_particles_in.
|
inline |
Get list of outgoing particles.
Definition at line 88 of file GenVertex.h.
References m_particles_out.
| const vector< ConstGenParticlePtr > & particles_out | ( | ) | const |
Get list of outgoing particles (for const access).
Definition at line 91 of file GenVertex.cc.
References m_particles_out.
| const FourVector & position | ( | ) | const |
Get vertex position.
Returns the position of this vertex. If a position is not set on this vertex, the production vertices of ancestors are searched to find the inherited position. FourVector(0,0,0,0) is returned if no position information is found.
Definition at line 95 of file GenVertex.cc.
References GenEvent::attribute(), GenEvent::event_pos(), has_set_position(), m_data, m_particles_in, parent_event(), and FourVector::ZERO_VECTOR().
| void remove_attribute | ( | const string & | name | ) |
Remove attribute.
Definition at line 127 of file GenVertex.cc.
References parent_event(), and GenEvent::remove_attribute().
| void remove_particle_in | ( | GenParticlePtr | p | ) |
| void remove_particle_out | ( | GenParticlePtr | p | ) |
| void set_id | ( | int | id | ) |
| void set_position | ( | const FourVector & | new_pos | ) |
|
inline |
|
inline |
|
friend |
Definition at line 29 of file GenVertex.h.
|
private |
Vertex data.
Definition at line 147 of file GenVertex.h.
|
private |
Parent event.
Definition at line 145 of file GenVertex.h.
|
private |
Vertex id.
Definition at line 146 of file GenVertex.h.
|
private |
Incoming particle list.
Definition at line 149 of file GenVertex.h.
|
private |
Outgoing particle list.
Definition at line 151 of file GenVertex.h.