00001 // -*- C++ -*- 00002 // 00003 // RemnantParticle.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_RemnantParticle_H 00010 #define THEPEG_RemnantParticle_H 00011 // 00012 // This is the declaration of the RemnantParticle class. 00013 // 00014 00015 #include "ThePEG/EventRecord/Particle.h" 00016 #include "RemnantParticle.fh" 00017 #include "ThePEG/PDT/RemnantData.fh" 00018 #include "ThePEG/PDT/RemnantDecayer.fh" 00019 00020 namespace ThePEG { 00021 00025 class RemnantParticle: public Particle { 00026 00027 public: 00028 00032 friend class RemnantDecayer; 00033 00034 public: 00035 00044 RemnantParticle(const Particle & particle, RemDecPtr decayer, 00045 tPPtr parton = tPPtr()); 00046 00047 public: 00048 00054 bool extract(tPPtr parton, bool fixcolour = false); 00055 00062 bool reextract(tPPtr oldp, tPPtr newp, bool fixcolour = false); 00063 00068 bool remove(tPPtr parton); 00069 00073 const PVector & extracted() const { 00074 return theExtracted; 00075 } 00076 00077 public: 00078 00085 void persistentOutput(PersistentOStream & os) const; 00086 00092 void persistentInput(PersistentIStream & is, int version); 00094 00101 static void Init(); 00102 00103 protected: 00104 00108 void fixColourLines(tPPtr parton); 00109 00110 private: 00111 00115 RemPDPtr remData; 00116 00120 tcPPtr parent; 00121 00125 PVector theExtracted; 00126 00127 protected: 00128 00133 RemnantParticle() {} 00134 00139 friend class ClassTraits<RemnantParticle>; 00140 00141 private: 00142 00147 static ClassDescription<RemnantParticle> initRemnantParticle; 00148 00153 RemnantParticle & operator=(const RemnantParticle &); 00154 00155 }; 00156 00157 } 00158 00159 #include "ThePEG/Utilities/ClassTraits.h" 00160 00161 namespace ThePEG { 00162 00167 template <> 00168 struct BaseClassTrait<RemnantParticle,1> { 00170 typedef Particle NthBase; 00171 }; 00172 00175 template <> 00176 struct ClassTraits<RemnantParticle> 00177 : public ClassTraitsBase<RemnantParticle> { 00179 static string className() { return "ThePEG::RemnantParticle"; } 00181 static TPtr create() { return TPtr::Create(RemnantParticle()); } 00182 }; 00183 00186 } 00187 00188 #endif /* THEPEG_RemnantParticle_H */