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:

ThePEG::Base ThePEG::Named ThePEG::Pointer::ReferenceCounted

List of all members.

Public Types

typedef map< tcColinePtr, int > ColourLineMap
 Map colour lines to indices.

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.
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.
double weight () const
 Return the weight associated with 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 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.
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.
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.
Functions for removing entires from an Event.
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.

Static Public Member Functions

static void Init ()
 Standard Init function.

Protected Member Functions

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.

Private Member Functions

 Event ()
 Private default constructor must only be used by the PersistentIStream class via the ClassTraits<Event> class .
Eventoperator= (const Event &)
 The assignment operator is private and not implemented.

Private Attributes

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.
long theParticleNumber
 Counter to keep track of particle numbering.

Static Private Attributes

static ClassDescription< EventinitEvent
 Describe concrete class with persistent data.

Friends

class EventHandler
 EventHandler is a friend of most Event classes.
class Collision
 Most of the Event classes are friends with each other.
class ClassTraits< Event >
 The ClassTraits<Event> class must be a friend to be able to use the private default constructor.


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 36 of file Event.h.


Member Typedef Documentation

Map colour lines to indices.

Definition at line 48 of file Event.h.


Constructor & Destructor Documentation

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:
newIncoming a pair of incoming particles to the prinary Collision.
newHandler the handler object in charge of the generation of this Event.
newName the name of this event.
newNumber the number of this event.
weight the weight of this event


Member Function Documentation

EventPtr ThePEG::Event::clone (  )  const

Returns a full clone of this Event.

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

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

Return a pointer to the EventHandler which produced this Event.

May be the null pointer.

Definition at line 90 of file Event.h.

References theHandler.

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

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

Parameters:
r an output iterator specifying where the extracted (pointers to) particles will be appended.
s SelectorBase object defining which particles should be extracted.

Definition at line 438 of file Event.h.

References ThePEG::SelectorBase::allCollisions(), primaryCollision(), and theCollisions.

Referenced by selectFinalState().

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

Extract all final state particles in this Event.

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

Definition at line 111 of file Event.h.

References select().

Referenced by getFinalState().

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

Extract all final state particles in this Event.

Parameters:
c a container where the extracted (pointers to) particles will be appended.

Definition at line 121 of file Event.h.

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

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 129 of file Event.h.

References selectFinalState().

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

Return a pointer to the primary Collision in this Event.

May be the null pointer.

Definition at line 139 of file Event.h.

References collisions().

Referenced by primarySubProcess(), and select().

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 431 of file Event.h.

References collisions(), and primaryCollision().

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.

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 183 of file Event.h.

References theNumber.

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.

void ThePEG::Event::addSubProcess ( tSubProPtr  p  )  [inline, protected]

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 263 of file Event.h.

References allSubProcesses.

void ThePEG::Event::addStep ( tStepPtr  s  )  [inline, protected]

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 277 of file Event.h.

References allSteps.

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.

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

Standard Init function.

See also:
Base::Init().

Reimplemented from ThePEG::Base.

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.


Friends And Related Function Documentation

friend class Collision [friend]

Most of the Event classes are friends with each other.

Definition at line 45 of file Event.h.


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

Generated on Thu Apr 29 12:42:59 2010 for ThePEG by  doxygen 1.5.5