thepeg is hosted by Hepforge, IPPP Durham
ThePEG 2.3.0
MultiColour.h
1// -*- C++ -*-
2//
3// MultiColour.h is a part of ThePEG - Toolkit for HEP Event Generation
4// Copyright (C) 1999-2019 Leif Lonnblad
5//
6// ThePEG is licenced under version 3 of the GPL, see COPYING for details.
7// Please respect the MCnet academic guidelines, see GUIDELINES for details.
8//
9#ifndef THEPEG_MultiColour_H
10#define THEPEG_MultiColour_H
11//
12// This is the declaration of the MultiColour class.
13//
14
15#include "ThePEG/EventRecord/ColourBase.h"
16
17namespace ThePEG {
18
24class MultiColour: public ColourBase {
25
26public:
27
30
35 virtual vector<tcColinePtr> antiColourLines() const;
36
41 virtual vector<tcColinePtr> colourLines() const;
42
47 virtual void colourLine(tColinePtr line, bool anti = false);
48
53 virtual void colourLine(tColinePtr line, int index, bool anti = false);
54
59 virtual void antiColourLine(tColinePtr line);
60
65 virtual void antiColourLine(tColinePtr line, int index);
66
72 virtual void removeColourLine(tcColinePtr line, bool anti = false);
73
80
85 virtual bool hasColourLine(tcColinePtr line, bool anti = false) const;
86
87public:
88
96
102 void persistentInput(PersistentIStream & is, int version);
104
111 static void Init();
112
116 virtual EIPtr clone() const { return new_ptr(*this); }
117
118private:
119
123 list<cColinePtr> theColourLines;
124
128 list<cColinePtr> theAntiColourLines;
129
130private:
131
137
142 MultiColour & operator=(const MultiColour &) = delete;
143
144};
145
146}
147
148#include "ThePEG/Utilities/ClassTraits.h"
149
150namespace ThePEG {
151
156template <>
157struct BaseClassTrait<MultiColour,1> {
159 typedef ColourBase NthBase;
160};
161
164template <>
165struct ClassTraits<MultiColour>
166 : public ClassTraitsBase<MultiColour> {
168 static string className() { return "ThePEG::MultiColour"; }
176 static string library() { return "MultiColour.so"; }
177};
178
181}
182
183#endif /* THEPEG_MultiColour_H */
A concreate implementation of ClassDescriptionBase describing a concrete class with persistent data.
ColourBase is the base class to be used to supply a Particle with information about its colour state.
Definition: ColourBase.h:32
tColinePtr colourLine() const
Return the colour line to which this particle is connected.
Definition: ColourBase.h:49
tColinePtr antiColourLine() const
Return the anti-colour line to which this particle is connected.
Definition: ColourBase.h:44
This class is used to store colour information of RemnantParticle objects and other particle classes ...
Definition: MultiColour.h:24
MultiColour & operator=(const MultiColour &)=delete
The assignment operator is private and must never be called.
virtual void antiColourLine(tColinePtr line)
Add the given anti-colour line to the particle.
virtual bool hasColourLine(tcColinePtr line, bool anti=false) const
Return true if the particle is connected to the given (anti-) colour line.
virtual void colourLine(tColinePtr line, int index, bool anti=false)
Add the given (anti-) colour line to the particle.
virtual void removeAntiColourLine(tcColinePtr line)
Remove the given anti-colour line from the particle.
static void Init()
The standard Init function used to initialize the interfaces.
virtual void colourLine(tColinePtr line, bool anti=false)
Add the given (anti-) colour line to the particle.
virtual EIPtr clone() const
Standard clone method.
Definition: MultiColour.h:116
virtual void antiColourLine(tColinePtr line, int index)
Add the given anti-colour line to the particle.
static ClassDescription< MultiColour > initMultiColour
The static object used to initialize the description of this class.
Definition: MultiColour.h:136
virtual vector< tcColinePtr > antiColourLines() const
Return the anti-colour lines to which this particle is connected.
void persistentOutput(PersistentOStream &os) const
Function used to write out object persistently.
list< cColinePtr > theAntiColourLines
The set of anti-colour lines to which a particle is attached.
Definition: MultiColour.h:128
virtual void removeColourLine(tcColinePtr line, bool anti=false)
Remove the given (anti-) colour line from the particle.
virtual vector< tcColinePtr > colourLines() const
Return the colour lines to which this particle is connected.
void persistentInput(PersistentIStream &is, int version)
Function used to read in object persistently.
list< cColinePtr > theColourLines
The set of colour lines to which a particle is attached.
Definition: MultiColour.h:123
PersistentIStream is used to read persistent objects from a stream where they were previously written...
PersistentOStream is used to write objects persistently to a stream from which they can be read in ag...
RCPtr is a reference counted (smart) pointer.
Definition: RCPtr.h:60
TransientConstRCPtr is a simple wrapper around a bare const pointer which can be assigned to and from...
Definition: RCPtr.h:696
TransientRCPtr is a simple wrapper around a bare pointer which can be assigned to and from an RCPtr a...
Definition: RCPtr.h:519
Ptr< T >::pointer new_ptr()
Simple interface to the PtrTraits<Ptr>::create()
Definition: PtrTraits.h:195
This is the main namespace within which all identifiers in ThePEG are declared.
Definition: FactoryBase.h:28
int NthBase
The type of the BaseN'th base class (int means there are no further base classes).
Definition: ClassTraits.h:161
static string className()
Return the name of class T.
Definition: ClassTraits.h:66
static string library()
The name of a file containing the dynamic library where the class T is implemented.
Definition: ClassTraits.h:85