00001 // -*- C++ -*- 00002 // 00003 // MultiColour.h is a part of ThePEG - Toolkit for HEP Event Generation 00004 // Copyright (C) 1999-2007 Leif Lonnblad 00005 // 00006 // ThePEG is licenced under version 2 of the GPL, see COPYING for details. 00007 // Please respect the MCnet academic guidelines, see GUIDELINES for details. 00008 // 00009 #ifndef THEPEG_MultiColour_H 00010 #define THEPEG_MultiColour_H 00011 // 00012 // This is the declaration of the MultiColour class. 00013 // 00014 00015 #include "ThePEG/EventRecord/ColourBase.h" 00016 00017 namespace ThePEG { 00018 00024 class MultiColour: public ColourBase { 00025 00026 public: 00027 00028 using ColourBase::colourLine; 00029 using ColourBase::antiColourLine; 00030 00035 virtual vector<tcColinePtr> antiColourLines() const; 00036 00041 virtual vector<tcColinePtr> colourLines() const; 00042 00047 virtual void colourLine(tColinePtr line, bool anti = false); 00048 00053 virtual void antiColourLine(tColinePtr line); 00054 00060 virtual void removeColourLine(tcColinePtr line, bool anti = false); 00061 00067 virtual void removeAntiColourLine(tcColinePtr line); 00068 00073 virtual bool hasColourLine(tcColinePtr line, bool anti = false) const; 00074 00075 public: 00076 00083 void persistentOutput(PersistentOStream & os) const; 00084 00090 void persistentInput(PersistentIStream & is, int version); 00092 00099 static void Init(); 00100 00104 virtual EIPtr clone() const { return new_ptr(*this); } 00105 00106 private: 00107 00111 set<cColinePtr> theColourLines; 00112 00116 set<cColinePtr> theAntiColourLines; 00117 00118 private: 00119 00124 static ClassDescription<MultiColour> initMultiColour; 00125 00130 MultiColour & operator=(const MultiColour &); 00131 00132 }; 00133 00134 } 00135 00136 #include "ThePEG/Utilities/ClassTraits.h" 00137 00138 namespace ThePEG { 00139 00144 template <> 00145 struct BaseClassTrait<MultiColour,1> { 00147 typedef ColourBase NthBase; 00148 }; 00149 00152 template <> 00153 struct ClassTraits<MultiColour> 00154 : public ClassTraitsBase<MultiColour> { 00156 static string className() { return "ThePEG::MultiColour"; } 00164 static string library() { return "MultiColour.so"; } 00165 }; 00166 00169 } 00170 00171 #endif /* THEPEG_MultiColour_H */