00001 // -*- C++ -*- 00002 // 00003 // RemnantData.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_RemnantData_H 00010 #define THEPEG_RemnantData_H 00011 // 00012 // This is the declaration of the RemnantData class. 00013 // 00014 00015 #include "ThePEG/PDT/ParticleData.h" 00016 #include "ThePEG/PDT/RemnantData.fh" 00017 #include "ThePEG/PDT/RemnantDecayer.fh" 00018 #include "ThePEG/PDT/DecayMode.h" 00019 00020 namespace ThePEG { 00021 00046 class RemnantData: public ParticleData { 00047 00048 public: 00049 00057 RemnantData(tcPDPtr particle, RemDecPtr decayer); 00059 00060 public: 00061 00065 const RemnantDecayer & decayer() const { 00066 return *theDecayer; 00067 }; 00068 00073 bool extract(tcPDPtr parton); 00074 00079 bool remove(tcPDPtr parton); 00080 00085 bool reextract(tcPDPtr oldp, tcPDPtr newp); 00086 00087 protected: 00092 bool fixColour(); 00093 00094 public: 00095 00102 void persistentOutput(PersistentOStream & os) const; 00103 00109 void persistentInput(PersistentIStream & is, int version); 00111 00118 static void Init(); 00119 00120 protected: 00121 00128 virtual IBPtr clone() const; 00129 00134 virtual IBPtr fullclone() const; 00136 00137 00138 // If needed, insert declarations of virtual function defined in the 00139 // InterfacedBase class here (using ThePEG-interfaced-decl in Emacs). 00140 00141 00142 private: 00143 00147 tcPDPtr parentPD; 00148 00152 RemDecPtr theDecayer; 00153 00157 DMPtr decayMode; 00158 00162 multiset<tcPDPtr> extracted; 00163 00164 protected: 00165 00170 RemnantData() {} 00171 00176 friend class ClassTraits<RemnantData>; 00177 00178 private: 00179 00184 static ClassDescription<RemnantData> initRemnantData; 00185 00190 RemnantData & operator=(const RemnantData &); 00191 00192 }; 00193 00194 } 00195 00196 #include "ThePEG/Utilities/ClassTraits.h" 00197 00198 namespace ThePEG { 00199 00204 template <> 00205 struct BaseClassTrait<RemnantData,1> { 00207 typedef ParticleData NthBase; 00208 }; 00209 00212 template <> 00213 struct ClassTraits<RemnantData> 00214 : public ClassTraitsBase<RemnantData> { 00216 static string className() { return "ThePEG::RemnantData"; } 00218 static TPtr create() { return TPtr::Create(RemnantData()); } 00219 }; 00220 00223 } 00224 00225 #endif /* THEPEG_RemnantData_H */