ThePEG::Collision Class Reference

This is the decalaration of the Collision class. More...

#include <Collision.h>

Inheritance diagram for ThePEG::Collision:

ThePEG::Base ThePEG::Pointer::ReferenceCounted

List of all members.

Public Member Functions

 Collision (const PPair &newIncoming, tEventPtr newEvent=tEventPtr(), tcEventBasePtr newHandler=tcEventBasePtr())
 The standard constructor takes a pair of incoming particles as argument.
 ~Collision ()
 The destructor.
tStepPtr newStep (tcEventBasePtr newHandler=tcEventBasePtr())
 Create a new step in this collision, which is a copy of the last step (if any) and return a pointer to it.
void addStep (tStepPtr s)
 Add a new Step to this Collision.
tcEventBasePtr handler () const
 Return a pointer to the EventHandler which produced this Collision.
tEventPtr event () const
 Return a pointer to the Event to which this Collision belongs.
const LorentzPointvertex () const
 Return the vertex position of this Collision.
void vertex (const LorentzPoint &p)
 Set the vertex position of this Collision.
void transform (const LorentzRotation &)
 Transform all particles in this Collision.
Energy2 m2 () const
 Return the total invariant mass squared of the final-state particles in this Collision.
void persistentOutput (PersistentOStream &) const
 Standard function for writing to a persistent stream.
void persistentInput (PersistentIStream &, int)
 Standard functions for reading from a persistent stream.
Functions for accessing particles etc.
template<class OutputIterator>
void select (OutputIterator r, const SelectorBase &s) const
 Extract particles from this Collision 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 Collision.
tPVector getFinalState () const
 Extract all final state particles in this Collision.
tSubProPtr primarySubProcess () const
 Return a pointer to the primary SubProcess in this Collision.
const SubProcessVectorsubProcesses () const
 Return the possibly empty list of sub processes in this Collision.
tcStepPtr finalStep () const
 Return a const pointer to the last step in this Collission.
tStepPtr finalStep ()
 Return a pointer to the last step in this Collission.
const StepVectorsteps () const
 Return the vector of steps in this Collision.
tcStepPtr step (unsigned int i) const
 Return a pointer to a given Step in this Collision.
const PPairincoming () const
 Return a reference to the pair of colliding particles in this Collision.
tParticleSet getRemnants () const
 Return the set of remnants in this collision.
bool isRemnant (tPPtr p) const
 Return true if the given particle is a remnant of the colliding particles.
Functions for removing entires from a Collision.
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 (recursively) the given Particle from the Collision.
void cleanSteps ()
 Remove all steps which have no new particles introduced in them.
void popStep ()
 Remove the last Step in this Collision.

Static Public Member Functions

static void Init ()
 Standard Init function.

Protected Member Functions

const ParticleSetall () const
 Return a reference to the list of all particles in this Collision.
CollPtr clone () const
 Clone this Collision.
void rebind (const EventTranslationMap &trans)
 Rebind to cloned objects.
Internal functions for adding and removing entires.
void addSubProcess (tSubProPtr p)
 Add a new SubProcess to this Collision.
void removeSubProcess (tSubProPtr p)
 Remove a SubProcess from this Collision.
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 removeEntry (tPPtr p)
 Remove a given Particle entry.

Private Member Functions

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

Private Attributes

PPair theIncoming
 The pair of colliding particles.
StepVector theSteps
 A vector of all steps in this Collision.
SubProcessVector theSubProcesses
 A vector of all sub-processes in this Collision.
ParticleSet allParticles
 A set of all particles in this Collision.
tEventPtr theEvent
 A pointer to the Event to which this Collision belongs.
tcEventBasePtr theHandler
 A pointer to the EventHandler which performed the generation of this Collision.
LorentzPoint theVertex
 The vertex position of this Collision.

Static Private Attributes

static ClassDescription
< Collision
initCollision
 Describe concrete class with persistent data.

Friends

class EventHandler
 EventHandler is a friend of most Event classes.
class Event
 Most of the Event classes are friends with each other.
class Step
 Most of the Event classes are friends with each other.
