thepeg is hosted by Hepforge, IPPP Durham
ThePEG 2.3.0
ThePEG::Event Class Reference

The Event class contains all Particles produced in the generation of an event. More...

#include <Event.h>

Inheritance diagram for ThePEG::Event:

Public Types

typedef map< tcColinePtr, int > ColourLineMap
 Map colour lines to indices.
 
- Public Types inherited from ThePEG::Pointer::ReferenceCounted
typedef unsigned int CounterType
 The integer type used for counting.
 

Public Member Functions

 Event (const PPair &newIncoming, tcEventBasePtr newHandler=tcEventBasePtr(), string newName="", long newNumber=-1, double weight=1.0)
 The standard constructor for an Event takes as arguments a pair of colliding particles (corresponding to the primary collision in case of multiple collisions in an event).
 
 Event (const Event &)
 The copy constructor.
 
 ~Event ()
 The destructor.
 
EventPtr clone () const
 Returns a full clone of this Event.
 
tcEventBasePtr handler () const
 Return a pointer to the EventHandler which produced this Event.
 
Functions for accessing particles etc.
template<class OutputIterator >
void select (OutputIterator r, const SelectorBase &s) const
 Extract particles from this event which satisfies the requirements given by an object of the SelectorBase class.
 
template<class OutputIterator >
void selectFinalState (OutputIterator r) const
 Extract all final state particles in this Event.
 
template<class Container >
void getFinalState (Container &c) const
 Extract all final state particles in this Event.
 
tPVector getFinalState () const
 Extract all final state particles in this Event.
 
tCollPtr primaryCollision () const
 Return a pointer to the primary Collision in this Event.
 
const CollisionVectorcollisions () const
 Return a possibly empty list of collisions in this Event.
 
tSubProPtr primarySubProcess () const
 Return a pointer to the primary SubProcess in the prinmary Collision in this Event.
 
const PPairincoming () const
 Return a reference to the pair of colliding particles in the primary Collision of this Event.
 
tCollPtr newCollision ()
 Create a new Collision in this event and return a pointer to it.
 
tStepPtr newStep ()
 Create a new Step in the current Collision, which is a copy of the last Step (if any) and return a pointer to it.
 
void transform (const LorentzRotation &)
 Transform all particles in this Event.
 
long number () const
 Return the number assigned to this Event.
 
int colourLineIndex (tcColinePtr) const
 Return the index of the given colour line.
 
- Public Member Functions inherited from ThePEG::Base
virtual ~Base ()
 The virtual destructor.
 
void debug () const
 Print out debugging information for this object on std::cerr.
 
virtual void debugme () const
 Print out debugging information for this object on std::cerr.
 
- Public Member Functions inherited from ThePEG::Pointer::ReferenceCounted
CounterType referenceCount () const
 Return the reference count.
 
- Public Member Functions inherited from ThePEG::Named
 Named (const string &newName=string())
 Constructor with name.
 
 Named (const Named &)=default
 Explicit default copy-constructor (too avoid compiler warnings)
 
const string & name () const
 Return name.
 
bool operator== (const Named &other) const
 Test for equality.
 
bool operator< (const Named &other) const
 Lexicographical comparison.
 

Friends

class EventHandler
 EventHandler is a friend of most Event classes.
 
class Collision
 Most of the Event classes are friends with each other.
 

Functions for removing entires from an Event.

struct ClassTraits< Event >
 The ClassTraits<Event> class must be a friend to be able to use the private default constructor.
 
PPair theIncoming
 The pair of colliding particles.
 
CollisionVector theCollisions
 A vector of collisions in this Event.
 
StepSet allSteps
 A set of all particles in this Event.
 
SubProcessSet allSubProcesses
 A set of all sub-processes in this Event.
 
ParticleSet allParticles
 A set of all particles in this Event.
 
tcEventBasePtr theHandler
 A pointer to the EventHandler which performed the generation of this Event.
 
ColourLineMap theColourLines
 Map of all registered colour lines to their index numbers.
 
long theNumber
 The number assigned to this Event.
 
double theWeight
 The weight associated with this event.
 
map< string, double > theOptionalWeights
 Optional named weights.
 
long theParticleNumber
 Counter to keep track of particle numbering.
 
map< string, AnyReferencetheMeta
 The meta information.
 
static ClassDescription< EventinitEvent
 Describe concrete class with persistent data.
 
void removeDecay (tPPtr)
 Remove (recursively) the decay products from a given Particle and add the particle to the list of final state particles.
 
void removeParticle (tPPtr)
 Remove the given Particle from the Collision.
 
void cleanSteps ()
 Remove all steps which have no new particles introduced in them.
 
