thepeg is hosted by Hepforge, IPPP Durham
ThePEG 2.3.0
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.
 
 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.
 
- 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.
 
virtual void debugme () const
 Print out debugging information for this object on std::cerr.
 
- 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.
 
static void Init ()
 Standard Init function.
 
- Static Public Member Functions inherited from ThePEG::Base
static void Init ()
 The standard Init function used to initialize the interfaces.
 

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

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.
 
class Event
 Most of the Event classes are friends with each other.
 

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.
 

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.

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.

◆ addDecayProduct() [1/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() [2/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.

◆ addDecayProduct() [3/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 addDecayProduct().

◆ addDecayProduct() [4/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().

◆ addDecayProduct() [5/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.

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

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

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

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

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

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

◆ all()

const ParticleSet & ThePEG::Step::all ( ) const
inline

A reference to the set of all particles in this step.

Definition at line 121 of file Step.h.

References allParticles.

Referenced by find().

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

◆ collision() [1/2]

tCollPtr ThePEG::Step::collision ( ) const
inline

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

Definition at line 74 of file Step.h.

References theCollision.

Referenced by incoming().

◆ collision() [2/2]

void ThePEG::Step::collision ( tCollPtr  c)
inlineprivate

Setup pointer to the Collision.

Definition at line 466 of file Step.h.

References theCollision.

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

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

◆ 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 all(), and ThePEG::member().

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

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

Referenced by getCurrent().

◆ 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 getSinglets(), and ThePEG::left().

Referenced by getSinglets().

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

◆ handler() [1/2]

tcEventBasePtr ThePEG::Step::handler ( ) const
inline

Return a pointer to the step handler which performed the generation of this step.

Definition at line 69 of file Step.h.

References theHandler.

◆ handler() [2/2]

void ThePEG::Step::handler ( tcEventBasePtr  sh)
inlineprivate

Setup pointer to the step handler.

Definition at line 471 of file Step.h.

References theHandler.

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

◆ Init()

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

Standard Init function.

See also
Base::Init().

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

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

◆ intermediates()

const ParticleSet & ThePEG::Step::intermediates ( ) const
inline

A reference to the set of intermediate particles in this step.

Definition at line 131 of file Step.h.

References theIntermediates.

◆ particles()

const ParticleSet & ThePEG::Step::particles ( ) const
inline

A reference to the set of outgoing particles in this step.

Definition at line 126 of file Step.h.

References theParticles.

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

◆ removeDecayProduct() [1/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 removeDecayProduct().

◆ removeDecayProduct() [2/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 removeDecayProduct().

◆ removeEntry()

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

Remove a particle entry from the step.

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

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

◆ removeSubProcess()

void ThePEG::Step::removeSubProcess ( tSubProPtr  )

Remove a sub-process.

All incoming and outgoing particles are removed as well.

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

◆ subProcesses()

const SubProcessVector & ThePEG::Step::subProcesses ( ) const
inline

A reference to the vector of sub-processes introduced in this step.

Definition at line 137 of file Step.h.

References theSubProcesses.

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.

Member Data Documentation

◆ allParticles

ParticleSet ThePEG::Step::allParticles
private

The set of all particles available in this step.

Definition at line 493 of file Step.h.

Referenced by all().

◆ initStep

ClassDescription<Step> ThePEG::Step::initStep
staticprivate

Describe concrete class with persistent data.

Definition at line 518 of file Step.h.

◆ theCollision

tCollPtr ThePEG::Step::theCollision
private

Pointer to the collision to which this step belongs.

Definition at line 498 of file Step.h.

Referenced by collision().

◆ theHandler

tcEventBasePtr ThePEG::Step::theHandler
private

Pointer ot the step handler which performed this step.

Definition at line 503 of file Step.h.

Referenced by handler().

◆ theIntermediates

ParticleSet ThePEG::Step::theIntermediates
private

The set of all intermediate particle in this step.

Definition at line 483 of file Step.h.

Referenced by intermediates().

◆ theParticles

ParticleSet ThePEG::Step::theParticles
private

The set of all outgoing particle in this step.

Definition at line 478 of file Step.h.

Referenced by particles().

◆ theSubProcesses

SubProcessVector ThePEG::Step::theSubProcesses
private

The vector of all sub-processes introduced in this step.

Definition at line 488 of file Step.h.

Referenced by subProcesses().


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