|
MARLEY (Model of Argon Reaction Low Energy Yields) v2.0.0
A Monte Carlo event generator for tens-of-MeV neutrino interactions
|
Stores vertex-related information. More...
#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 |
| 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. | |
| int | particles_in_size () const |
| Number of incoming particles, HepMC2 compatiility. | |
| int | particles_out_size () const |
| Number of outgoing particles, HepMC2 compatiility. | |
| const std::vector< GenParticlePtr > & | particles_in () |
| Get list of incoming particles. | |
| const std::vector< ConstGenParticlePtr > & | particles_in () const |
| Get list of incoming particles (for const access) | |
| const std::vector< GenParticlePtr > & | particles_out () |
| Get list of outgoing particles. | |
| const std::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 std::string &name, std::shared_ptr< Attribute > att) |
| Add event attribute to this vertex. | |
| std::vector< std::string > | attribute_names () const |
| Get list of names of attributes assigned to this particle. | |
| void | remove_attribute (const std::string &name) |
| Remove attribute. | |
| template<class T> | |
| std::shared_ptr< T > | attribute (const std::string &name) const |
| Get attribute of type T. | |
| std::string | attribute_as_string (const std::string &name) const |
| Get attribute of any type as string. | |
Friends | |
| class | GenEvent |
Stores vertex-related information.
Definition at line 29 of file GenVertex.h.
| HepMC3::GenVertex::GenVertex | ( | const FourVector & | position = FourVector::ZERO_VECTOR() | ) |
Default constructor.
Definition at line 351 of file marley_hepmc3.cc.
| HepMC3::GenVertex::GenVertex | ( | const GenVertexData & | data | ) |
Constructor based on vertex data.
Definition at line 358 of file marley_hepmc3.cc.
| bool HepMC3::GenVertex::add_attribute | ( | const std::string & | name, |
| std::shared_ptr< Attribute > | att ) |
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 443 of file marley_hepmc3.cc.
References HepMC3::GenEvent::add_attribute(), and parent_event().
| void HepMC3::GenVertex::add_particle_in | ( | GenParticlePtr | p | ) |
Add incoming particle.
Definition at line 365 of file marley_hepmc3.cc.
References particles_in().
| void HepMC3::GenVertex::add_particle_out | ( | GenParticlePtr | p | ) |
Add outgoing particle.
Definition at line 381 of file marley_hepmc3.cc.
References particles_out().
| std::shared_ptr< T > HepMC3::GenVertex::attribute | ( | const std::string & | name | ) | const |
Get attribute of type T.
Definition at line 156 of file GenVertex.h.
References HepMC3::GenEvent::attribute(), id(), and parent_event().
| std::string HepMC3::GenVertex::attribute_as_string | ( | const std::string & | name | ) | const |
Get attribute of any type as string.
Definition at line 453 of file marley_hepmc3.cc.
References HepMC3::GenEvent::attribute_as_string(), and parent_event().
| std::vector< std::string > HepMC3::GenVertex::attribute_names | ( | ) | const |
Get list of names of attributes assigned to this particle.
Definition at line 457 of file marley_hepmc3.cc.
References HepMC3::GenEvent::attribute_names(), and parent_event().
|
inline |
|
inline |
Check if position of this vertex is set.
Definition at line 109 of file GenVertex.h.
Referenced by position().
|
inline |
Get the vertex unique identifier
Definition at line 67 of file GenVertex.h.
Referenced by attribute().
|
inline |
Check if this vertex belongs to an event.
Definition at line 62 of file GenVertex.h.
References parent_event().
|
inline |
Get parent event.
Definition at line 56 of file GenVertex.h.
Referenced by add_attribute(), attribute(), attribute_as_string(), attribute_names(), in_event(), position(), and remove_attribute().
|
inline |
|
inline |
Get list of incoming particles.
Definition at line 93 of file GenVertex.h.
Referenced by add_particle_in().
| const std::vector< ConstGenParticlePtr > & HepMC3::GenVertex::particles_in | ( | ) | const |
Get list of incoming particles (for const access)
Definition at line 411 of file marley_hepmc3.cc.
|
inline |
Number of incoming particles, HepMC2 compatiility.
Definition at line 87 of file GenVertex.h.
|
inline |
Get list of outgoing particles.
Definition at line 97 of file GenVertex.h.
Referenced by add_particle_out().
| const std::vector< ConstGenParticlePtr > & HepMC3::GenVertex::particles_out | ( | ) | const |
Get list of outgoing particles (for const access)
Definition at line 415 of file marley_hepmc3.cc.
|
inline |
Number of outgoing particles, HepMC2 compatiility.
Definition at line 89 of file GenVertex.h.
| const FourVector & HepMC3::GenVertex::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 419 of file marley_hepmc3.cc.
References HepMC3::GenEvent::attribute(), HepMC3::GenEvent::event_pos(), has_set_position(), parent_event(), and HepMC3::FourVector::ZERO_VECTOR().
| void HepMC3::GenVertex::remove_attribute | ( | const std::string & | name | ) |
Remove attribute.
Definition at line 449 of file marley_hepmc3.cc.
References parent_event(), and HepMC3::GenEvent::remove_attribute().
| void HepMC3::GenVertex::remove_particle_in | ( | GenParticlePtr | p | ) |
Remove incoming particle.
Definition at line 396 of file marley_hepmc3.cc.
| void HepMC3::GenVertex::remove_particle_out | ( | GenParticlePtr | p | ) |
Remove outgoing particle.
Definition at line 404 of file marley_hepmc3.cc.
| void HepMC3::GenVertex::set_position | ( | const FourVector & | new_pos | ) |
Set vertex position.
Definition at line 439 of file marley_hepmc3.cc.
|
inline |
|
inline |
|
friend |
Definition at line 31 of file GenVertex.h.