double weight () const
 Return the weight associated with this event.
 
double optionalWeight (const string &name) const
 Return an optional named weight associated to this event.
 
const map< string, double > & optionalWeights () const
 Return the optional named weights associated to this event.
 
void printGraphviz () const
 Print this Event in Graphviz format on the standard output.
 
void weight (double w)
 Set the weight associated with this event.
 
void optionalWeight (const string &name, double value)
 Set an optional named weight associated to this event.
 
map< string, double > & optionalWeights ()
 Access the optional named weights associated to this event.
 
void setInfo (tcEventBasePtr newHandler, string newName, long newNumber, double weight)
 Set event info.
 
void addCollision (tCollPtr c)
 Add a collision to this Event.
 
void primaryCollision (tCollPtr c)
 Set the primary collision in this Event.
 
bool hasMeta (const string &id) const
 Check for meta information.
 
template<class T >
void meta (const string &id, T &ref)
 Set meta information.
 
void eraseMeta (const string &id)
 Erase meta information.
 
template<class T >
T & meta (const string &id) const
 Retrieve meta information.
 
void persistentOutput (PersistentOStream &) const
 Standard function for writing to a persistent stream.
 
void persistentInput (PersistentIStream &, int)
 Standard functions for reading from a persistent stream.
 
virtual void debugme () const
 Print out debugging information for this object on std::cerr.
 
template<class Iterator >
void addParticles (Iterator first, Iterator last)
 Add a range of particles to this Collision.
 
void addParticle (tPPtr p)
 Add a particle to this Collision.
 
void addSubProcess (tSubProPtr p)
 Add a new SubProcess to this Event.
 
void removeSubProcess (tSubProPtr p)
 Remove a SubProcess from this Event.
 
void addStep (tStepPtr s)
 Add a new Step to this Collision.
 
void removeEntry (tPPtr p)
 Remove a given Particle entry.
 
void rebind (const EventTranslationMap &trans)
 Rebind to cloned objects.
 
static void Init ()
 Standard Init function.
 
 Event ()
 Private default constructor must only be used by the PersistentIStream class via the ClassTraits<Event> class .
 
Eventoperator= (const Event &)=delete
 The assignment operator is private and not implemented.
 

Additional Inherited Members

- Static Public Member Functions inherited from ThePEG::Base
static void Init ()
 The standard Init function used to initialize the interfaces.
 
- Public Attributes inherited from ThePEG::Pointer::ReferenceCounted
const unsigned long uniqueId
 The unique ID.
 
- Protected Member Functions inherited from ThePEG::Pointer::ReferenceCounted
 ReferenceCounted ()
 Default constructor.
 
 ReferenceCounted (const ReferenceCounted &)
 Copy-constructor.
 
ReferenceCountedoperator= (const ReferenceCounted &)
 Assignment.
 
- Protected Member Functions inherited from ThePEG::Named
const Namedoperator= (const Named &other)
 Assignment.
 
const string & name (const string &newName)
 Set new name.
 

Detailed Description

The Event class contains all Particles produced in the generation of an event.

The particles are divided into Collisions corresponding to the actiual collisions between incoming particles in a bunch crossing.

Event inherits from the Named which holds the name of an event.

See also
Collision
Step
SubProcess
Particle
SelectorBase
Named

Definition at line 37 of file Event.h.

Member Typedef Documentation

◆ ColourLineMap

Map colour lines to indices.

Definition at line 49 of file Event.h.

Constructor & Destructor Documentation

◆ Event() [1/2]

ThePEG::Event::Event ( const PPair newIncoming,
tcEventBasePtr  newHandler = tcEventBasePtr(),
string  newName = "",
long  newNumber = -1,
double  weight = 1.0 
)

The standard constructor for an Event takes as arguments a pair of colliding particles (corresponding to the primary collision in case of multiple collisions in an event).

Optionally a pointer to the EventHandler which performed the generation, an event name and event number can be given.

Parameters
newIncominga pair of incoming particles to the prinary Collision.
newHandlerthe handler object in charge of the generation of this Event.
newNamethe name of this event.
newNumberthe number of this event.
weightthe weight of this event

◆ Event() [2/2]

ThePEG::Event::Event ( )
inlineprivate

Private default constructor must only be used by the PersistentIStream class via the ClassTraits<Event> class .

Definition at line 448 of file Event.h.

Member Function Documentation

◆ addParticles()

template<class Iterator >
void ThePEG::Event::addParticles ( Iterator  first,
Iterator  last 
)
inlineprotected

Add a range of particles to this Collision.

Definition at line 303 of file Event.h.

References addParticle().

◆ addStep()

void ThePEG::Event::addStep ( tStepPtr  s)
inlineprotected

