thepeg is hosted by Hepforge, IPPP Durham
ThePEG  2.2.1
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:

Public Member Functions

 Step (tCollPtr newCollision=tCollPtr(), tcEventBasePtr newHandler=tcEventBasePtr())
 Standard constructor. More...
 
 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. More...
 
template<typename OutputIterator >
void selectFinalState (OutputIterator r) const
 Extract all final state particles in this Step. More...
 
tPVector getFinalState () const
 Extract all final state particles in this Step. More...
 
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. More...
 
tPPtr find (tcPPtr p) const
 Get mutable particle. More...
 
tPPtr copyParticle (tcPPtr p)
 Copy a particle. More...
 
bool setCopy (tcPPtr pold, tPPtr pnew)
 Make particles copies of eachother. More...
 
tPPtr insertCopy (tcPPtr p)
 Insert a copy. More...
 
bool addDecayProduct (tcPPtr parent, tPPtr child, bool fixColour=true)
 Add decay product. More...
 
template<typename CIterator >
bool addDecayProduct (tcPPtr parent, CIterator firstChild, CIterator lastChild, bool fixColour=true)
 Add decay products. More...
 
void addDecayNoCheck (tPPtr parent, tPPtr child)
 Add a particle to this Step. More...
 
void addDecayProduct (tPPtr child)
 Add a particle to this Step. More...
 
bool removeDecayProduct (tcPPtr parent, tPPtr child)
 Remove the child form the given parent. More...
 
template<typename CIterator >
bool removeDecayProduct (tcPPtr parent, CIterator firstChild, CIterator lastChild)
 Remove children form the given parent. More...
 
template<typename Iterator >
bool addDecayProduct (Iterator firstParent, Iterator lastParent, tPPtr child, bool checkfinal=true)
 Add decay product. More...
 
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. More...
 
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. More...
 
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. More...
 
tPPtr antiColourNeighbour (tcPPtr particle) const
 Return the anti-colour neighbour of the given particle if one exists in the final state of this Step. More...
 
template<typename Iterator >
void addParticles (Iterator first, Iterator last)
 Add a range of particles to this Step. More...
 
void addParticle (tPPtr p)
 Add a particle to this step. More...
 
template<typename Iterator >
void addIntermediates (Iterator first, Iterator last)
 Add a range of intermediate particles in this step. More...
 
void addIntermediate (tPPtr p)
 Add an intermediate particle in this Step. More...
 
void insertIntermediate (tPPtr p, tPPtr parent, tPPtr child)
 Add an intermediate particle. More...
 
void addSubProcess (tSubProPtr)
 Add a sub-process. More...
 
void removeSubProcess (tSubProPtr)
 Remove a sub-process. More...
 
void removeParticle (tPPtr p)
 Remove (recursively) the given Particle from the Step. More...
 
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. More...
 
template<typename Iterator >
tParticleSet getCurrent (Iterator first, Iterator last) const
 Get final state particles. More...
 
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. More...
 
- 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...
 
- Public Member Functions inherited from ThePEG::Pointer::ReferenceCounted
CounterType referenceCount () const
 Return the reference count.
 

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. More...
 
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

void removeEntry (tPPtr p)
 Remove a particle entry from the step. More...
 
void rebind (const EventTranslationMap &trans)
 Rebind to cloned objects. More...
 
template<typename Inserter , typename PPointer >
void addIfFinal (Inserter o, PPointer p)
 Get final state particles. More...
 
- Protected Member Functions inherited from ThePEG::Pointer::ReferenceCounted
 ReferenceCounted ()
 Default constructor.
 
 ReferenceCounted (const ReferenceCounted &)
 Copy-constructor.
 
ReferenceCountedoperator= (const ReferenceCounted &)
 Assignment.
 

Static Protected Member Functions

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

Private Member Functions

Stepoperator= (const Step &)=delete
 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. More...
 
class Event
 Most of the Event classes are friends with each other. 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

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

◆ Step()

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

