ThePEG::Step Class Reference

The Step class contains information of all particles present after certain step in the event generation. More...

#include <Step.h>

Inheritance diagram for ThePEG::Step:

ThePEG::Base ThePEG::Pointer::ReferenceCounted

List of all members.

Public Member Functions

 Step (tCollPtr newCollision=tCollPtr(), tcEventBasePtr newHandler=tcEventBasePtr())
 Standard constructor.
 Step (const Step &)
 The copy constructor.
 ~Step ()
 The destructor.
tcEventBasePtr handler () const
 Return a pointer to the step handler which performed the generation of this step.
tCollPtr collision () const
 Return a pointer to the Collision to which this step belongs.
template<typename OutputIterator>
void select (OutputIterator r, const SelectorBase &s) const
 Extract particles from this Step which satisfies the requirements given by an object of the SelectorBase class.
template<typename OutputIterator>
void selectFinalState (OutputIterator r) const
 Extract all final state particles in this Step.
tPVector getFinalState () const
 Extract all final state particles in this Step.
const ParticleSetall () const
 A reference to the set of all particles in this step.
const ParticleSetparticles () const
 A reference to the set of outgoing particles in this step.
const ParticleSetintermediates () const
 A reference to the set of intermediate particles in this step.
const SubProcessVectorsubProcesses () const
 A reference to the vector of sub-processes introduced in this step.
const PPairincoming () const
 Returns the colliding particles in the collision to which this step belongs.
tPPtr find (tcPPtr p) const
 Get mutable particle.
tPPtr copyParticle (tcPPtr p)
 Copy a particle.
bool setCopy (tcPPtr pold, tPPtr pnew)
 Make particles copies of eachother.
tPPtr insertCopy (tcPPtr p)
 Insert a copy.
bool addDecayProduct (tcPPtr parent, tPPtr child, bool fixColour=true)
 Add decay product.
template<typename CIterator>
bool addDecayProduct (tcPPtr parent, CIterator firstChild, CIterator lastChild, bool fixColour=true)
 Add decay products.
void addDecayNoCheck (tPPtr parent, tPPtr child)
 Add a particle to this Step.
void addDecayProduct (tPPtr child)
 Add a particle to this Step.
bool removeDecayProduct (tcPPtr parent, tPPtr child)
 Remove the child form the given parent.
template<typename CIterator>
bool removeDecayProduct (tcPPtr parent, CIterator firstChild, CIterator lastChild)
 Remove children form the given parent.
template<typename Iterator>
bool addDecayProduct (Iterator firstParent, Iterator lastParent, tPPtr child, bool checkfinal=true)
 Add decay product.
template<typename PIterator, typename CIterator>
bool addDecayProduct (PIterator firstParent, PIterator lastParent, CIterator firstChild, CIterator lastChild)
 Add the children as a decay products of all the listed particles.
void fixColourFlow ()
 Fix the colour flow of particles which have been added to this step and which have not already had their colour neighbours set.
tPPtr colourNeighbour (tcPPtr particle, bool anti=false) const
 Return the (anti-)colour neighbour of the given particle if one exists in the final state of this Step.
tPPtr antiColourNeighbour (tcPPtr particle) const
 Return the anti-colour neighbour of the given particle if one exists in the final state of this Step.
template<typename Iterator>
void addParticles (Iterator first, Iterator last)
 Add a range of particles to this Step.
void addParticle (tPPtr p)
 Add a particle to this step.
template<typename Iterator>
void addIntermediates (Iterator first, Iterator last)
 Add a range of intermediate particles in this step.
void addIntermediate (tPPtr p)
 Add an intermediate particle in this Step.
void insertIntermediate (tPPtr p, tPPtr parent, tPPtr child)
 Add an intermediate particle.
void addSubProcess (tSubProPtr)
 Add a sub-process.
void removeSubProcess (tSubProPtr)
 Remove a sub-process.
void removeParticle (tPPtr p)
 Remove (recursively) the given Particle from the Step.
bool nullStep () const
 Return true if no new particles were introduced in this step.
template<typename Cont>
tParticleSet getCurrent (const Cont &c) const
 Get final state particles.
template<typename Iterator>
tParticleSet getCurrent (Iterator first, Iterator last) const
 Get final state particles.
StepPtr clone () const
 Return a clone of this step.
void persistentOutput (PersistentOStream &) const
 Standard function for writing to a persistent stream.