Add a new Step to this Collision.

For book keeping purposes only. The steps are accessed from the different Collisions in this Event.

Definition at line 331 of file Event.h.

References allSteps.

◆ addSubProcess()

void ThePEG::Event::addSubProcess ( tSubProPtr  p)
inlineprotected

Add a new SubProcess to this Event.

For book keeping purposes only. The sub-processes are accessed from the different Collisions in this Event.

Definition at line 317 of file Event.h.

References allSubProcesses.

◆ clone()

EventPtr ThePEG::Event::clone ( ) const

Returns a full clone of this Event.

All collisions, Particles etc. in this Event are cloned.

◆ collisions()

const CollisionVector & ThePEG::Event::collisions ( ) const
inline

Return a possibly empty list of collisions in this Event.

Definition at line 147 of file Event.h.

References theCollisions.

Referenced by primaryCollision(), and primarySubProcess().

◆ debugme()

virtual void ThePEG::Event::debugme ( ) const
virtual

Print out debugging information for this object on std::cerr.

To be called from within a debugger via the debug() function.

Reimplemented from ThePEG::Base.

◆ eraseMeta()

void ThePEG::Event::eraseMeta ( const string &  id)
inline

Erase meta information.

Definition at line 285 of file Event.h.

References theMeta.

◆ getFinalState() [1/2]

tPVector ThePEG::Event::getFinalState ( ) const
inline

Extract all final state particles in this Event.

Returns
a vector of pointers to the extracted particles.

Definition at line 130 of file Event.h.

References selectFinalState().

◆ getFinalState() [2/2]

template<class Container >
void ThePEG::Event::getFinalState ( Container &  c) const
inline

Extract all final state particles in this Event.

Parameters
ca container where the extracted (pointers to) particles will be appended.

Definition at line 122 of file Event.h.

References ThePEG::inserter(), and selectFinalState().

◆ handler()

tcEventBasePtr ThePEG::Event::handler ( ) const
inline

Return a pointer to the EventHandler which produced this Event.

May be the null pointer.

Definition at line 91 of file Event.h.

References theHandler.

◆ hasMeta()

bool ThePEG::Event::hasMeta ( const string &  id) const
inline

Check for meta information.

Definition at line 270 of file Event.h.

References theMeta.

◆ incoming()

const PPair & ThePEG::Event::incoming ( ) const
inline

Return a reference to the pair of colliding particles in the primary Collision of this Event.

Definition at line 159 of file Event.h.

References theIncoming.

◆ Init()

static void ThePEG::Event::Init ( )
static

Standard Init function.

See also
Base::Init().

◆ meta() [1/2]

template<class T >
T & ThePEG::Event::meta ( const string &  id) const
inline

Retrieve meta information.

Definition at line 293 of file Event.h.

References theMeta.

◆ meta() [2/2]

template<class T >
void ThePEG::Event::meta ( const string &  id,
T &  ref 
)
inline

Set meta information.

Definition at line 278 of file Event.h.

References theMeta.

◆ newStep()

tStepPtr ThePEG::Event::newStep ( )

Create a new Step in the current Collision, which is a copy of the last Step (if any) and return a pointer to it.

If no collision exists, one will be added.

◆ number()

long ThePEG::Event::number ( ) const
inline

Return the number assigned to this Event.

The name is accessed with the name() method of the Named base class.

Definition at line 184 of file Event.h.

References theNumber.

◆ optionalWeight()

double ThePEG::Event::optionalWeight ( const string &  name) const

Return an optional named weight associated to this event.

Returns 0, if no weight identified by this name is present.

◆ optionalWeights() [1/2]

map< string, double > & ThePEG::Event::optionalWeights ( )
inline

Access the optional named weights associated to this event.

Definition at line 247 of file Event.h.

References theOptionalWeights.

◆ optionalWeights() [2/2]

const map< string, double > & ThePEG::Event::optionalWeights ( ) const
inline

Return the optional named weights associated to this event.

Definition at line 227 of file Event.h.

References theOptionalWeights.

◆ primaryCollision()

tCollPtr ThePEG::Event::primaryCollision ( ) const
inline

Return a pointer to the primary Collision in this Event.

May be the null pointer.

Definition at line 140 of file Event.h.

References collisions().

Referenced by primarySubProcess(), and select().

◆ primarySubProcess()

ThePEG::tSubProPtr ThePEG::Event::primarySubProcess ( ) const
inline

Return a pointer to the primary SubProcess in the prinmary Collision in this Event.

May be the null pointer.

Definition at line 495 of file Event.h.

References collisions(), primaryCollision(), and primarySubProcess().

Referenced by primarySubProcess().

◆ rebind()