Standard constructor.

Parameters
newCollisionthe Collision to which this Step belongs.
newHandlerthe handler object in charge of the generation of this Step.

Definition at line 51 of file Step.h.

References ~Step().

Member Function Documentation

◆ addDecayNoCheck()

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.

Referenced by addDecayProduct().

◆ addDecayProduct() [1/5]

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(), find(), and removeDecayProduct().

◆ addDecayProduct() [2/5]

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 addDecayNoCheck(), addDecayProduct(), and removeDecayProduct().

◆ addDecayProduct() [3/5]

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.

◆ addDecayProduct() [4/5]

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

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.

◆ addDecayProduct() [5/5]

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

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.

◆ addIfFinal()

template<typename Inserter , typename PPointer >
void ThePEG::Step::addIfFinal ( Inserter  o,
PPointer  p 
)
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.

Referenced by getCurrent().

◆ addIntermediate()

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.

Referenced by removeDecayProduct().

◆ addIntermediates()

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

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.

Referenced by removeDecayProduct().

◆ addParticle()

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.

Referenced by removeDecayProduct().

◆ addParticles()

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

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.

Referenced by removeDecayProduct().

◆ addSubProcess()

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.

Referenced by removeDecayProduct().

◆ antiColourNeighbour()

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.

Referenced by removeDecayProduct().

◆ colourNeighbour()

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.

Referenced by removeDecayProduct().

◆ copyParticle()

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.

Referenced by find().

◆ debugme()

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.

◆ find()

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 addDecayProduct(), all(), ThePEG::Pointer::const_ptr_cast(), copyParticle(), insertCopy(), ThePEG::member(), and setCopy().

◆ fixColourFlow()

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.

Referenced by removeDecayProduct().

◆ getCurrent() [1/2]

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.

References addIfFinal(), clone(), getSinglets(), Init(), operator=(), persistentInput(), persistentOutput(), rebind(), and removeEntry().

◆ getCurrent() [2/2]

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

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)

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

◆ getSinglets() [1/2]

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

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

Referenced by getCurrent().

◆ getSinglets() [2/2]

static vector<tPVector> ThePEG::Step::getSinglets ( tParticleSet )
staticprotected

Used internally by the public getSinglets(...);.

Deprecated:
Use the corresponding functions in ColourLine instead.

◆ incoming()

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

Referenced by subProcesses().

◆ Init()

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

Standard Init function.

See also
Base::Init().

Referenced by getCurrent().

◆ insertCopy()

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.

Referenced by find().

◆ insertIntermediate()

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.

Referenced by removeDecayProduct().

◆ rebind()

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.

Referenced by getCurrent().

◆ removeDecayProduct() [1/2]

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 addDecayProduct(), and removeDecayProduct().

◆ removeDecayProduct() [2/2]

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 addDecayProduct(), addIntermediate(), addIntermediates(), addParticle(), addParticles(), addSubProcess(), antiColourNeighbour(), colourNeighbour(), fixColourFlow(), insertIntermediate(), nullStep(), removeDecayProduct(), removeParticle(), and removeSubProcess().

◆ removeEntry()

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

Remove a particle entry from the step.

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

Referenced by getCurrent().

◆ removeParticle()

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.

Referenced by removeDecayProduct().

◆ removeSubProcess()

void ThePEG::Step::removeSubProcess ( tSubProPtr  )

Remove a sub-process.

All incoming and outgoing particles are removed as well.

Referenced by removeDecayProduct().

◆ select()

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

Extract particles from this Step 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 collision(), and selectFinalState().

◆ selectFinalState()

template<typename OutputIterator >
void ThePEG::Step::selectFinalState ( OutputIterator  r) const
inline

Extract all final state particles in this Step.

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

◆ setCopy()

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.

Referenced by find().

Friends And Related Function Documentation

◆ Collision

friend class Collision
friend

Most of the Event classes are friends with each other.

Definition at line 39 of file Step.h.

◆ Event

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: