#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. | |
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. | |
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< tPVector > | getSinglets (tParticleSet &) |
Used internally by the public getSinglets(. | |
Private Member Functions | |
Step & | operator= (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< 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. |
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.
Definition at line 34 of file Step.h.
ThePEG::Step::Step | ( | tCollPtr | newCollision = tCollPtr() , |
|
tcEventBasePtr | newHandler = tcEventBasePtr() | |||
) | [inline] |
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.
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().
void ThePEG::Step::selectFinalState | ( | OutputIterator | r | ) | const [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().
tPVector ThePEG::Step::getFinalState | ( | ) | const [inline] |
Extract all final state particles in this Step.
Definition at line 101 of file Step.h.
References selectFinalState().
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.
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.
Definition at line 533 of file Step.h.
References collision().
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().
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.
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.
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 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().
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.
Definition at line 217 of file Step.h.
References addDecayProduct().
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.
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.
Remove the child form the given parent.
The child is not removed from the decay record.
Referenced by removeDecayProduct().
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().
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.
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.
void ThePEG::Step::addParticles | ( | Iterator | first, | |
Iterator | last | |||
) | [inline] |
void ThePEG::Step::addParticle | ( | tPPtr | p | ) |
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.
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 | ) |
tParticleSet ThePEG::Step::getCurrent | ( | const Cont & | c | ) | const [inline] |
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] |
static vector<tPVector> ThePEG::Step::getSinglets | ( | tParticleSet & | ) | [static, protected] |
Used internally by the public getSinglets(.
..);
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] |
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.
friend class Collision [friend] |
friend class Event [friend] |