thepeg is hosted by Hepforge, IPPP Durham
ThePEG 2.3.0
ThePEG::ColourLine Class Reference

The ColourLine class represents colour lines connecting Particles. More...

#include <ColourLine.h>

Inheritance diagram for ThePEG::ColourLine:

Public Member Functions

Access particles connected to the colour line.
const tPVectorcoloured () const
 Return the vectors of particles connected to this line with their colours.
 
const tPVectorantiColoured () 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< ColinePtrorphanedConnectors
 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< ColourLineinitColourLine
 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.
 
ColourLineoperator= (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.
 
ReferenceCountedoperator= (const ReferenceCounted &)
 Assignment.
 

Detailed Description

The ColourLine class represents colour lines connecting Particles.

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.

See also
Particle
ColourBase

Definition at line 36 of file ColourLine.h.

Member Function Documentation

◆ addColoured()

void ThePEG::ColourLine::addColoured ( tPPtr  p,
bool  anti = false 
)

Add a particle having this as a (anti-)colour line.

Parameters
pthe particle to be connected.
antiif true, this is the anti-colour line of p.

◆ addColouredIndexed()

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.

Parameters
pthe particle to be connected.
antiif true, this is the anti-colour line of p.

◆ antiColoured()

const tPVector & ThePEG::ColourLine::antiColoured ( ) const
inline

Return the vectors of particles connected to this line with their anti-colours.

Definition at line 93 of file ColourLine.h.

References theAntiColoured.

◆ coloured()

const tPVector & ThePEG::ColourLine::coloured ( ) const
inline

Return the vectors of particles connected to this line with their colours.

Definition at line 87 of file ColourLine.h.

References theColoured.

◆ create() [1/2]

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().

◆ create() [2/2]

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 .

Parameters
pthe particle to be connected.
antiif true, the created object is the anti-colour line of p.

◆ createAnti()

static tColinePtr ThePEG::ColourLine::createAnti ( tPPtr  p)
inlinestatic

Create a colour line.

Set a particle for which the created object is a anti-colour line .

Parameters
pthe particle to be connected.

Definition at line 62 of file ColourLine.h.

References create().

◆ endParticle()

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.

◆ getColouredParticle()

template<typename Iterator >
std::iterator_traits< Iterator >::value_type ThePEG::ColourLine::getColouredParticle ( Iterator  first,
Iterator  last,
bool  anti = false 
) const
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.

◆ join()

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.

◆ removeColoured()

void ThePEG::ColourLine::removeColoured ( tPPtr  p,
bool  anti = false 
)

Remove a particle having this as a (anti-)colour line.

Parameters
pthe particle to be removed.
antiif true, this is the anti-colour line of p.

◆ setSinkNeighbours()

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 174 of file ColourLine.h.

References theSinkNeighbours.

◆ setSourceNeighbours()

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 185 of file ColourLine.h.

References theSourceNeighbours.

◆ sinkNeighbours()

tColinePair ThePEG::ColourLine::sinkNeighbours ( ) const
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.

◆ sourceNeighbours()

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.

Parameters
antiif true return sinkNeighbours().

Definition at line 165 of file ColourLine.h.

References theSinkNeighbours, and theSourceNeighbours.

◆ startParticle()

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.

Member Data Documentation

◆ initColourLine

ClassDescription<ColourLine> ThePEG::ColourLine::initColourLine
staticprivate

Describe a concrete class with persistent data.

Definition at line 272 of file ColourLine.h.

◆ orphanedConnectors

vector<ColinePtr> ThePEG::ColourLine::orphanedConnectors
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.

◆ theAntiColoured

tPVector ThePEG::ColourLine::theAntiColoured
private

The particles connecting to this colour line, following the outgoing colour flow.

Definition at line 246 of file ColourLine.h.

Referenced by antiColoured().

◆ theColoured

tPVector ThePEG::ColourLine::theColoured
private

The particles connecting to this colour line, following the incoming colour flow.

Definition at line 240 of file ColourLine.h.

Referenced by coloured().

◆ theSinkNeighbours

tColinePair ThePEG::ColourLine::theSinkNeighbours
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().

◆ theSourceNeighbours

tColinePair ThePEG::ColourLine::theSourceNeighbours
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().


The documentation for this class was generated from the following file: