9 #ifndef ThePEG_ColourLine_H 10 #define ThePEG_ColourLine_H 14 #include "ThePEG/Utilities/ClassDescription.h" 15 #include "ThePEG/EventRecord/ColourSinglet.h" 177 l1->theSinkNeighbours.first = l2->theSinkNeighbours.first =
this;
188 l1->theSourceNeighbours.first = l2->theSourceNeighbours.first =
this;
207 template <
typename Iterator>
208 typename std::iterator_traits<Iterator>::value_type
210 typedef typename std::iterator_traits<Iterator>::value_type ParticlePointer;
211 for ( ; first != last; ++first )
212 if ( (**first).coloured() && (**first).hasColourLine(
this, anti) )
214 return ParticlePointer();
305 static string className() {
return "ThePEG::ColourLine"; }
308 static string library() {
return "ColourLine.so"; }
PersistentIStream is used to read persistent objects from a stream where they were previously written...
pair< tColinePtr, tColinePtr > tColinePair
A pair of transient pointers to ColourLine objects.
Define the base class from which all (polymorphic) classes in ThePEG are derived. ...
ClassTraitsType is an empty, non-polymorphic, base class.
This is the main config header file for the Event classes.
A concreate implementation of ClassDescriptionBase describing a concrete class with persistent data...
void addAntiColouredIndexed(tPPtr p, int index)
Add a particle having this as a anti-colour line at a given index.
PersistentOStream is used to write objects persistently to a stream from which they can be read in ag...
const tPVector & antiColoured() const
Return the vectors of particles connected to this line with their anti-colours.
ColourLine & operator=(const ColourLine &)
Private and non-existent assignment operator.
TransientConstRCPtr is a simple wrapper around a bare const pointer which can be assigned to and from...
void setSourceNeighbours(tColinePtr l1, tColinePtr l2)
Add two colour lines as neighbours to this line.
TransientRCPtr is a simple wrapper around a bare pointer which can be assigned to and from an RCPtr a...
tPVector theColoured
The particles connecting to this colour line, following the incoming colour flow. ...
This is the main namespace within which all identifiers in ThePEG are declared.
void setSinkNeighbours(tColinePtr l1, tColinePtr l2)
Add two colour lines as neighbours to this line.
void addColoured(tPPtr p, bool anti=false)
Add a particle having this as a (anti-)colour line.
void removeAntiColoured(tPPtr)
Remove a particle having this as an anti-colour line.
void write(ostream &os, tcEventPtr event, bool anti) const
Write out information about this colour line to the stream.
static tColinePtr create(tPPtr col, tPPtr anti)
Create a colour line.
tPPtr startParticle() const
Return the first particle on this colour line.
static tColinePtr createAnti(tPPtr p)
Create a colour line.
tColinePair theSinkNeighbours
If this colour line ends in a colour sink, these two colour lines ends in the same.
virtual ~ColourLine()
Destructor.
tColinePair sourceNeighbours(bool anti=false) const
If this colour line stems from a colour source (sink), these two colour lines stems from (ends in) th...
void removeColoured(tPPtr p, bool anti=false)
Remove a particle having this as a (anti-)colour line.
tColinePair sinkNeighbours() const
If this colour line ends in a colour sink, these two colour lines ends in the same.
void addColouredIndexed(tPPtr p, int index, bool anti=false)
Add a particle having this as a (anti-)colour line at a given index.
RCPtr is a reference counted (smart) pointer.
void addAntiColoured(tPPtr)
Add a particle having this as a anti-colour line.
tColinePair theSourceNeighbours
If this colour line stems from a colour source, these two colour lines stems from the same...
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 li...
bool join(ColinePtr line)
Join with the given ColourLine.
vector< ColinePtr > orphanedConnectors
Colour lines which are connectors between two junctions do not have a particle which owns it...
void persistentOutput(PersistentOStream &) const
Standard function for writing to a persistent stream.
The default concrete implementation of ClassTraitsBase.
tPPtr endParticle() const
Return the last particle on this colour line.
The ColourLine class represents colour lines connecting Particles.
static ClassDescription< ColourLine > initColourLine
Describe a concrete class with persistent data.
tPVector theAntiColoured
The particles connecting to this colour line, following the outgoing colour flow. ...
vector< tPPtr > tPVector
A vector of transient pointers to Particle objects.
const tPVector & coloured() const
Return the vectors of particles connected to this line with their colours.
BaseClassTraits describes the base classes of the templated class.
The templated ClassTraitsBase class defines a set of default information about classes used by ThePEG...
void persistentInput(PersistentIStream &, int)
Standard function for reading from a persistent stream.