Container for the information on the in- and outgoing particles' kinematics. More...
#include <include/CepGen/Event/Event.h>
Classes | |
struct | EventMetadata |
Collection of key -> value pairs storing event metadata. More... | |
Public Member Functions | |
Event (bool compressed=false) | |
Build an empty event. | |
Event (const Event &) | |
Copy constructor. | |
Event & | operator= (const Event &) |
Assignment operator. | |
bool | operator== (const Event &) const |
Equality operator. | |
void | clear () |
Empty the whole event content. | |
void | freeze () |
Store a snapshot of the primordial event block. | |
void | restore () |
Restore the event to its "empty" state. | |
bool | compressed () const |
Is the event already without intermediate-channel information? | |
Event | compress () const |
Compress the event record. | |
void | updateRoles () |
Update the table of particles roles. | |
void | dump () const |
Dump all the known information on every Particle object contained in this Event container in the output stream. | |
double | cmEnergy () const |
Incoming beams centre-of-mass energy, in GeV. | |
ParticleRef | addParticle (Particle &particle, bool replace=false) |
Set the information on one particle in the process. | |
ParticleRef | addParticle (Particle::Role role, bool replace=false) |
Create a new particle in the event, with no kinematic information but the role it has to play in the process. | |
size_t | size () const |
Number of particles in the event. | |
bool | empty () const |
Is the particles map empty? | |
Particles | particles () const |
Vector of all particles in the event. | |
Particles | stableParticles () const |
Vector of all stable particles in the event. | |
Particles | stableParticlesWithRole (Particle::Role) const |
Vector of all stable particles with a given role. | |
ParticlesMap & | map () |
Internal particles map retrieval operator. | |
ParticlesRefs | operator[] (Particle::Role role) |
List of references to Particle objects corresponding to a certain role in the process kinematics. | |
const Particles & | operator() (Particle::Role role) const |
Get a list of constant Particle objects corresponding to a certain role in the process kinematics. | |
ParticlesIds | ids (Particle::Role role) const |
Get a list of particle identifiers in Event corresponding to a certain role in the process kinematics. | |
bool | hasRole (Particle::Role role) const |
Check whether a particle role is represented in this event. | |
Particle & | oneWithRole (Particle::Role role) |
First Particle object with a given role in the event. | |
const Particle & | oneWithRole (Particle::Role role) const |
First constant Particle object with a given role in the event. | |
Particle & | operator[] (int id) |
Reference to the Particle object corresponding to a unique identifier in the event. | |
const Particle & | operator() (int id) const |
Constant reference to the Particle object corresponding to a unique identifier in the event. | |
ParticlesRefs | operator[] (const ParticlesIds &ids) |
References to the Particle objects corresponding to the unique identifiers in the event. | |
Particles | operator() (const ParticlesIds &ids) const |
Particle objects corresponding to the unique identifiers in the event. | |
Momentum | missingMomentum () const |
Compute the missing momentum for central particles in this event. | |
Particles | mothers (const Particle &particle) const |
List of all parent Particle object for this given particle. | |
ParticlesRefs | mothers (const Particle &particle) |
List of all parent Particle object for this given particle. | |
void | clearMothers (Particle &particle) |
Remove all mothers from a given particle (also affects the mothers' filiation) | |
Particles | children (const Particle &particle) const |
List of all the daughters from a particle. | |
ParticlesRefs | children (const Particle &particle) |
List of all the daughters from a particle. | |
Particles | stableChildren (const Particle &particle, bool recursive=false) const |
List all the stable daughters of a particle in this event. | |
ParticlesRefs | stableChildren (const Particle &particle, bool recursive=false) |
List all the stable daughters of a particle in this event. | |
void | clearChildren (Particle &particle) |
Remove all daughters from a given particle (also affects the daughters' parentage) | |
ParticleRoles | roles () const |
List of roles defined for the given event (really process-dependant for the central system) | |
Static Public Member Functions | |
static Event | minimal (size_t num_out_particles=1) |
Build a trivial event with the minimal information. | |
Public Attributes | |
EventMetadata | metadata |
List of auxiliary information. | |
Friends | |
std::ostream & | operator<< (std::ostream &, const Event &) |
Human-readable version of the event content. | |
|
explicit |
ParticleRef addParticle | ( | Particle & | particle, |
bool | replace = false ) |
[in] | particle | The Particle object to insert or modify in the event |
[in] | replace | Do we replace the particle if already present in the event, or do we append another particle with the same role? |
ParticleRef addParticle | ( | Particle::Role | role, |
bool | replace = false ) |
[in] | role | The role the particle will play in the process |
[in] | replace | Do we replace the particle if already present in the event, or do we append another particle with the same role? |
ParticlesRefs children | ( | const Particle & | particle | ) |
[in] | particle | The particle for which the daughter particles have to be retrieved |
[in] | particle | The particle for which the daughter particles have to be retrieved |
void clear | ( | ) |
void clearChildren | ( | Particle & | particle | ) |
void clearMothers | ( | Particle & | particle | ) |
double cmEnergy | ( | ) | const |
Event compress | ( | ) | const |
bool compressed | ( | ) | const |
void dump | ( | ) | const |
bool empty | ( | ) | const |
void freeze | ( | ) |
bool hasRole | ( | Particle::Role | role | ) | const |
ParticlesIds ids | ( | Particle::Role | role | ) | const |
ParticlesMap & map | ( | ) |
|
static |
[in] | num_out_particles | produced particles multiplicity (excluding outgoing beam remnants) |
Momentum missingMomentum | ( | ) | const |
ParticlesRefs mothers | ( | const Particle & | particle | ) |
[in] | particle | The particle for which the mother particles have to be retrieved |
[in] | particle | The particle for which the mother particles have to be retrieved |
Particle & oneWithRole | ( | Particle::Role | role | ) |
[in] | role | The role the particle has to play in the event |
const Particle & oneWithRole | ( | Particle::Role | role | ) | const |
Particles operator() | ( | const ParticlesIds & | ids | ) | const |
[in] | ids | The unique identifiers to the particles to be selected in the event |
const Particle & operator() | ( | int | id | ) | const |
[in] | id | The unique identifier to this particle in the event |
const Particles & operator() | ( | Particle::Role | role | ) | const |
bool operator== | ( | const Event & | ) | const |
ParticlesRefs operator[] | ( | const ParticlesIds & | ids | ) |
[in] | ids | The unique identifiers to the particles to be selected in the event |
Particle & operator[] | ( | int | id | ) |
[in] | id | The unique identifier to this particle in the event |
ParticlesRefs operator[] | ( | Particle::Role | role | ) |
[in] | role | The role the particles have to play in the process |
Particles particles | ( | ) | const |
void restore | ( | ) |
ParticleRoles roles | ( | ) | const |
size_t size | ( | ) | const |
ParticlesRefs stableChildren | ( | const Particle & | particle, |
bool | recursive = false ) |
Particles stableParticles | ( | ) | const |
Particles stableParticlesWithRole | ( | Particle::Role | ) | const |
void updateRoles | ( | ) |
|
friend |
EventMetadata metadata |