|
HepMC event record
|
Stores particle-related information.
Definition at line 30 of file build/outputs/include/HepMC/GenParticle.h.
#include <GenParticle.h>
Collaboration diagram for GenParticle:Public Member Functions | |
| GenParticle (const FourVector &momentum=FourVector::ZERO_VECTOR(), int pid=0, int status=0) | |
| Default constructor. More... | |
| GenParticle (const GenParticleData &data) | |
| Constructor based on particle data. More... | |
| bool | in_event () const |
| Check if this particle belongs to an event. More... | |
| GenEvent * | parent_event () const |
| Get parent event. More... | |
| int | id () const |
| Get particle id. More... | |
| const GenParticleData & | data () const |
| Get particle data. More... | |
| const GenVertexPtr | production_vertex () const |
| Get production vertex. More... | |
| const GenVertexPtr | end_vertex () const |
| Get end vertex. More... | |
| GenVertexPtr | production_vertex () |
| Get production vertex. More... | |
| GenVertexPtr | end_vertex () |
| Get end vertex. More... | |
| vector< GenParticlePtr > | parents () const |
| Convenience access to immediate incoming particles via production vertex. More... | |
| vector< GenParticlePtr > | children () const |
| Convenience access to immediate outgoing particles via end vertex. More... | |
| vector< GenParticlePtr > | ancestors () const |
| Convenience access to all incoming particles via production vertex. More... | |
| vector< GenParticlePtr > | descendants () const |
| Convenience access to all outgoing particles via end vertex. More... | |
| int | pid () const |
| Get PDG ID. More... | |
| int | status () const |
| Get status code. More... | |
| const FourVector & | momentum () const |
| Get momentum. More... | |
| bool | is_generated_mass_set () const |
| Check if generated mass is set. More... | |
| double | generated_mass () const |
| Get generated mass. More... | |
| void | set_pid (int pid) |
| Set PDG ID. More... | |
| void | set_status (int status) |
| Set status code. More... | |
| void | set_momentum (const FourVector &momentum) |
| Set momentum. More... | |
| void | set_generated_mass (double m) |
| Set generated mass. More... | |
| void | unset_generated_mass () |
| Declare that generated mass is not set. More... | |
| bool | add_attribute (string name, shared_ptr< Attribute > att) |
| Add an attribute to this particle. More... | |
| vector< string > | attribute_names () const |
| Get list of names of attributes assigned to this particle. More... | |
| void | remove_attribute (string name) |
| Remove attribute. More... | |
| template<class T > | |
| shared_ptr< T > | attribute (string name) const |
| Get attribute of type T. More... | |
| string | attribute_as_string (string name) const |
| Get attribute of any type as string. More... | |
| GenParticle (const FourVector &momentum=FourVector::ZERO_VECTOR(), int pid=0, int status=0) | |
| Default constructor. More... | |
| GenParticle (const GenParticleData &data) | |
| Constructor based on particle data. More... | |
| bool | in_event () const |
| Check if this particle belongs to an event. More... | |
| GenEvent * | parent_event () const |
| Get parent event. More... | |
| int | id () const |
| Get particle id. More... | |
| const GenParticleData & | data () const |
| Get particle data. More... | |
| const GenVertexPtr | production_vertex () const |
| Get production vertex. More... | |
| const GenVertexPtr | end_vertex () const |
| Get end vertex. More... | |
| GenVertexPtr | production_vertex () |
| Get production vertex. More... | |
| GenVertexPtr | end_vertex () |
| Get end vertex. More... | |
| vector< GenParticlePtr > | parents () const |
| Convenience access to immediate incoming particles via production vertex. More... | |
| vector< GenParticlePtr > | children () const |
| Convenience access to immediate outgoing particles via end vertex. More... | |
| vector< GenParticlePtr > | ancestors () const |
| Convenience access to all incoming particles via production vertex. More... | |
| vector< GenParticlePtr > | descendants () const |
| Convenience access to all outgoing particles via end vertex. More... | |
| int | pid () const |
| Get PDG ID. More... | |
| int | status () const |
| Get status code. More... | |
| const FourVector & | momentum () const |
| Get momentum. More... | |
| bool | is_generated_mass_set () const |
| Check if generated mass is set. More... | |
| double | generated_mass () const |
| Get generated mass. More... | |
| void | set_pid (int pid) |
| Set PDG ID. More... | |
| void | set_status (int status) |
| Set status code. More... | |
| void | set_momentum (const FourVector &momentum) |
| Set momentum. More... | |
| void | set_generated_mass (double m) |
| Set generated mass. More... | |
| void | unset_generated_mass () |
| Declare that generated mass is not set. More... | |
| bool | add_attribute (string name, shared_ptr< Attribute > att) |
| Add an attribute to this particle. More... | |
| vector< string > | attribute_names () const |
| Get list of names of attributes assigned to this particle. More... | |
| void | remove_attribute (string name) |
| Remove attribute. More... | |
| template<class T > | |
| shared_ptr< T > | attribute (string name) const |
| Get attribute of type T. More... | |
| string | attribute_as_string (string name) const |
| Get attribute of any type as string. More... | |
| template<class T > | |
| HepMC::shared_ptr< T > | attribute (string name) const |
| Get attribute of type T. More... | |
Deprecated functionality | |
| int | pdg_id () const |
| Get PDG ID. More... | |
| void | set_pdg_id (int pidin) |
| Set PDG ID. More... | |
| int | pdg_id () const |
| Get PDG ID. More... | |
| void | set_pdg_id (int pidin) |
| Set PDG ID. More... | |
Private Attributes | |
| GenEvent * | m_event |
| Parent event. More... | |
| int | m_id |
| Index. More... | |
| GenParticleData | m_data |
| Particle data. More... | |
| weak_ptr< GenVertex > | m_production_vertex |
| Production vertex. More... | |
| weak_ptr< GenVertex > | m_end_vertex |
| End vertex. More... | |
| weak_ptr< GenParticle > | m_this |
| Pointer to shared pointer managing this particle. More... | |
Friends | |
| class | GenEvent |
| class | GenVertex |
| class | SmartPointer< GenParticle > |
| GenParticle | ( | const FourVector & | momentum = FourVector::ZERO_VECTOR(), |
| int | pid = 0, |
||
| int | status = 0 |
||
| ) |
Default constructor.
Definition at line 21 of file GenParticle.cc.
References GenParticleData::is_mass_set, GenParticle::m_data, GenParticleData::mass, GenParticleData::momentum, GenParticleData::pid, and GenParticleData::status.
| GenParticle | ( | const GenParticleData & | data | ) |
Constructor based on particle data.
Definition at line 31 of file GenParticle.cc.
| GenParticle | ( | const FourVector & | momentum = FourVector::ZERO_VECTOR(), |
| int | pid = 0, |
||
| int | status = 0 |
||
| ) |
Default constructor.
| GenParticle | ( | const GenParticleData & | data | ) |
Constructor based on particle data.
| bool add_attribute | ( | std::string | name, |
| shared_ptr< Attribute > | att | ||
| ) |
Add an attribute to this particle.
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 96 of file GenParticle.cc.
References GenEvent::add_attribute(), and GenParticle::parent_event().
| bool add_attribute | ( | string | name, |
| shared_ptr< Attribute > | att | ||
| ) |
Add an attribute to this particle.
This will overwrite existing attribute if an attribute with the same name is present. The attribute will be stored in the parent_event().
| vector< GenParticlePtr > ancestors | ( | ) | const |
Convenience access to all incoming particles via production vertex.
Definition at line 88 of file GenParticle.cc.
References HepMC::findParticles(), and GenParticle::production_vertex().
| vector<GenParticlePtr> ancestors | ( | ) | const |
Convenience access to all incoming particles via production vertex.
| shared_ptr<T> attribute | ( | string | name | ) | const |
Get attribute of type T.
| shared_ptr<T> attribute | ( | string | name | ) | const |
Get attribute of type T.
| HepMC::shared_ptr< T > attribute | ( | string | name | ) | const |
Get attribute of type T.
Definition at line 162 of file build/outputs/include/HepMC/GenParticle.h.
| string attribute_as_string | ( | string | name | ) | const |
Get attribute of any type as string.
Definition at line 112 of file GenParticle.cc.
References GenEvent::attribute_as_string(), and GenParticle::parent_event().
| string attribute_as_string | ( | string | name | ) | const |
Get attribute of any type as string.
| vector< string > attribute_names | ( | ) | const |
Get list of names of attributes assigned to this particle.
Definition at line 102 of file GenParticle.cc.
References GenEvent::attribute_names(), and GenParticle::parent_event().
| vector<string> attribute_names | ( | ) | const |
Get list of names of attributes assigned to this particle.
| vector<GenParticlePtr> children | ( | ) | const |
Convenience access to immediate outgoing particles via end vertex.
| vector< GenParticlePtr > children | ( | ) | const |
Convenience access to immediate outgoing particles via end vertex.
Definition at line 84 of file GenParticle.cc.
References GenParticle::end_vertex().
|
inline |
Get particle data.
Definition at line 60 of file include/HepMC/GenParticle.h.
|
inline |
Get particle data.
Definition at line 60 of file build/outputs/include/HepMC/GenParticle.h.
| vector<GenParticlePtr> descendants | ( | ) | const |
Convenience access to all outgoing particles via end vertex.
| vector< GenParticlePtr > descendants | ( | ) | const |
Convenience access to all outgoing particles via end vertex.
Definition at line 92 of file GenParticle.cc.
References GenParticle::end_vertex(), and HepMC::findParticles().
| const GenVertexPtr end_vertex | ( | ) | const |
Get end vertex.
| const GenVertexPtr end_vertex | ( | ) | const |
| GenVertexPtr end_vertex | ( | ) |
Get end vertex.
| GenVertexPtr end_vertex | ( | ) |
| double generated_mass | ( | ) | const |
Get generated mass.
This function will return mass as set by a generator/tool. If not set, it will return momentum().m()
Definition at line 37 of file GenParticle.cc.
References GenParticleData::is_mass_set, FourVector::m(), GenParticle::m_data, GenParticleData::mass, and GenParticleData::momentum.
| double generated_mass | ( | ) | const |
Get generated mass.
This function will return mass as set by a generator/tool. If not set, it will return momentum().m()
|
inline |
Get particle id.
Definition at line 59 of file build/outputs/include/HepMC/GenParticle.h.
|
inline |
Get particle id.
Definition at line 59 of file include/HepMC/GenParticle.h.
|
inline |
Check if this particle belongs to an event.
Definition at line 51 of file build/outputs/include/HepMC/GenParticle.h.
|
inline |
Check if this particle belongs to an event.
Definition at line 51 of file include/HepMC/GenParticle.h.
|
inline |
Check if generated mass is set.
Definition at line 87 of file build/outputs/include/HepMC/GenParticle.h.
|
inline |
Check if generated mass is set.
Definition at line 87 of file include/HepMC/GenParticle.h.
|
inline |
Get momentum.
Definition at line 86 of file include/HepMC/GenParticle.h.
|
inline |
Get momentum.
Definition at line 86 of file build/outputs/include/HepMC/GenParticle.h.
|
inline |
Get parent event.
Definition at line 58 of file build/outputs/include/HepMC/GenParticle.h.
|
inline |
Get parent event.
Definition at line 58 of file include/HepMC/GenParticle.h.
| vector< GenParticlePtr > parents | ( | ) | const |
Convenience access to immediate incoming particles via production vertex.
Definition at line 80 of file GenParticle.cc.
References GenParticle::production_vertex().
| vector<GenParticlePtr> parents | ( | ) | const |
Convenience access to immediate incoming particles via production vertex.
|
inline |
Get PDG ID.
Definition at line 133 of file include/HepMC/GenParticle.h.
|
inline |
Get PDG ID.
Definition at line 133 of file build/outputs/include/HepMC/GenParticle.h.
|
inline |
Get PDG ID.
Definition at line 84 of file include/HepMC/GenParticle.h.
|
inline |
Get PDG ID.
Definition at line 84 of file build/outputs/include/HepMC/GenParticle.h.
| const GenVertexPtr production_vertex | ( | ) | const |
Get production vertex.
| const GenVertexPtr production_vertex | ( | ) | const |
Get production vertex.
Definition at line 68 of file GenParticle.cc.
References GenParticle::m_production_vertex.
| GenVertexPtr production_vertex | ( | ) |
Get production vertex.
| GenVertexPtr production_vertex | ( | ) |
Get production vertex.
Definition at line 64 of file GenParticle.cc.
References GenParticle::m_production_vertex.
| void remove_attribute | ( | std::string | name | ) |
Remove attribute.
Definition at line 108 of file GenParticle.cc.
References GenParticle::parent_event(), and GenEvent::remove_attribute().
| void remove_attribute | ( | string | name | ) |
Remove attribute.
| void set_generated_mass | ( | double | m | ) |
Set generated mass.
Definition at line 54 of file GenParticle.cc.
References GenParticleData::is_mass_set, GenParticle::m_data, and GenParticleData::mass.
| void set_generated_mass | ( | double | m | ) |
Set generated mass.
| void set_momentum | ( | const FourVector & | momentum | ) |
Set momentum.
Definition at line 50 of file GenParticle.cc.
References GenParticle::m_data, and GenParticleData::momentum.
| void set_momentum | ( | const FourVector & | momentum | ) |
Set momentum.
|
inline |
Set PDG ID.
Definition at line 138 of file build/outputs/include/HepMC/GenParticle.h.
|
inline |
Set PDG ID.
Definition at line 138 of file include/HepMC/GenParticle.h.
| void set_pid | ( | int | pid | ) |
Set PDG ID.
| void set_pid | ( | int | pid | ) |
Set PDG ID.
Definition at line 42 of file GenParticle.cc.
References GenParticle::m_data, and GenParticleData::pid.
| void set_status | ( | int | status | ) |
Set status code.
| void set_status | ( | int | status | ) |
Set status code.
Definition at line 46 of file GenParticle.cc.
References GenParticle::m_data, and GenParticleData::status.
|
inline |
Get status code.
Definition at line 85 of file build/outputs/include/HepMC/GenParticle.h.
|
inline |
Get status code.
Definition at line 85 of file include/HepMC/GenParticle.h.
| void unset_generated_mass | ( | ) |
Declare that generated mass is not set.
Definition at line 59 of file GenParticle.cc.
References GenParticleData::is_mass_set, GenParticle::m_data, and GenParticleData::mass.
| void unset_generated_mass | ( | ) |
Declare that generated mass is not set.
|
private |
Particle data.
Definition at line 149 of file build/outputs/include/HepMC/GenParticle.h.
|
private |
End vertex.
Definition at line 152 of file build/outputs/include/HepMC/GenParticle.h.
|
private |
Parent event.
Definition at line 147 of file build/outputs/include/HepMC/GenParticle.h.
|
private |
Index.
Definition at line 148 of file build/outputs/include/HepMC/GenParticle.h.
|
private |
Production vertex.
Definition at line 151 of file build/outputs/include/HepMC/GenParticle.h.
|
private |
Pointer to shared pointer managing this particle.
Definition at line 153 of file build/outputs/include/HepMC/GenParticle.h.
1.8.14