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

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

#include <ColourLine.h>

Inheritance diagram for ThePEG::ColourLine:

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

ColourLineoperator= (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< 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 Private Attributes

static ClassDescription< ColourLineinitColourLine
 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.
 
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.

Referenced by antiColoured().

◆ 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.

Referenced by antiColoured().

◆ 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(), and ~ColourLine().

◆ 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.

Referenced by antiColoured().

◆ 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.

Referenced by setSourceNeighbours().

◆ 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.

Referenced by antiColoured().

◆ 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 join(), and theSourceNeighbours.

◆ 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.

Referenced by antiColoured().


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