void ThePEG::Event::rebind ( const EventTranslationMap trans)
protected

Rebind to cloned objects.

When an Event is cloned, a shallow copy is done first, then all Particles etc, are cloned, and finally this method is used to see to that the pointers in the cloned Event points to the cloned Particles etc.

◆ removeParticle()

void ThePEG::Event::removeParticle ( tPPtr  )

Remove the given Particle from the Collision.

If this was the last daughter of the mother Particle, the latter is added to the list of final state particles.

◆ removeSubProcess()

void ThePEG::Event::removeSubProcess ( tSubProPtr  p)
inlineprotected

Remove a SubProcess from this Event.

Definition at line 324 of file Event.h.

References allSubProcesses.

◆ select()

template<class OutputIterator >
void ThePEG::Event::select ( OutputIterator  r,
const SelectorBase s 
) const

Extract particles from this event which satisfies the requirements given by an object of the SelectorBase class.

Parameters
ran output iterator specifying where the extracted (pointers to) particles will be appended.
sSelectorBase object defining which particles should be extracted.

Definition at line 502 of file Event.h.

References primaryCollision(), and theCollisions.

Referenced by selectFinalState().

◆ selectFinalState()

template<class OutputIterator >
void ThePEG::Event::selectFinalState ( OutputIterator  r) const
inline

Extract all final state particles in this Event.

Parameters
ran output iterator specifying where the extracted (pointers to) particles will be appended.

Definition at line 112 of file Event.h.

References select().

Referenced by getFinalState().

◆ weight() [1/2]

double ThePEG::Event::weight ( ) const
inline

Return the weight associated with this event.

Definition at line 216 of file Event.h.

References theWeight.

◆ weight() [2/2]

void ThePEG::Event::weight ( double  w)
inline

Set the weight associated with this event.

Definition at line 237 of file Event.h.

References theWeight.

Friends And Related Function Documentation

◆ ClassTraits< Event >

friend struct ClassTraits< Event >
friend

The ClassTraits<Event> class must be a friend to be able to use the private default constructor.

Definition at line 448 of file Event.h.

◆ Collision

friend class Collision
friend

Most of the Event classes are friends with each other.

Definition at line 46 of file Event.h.

◆ EventHandler

friend class EventHandler
friend

EventHandler is a friend of most Event classes.

Definition at line 44 of file Event.h.

Member Data Documentation

◆ allParticles

ParticleSet ThePEG::Event::allParticles
private

A set of all particles in this Event.

Definition at line 391 of file Event.h.

◆ allSteps

StepSet ThePEG::Event::allSteps
private

A set of all particles in this Event.

Definition at line 381 of file Event.h.

Referenced by addStep().

◆ allSubProcesses

SubProcessSet ThePEG::Event::allSubProcesses
private

A set of all sub-processes in this Event.

Definition at line 386 of file Event.h.

Referenced by addSubProcess(), and removeSubProcess().

◆ initEvent

ClassDescription<Event> ThePEG::Event::initEvent
staticprivate

Describe concrete class with persistent data.

Definition at line 442 of file Event.h.

◆ theCollisions

CollisionVector ThePEG::Event::theCollisions
private

A vector of collisions in this Event.

Definition at line 376 of file Event.h.

Referenced by collisions(), and select().

◆ theColourLines

ColourLineMap ThePEG::Event::theColourLines
mutableprivate

Map of all registered colour lines to their index numbers.

Definition at line 402 of file Event.h.

◆ theHandler

tcEventBasePtr ThePEG::Event::theHandler
private

A pointer to the EventHandler which performed the generation of this Event.

Definition at line 397 of file Event.h.

Referenced by handler().

◆ theIncoming

PPair ThePEG::Event::theIncoming
private

The pair of colliding particles.

Definition at line 371 of file Event.h.

Referenced by incoming().

◆ theMeta

map<string,AnyReference> ThePEG::Event::theMeta
private

The meta information.

Definition at line 427 of file Event.h.

Referenced by eraseMeta(), hasMeta(), and meta().

◆ theNumber

long ThePEG::Event::theNumber
private

The number assigned to this Event.

Definition at line 407 of file Event.h.

Referenced by number().

◆ theOptionalWeights

map<string,double> ThePEG::Event::theOptionalWeights
private

Optional named weights.

Definition at line 417 of file Event.h.

Referenced by optionalWeights().

◆ theParticleNumber

long ThePEG::Event::theParticleNumber
private

Counter to keep track of particle numbering.

Definition at line 422 of file Event.h.

◆ theWeight

double ThePEG::Event::theWeight
private

The weight associated with this event.

Definition at line 412 of file Event.h.

Referenced by weight().


The documentation for this class was generated from the following file: