cepgen is hosted by Hepforge, IPPP Durham
CepGen 1.2.5
Central exclusive processes event generator
Loading...
Searching...
No Matches

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

#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 &part, 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 of 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 &part) const
 List of all parent Particle object for this given particle.
 
ParticlesRefs mothers (const Particle &part)
 List of all parent Particle object for this given particle.
 
void clearMothers (Particle &part)
 Remove all mothers from a given particle (also affects the mothers' filiation)
 
Particles daughters (const Particle &part) const
 List of all the daughters from a particle.
 
ParticlesRefs daughters (const Particle &part)
 List of all the daughters from a particle.
 
Particles stableDaughters (const Particle &part, bool recursive=false) const
 List all the stable daughters of a particle in this event.
 
ParticlesRefs stableDaughters (const Particle &part, bool recursive=false)
 List all the stable daughters of a particle in this event.
 
void clearDaughters (Particle &part)
 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 28 of file Event.h.

Constructor & Destructor Documentation

◆ Event() [1/2]

Event ( bool  compressed = false)
explicit

Definition at line 29 of file Event.cpp.

◆ Event() [2/2]

Event ( const Event oth)

Definition at line 31 of file Event.cpp.

Member Function Documentation

◆ addParticle() [1/2]

ParticleRef addParticle ( Particle part,
bool  replace = false 
)
Parameters
[in]partThe 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 ?

Definition at line 323 of file Event.cpp.

◆ 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 ?

Definition at line 340 of file Event.cpp.

◆ clear()

void clear ( )

Definition at line 90 of file Event.cpp.

◆ clearDaughters()

void clearDaughters ( Particle part)

Definition at line 297 of file Event.cpp.

◆ clearMothers()

void clearMothers ( Particle part)

Definition at line 251 of file Event.cpp.

◆ cmEnergy()

double cmEnergy ( ) const

Definition at line 425 of file Event.cpp.

◆ compress()

Event compress ( ) const

Definition at line 115 of file Event.cpp.

◆ compressed()

bool compressed ( ) const

Definition at line 113 of file Event.cpp.

◆ daughters() [1/2]

ParticlesRefs daughters ( const Particle part)
Parameters
[in]partThe particle for which the daughter particles have to be retrieved

Definition at line 259 of file Event.cpp.

◆ daughters() [2/2]

Particles daughters ( const Particle part) const
Parameters
[in]partThe particle for which the daughter particles have to be retrieved

Definition at line 257 of file Event.cpp.

◆ dump()

void dump ( ) const

Definition at line 423 of file Event.cpp.

◆ empty()

bool empty ( ) const

Definition at line 351 of file Event.cpp.

◆ freeze()

void freeze ( )

Definition at line 95 of file Event.cpp.

◆ hasRole()

bool hasRole ( Particle::Role  role) const

Definition at line 82 of file Event.h.

◆ ids()

ParticlesIds ids ( Particle::Role  role) const

Definition at line 178 of file Event.cpp.

◆ map()

ParticlesMap & map ( )

Definition at line 72 of file Event.h.

◆ minimal()

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

Definition at line 52 of file Event.cpp.

◆ missingMomentum()

Momentum missingMomentum ( ) const

Definition at line 384 of file Event.cpp.

◆ mothers() [1/2]

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

Definition at line 249 of file Event.cpp.

◆ mothers() [2/2]

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

Definition at line 247 of file Event.cpp.

◆ oneWithRole() [1/2]

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

Definition at line 190 of file Event.cpp.

◆ oneWithRole() [2/2]

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

Definition at line 201 of file Event.cpp.

◆ operator()() [1/3]

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

Definition at line 240 of file Event.cpp.

◆ operator()() [2/3]

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

Definition at line 221 of file Event.cpp.

◆ operator()() [3/3]

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

Definition at line 171 of file Event.cpp.

◆ operator=()

Event & operator= ( const Event oth)

Definition at line 33 of file Event.cpp.

◆ operator==()

bool operator== ( const Event oth) const

Definition at line 42 of file Event.cpp.

◆ operator[]() [1/3]

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

Definition at line 232 of file Event.cpp.

◆ operator[]() [2/3]

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

Definition at line 212 of file Event.cpp.

◆ operator[]() [3/3]

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

Definition at line 163 of file Event.cpp.

◆ particles()

Particles particles ( ) const

Definition at line 353 of file Event.cpp.

◆ restore()

void restore ( )

Definition at line 104 of file Event.cpp.

◆ roles()

ParticleRoles roles ( ) const

Definition at line 303 of file Event.cpp.

◆ size()

size_t size ( ) const

Definition at line 345 of file Event.cpp.

◆ stableDaughters() [1/2]

ParticlesRefs stableDaughters ( const Particle part,
bool  recursive = false 
)

Definition at line 277 of file Event.cpp.

◆ stableDaughters() [2/2]

Particles stableDaughters ( const Particle part,
bool  recursive = false 
) const

Definition at line 261 of file Event.cpp.

◆ stableParticles()

Particles stableParticles ( ) const

Definition at line 362 of file Event.cpp.

◆ stableParticlesWithRole()

Particles stableParticlesWithRole ( Particle::Role  role) const

Definition at line 373 of file Event.cpp.

◆ updateRoles()

void updateRoles ( )

Definition at line 310 of file Event.cpp.

Friends And Related Symbol Documentation

◆ operator<<

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

Definition at line 431 of file Event.cpp.

Member Data Documentation

◆ metadata

EventMetadata metadata

Definition at line 136 of file Event.h.