void persistentInput (PersistentIStream &, int)
 Standard function for reading from a persistent stream.
virtual void debugme () const
 Print out debugging information for this object on std::cerr.

Static Public Member Functions

template<typename PIterator>
static vector< tPVectorgetSinglets (PIterator first, PIterator last)
 Return a vector of particle vectors with colour-connected partons, where each particle vector is in a colour singlet state.
static void Init ()
 Standard Init function.

Protected Member Functions

void removeEntry (tPPtr p)
 Remove a particle entry from the step.
void rebind (const EventTranslationMap &trans)
 Rebind to cloned objects.
template<typename Inserter, typename PPointer>
void addIfFinal (Inserter o, PPointer p)
 Get final state particles.

Static Protected Member Functions

static vector< tPVectorgetSinglets (tParticleSet &)
 Used internally by the public getSinglets(.

Private Member Functions

Stepoperator= (const Step &)
 Assignement is not allowed.
void collision (tCollPtr c)
 Setup pointer to the Collision.
void handler (tcEventBasePtr sh)
 Setup pointer to the step handler.

Private Attributes

ParticleSet theParticles
 The set of all outgoing particle in this step.
ParticleSet theIntermediates
 The set of all intermediate particle in this step.
SubProcessVector theSubProcesses
 The vector of all sub-processes introduced in this step.
ParticleSet allParticles
 The set of all particles available in this step.
tCollPtr theCollision
 Pointer to the collision to which this step belongs.
tcEventBasePtr theHandler
 Pointer ot the step handler which performed this step.

Static Private Attributes

static ClassDescription< StepinitStep
 Describe concrete class with persistent data.

Friends

class Collision
 Most of the Event classes are friends with each other.
class Event
 Most of the Event classes are friends with each other.


Detailed Description

The Step class contains information of all particles present after certain step in the event generation.

There is also information about particles which were introduced as intermediate ones in the generation of the step. The Step may also contain one or more SubProcesses which were generated in the step. The Step is linked back to the Collision to which it belongs, and there may be a pointer to the StepHandler which generated the step.

See also:
Event

Collision

SubProcess

Particle

SelectorBase

SelectorBase

Definition at line 34 of file Step.h.


Constructor & Destructor Documentation

ThePEG::Step::Step ( tCollPtr  newCollision = tCollPtr(),
tcEventBasePtr  newHandler = tcEventBasePtr() 
) [inline]

Standard constructor.

Parameters:
newCollision the Collision to which this Step belongs.
newHandler the handler object in charge of the generation of this Step.

Definition at line 51 of file Step.h.


Member Function Documentation

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

Extract particles from this Step 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<typename OutputIterator>
void ThePEG::Step::selectFinalState ( OutputIterator  r  )  const [inline]

Extract all final state particles in this Step.

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

Definition at line 93 of file Step.h.

References select().

Referenced by getFinalState().

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

Extract all final state particles in this Step.

Returns:
a vector of pointers to the extracted particles.

Definition at line 101 of file Step.h.

References selectFinalState().

template<typename PIterator>
static vector<tPVector> ThePEG::Step::getSinglets ( PIterator  first,
PIterator  last 
) [inline, static]

Return a vector of particle vectors with colour-connected partons, where each particle vector is in a colour singlet state.

Deprecated:
Use the corresponding functions in ColourLine instead.

Definition at line 113 of file Step.h.

References ThePEG::left().

const ThePEG::PPair & ThePEG::Step::incoming (  )  const [inline]

Returns the colliding particles in the collision to which this step belongs.

(If this step does not belong to a collision, this method will probably cause a segmentation fault - This should be fixed.

Deprecated:
Maybe this method is not needed at all.)

Definition at line 533 of file Step.h.

References collision().

tPPtr ThePEG::Step::find ( tcPPtr  p  )  const [inline]

Get mutable particle.

If the given particle is present in this step, return its pointer otherwise return the null pointer;

Definition at line 153 of file Step.h.

References all(), ThePEG::Pointer::const_ptr_cast(), and ThePEG::member().

tPPtr ThePEG::Step::copyParticle ( tcPPtr  p  ) 

Copy a particle.

If the given Particle is present in this step, insert a copy and remove the original (or make it intermediate if it was initially added to this step). Returns the new Particle if the copy succeeded. If the copy fails, nothing is changed. For a successful call copyParticle(p)->previous() == p is true.

bool ThePEG::Step::setCopy ( tcPPtr  pold,
tPPtr  pnew 
)

Make particles copies of eachother.

Declare that pold and pnew are two instances of the same particle. If pnew is not present in the step it will be afterwars. Afterwards pold == pnew->previous() && pnew == pold->next() is true. Returns false if something went wrong.

tPPtr ThePEG::Step::insertCopy ( tcPPtr  p  ) 

Insert a copy.

If the given particle is present in the current Collision, insert copy of that particle 'before' the particle. If the particle does not belong to the current collision or if the copy failed, nothing is changed and the null pointer is returned. If successful insertCopy(p)->next() == p is true. The parents of the original particle will become the parents of the copy.

bool ThePEG::Step::addDecayProduct ( tcPPtr  parent,
tPPtr  child,
bool  fixColour = true 
)

Add decay product.

If the parent is present in this step or if it has immediate children in this step, insert the child and fix up references between the two. If the parent is among the final state particles, remove it (or make it intermediate if it was initially added to this step). The parent/child pointers of the affected particles will be set accordingly. If both the parent and child/children are coloured and fixColour is true, the colour flow will be set.

Returns:
true iff the addition succeeded.

Referenced by addDecayProduct().

template<typename CIterator>
bool ThePEG::Step::addDecayProduct ( tcPPtr  parent,
CIterator  firstChild,
CIterator  lastChild,
bool  fixColour = true 
) [inline]

Add decay products.

If the parent is present in this step or if it has immediate children in this step, insert the range of children and fix up references between the two. If the parent is among the final state particles, remove it (or make it intermediate if it was initially added to this step). The parent/child pointers of the affected particles will be set accordingly. If both the parent and children are coloured and fixColour is true, the colour flow will be set. The colour of the parent will then flow to the first added child, while the anti colour will flow to the last added child.

Returns:
true iff the addition succeeded.

Definition at line 217 of file Step.h.

References addDecayProduct().

void ThePEG::Step::addDecayNoCheck ( tPPtr  parent,
tPPtr  child 
)

Add a particle to this Step.

It is assumed to be already setup as a child to a parent particle. The parent is removed from the list of final state particles in this step. No consistency checks are performed.

Deprecated:
Use addDecayProduct(tPPtr child) instead.

void ThePEG::Step::addDecayProduct ( tPPtr  child  ) 

Add a particle to this Step.

It is assumed to be already setup as a child to parent particles. The parents are removed from the list of final state particles in this step. No consistency checks are performed.

bool ThePEG::Step::removeDecayProduct ( tcPPtr  parent,
tPPtr  child 
)

Remove the child form the given parent.

The child is not removed from the decay record.

Referenced by removeDecayProduct().

template<typename CIterator>
bool ThePEG::Step::removeDecayProduct ( tcPPtr  parent,
CIterator  firstChild,
CIterator  lastChild 
) [inline]

Remove children form the given parent.

The children are not removed from the decay record.

Definition at line 252 of file Step.h.

References removeDecayProduct().

template<typename Iterator>
bool ThePEG::Step::addDecayProduct ( Iterator  firstParent,
Iterator  lastParent,
tPPtr  child,
bool  checkfinal = true 
) [inline]

Add decay product.

Add the child as a decay product of all the listed parents. The parents must satisfy the same requirements as in the addDecayProduct(tcPPtr,tPPtr,bool) function. If any of the parents fail false is returned and nothing is changed. The parent/child pointers of the affected particles will be set accordingly, but no colour flow wll be set. If checkfinal is true the parents or its immediate children must be in the final state.

template<typename PIterator, typename CIterator>
bool ThePEG::Step::addDecayProduct ( PIterator  firstParent,
PIterator  lastParent,
CIterator  firstChild,
CIterator  lastChild 
) [inline]

Add the children as a decay products of all the listed particles.

The parents must satisfy the same requirements as in the addDecayProduct(tcPPtr,tPPtr,bool) function. If any of the parents fail false is returned and nothing is changed. The parent/child pointers of the affected particles will be set accordingly, but no colour flow wll be set.

void ThePEG::Step::fixColourFlow (  ) 

Fix the colour flow of particles which have been added to this step and which have not already had their colour neighbours set.

If a neighbor is found which has not been added in this step, it is first cloned in order not to compromise the colour flow of previous steps.

Deprecated:
This method should not be needed with the current ColourLine representation of colour.

tPPtr ThePEG::Step::colourNeighbour ( tcPPtr  particle,
bool  anti = false 
) const

Return the (anti-)colour neighbour of the given particle if one exists in the final state of this Step.

The colour neighbour has its colour connected to the same colour line as the given particles anti-colour. Will return null if the given particle is not in the final state of this Step.

tPPtr ThePEG::Step::antiColourNeighbour ( tcPPtr  particle  )  const

Return the anti-colour neighbour of the given particle if one exists in the final state of this Step.

The anti-colour neighbour has its anti-colour connected to the same colour line as the given particles colour. Will return null if the given particle is not in the final state of this Step.

template<typename Iterator>
void ThePEG::Step::addParticles ( Iterator  first,
Iterator  last 
) [inline]

Add a range of particles to this Step.

If this step belongs to a Collision, the paticle will also be added to the Collision. If this particle has not previously been in a Step, the birthStep pointer of the particle will be set.

void ThePEG::Step::addParticle ( tPPtr  p  ) 

Add a particle to this step.

If this step belongs to a Collision, the paticle will also be added to the Collision. If this particle has not previously been in a Step, the birthStep pointer of the particle will be set.

template<typename Iterator>
void ThePEG::Step::addIntermediates ( Iterator  first,
Iterator  last 
) [inline]

Add a range of intermediate particles in this step.

If this step belongs to a Collision, the particles will also be added to the Collision. If any particle has not previously been in a Step, the birthStep pointer of the particle will be set. The particles will be removed from the list of final state particles if present.

void ThePEG::Step::addIntermediate ( tPPtr  p  ) 

Add an intermediate particle in this Step.

If this Step belongs to a Collision, the particle will also be added to the Collision. If this particle has not previously been in a step, the birthStep pointer of the particle will be set. The particle will be removed from the list of final state particles if present.

void ThePEG::Step::insertIntermediate ( tPPtr  p,
tPPtr  parent,
tPPtr  child 
)

Add an intermediate particle.

Particle p is added so that if child previously was the child of parent, afterwards p will be the child of parent and child will be the child of p.

void ThePEG::Step::addSubProcess ( tSubProPtr   ) 

Add a sub-process.

All outgoing particles are added to the list of outgoing particles in the step. All other particles in the sub-process will be added to the list of intermediates.

void ThePEG::Step::removeSubProcess ( tSubProPtr   ) 

Remove a sub-process.

All incoming and outgoing particles are removed as well.

void ThePEG::Step::removeParticle ( tPPtr  p  ) 

Remove (recursively) the given Particle from the Step.

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

template<typename Cont>
tParticleSet ThePEG::Step::getCurrent ( const Cont &  c  )  const [inline]

Get final state particles.

Given a container, return the ones which belongs to the final state of this step. If a particle does not belong to these, it's children (or next instance) will be checked and possibly added instead (recursively).

Definition at line 392 of file Step.h.

template<typename Iterator>
tParticleSet ThePEG::Step::getCurrent ( Iterator  first,
Iterator  last 
) const [inline]

Get final state particles.

Given a range of particles, return the ones which belongs to the final state of this step. If a particle does not belong to these, it's children (or next instance) will be checked and possibly added instead (recursively)

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

Standard Init function.

See also:
Base::Init().

Reimplemented from ThePEG::Base.

static vector<tPVector> ThePEG::Step::getSinglets ( tParticleSet  )  [static, protected]

Used internally by the public getSinglets(.

..);

Deprecated:
Use the corresponding functions in ColourLine instead.

void ThePEG::Step::removeEntry ( tPPtr  p  )  [protected]

Remove a particle entry from the step.

Make its ancesters (if any) present in this step.

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

Rebind to cloned objects.

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

template<typename Inserter, typename PPointer>
void ThePEG::Step::addIfFinal ( Inserter  o,
PPointer  p 
) [inline, protected]

Get final state particles.

Insert particle p into with the Inserter o if p is a member of the final state of this Step. Otherwise call the method for the children of p if any.

virtual void ThePEG::Step::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 39 of file Step.h.

friend class Event [friend]

Most of the Event classes are friends with each other.

Definition at line 41 of file Step.h.


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

Generated on Thu Apr 29 12:43:02 2010 for ThePEG by  doxygen 1.5.5