ThePEG 2.3.0
|
The ColourLine class represents colour lines connecting Particle
s.
More...
#include <ColourLine.h>
Public Member Functions | |
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 | 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. | |
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. | |
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. | |
Functions for junction strings. | |
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 ClassDescription< ColourLine > | initColourLine |
Describe a concrete class with persistent data. | |
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. | |
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. | |
ColourLine & | operator= (const ColourLine &)=delete |
Private and non-existent assignment operator. | |
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. | |
virtual | ~ColourLine () |
Destructor. | |
Additional Inherited Members | |
Public Types inherited from ThePEG::Pointer::ReferenceCounted | |
typedef unsigned int | CounterType |
The integer type used for counting. | |
Static Public Member Functions inherited from ThePEG::Base | |
static void | Init () |
The standard Init function used to initialize the interfaces. | |
Public Attributes inherited from ThePEG::Pointer::ReferenceCounted | |
const unsigned long | uniqueId |
The unique ID. | |
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. |
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. |
|
inline |
Return the vectors of particles connected to this line with their anti-colours.
Definition at line 93 of file ColourLine.h.
References theAntiColoured.
|
inline |
Return the vectors of particles connected to this line with their colours.
Definition at line 87 of file ColourLine.h.
References theColoured.
|
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().
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.
|
inline |
Return the first (anti-)coloured parton among the given range of particles which is on this colour line.
Definition at line 209 of file ColourLine.h.
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.
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. |
|
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 theSourceNeighbours.
|
inline |
If this colour line ends in a colour sink, these two colour lines ends in the same.
Definition at line 158 of file ColourLine.h.
References theSinkNeighbours.
|
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.
|
staticprivate |
Describe a concrete class with persistent data.
Definition at line 272 of file ColourLine.h.
|
private |
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.
Definition at line 265 of file ColourLine.h.
|
private |
The particles connecting to this colour line, following the outgoing colour flow.
Definition at line 246 of file ColourLine.h.
Referenced by antiColoured().
|
private |
The particles connecting to this colour line, following the incoming colour flow.
Definition at line 240 of file ColourLine.h.
Referenced by coloured().
|
private |
If this colour line ends in a colour sink, these two colour lines ends in the same.
Definition at line 258 of file ColourLine.h.
Referenced by setSinkNeighbours(), sinkNeighbours(), and sourceNeighbours().
|
private |
If this colour line stems from a colour source, these two colour lines stems from the same.
Definition at line 252 of file ColourLine.h.
Referenced by setSourceNeighbours(), and sourceNeighbours().