ThePEG
2.2.1
|
The ColourLine class represents colour lines connecting Particle
s.
More...
#include <ColourLine.h>
Public Member Functions | |
virtual | ~ColourLine () |
Destructor. | |
bool | join (ColinePtr line) |
Join with the given ColourLine. More... | |
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. More... | |
tPPtr | endParticle () const |
Return the last particle on this colour line. More... | |
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. More... | |
void | addAntiColouredIndexed (tPPtr p, int index) |
Add a particle having this as a anti-colour line at a given index. | |
void | addColouredIndexed (tPPtr p, int index, bool anti=false) |
Add a particle having this as a (anti-)colour line at a given index. More... | |
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. More... | |
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. More... | |
void | setSinkNeighbours (tColinePtr l1, tColinePtr l2) |
Add two colour lines as neighbours to this line. More... | |
void | setSourceNeighbours (tColinePtr l1, tColinePtr l2) |
Add two colour lines as neighbours to this line. 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... | |
virtual void | debugme () 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 | |
Creation functions. | |
static tColinePtr | create (tPPtr col, tPPtr anti) |
Create a colour line. More... | |
static tColinePtr | create (tPPtr p, bool anti=false) |
Create a colour line. More... | |
static tColinePtr | createAnti (tPPtr p) |
Create a colour line. More... | |
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. | |
Static Public Member Functions inherited from ThePEG::Base | |
static void | Init () |
The standard Init function used to initialize the interfaces. More... | |
Private Member Functions | |
ColourLine & | operator= (const ColourLine &)=delete |
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. | |
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... | |
Protected Member Functions inherited from ThePEG::Pointer::ReferenceCounted | |
ReferenceCounted () | |
Default constructor. | |
ReferenceCounted (const ReferenceCounted &) | |
Copy-constructor. | |
ReferenceCounted & | operator= (const ReferenceCounted &) |
Assignment. | |
The ColourLine class represents colour lines connecting 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.
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. |
Referenced by antiColoured().
void ThePEG::ColourLine::addColouredIndexed | ( | tPPtr | p, |
int | index, | ||
bool | anti = false |
||
) |
Add a particle having this as a (anti-)colour line at a given index.
p | the particle to be connected. |
anti | if true, this is the anti-colour line of p. |
Referenced by antiColoured().
|
static |
Create a colour line.
Set a pair of colour - anticolour particles in a newly created colour line.
Referenced by createAnti().
|
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. |
|
inlinestatic |
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(), and ~ColourLine().
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.
Referenced by antiColoured().
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.
Referenced by setSourceNeighbours().
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. |
Referenced by antiColoured().
|
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 174 of file ColourLine.h.
References theSinkNeighbours.
|
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 185 of file ColourLine.h.
References join(), and theSourceNeighbours.
|
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 165 of file ColourLine.h.
References theSinkNeighbours, and theSourceNeighbours.
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.
Referenced by antiColoured().