thepeg is hosted by Hepforge, IPPP Durham
ThePEG  2.2.1
ThePEG::Collision Class Reference

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

#include <Collision.h>

Inheritance diagram for ThePEG::Collision:

Public Member Functions

 Collision (const PPair &newIncoming, tEventPtr newEvent=tEventPtr(), tcEventBasePtr newHandler=tcEventBasePtr())
 The standard constructor takes a pair of incoming particles as argument. More...
 
 ~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. More...
 
void addStep (tStepPtr s)
 Add a new Step to this Collision.
 
tcEventBasePtr handler () const
 Return a pointer to the EventHandler which produced this Collision. More...
 
tEventPtr event () const
 Return a pointer to the Event to which this Collision belongs. More...
 
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. More...
 
template<class OutputIterator >
void selectFinalState (OutputIterator r) const
 Extract all final state particles in this Collision. More...
 
tPVector getFinalState () const
 Extract all final state particles in this Collision. More...
 
tSubProPtr primarySubProcess () const
 Return a pointer to the primary SubProcess in this Collision. More...
 
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. More...
 
bool isRemnant (tPPtr p) const
 Return true if the given particle is a remnant of the colliding particles. More...
 
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. More...
 
void cleanSteps ()
 Remove all steps which have no new particles introduced in them.
 
void popStep ()
 Remove the last Step in this Collision.
 
- 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. More...
 
virtual void debugme () const
 Print out debugging information for this object on std::cerr. More...
 
- Public Member Functions inherited from ThePEG::Pointer::ReferenceCounted
CounterType referenceCount () const
 Return the reference count.
 

Static Public Member Functions

static void Init ()
 Standard Init function. More...
 
- Static Public Member Functions inherited from ThePEG::Base
static void Init ()
 The standard Init function used to initialize the interfaces. More...
 

Protected Member Functions

const ParticleSetall () const
 Return a reference to the list of all particles in this Collision.
 
CollPtr clone () const
 Clone this Collision. More...
 
void rebind (const EventTranslationMap &trans)
 Rebind to cloned objects. More...
 
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.
 
- Protected Member Functions inherited from ThePEG::Pointer::ReferenceCounted
 ReferenceCounted ()
 Default constructor.
 
 ReferenceCounted (const ReferenceCounted &)
 Copy-constructor.
 
ReferenceCountedoperator= (const ReferenceCounted &)
 Assignment.
 

Private Member Functions

 Collision ()
 Private default constructor must only be used by the PersistentIStream class via the ClassTraits<Collision> class .
 
Collisionoperator= (const Collision &)=delete
 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. More...
 
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< CollisioninitCollision
 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. More...
 
class Step
 Most of the Event classes are friends with each other. More...
 
struct 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. More...
 

Additional Inherited Members

- Public Types inherited from ThePEG::Pointer::ReferenceCounted
typedef unsigned int CounterType
 The integer type used for counting.
 
- Public Attributes inherited from ThePEG::Pointer::ReferenceCounted
const unsigned long uniqueId
 The unique ID. More...
 

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

◆ Collision()

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
newIncominga pair of incoming particles.
newEventthe Event to which this Collision belongs.
newHandlerthe handler object in charge of the generation of this Collision.

Definition at line 59 of file Collision.h.

References addParticle(), addStep(), incoming(), newStep(), and ~Collision().

Member Function Documentation

◆ clone()

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

Clone this Collision.

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

Referenced by all().

◆ event()

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 select(), and theEvent.

◆ 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().

◆ getRemnants()

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 incoming(), and isRemnant().

◆ handler()

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.

◆ Init()

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

Standard Init function.

See also
Base::Init().

Referenced by m2().

◆ 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().

◆ newStep()

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
newHandlerthe handler object in charge of generating the new step.

Referenced by Collision().

◆ primarySubProcess()

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

◆ rebind()

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.

Referenced by all().

◆ removeParticle()

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.

Referenced by m2().

◆ select()

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

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

Referenced by event(), and selectFinalState().

◆ selectFinalState()

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

Extract all final state particles in this Collision.

Parameters
ran 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().

Friends And Related Function Documentation

◆ Event

friend class Event
friend

Most of the Event classes are friends with each other.

Definition at line 43 of file Collision.h.

◆ operator<<

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

Output to a standard ostream.

◆ Step

friend class Step
friend

Most of the Event classes are friends with each other.

Definition at line 45 of file Collision.h.

Member Data Documentation

◆ theSubProcesses

SubProcessVector ThePEG::Collision::theSubProcesses
private

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: