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();
293 struct BaseClassTrait<ColourLine,1>:
public ClassTraitsType {
303 struct ClassTraits<ColourLine>:
public ClassTraitsBase<ColourLine> {
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...
tPPtr endParticle() const
Return the last particle on this colour line.
void write(ostream &os, tcEventPtr event, bool anti) const
Write out information about this colour line to the stream.
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. ...
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...
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 persistentOutput(PersistentOStream &) const
Standard function for writing to a persistent stream.
tPPtr startParticle() const
Return the first particle on this colour line.
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 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.
static tColinePtr create(tPPtr col, tPPtr anti)
Create a colour line.
const tPVector & coloured() const
Return the vectors of particles connected to this line with their colours.
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...
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.
static string library()
The name of a file containing the dynamic library where the class T is implemented.
void removeColoured(tPPtr p, bool anti=false)
Remove a particle having this as a (anti-)colour line.
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...
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...
Base EventRecordBase
EventRecordBase is the base class of all event record classes.
const tPVector & antiColoured() const
Return the vectors of particles connected to this line with their anti-colours.
static string className()
Return the name of class T.
The ColourLine class represents colour lines connecting Particles.
int NthBase
The type of the BaseN'th base class (int means there are no further base classes).
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.
tColinePair sinkNeighbours() const
If this colour line ends in a colour sink, these two colour lines ends in the same.
void persistentInput(PersistentIStream &, int)
Standard function for reading from a persistent stream.