File: ColourLine.h
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
methods 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 sinks and sources are implemented.
See
also:
namespace Pythia7
CLASS
ColourLine:
Base class:
Public members:
inline ColourLine();
inline ColourLine(const ColourLine &);
virtual ~ColourLine();
Standard ctors and dtor.
static tColinePtr create(tPPtr col, tPPtr anti);
Set a pair of colour - anticolour particles in a newly created
colour line.
static tColinePtr create(tPPtr col, bool anti = false);
Set a (anti) particle in a newly created colour line.
inline const tPVector & coloured() const;
inline const tPVector & antiColoured() const;
Return the vectors of particles connected to this line with their
coloures or anti colours.
inline tPPtr 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.
inline tPPtr 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 addAntiColoured(tPPtr);
Add an anti coloured particle to this line.
void addColoured(tPPtr, bool anti = false);
Add a coloured particle to this line.
void removeAntiColoured(tPPtr);
Add an anti coloured particle to this line.
void removeColoured(tPPtr, bool anti = false);
Add a coloured particle to this line.
inline tColinePair sinkNeighbours() const;
If this colour line ends in a colour sink, these two colour lines
ends in the same.
inline tColinePair sourceNeighbours(bool anti = false) const;
If this colour line stems from a colour source, these two colour
lines stems from the same.
inline void setSinkNeighbours(tColinePtr, tColinePtr);
inline void setSourceNeighbours(tColinePtr, tColinePtr);
Add two colour lines as neighbour to this lines sink or
source. Also the neighbors are set up correspondingly.
template <typename Iterator>
inline typename 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);
Write out information about this colour line to the stream.
void persistentOutput(PersistentOStream &) const;
void persistentInput(PersistentIStream &, int);
Standard functions for writing and reading from persistent streams.
Private members:
tPVector theColoured;
tPVector theAntiColoured;
The particles connecting to this colour line, either following
the incoming colour flow or the outgoing one.
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.
static ClassDescription<ColourLine> initColourLine;
Describe a concrete class with persistent data.
ColourLine & operator=(const ColourLine &);
Private and non-existent assignment operator.
DEFINED MACROS
INCLUDED FILES
EventConfig.h
Pythia7/Utilities/ClassDescription.h
Pythia7/EventRecord/ColourSinglet.h