class ClassTraits< Collision >
 The ClassTraits<Collision> class must be a friend to be able to use the private default constructor.
ostream & operator<< (ostream &os, const Collision &c)
 Output to a standard ostream.


Detailed Description

This is the decalaration of the Collision class.

It contains all Particles produced in the generation of a collision between two particles in an Event. The particles are divided into Steps corresponding to the particles present after a given step in the event generation. The collision also carries information about the SubProcesses in the collision.

See also:
Event

Step

SubProcess

Particle

Definition at line 34 of file Collision.h.


Constructor & Destructor Documentation

ThePEG::Collision::Collision ( const PPair newIncoming,
tEventPtr  newEvent = tEventPtr(),
tcEventBasePtr  newHandler = tcEventBasePtr() 
) [inline]

The standard constructor takes a pair of incoming particles as argument.

Optionally can be given a pointer to the Event which this Collision belongs, and a pointer to the EventHandler which produced this collision.

Parameters:
newIncoming a pair of incoming particles.
newEvent the Event to which this Collision belongs.
newHandler the handler object in charge of the generation of this Collision.

Definition at line 59 of file Collision.h.

References addParticle(), and incoming().


Member Function Documentation

tStepPtr ThePEG::Collision::newStep ( tcEventBasePtr  newHandler = tcEventBasePtr()  ) 

Create a new step in this collision, which is a copy of the last step (if any) and return a pointer to it.

Parameters:
newHandler the handler object in charge of generating the new step.

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

Return a pointer to the EventHandler which produced this Collision.

May be the null pointer.

Definition at line 90 of file Collision.h.

References theHandler.

tEventPtr ThePEG::Collision::event (  )  const [inline]

Return a pointer to the Event to which this Collision belongs.

May be the null pointer.

Definition at line 96 of file Collision.h.

References theEvent.

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

Extract particles from this Collision 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.

Referenced by selectFinalState().

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

Extract all final state particles in this Collision.

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

Definition at line 117 of file Collision.h.

References select().

Referenced by getFinalState().

tPVector ThePEG::Collision::getFinalState (  )  const [inline]

Extract all final state particles in this Collision.

Returns:
a vector of pointers to the extracted particles.

Definition at line 125 of file Collision.h.

References selectFinalState().

tSubProPtr ThePEG::Collision::primarySubProcess (  )  const [inline]

Return a pointer to the primary SubProcess in this Collision.

May be the null pointer.

Definition at line 135 of file Collision.h.

References subProcesses().

tParticleSet ThePEG::Collision::getRemnants (  )  const

Return the set of remnants in this collision.

Remnants are defined as the daughters of the incoming particles which are not incoming particles to any SubProcess or children thereof which are present in the final state.

Referenced by isRemnant().

bool ThePEG::Collision::isRemnant ( tPPtr  p  )  const [inline]

Return true if the given particle is a remnant of the colliding particles.

Calls the getRemnants method, so to check several particles it is better to call getRemnants directly and check if the particles are members of the resulting set by hand.

Definition at line 193 of file Collision.h.

References getRemnants(), and ThePEG::member().

void ThePEG::Collision::removeParticle ( tPPtr   ) 

Remove (recursively) 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.

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

Standard Init function.

See also:
Base::Init().

Reimplemented from ThePEG::Base.

CollPtr ThePEG::Collision::clone (  )  const [protected]

Clone this Collision.

This also makes clones of all steps, sub processes and particles in this Collision.

void ThePEG::Collision::rebind ( const EventTranslationMap trans  )  [protected]

Rebind to cloned objects.

When a Collision 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 Collision points to the cloned Particles etc.


Friends And Related Function Documentation

friend class Event [friend]

Most of the Event classes are friends with each other.

Definition at line 43 of file Collision.h.

friend class Step [friend]

Most of the Event classes are friends with each other.

Definition at line 45 of file Collision.h.

ostream& operator<< ( ostream &  os,
const Collision c 
) [friend]

Output to a standard ostream.


Member Data Documentation

A vector of all sub-processes in this Collision.

The front element points to the primary sub-process.

Definition at line 332 of file Collision.h.

Referenced by subProcesses().


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