Particle
s.
More...
#include <ColourLine.h>
Public Member Functions | |
virtual | ~ColourLine () |
Destructor. | |
bool | join (ColinePtr line) |
Join with the given ColourLine. | |
template<typename Iterator> | |
std::iterator_traits< Iterator > ::value_type | getColouredParticle (Iterator first, Iterator last, bool anti=false) const |
Return the first (anti-)coloured parton among the given range of particles which is on this colour line. | |
void | write (ostream &os, tcEventPtr event, bool anti) const |
Write out information about this colour line to the stream. | |
void | persistentOutput (PersistentOStream &) const |
Standard function for writing to a persistent stream. | |
void | persistentInput (PersistentIStream &, int) |
Standard function for reading from a persistent stream. | |
Access particles connected to the colour line. | |
const tPVector & | coloured () const |
Return the vectors of particles connected to this line with their colours. | |
const tPVector & | antiColoured () const |
Return the vectors of particles connected to this line with their anti-colours. | |
tPPtr | startParticle () const |
Return the first particle on this colour line. | |
tPPtr | endParticle () const |
Return the last particle on this colour line. | |
Add and remove particles in a colour line. | |
void | addAntiColoured (tPPtr) |
Add a particle having this as a anti-colour line. | |
void | addColoured (tPPtr p, bool anti=false) |
Add a particle having this as a (anti-)colour line. | |
void | removeAntiColoured (tPPtr) |
Remove a particle having this as an anti-colour line. | |
void | removeColoured (tPPtr p, bool anti=false) |
Remove a particle having this as a (anti-)colour line. | |
Functions for junction strings. | |
tColinePair | sinkNeighbours () const |
If this colour line ends in a colour sink, these two colour lines ends in the same. | |
tColinePair | sourceNeighbours (bool anti=false) const |
If this colour line stems from a colour source (sink), these two colour lines stems from (ends in) the same. | |
void | setSinkNeighbours (tColinePtr l1, tColinePtr l2) |
Add two colour lines as neighbours to this line. | |
void | setSourceNeighbours (tColinePtr l1, tColinePtr l2) |
Add two colour lines as neighbours to this line. | |
Static Public Member Functions | |
Creation functions. | |
static tColinePtr | create (tPPtr col, tPPtr anti) |
Create a colour line. | |
static tColinePtr | create (tPPtr p, bool anti=false) |
Create a colour line. | |
static tColinePtr | createAnti (tPPtr p) |
Create a colour line. | |
static tColinePtr | create (tColinePtr son1, tColinePtr son2, tColinePtr sin1, tColinePtr sin2) |
Create a coloue line which is a connector between two junctions, a source junction with neigboring colour lines son1 and son2 and a sink junction with neigboring colour lines sin1 and sin2. | |
Private Member Functions | |
ColourLine & | operator= (const ColourLine &) |
Private and non-existent assignment operator. | |
Private Attributes | |
tPVector | theColoured |
The particles connecting to this colour line, following the incoming colour flow. | |
tPVector | theAntiColoured |
The particles connecting to this colour line, following the outgoing colour flow. | |
tColinePair | theSourceNeighbours |
If this colour line stems from a colour source, these two colour lines stems from the same. | |
tColinePair | theSinkNeighbours |
If this colour line ends in a colour sink, these two colour lines ends in the same. | |
vector< ColinePtr > | orphanedConnectors |
Colour lines which are connectors between two junctions do not have a particle which owns it, instead it is owned by one of the source neighbours. | |
Static Private Attributes | |
static ClassDescription < ColourLine > | initColourLine |
Describe a concrete class with persistent data. |
Particle
s.
A ColourLine
keeps track on the particles connected to it. To connect a particle to a colour line the addColoured()
and addAntiColoured()
functions should be used - these will automatically set up the Particle correctly. There is no method in a Particle to directly set its colour lines.
If a colour line stems from a colour source or ends in a colour sink, it is possible to obtain the neighbouring colour lines. This is also the way junction strings and sinks and sources are implemented.
Definition at line 36 of file ColourLine.h.
static tColinePtr ThePEG::ColourLine::create | ( | tPPtr | col, | |
tPPtr | anti | |||
) | [static] |
Create a colour line.
Set a pair of colour - anticolour particles in a newly created colour line.
Referenced by createAnti().
static tColinePtr ThePEG::ColourLine::create | ( | tPPtr | p, | |
bool | anti = false | |||
) | [static] |
Create a colour line.
Set a particle for which the created object is a (anti-)colour line .
p | the particle to be connected. | |
anti | if true, the created object is the anti-colour line of p. |
static tColinePtr ThePEG::ColourLine::createAnti | ( | tPPtr | p | ) | [inline, static] |
Create a colour line.
Set a particle for which the created object is a anti-colour line .
p | the particle to be connected. |
Definition at line 62 of file ColourLine.h.
References create().
tPPtr ThePEG::ColourLine::startParticle | ( | ) | const |
Return the first particle on this colour line.
Returns null if this line stems from a colour source. If the particle is outgoing, its anti colour is connected, otherwise its colour is connected.
tPPtr ThePEG::ColourLine::endParticle | ( | ) | const |
Return the last particle on this colour line.
Returns null if this line ends in a colour sink. If the particle is outgoing, its colour is connected, otherwise its anti colour is connected.
void ThePEG::ColourLine::addColoured | ( | tPPtr | p, | |
bool | anti = false | |||
) |
Add a particle having this as a (anti-)colour line.
p | the particle to be connected. | |
anti | if true, this is the anti-colour line of p. |
void ThePEG::ColourLine::removeColoured | ( | tPPtr | p, | |
bool | anti = false | |||
) |
Remove a particle having this as a (anti-)colour line.
p | the particle to be removed. | |
anti | if true, this is the anti-colour line of p. |
tColinePair ThePEG::ColourLine::sourceNeighbours | ( | bool | anti = false |
) | const [inline] |
If this colour line stems from a colour source (sink), these two colour lines stems from (ends in) the same.
anti | if true return sinkNeighbours(). |
Definition at line 153 of file ColourLine.h.
References theSinkNeighbours, and theSourceNeighbours.
void ThePEG::ColourLine::setSinkNeighbours | ( | tColinePtr | l1, | |
tColinePtr | l2 | |||
) | [inline] |
Add two colour lines as neighbours to this line.
Afterwards all three will end in the same sink. Also the neighbors are set up correspondingly.
Definition at line 162 of file ColourLine.h.
References theSinkNeighbours.
void ThePEG::ColourLine::setSourceNeighbours | ( | tColinePtr | l1, | |
tColinePtr | l2 | |||
) | [inline] |
Add two colour lines as neighbours to this line.
Afterwards all three will stem from the same source. Also the neighbors are set up correspondingly.
Definition at line 173 of file ColourLine.h.
References theSourceNeighbours.
bool ThePEG::ColourLine::join | ( | ColinePtr | line | ) |
Join with the given ColourLine.
The colour of the given line is joined so that it will flow into this line, ie. the anti-coloured particle in the end of the line will become connected to the coloured particle in the of this line. After the joining the given line will not be connected to anything.