cepgen is hosted by Hepforge, IPPP Durham
CepGen N/A
Central exclusive processes event generator

Container for the information on the in- and outgoing particles' kinematics. More...

#include <include/CepGen/Event/Event.h>

+ Collaboration diagram for Event:

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.
 
Eventoperator= (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.
 
ParticlesMapmap ()
 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 Particlesoperator() (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.
 
ParticleoneWithRole (Particle::Role role)
 First Particle object with a given role in the event.
 
const ParticleoneWithRole (Particle::Role role) const
 First constant Particle object with a given role in the event.
 
Particleoperator[] (int id)
 Reference to the Particle object corresponding to a unique identifier in the event.
 
const Particleoperator() (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.
 

Detailed Description

Definition at line 26 of file Event.h.

Constructor & Destructor Documentation

◆ Event() [1/2]

Event ( bool compressed = false)
explicit

◆ Event() [2/2]

Event ( const Event & )

Member Function Documentation

◆ addParticle() [1/2]

ParticleRef addParticle ( Particle & particle,
bool replace = false )
Parameters
[in]particleThe Particle object to insert or modify in the event
[in]replaceDo we replace the particle if already present in the event, or do we append another particle with the same role?

◆ addParticle() [2/2]

ParticleRef addParticle ( Particle::Role role,
bool replace = false )
Parameters
[in]roleThe role the particle will play in the process
[in]replaceDo we replace the particle if already present in the event, or do we append another particle with the same role?

◆ children() [1/2]

ParticlesRefs children ( const Particle & particle)
Parameters
[in]particleThe particle for which the daughter particles have to be retrieved

◆ children() [2/2]

Particles children ( const Particle & particle) const
Parameters
[in]particleThe particle for which the daughter particles have to be retrieved

◆ clear()

void clear ( )

◆ clearChildren()

void clearChildren ( Particle & particle)

◆ clearMothers()

void clearMothers ( Particle & particle)

◆ cmEnergy()

double cmEnergy ( ) const

◆ compress()

Event compress ( ) const

◆ compressed()

bool compressed ( ) const

◆ dump()

void dump ( ) const

◆ empty()

bool empty ( ) const

◆ freeze()

void freeze ( )

◆ hasRole()

bool hasRole ( Particle::Role role) const

Definition at line 80 of file Event.h.

◆ ids()

ParticlesIds ids ( Particle::Role role) const

◆ map()

ParticlesMap & map ( )

Definition at line 70 of file Event.h.

◆ minimal()

static Event minimal ( size_t num_out_particles = 1)
static
Parameters
[in]num_out_particlesproduced particles multiplicity (excluding outgoing beam remnants)

◆ missingMomentum()

Momentum missingMomentum ( ) const

◆ mothers() [1/2]

ParticlesRefs mothers ( const Particle & particle)
Parameters
[in]particleThe particle for which the mother particles have to be retrieved

◆ mothers() [2/2]

Particles mothers ( const Particle & particle) const
Parameters
[in]particleThe particle for which the mother particles have to be retrieved

◆ oneWithRole() [1/2]

Particle & oneWithRole ( Particle::Role role)
Parameters
[in]roleThe role the particle has to play in the event

◆ oneWithRole() [2/2]

const Particle & oneWithRole ( Particle::Role role) const

◆ operator()() [1/3]

Particles operator() ( const ParticlesIds & ids) const
Parameters
[in]idsThe unique identifiers to the particles to be selected in the event

◆ operator()() [2/3]

const Particle & operator() ( int id) const
Parameters
[in]idThe unique identifier to this particle in the event

◆ operator()() [3/3]

const Particles & operator() ( Particle::Role role) const

◆ operator=()

Event & operator= ( const Event & )

◆ operator==()

bool operator== ( const Event & ) const

◆ operator[]() [1/3]

ParticlesRefs operator[] ( const ParticlesIds & ids)
Parameters
[in]idsThe unique identifiers to the particles to be selected in the event

◆ operator[]() [2/3]

Particle & operator[] ( int id)
Parameters
[in]idThe unique identifier to this particle in the event

◆ operator[]() [3/3]

ParticlesRefs operator[] ( Particle::Role role)
Parameters
[in]roleThe role the particles have to play in the process

◆ particles()

Particles particles ( ) const

◆ restore()

void restore ( )

◆ roles()

ParticleRoles roles ( ) const

◆ size()

size_t size ( ) const

◆ stableChildren() [1/2]

ParticlesRefs stableChildren ( const Particle & particle,
bool recursive = false )

◆ stableChildren() [2/2]

Particles stableChildren ( const Particle & particle,
bool recursive = false ) const

◆ stableParticles()

Particles stableParticles ( ) const

◆ stableParticlesWithRole()

Particles stableParticlesWithRole ( Particle::Role ) const

◆ updateRoles()

void updateRoles ( )

Friends And Related Symbol Documentation

◆ operator<<

std::ostream & operator<< ( std::ostream & ,
const Event &  )
friend

Member Data Documentation

◆ metadata

EventMetadata metadata

Definition at line 134 of file Event.h.