HepMC event record
|
Stores event-related information.
Manages event-related information. Contains lists of GenParticle and GenVertex objects
Definition at line 37 of file build/outputs/include/HepMC/GenEvent.h.
#include <GenEvent.h>
Public Member Functions | |
GenEvent (Units::MomentumUnit momentum_unit=Units::GEV, Units::LengthUnit length_unit=Units::MM) | |
Event constructor without a run. More... | |
GenEvent (shared_ptr< GenRunInfo > run, Units::MomentumUnit momentum_unit=Units::GEV, Units::LengthUnit length_unit=Units::MM) | |
Constructor with associated run. More... | |
GenEvent (Units::MomentumUnit momentum_unit=Units::GEV, Units::LengthUnit length_unit=Units::MM) | |
Event constructor without a run. More... | |
GenEvent (shared_ptr< GenRunInfo > run, Units::MomentumUnit momentum_unit=Units::GEV, Units::LengthUnit length_unit=Units::MM) | |
Constructor with associated run. More... | |
Particle and vertex access | |
const std::vector< GenParticlePtr > & | particles () const |
Get list of particles (const) More... | |
const std::vector< GenVertexPtr > & | vertices () const |
Get list of vertices (const) More... | |
std::vector< GenParticlePtr > & | particles () |
Get/set list of particles (non-const) More... | |
std::vector< GenVertexPtr > & | vertices () |
Get/set list of vertices (non-const) More... | |
const std::vector< GenParticlePtr > & | particles () const |
Get list of particles (const) More... | |
const std::vector< GenVertexPtr > & | vertices () const |
Get list of vertices (const) More... | |
std::vector< GenParticlePtr > & | particles () |
Get/set list of particles (non-const) More... | |
std::vector< GenVertexPtr > & | vertices () |
Get/set list of vertices (non-const) More... | |
Event weights | |
const std::vector< double > & | weights () const |
Get event weight values as a vector. More... | |
std::vector< double > & | weights () |
Get event weights as a vector (non-const) More... | |
double | weight (size_t index=0) const |
double | weight (const std::string &name) const |
const std::vector< std::string > & | weight_names (const std::string &) const |
const std::vector< double > & | weights () const |
Get event weight values as a vector. More... | |
std::vector< double > & | weights () |
Get event weights as a vector (non-const) More... | |
double | weight (size_t index=0) const |
double | weight (const std::string &name) const |
const std::vector< std::string > & | weight_names (const std::string &) const |
Auxiliary info and event metadata | |
shared_ptr< GenRunInfo > | run_info () const |
Get a pointer to the the GenRunInfo object. More... | |
void | set_run_info (shared_ptr< GenRunInfo > run) |
Set the GenRunInfo object by smart pointer. More... | |
int | event_number () const |
Get event number. More... | |
void | set_event_number (int num) |
Set event number. More... | |
const Units::MomentumUnit & | momentum_unit () const |
Get momentum unit. More... | |
const Units::LengthUnit & | length_unit () const |
Get length unit. More... | |
void | set_units (Units::MomentumUnit new_momentum_unit, Units::LengthUnit new_length_unit) |
Change event units Converts event from current units to new ones. More... | |
void | use_units (Units::MomentumUnit new_momentum_unit, Units::LengthUnit new_length_unit) |
Converts event from current units to new ones (compatibility name) More... | |
const GenHeavyIonPtr | heavy_ion () const |
Get heavy ion generator additional information. More... | |
void | set_heavy_ion (const GenHeavyIonPtr &hi) |
Set heavy ion generator additional information. More... | |
const GenPdfInfoPtr | pdf_info () const |
Get PDF information. More... | |
void | set_pdf_info (const GenPdfInfoPtr &pi) |
Set PDF information. More... | |
const GenCrossSectionPtr | cross_section () const |
Get cross-section information. More... | |
void | set_cross_section (const GenCrossSectionPtr &cs) |
Set cross-section information. More... | |
shared_ptr< GenRunInfo > | run_info () const |
Get a pointer to the the GenRunInfo object. More... | |
void | set_run_info (shared_ptr< GenRunInfo > run) |
Set the GenRunInfo object by smart pointer. More... | |
int | event_number () const |
Get event number. More... | |
void | set_event_number (int num) |
Set event number. More... | |
const Units::MomentumUnit & | momentum_unit () const |
Get momentum unit. More... | |
const Units::LengthUnit & | length_unit () const |
Get length unit. More... | |
void | set_units (Units::MomentumUnit new_momentum_unit, Units::LengthUnit new_length_unit) |
Change event units Converts event from current units to new ones. More... | |
void | use_units (Units::MomentumUnit new_momentum_unit, Units::LengthUnit new_length_unit) |
Converts event from current units to new ones (compatibility name) More... | |
const GenHeavyIonPtr | heavy_ion () const |
Get heavy ion generator additional information. More... | |
void | set_heavy_ion (const GenHeavyIonPtr &hi) |
Set heavy ion generator additional information. More... | |
const GenPdfInfoPtr | pdf_info () const |
Get PDF information. More... | |
void | set_pdf_info (const GenPdfInfoPtr &pi) |
Set PDF information. More... | |
const GenCrossSectionPtr | cross_section () const |
Get cross-section information. More... | |
void | set_cross_section (const GenCrossSectionPtr &cs) |
Set cross-section information. More... | |
Event position | |
const FourVector & | event_pos () const |
Vertex representing the overall event position. More... | |
const std::vector< GenParticlePtr > & | beams () const |
Vector of beam particles. More... | |
void | shift_position_by (const FourVector &delta) |
Shift position of all vertices in the event by delta. More... | |
void | shift_position_to (const FourVector &newpos) |
Shift position of all vertices in the event to op. More... | |
const FourVector & | event_pos () const |
Vertex representing the overall event position. More... | |
const std::vector< GenParticlePtr > & | beams () const |
Vector of beam particles. More... | |
void | shift_position_by (const FourVector &delta) |
Shift position of all vertices in the event by delta. More... | |
void | shift_position_to (const FourVector &newpos) |
Shift position of all vertices in the event to op. More... | |
Additional attributes | |
void | add_attribute (const string &name, const shared_ptr< Attribute > &att, int id=0) |
Add event attribute to event. More... | |
void | remove_attribute (const string &name, int id=0) |
Remove attribute. More... | |
template<class T > | |
shared_ptr< T > | attribute (const string &name, int id=0) const |
Get attribute of type T. More... | |
string | attribute_as_string (const string &name, int id=0) const |
Get attribute of any type as string. More... | |
std::vector< string > | attribute_names (int id=0) const |
Get list of attribute names. More... | |
const std::map< string, std::map< int, shared_ptr< Attribute > > > & | attributes () const |
Get list of attributes. More... | |
void | add_attribute (const string &name, const shared_ptr< Attribute > &att, int id=0) |
Add event attribute to event. More... | |
void | remove_attribute (const string &name, int id=0) |
Remove attribute. More... | |
template<class T > | |
shared_ptr< T > | attribute (const string &name, int id=0) const |
Get attribute of type T. More... | |
string | attribute_as_string (const string &name, int id=0) const |
Get attribute of any type as string. More... | |
std::vector< string > | attribute_names (int id=0) const |
Get list of attribute names. More... | |
const std::map< string, std::map< int, shared_ptr< Attribute > > > & | attributes () const |
Get list of attributes. More... | |
Particle and vertex modification | |
void | add_particle (GenParticlePtr p) |
Add particle. More... | |
void | add_vertex (GenVertexPtr v) |
Add vertex. More... | |
void | remove_particle (GenParticlePtr v) |
Remove particle from the event. More... | |
void | remove_particles (std::vector< GenParticlePtr > v) |
Remove a set of particles. More... | |
void | remove_vertex (GenVertexPtr v) |
Remove vertex from the event. More... | |
void | add_tree (const std::vector< GenParticlePtr > &particles) |
Add whole tree in topological order. More... | |
void | reserve (unsigned int particles, unsigned int vertices=0) |
Reserve memory for particles and vertices. More... | |
void | clear () |
Remove contents of this event. More... | |
void | add_particle (GenParticlePtr p) |
Add particle. More... | |
void | add_vertex (GenVertexPtr v) |
Add vertex. More... | |
void | remove_particle (GenParticlePtr v) |
Remove particle from the event. More... | |
void | remove_particles (std::vector< GenParticlePtr > v) |
Remove a set of particles. More... | |
void | remove_vertex (GenVertexPtr v) |
Remove vertex from the event. More... | |
void | add_tree (const std::vector< GenParticlePtr > &particles) |
Add whole tree in topological order. More... | |
void | reserve (unsigned int particles, unsigned int vertices=0) |
Reserve memory for particles and vertices. More... | |
void | clear () |
Remove contents of this event. More... | |
Methods to fill GenEventData and to read it back | |
void | write_data (GenEventData &data) const |
Fill GenEventData object. More... | |
void | read_data (const GenEventData &data) |
Fill GenEvent based on GenEventData. More... | |
void | write_data (GenEventData &data) const |
Fill GenEventData object. More... | |
void | read_data (const GenEventData &data) |
Fill GenEvent based on GenEventData. More... | |
Deprecated functionality | |
typedef std::vector< double > | GenWeights |
typedef std::vector< double > | WeightContainer |
typedef std::vector< GenParticlePtr >::iterator | particle_iterator |
typedef std::vector< GenParticlePtr >::const_iterator | particle_const_iterator |
typedef std::vector< GenVertexPtr >::iterator | vertex_iterator |
typedef std::vector< GenVertexPtr >::const_iterator | vertex_const_iterator |
typedef std::vector< double > | GenWeights |
typedef std::vector< double > | WeightContainer |
typedef std::vector< GenParticlePtr >::iterator | particle_iterator |
typedef std::vector< GenParticlePtr >::const_iterator | particle_const_iterator |
typedef std::vector< GenVertexPtr >::iterator | vertex_iterator |
typedef std::vector< GenVertexPtr >::const_iterator | vertex_const_iterator |
void | add_particle (GenParticle *p) |
Add particle by raw pointer. More... | |
void | add_vertex (GenVertex *v) |
Add vertex by raw pointer. More... | |
void | set_heavy_ion (GenHeavyIon *hi) |
Set heavy ion generator additional information by raw pointer. More... | |
void | set_pdf_info (GenPdfInfo *pi) |
Set PDF information by raw pointer. More... | |
void | set_cross_section (GenCrossSection *cs) |
Set cross-section information by raw pointer. More... | |
particle_iterator | particles_begin () |
particle_iterator | particles_end () |
particle_const_iterator | particles_begin () const |
particle_const_iterator | particles_end () const |
vertex_iterator | vertices_begin () |
vertex_iterator | vertices_end () |
vertex_const_iterator | vertices_begin () const |
vertex_const_iterator | vertices_end () const |
HEPMC_DEPRECATED ("Use particles().size() instead") int particles_size() const | |
HEPMC_DEPRECATED ("Use particles().empty() instead") bool particles_empty() const | |
HEPMC_DEPRECATED ("Use vertices().size() instead") int vertices_size() const | |
HEPMC_DEPRECATED ("Use vertices().empty() instead") bool vertices_empty() const | |
bool | valid_beam_particles () const |
Test to see if we have exactly two particles in event_pos() vertex. More... | |
std::pair< GenParticlePtr, GenParticlePtr > | beam_particles () const |
Get first two particles of the event_pos() vertex. More... | |
void | set_beam_particles (const GenParticlePtr &p1, const GenParticlePtr &p2) |
Set incoming beam particles. More... | |
void | set_beam_particles (const std::pair< GenParticlePtr, GenParticlePtr > &p) |
Set incoming beam particles. More... | |
void | add_particle (GenParticle *p) |
Add particle by raw pointer. More... | |
void | add_vertex (GenVertex *v) |
Add vertex by raw pointer. More... | |
void | set_heavy_ion (GenHeavyIon *hi) |
Set heavy ion generator additional information by raw pointer. More... | |
void | set_pdf_info (GenPdfInfo *pi) |
Set PDF information by raw pointer. More... | |
void | set_cross_section (GenCrossSection *cs) |
Set cross-section information by raw pointer. More... | |
particle_iterator | particles_begin () |
particle_iterator | particles_end () |
particle_const_iterator | particles_begin () const |
particle_const_iterator | particles_end () const |
vertex_iterator | vertices_begin () |
vertex_iterator | vertices_end () |
vertex_const_iterator | vertices_begin () const |
vertex_const_iterator | vertices_end () const |
HEPMC_DEPRECATED ("Use particles().size() instead") int particles_size() const | |
HEPMC_DEPRECATED ("Use particles().empty() instead") bool particles_empty() const | |
HEPMC_DEPRECATED ("Use vertices().size() instead") int vertices_size() const | |
HEPMC_DEPRECATED ("Use vertices().empty() instead") bool vertices_empty() const | |
bool | valid_beam_particles () const |
Test to see if we have exactly two particles in event_pos() vertex. More... | |
std::pair< GenParticlePtr, GenParticlePtr > | beam_particles () const |
Get first two particles of the event_pos() vertex. More... | |
void | set_beam_particles (const GenParticlePtr &p1, const GenParticlePtr &p2) |
Set incoming beam particles. More... | |
void | set_beam_particles (const std::pair< GenParticlePtr, GenParticlePtr > &p) |
Set incoming beam particles. More... | |
Fields | |
typedef std::map< string, std::map< int, shared_ptr< Attribute > > >::value_type | att_key_t |
Attribute map key type. More... | |
typedef std::map< int, shared_ptr< Attribute > >::value_type | att_val_t |
Attribute map value type. More... | |
typedef std::map< string, std::map< int, shared_ptr< Attribute > > >::value_type | att_key_t |
Attribute map key type. More... | |
typedef std::map< int, shared_ptr< Attribute > >::value_type | att_val_t |
Attribute map value type. More... | |
std::vector< GenParticlePtr > | m_particles |
List of particles. More... | |
std::vector< GenVertexPtr > | m_vertices |
List of vertices. More... | |
int | m_event_number |
std::vector< double > | m_weights |
Event weights. More... | |
Units::MomentumUnit | m_momentum_unit |
Momentum unit. More... | |
Units::LengthUnit | m_length_unit |
Length unit. More... | |
GenVertexPtr | m_rootvertex |
The root vertex is stored outside the normal vertices list to block user access to it. More... | |
shared_ptr< GenRunInfo > | m_run_info |
Global run information. More... | |
std::map< string, std::map< int, shared_ptr< Attribute > > > | m_attributes |
Map of event, particle and vertex attributes. More... | |
Attribute map key type.
Definition at line 422 of file build/outputs/include/HepMC/GenEvent.h.
Attribute map key type.
Definition at line 422 of file include/HepMC/GenEvent.h.
Attribute map value type.
Definition at line 425 of file build/outputs/include/HepMC/GenEvent.h.
Attribute map value type.
Definition at line 425 of file include/HepMC/GenEvent.h.
typedef std::vector<double> GenWeights |
Definition at line 280 of file include/HepMC/GenEvent.h.
typedef std::vector<double> GenWeights |
Definition at line 280 of file build/outputs/include/HepMC/GenEvent.h.
typedef std::vector<GenParticlePtr>::const_iterator particle_const_iterator |
Definition at line 287 of file build/outputs/include/HepMC/GenEvent.h.
typedef std::vector<GenParticlePtr>::const_iterator particle_const_iterator |
Definition at line 287 of file include/HepMC/GenEvent.h.
typedef std::vector<GenParticlePtr>::iterator particle_iterator |
Definition at line 285 of file include/HepMC/GenEvent.h.
typedef std::vector<GenParticlePtr>::iterator particle_iterator |
Definition at line 285 of file build/outputs/include/HepMC/GenEvent.h.
typedef std::vector<GenVertexPtr>::const_iterator vertex_const_iterator |
Definition at line 292 of file include/HepMC/GenEvent.h.
typedef std::vector<GenVertexPtr>::const_iterator vertex_const_iterator |
Definition at line 292 of file build/outputs/include/HepMC/GenEvent.h.
typedef std::vector<GenVertexPtr>::iterator vertex_iterator |
Definition at line 290 of file build/outputs/include/HepMC/GenEvent.h.
typedef std::vector<GenVertexPtr>::iterator vertex_iterator |
Definition at line 290 of file include/HepMC/GenEvent.h.
typedef std::vector<double> WeightContainer |
Definition at line 282 of file build/outputs/include/HepMC/GenEvent.h.
typedef std::vector<double> WeightContainer |
Definition at line 282 of file include/HepMC/GenEvent.h.
GenEvent | ( | Units::MomentumUnit | momentum_unit = Units::GEV , |
Units::LengthUnit | length_unit = Units::MM |
||
) |
Event constructor without a run.
Definition at line 25 of file GenEvent.cc.
GenEvent | ( | shared_ptr< GenRunInfo > | run, |
Units::MomentumUnit | momentum_unit = Units::GEV , |
||
Units::LengthUnit | length_unit = Units::MM |
||
) |
Constructor with associated run.
Definition at line 32 of file GenEvent.cc.
GenEvent | ( | Units::MomentumUnit | momentum_unit = Units::GEV , |
Units::LengthUnit | length_unit = Units::MM |
||
) |
Event constructor without a run.
GenEvent | ( | shared_ptr< GenRunInfo > | run, |
Units::MomentumUnit | momentum_unit = Units::GEV , |
||
Units::LengthUnit | length_unit = Units::MM |
||
) |
Constructor with associated run.
|
inline |
Add event attribute to event.
This will overwrite existing attribute if an attribute with the same name is present
Definition at line 176 of file build/outputs/include/HepMC/GenEvent.h.
References GenEvent::m_attributes.
|
inline |
Add event attribute to event.
This will overwrite existing attribute if an attribute with the same name is present
Definition at line 176 of file include/HepMC/GenEvent.h.
References GenEvent::m_attributes.
void add_particle | ( | GenParticlePtr | p | ) |
Add particle.
Definition at line 42 of file GenEvent.cc.
References GenEvent::m_particles, GenEvent::m_rootvertex, and GenEvent::particles().
void add_particle | ( | GenParticlePtr | p | ) |
Add particle.
void add_particle | ( | GenParticle * | p | ) |
Add particle by raw pointer.
Definition at line 388 of file GenEvent.cc.
void add_particle | ( | GenParticle * | p | ) |
Add particle by raw pointer.
void add_tree | ( | const std::vector< GenParticlePtr > & | particles | ) |
Add whole tree in topological order.
This function will find the beam particles (particles that have no production vertices or their production vertices have no particles) and will add the whole decay tree starting from these particles.
Definition at line 262 of file GenEvent.cc.
void add_tree | ( | const std::vector< GenParticlePtr > & | particles | ) |
Add whole tree in topological order.
This function will find the beam particles (particles that have no production vertices or their production vertices have no particles) and will add the whole decay tree starting from these particles.
void add_vertex | ( | GenVertexPtr | v | ) |
Add vertex.
Definition at line 57 of file GenEvent.cc.
References GenEvent::add_particle(), GenEvent::m_vertices, and GenEvent::vertices().
void add_vertex | ( | GenVertexPtr | v | ) |
Add vertex.
void add_vertex | ( | GenVertex * | v | ) |
Add vertex by raw pointer.
Definition at line 393 of file GenEvent.cc.
void add_vertex | ( | GenVertex * | v | ) |
Add vertex by raw pointer.
shared_ptr<T> attribute | ( | const string & | name, |
int | id = 0 |
||
) | const |
Get attribute of type T.
shared_ptr< T > attribute | ( | const string & | name, |
int | id = 0 |
||
) | const |
Get attribute of type T.
Definition at line 441 of file build/outputs/include/HepMC/GenEvent.h.
References GenEvent::m_attributes, and GenEvent::run_info().
string attribute_as_string | ( | const string & | name, |
int | id = 0 |
||
) | const |
Get attribute of any type as string.
string attribute_as_string | ( | const string & | name, |
int | id = 0 |
||
) | const |
Get attribute of any type as string.
Definition at line 555 of file GenEvent.cc.
vector< string > attribute_names | ( | int | id = 0 | ) | const |
Get list of attribute names.
Definition at line 408 of file GenEvent.cc.
std::vector<string> attribute_names | ( | int | id = 0 | ) | const |
Get list of attribute names.
|
inline |
Get list of attributes.
Definition at line 194 of file build/outputs/include/HepMC/GenEvent.h.
References GenEvent::m_attributes.
|
inline |
Get list of attributes.
Definition at line 194 of file include/HepMC/GenEvent.h.
References GenEvent::m_attributes.
pair< GenParticlePtr, GenParticlePtr > beam_particles | ( | ) | const |
Get first two particles of the event_pos() vertex.
Definition at line 532 of file GenEvent.cc.
std::pair<GenParticlePtr,GenParticlePtr> beam_particles | ( | ) | const |
Get first two particles of the event_pos() vertex.
const std::vector<GenParticlePtr>& beams | ( | ) | const |
Vector of beam particles.
const vector< GenParticlePtr > & beams | ( | ) | const |
void clear | ( | ) |
Remove contents of this event.
Definition at line 374 of file GenEvent.cc.
void clear | ( | ) |
Remove contents of this event.
|
inline |
Get cross-section information.
Definition at line 142 of file include/HepMC/GenEvent.h.
|
inline |
Get cross-section information.
Definition at line 142 of file build/outputs/include/HepMC/GenEvent.h.
|
inline |
Get event number.
Definition at line 112 of file build/outputs/include/HepMC/GenEvent.h.
References GenEvent::m_event_number.
|
inline |
Get event number.
Definition at line 112 of file include/HepMC/GenEvent.h.
References GenEvent::m_event_number.
const FourVector& event_pos | ( | ) | const |
Vertex representing the overall event position.
const FourVector & event_pos | ( | ) | const |
Vertex representing the overall event position.
Definition at line 355 of file GenEvent.cc.
|
inline |
Get heavy ion generator additional information.
Definition at line 132 of file include/HepMC/GenEvent.h.
|
inline |
Get heavy ion generator additional information.
Definition at line 132 of file build/outputs/include/HepMC/GenEvent.h.
|
inline |
Definition at line 327 of file build/outputs/include/HepMC/GenEvent.h.
References GenEvent::m_particles.
|
inline |
Definition at line 327 of file include/HepMC/GenEvent.h.
References GenEvent::m_particles.
|
inline |
Definition at line 331 of file build/outputs/include/HepMC/GenEvent.h.
References GenEvent::m_particles.
|
inline |
Definition at line 331 of file include/HepMC/GenEvent.h.
References GenEvent::m_particles.
|
inline |
Definition at line 335 of file include/HepMC/GenEvent.h.
References GenEvent::m_vertices.
|
inline |
Definition at line 335 of file build/outputs/include/HepMC/GenEvent.h.
References GenEvent::m_vertices.
|
inline |
Definition at line 339 of file build/outputs/include/HepMC/GenEvent.h.
References GenEvent::m_vertices.
|
inline |
Definition at line 339 of file include/HepMC/GenEvent.h.
References GenEvent::m_vertices.
|
inline |
Get length unit.
Definition at line 119 of file include/HepMC/GenEvent.h.
References GenEvent::m_length_unit.
|
inline |
Get length unit.
Definition at line 119 of file build/outputs/include/HepMC/GenEvent.h.
References GenEvent::m_length_unit.
|
inline |
Get momentum unit.
Definition at line 117 of file include/HepMC/GenEvent.h.
References GenEvent::m_momentum_unit.
|
inline |
Get momentum unit.
Definition at line 117 of file build/outputs/include/HepMC/GenEvent.h.
References GenEvent::m_momentum_unit.
|
inline |
Get list of particles (const)
Definition at line 57 of file include/HepMC/GenEvent.h.
References GenEvent::m_particles.
|
inline |
Get list of particles (const)
Definition at line 57 of file build/outputs/include/HepMC/GenEvent.h.
References GenEvent::m_particles.
|
inline |
Get/set list of particles (non-const)
Definition at line 63 of file include/HepMC/GenEvent.h.
References GenEvent::m_particles.
|
inline |
Get/set list of particles (non-const)
Definition at line 63 of file build/outputs/include/HepMC/GenEvent.h.
References GenEvent::m_particles.
|
inline |
Definition at line 296 of file build/outputs/include/HepMC/GenEvent.h.
References GenEvent::m_particles.
|
inline |
Definition at line 296 of file include/HepMC/GenEvent.h.
References GenEvent::m_particles.
|
inline |
Definition at line 304 of file build/outputs/include/HepMC/GenEvent.h.
References GenEvent::m_particles.
|
inline |
Definition at line 304 of file include/HepMC/GenEvent.h.
References GenEvent::m_particles.
|
inline |
Definition at line 300 of file include/HepMC/GenEvent.h.
References GenEvent::m_particles.
|
inline |
Definition at line 300 of file build/outputs/include/HepMC/GenEvent.h.
References GenEvent::m_particles.
|
inline |
Definition at line 308 of file include/HepMC/GenEvent.h.
References GenEvent::m_particles.
|
inline |
Definition at line 308 of file build/outputs/include/HepMC/GenEvent.h.
References GenEvent::m_particles.
|
inline |
Get PDF information.
Definition at line 137 of file include/HepMC/GenEvent.h.
|
inline |
Get PDF information.
Definition at line 137 of file build/outputs/include/HepMC/GenEvent.h.
void read_data | ( | const GenEventData & | data | ) |
Fill GenEvent based on GenEventData.
Definition at line 478 of file GenEvent.cc.
References GenEventData::attribute_id, GenEventData::attribute_name, GenEventData::attribute_string, GenEventData::event_number, GenEventData::event_pos, GenEventData::length_unit, GenEventData::links1, GenEventData::links2, GenEventData::momentum_unit, GenEventData::particles, GenEventData::vertices, and GenEventData::weights.
void read_data | ( | const GenEventData & | data | ) |
Fill GenEvent based on GenEventData.
void remove_attribute | ( | const string & | name, |
int | id = 0 |
||
) |
Remove attribute.
void remove_attribute | ( | const string & | name, |
int | id = 0 |
||
) |
void remove_particle | ( | GenParticlePtr | v | ) |
Remove particle from the event.
This function will remove whole sub-tree starting from this particle if it is the only incoming particle of this vertex. It will also production vertex of this particle if this vertex has no more outgoing particles
Definition at line 78 of file GenEvent.cc.
References GenEvent::m_attributes, GenEvent::m_particles, and GenEvent::remove_vertex().
void remove_particle | ( | GenParticlePtr | v | ) |
Remove particle from the event.
This function will remove whole sub-tree starting from this particle if it is the only incoming particle of this vertex. It will also production vertex of this particle if this vertex has no more outgoing particles
void remove_particles | ( | std::vector< GenParticlePtr > | v | ) |
Remove a set of particles.
This function follows rules of GenEvent::remove_particle to remove a list of particles from the event.
Definition at line 163 of file GenEvent.cc.
References GenEvent::remove_particle().
void remove_particles | ( | std::vector< GenParticlePtr > | v | ) |
Remove a set of particles.
This function follows rules of GenEvent::remove_particle to remove a list of particles from the event.
void remove_vertex | ( | GenVertexPtr | v | ) |
Remove vertex from the event.
This will remove all sub-trees of all outgoing particles of this vertex
Definition at line 174 of file GenEvent.cc.
References GenEvent::m_attributes, GenEvent::m_vertices, and GenEvent::remove_particle().
void remove_vertex | ( | GenVertexPtr | v | ) |
Remove vertex from the event.
This will remove all sub-trees of all outgoing particles of this vertex
void reserve | ( | unsigned int | particles, |
unsigned int | vertices = 0 |
||
) |
Reserve memory for particles and vertices.
Helps optimize event creation when size of the event is known beforehand
Definition at line 329 of file GenEvent.cc.
void reserve | ( | unsigned int | particles, |
unsigned int | vertices = 0 |
||
) |
Reserve memory for particles and vertices.
Helps optimize event creation when size of the event is known beforehand
|
inline |
Get a pointer to the the GenRunInfo object.
Definition at line 103 of file build/outputs/include/HepMC/GenEvent.h.
References GenEvent::m_run_info.
|
inline |
Get a pointer to the the GenRunInfo object.
Definition at line 103 of file include/HepMC/GenEvent.h.
References GenEvent::m_run_info.
void set_beam_particles | ( | const GenParticlePtr & | p1, |
const GenParticlePtr & | p2 | ||
) |
Set incoming beam particles.
void set_beam_particles | ( | const GenParticlePtr & | p1, |
const GenParticlePtr & | p2 | ||
) |
Set incoming beam particles.
Definition at line 541 of file GenEvent.cc.
void set_beam_particles | ( | const std::pair< GenParticlePtr, GenParticlePtr > & | p | ) |
Set incoming beam particles.
void set_beam_particles | ( | const std::pair< GenParticlePtr, GenParticlePtr > & | p | ) |
Set incoming beam particles.
|
inline |
Set cross-section information.
Definition at line 144 of file include/HepMC/GenEvent.h.
References GenEvent::add_attribute().
|
inline |
Set cross-section information.
Definition at line 144 of file build/outputs/include/HepMC/GenEvent.h.
References GenEvent::add_attribute().
void set_cross_section | ( | GenCrossSection * | cs | ) |
Set cross-section information by raw pointer.
void set_cross_section | ( | GenCrossSection * | cs | ) |
Set cross-section information by raw pointer.
|
inline |
Set event number.
Definition at line 114 of file build/outputs/include/HepMC/GenEvent.h.
References GenEvent::m_event_number.
|
inline |
Set event number.
Definition at line 114 of file include/HepMC/GenEvent.h.
References GenEvent::m_event_number.
|
inline |
Set heavy ion generator additional information.
Definition at line 134 of file include/HepMC/GenEvent.h.
References GenEvent::add_attribute().
|
inline |
Set heavy ion generator additional information.
Definition at line 134 of file build/outputs/include/HepMC/GenEvent.h.
References GenEvent::add_attribute().
void set_heavy_ion | ( | GenHeavyIon * | hi | ) |
Set heavy ion generator additional information by raw pointer.
void set_heavy_ion | ( | GenHeavyIon * | hi | ) |
Set heavy ion generator additional information by raw pointer.
|
inline |
Set PDF information.
Definition at line 139 of file include/HepMC/GenEvent.h.
References GenEvent::add_attribute().
|
inline |
Set PDF information.
Definition at line 139 of file build/outputs/include/HepMC/GenEvent.h.
References GenEvent::add_attribute().
void set_pdf_info | ( | GenPdfInfo * | pi | ) |
Set PDF information by raw pointer.
void set_pdf_info | ( | GenPdfInfo * | pi | ) |
Set PDF information by raw pointer.
|
inline |
Set the GenRunInfo object by smart pointer.
Definition at line 107 of file include/HepMC/GenEvent.h.
References GenEvent::m_run_info.
|
inline |
Set the GenRunInfo object by smart pointer.
Definition at line 107 of file build/outputs/include/HepMC/GenEvent.h.
References GenEvent::m_run_info.
void set_units | ( | Units::MomentumUnit | new_momentum_unit, |
Units::LengthUnit | new_length_unit | ||
) |
Change event units Converts event from current units to new ones.
void set_units | ( | Units::MomentumUnit | new_momentum_unit, |
Units::LengthUnit | new_length_unit | ||
) |
Change event units Converts event from current units to new ones.
Definition at line 335 of file GenEvent.cc.
References FourVector::is_zero(), and SmartPointer< T >::m_data.
void shift_position_by | ( | const FourVector & | delta | ) |
Shift position of all vertices in the event by delta.
Definition at line 363 of file GenEvent.cc.
void shift_position_by | ( | const FourVector & | delta | ) |
Shift position of all vertices in the event by delta.
|
inline |
Shift position of all vertices in the event to op.
Definition at line 162 of file include/HepMC/GenEvent.h.
References GenEvent::event_pos(), and GenEvent::shift_position_by().
|
inline |
Shift position of all vertices in the event to op.
Definition at line 162 of file build/outputs/include/HepMC/GenEvent.h.
References GenEvent::event_pos(), and GenEvent::shift_position_by().
|
inline |
Converts event from current units to new ones (compatibility name)
Definition at line 126 of file build/outputs/include/HepMC/GenEvent.h.
References GenEvent::set_units().
|
inline |
Converts event from current units to new ones (compatibility name)
Definition at line 126 of file include/HepMC/GenEvent.h.
References GenEvent::set_units().
bool valid_beam_particles | ( | ) | const |
Test to see if we have exactly two particles in event_pos() vertex.
bool valid_beam_particles | ( | ) | const |
Test to see if we have exactly two particles in event_pos() vertex.
Definition at line 527 of file GenEvent.cc.
|
inline |
Get list of vertices (const)
Definition at line 59 of file build/outputs/include/HepMC/GenEvent.h.
References GenEvent::m_vertices.
|
inline |
Get list of vertices (const)
Definition at line 59 of file include/HepMC/GenEvent.h.
References GenEvent::m_vertices.
|
inline |
Get/set list of vertices (non-const)
Definition at line 65 of file build/outputs/include/HepMC/GenEvent.h.
References GenEvent::m_vertices.
|
inline |
Get/set list of vertices (non-const)
Definition at line 65 of file include/HepMC/GenEvent.h.
References GenEvent::m_vertices.
|
inline |
Definition at line 312 of file include/HepMC/GenEvent.h.
References GenEvent::m_vertices.
|
inline |
Definition at line 312 of file build/outputs/include/HepMC/GenEvent.h.
References GenEvent::m_vertices.
|
inline |
Definition at line 320 of file build/outputs/include/HepMC/GenEvent.h.
References GenEvent::m_vertices.
|
inline |
Definition at line 320 of file include/HepMC/GenEvent.h.
References GenEvent::m_vertices.
|
inline |
Definition at line 316 of file include/HepMC/GenEvent.h.
References GenEvent::m_vertices.
|
inline |
Definition at line 316 of file build/outputs/include/HepMC/GenEvent.h.
References GenEvent::m_vertices.
|
inline |
Definition at line 324 of file build/outputs/include/HepMC/GenEvent.h.
References GenEvent::m_vertices.
|
inline |
Definition at line 324 of file include/HepMC/GenEvent.h.
References GenEvent::m_vertices.
|
inline |
Get event weight accessed by index (or the canonical/first one if there is no argument)
Definition at line 79 of file build/outputs/include/HepMC/GenEvent.h.
References GenEvent::weights().
|
inline |
Get event weight accessed by index (or the canonical/first one if there is no argument)
Definition at line 79 of file include/HepMC/GenEvent.h.
References GenEvent::weights().
|
inline |
Get event weight accessed by weight name
Definition at line 83 of file build/outputs/include/HepMC/GenEvent.h.
References GenEvent::run_info(), and GenEvent::weight().
|
inline |
Get event weight accessed by weight name
Definition at line 83 of file include/HepMC/GenEvent.h.
References GenEvent::run_info(), and GenEvent::weight().
|
inline |
Get event weight names, if there are some
Definition at line 89 of file include/HepMC/GenEvent.h.
References GenEvent::run_info().
|
inline |
Get event weight names, if there are some
Definition at line 89 of file build/outputs/include/HepMC/GenEvent.h.
References GenEvent::run_info().
|
inline |
Get event weight values as a vector.
Definition at line 74 of file include/HepMC/GenEvent.h.
References GenEvent::m_weights.
|
inline |
Get event weight values as a vector.
Definition at line 74 of file build/outputs/include/HepMC/GenEvent.h.
References GenEvent::m_weights.
|
inline |
Get event weights as a vector (non-const)
Definition at line 76 of file build/outputs/include/HepMC/GenEvent.h.
References GenEvent::m_weights.
|
inline |
Get event weights as a vector (non-const)
Definition at line 76 of file include/HepMC/GenEvent.h.
References GenEvent::m_weights.
void write_data | ( | GenEventData & | data | ) | const |
Fill GenEventData object.
Definition at line 420 of file GenEvent.cc.
References GenEventData::attribute_id, GenEventData::attribute_name, GenEventData::attribute_string, GenEventData::event_number, GenEventData::event_pos, GenEventData::length_unit, GenEventData::links1, GenEventData::links2, GenEventData::momentum_unit, GenEventData::particles, GenEventData::vertices, and GenEventData::weights.
void write_data | ( | GenEventData & | data | ) | const |
Fill GenEventData object.
|
mutableprivate |
Map of event, particle and vertex attributes.
Keys are name and ID (0 = event, <0 = vertex, >0 = particle)
Definition at line 419 of file build/outputs/include/HepMC/GenEvent.h.
|
private |
Event number
Event number
Definition at line 400 of file build/outputs/include/HepMC/GenEvent.h.
|
private |
Length unit.
Definition at line 408 of file build/outputs/include/HepMC/GenEvent.h.
|
private |
Momentum unit.
Definition at line 406 of file build/outputs/include/HepMC/GenEvent.h.
|
private |
List of particles.
Definition at line 394 of file build/outputs/include/HepMC/GenEvent.h.
|
private |
The root vertex is stored outside the normal vertices list to block user access to it.
Definition at line 411 of file build/outputs/include/HepMC/GenEvent.h.
|
private |
Global run information.
Definition at line 414 of file build/outputs/include/HepMC/GenEvent.h.
|
private |
List of vertices.
Definition at line 396 of file build/outputs/include/HepMC/GenEvent.h.
|
private |
Event weights.
Definition at line 403 of file build/outputs/include/HepMC/GenEvent.h.