The Step class contains information of all particles present after certain step in the event generation. More...
#include <Step.h>
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 ParticleSet & | all () const |
A reference to the set of all particles in this step. | |
const ParticleSet & | particles () const |
A reference to the set of outgoing particles in this step. | |
const ParticleSet & | intermediates () const |
A reference to the set of intermediate particles in this step. | |
const SubProcessVector & | subProcesses () const |
A reference to the vector of sub-processes introduced in this step. | |
const PPair & | incoming () 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< tPVector > | getSinglets (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. | |
ReferenceCounted & | operator= (const ReferenceCounted &) |
Assignment. | |
Static Protected Member Functions | |
static vector< tPVector > | getSinglets (tParticleSet &) |
Used internally by the public getSinglets(...);. | |
Private Member Functions | |
Step & | operator= (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< Step > | initStep |
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. | |
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.
|
inline |
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.
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.
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.
|
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.
Definition at line 217 of file Step.h.
References addDecayProduct().
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.
Referenced by addDecayProduct().
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.
|
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.
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::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.
void ThePEG::Step::addParticle | ( | tPPtr | p | ) |
void ThePEG::Step::addParticles | ( | Iterator | first, |
Iterator | last | ||
) |
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.
|
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().
|
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().
|
inlineprivate |
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.
|
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.
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().
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.
|
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().
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)
|
inline |
Extract all final state particles in this Step.
Definition at line 101 of file Step.h.
References selectFinalState().
|
inlinestatic |
Return a vector of particle vectors with colour-connected partons, where each particle vector is in a colour singlet state.
Definition at line 113 of file Step.h.
References getSinglets(), and ThePEG::left().
Referenced by getSinglets().
|
staticprotected |
Used internally by the public getSinglets(...);.
|
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.
|
inlineprivate |
|
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.
Definition at line 533 of file Step.h.
References collision().
|
static |
Standard Init function.
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.
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.
|
inline |
A reference to the set of intermediate particles in this step.
Definition at line 131 of file Step.h.
References theIntermediates.
|
inline |
A reference to the set of outgoing particles in this step.
Definition at line 126 of file Step.h.
References theParticles.
|
protected |
|
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().
Remove the child form the given parent.
The child is not removed from the decay record.
Referenced by removeDecayProduct().
|
protected |
Remove a particle entry from the step.
Make its ancesters (if any) present in this step.
void ThePEG::Step::removeParticle | ( | tPPtr | p | ) |
void ThePEG::Step::removeSubProcess | ( | tSubProPtr | ) |
Remove a sub-process.
All incoming and outgoing particles are removed as well.
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.
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().
|
inline |
Extract all final state particles in this Step.
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().
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.
|
inline |
A reference to the vector of sub-processes introduced in this step.
Definition at line 137 of file Step.h.
References theSubProcesses.
|
friend |
|
friend |
|
private |
|
staticprivate |
|
private |
Pointer to the collision to which this step belongs.
Definition at line 498 of file Step.h.
Referenced by collision().
|
private |
|
private |
The set of all intermediate particle in this step.
Definition at line 483 of file Step.h.
Referenced by intermediates().
|
private |
The set of all outgoing particle in this step.
Definition at line 478 of file Step.h.
Referenced by particles().
|
private |
The vector of all sub-processes introduced in this step.
Definition at line 488 of file Step.h.
Referenced by subProcesses().