00001 // -*- C++ -*- 00002 // 00003 // ConstituentParticleData.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_ConstituentParticleData_H 00010 #define ThePEG_ConstituentParticleData_H 00011 // This is the declaration of the ConstituentParticleData class. 00012 00013 #include "ThePEG/PDT/ParticleData.h" 00014 00015 namespace ThePEG { 00016 00025 class ConstituentParticleData: public virtual ParticleData { 00026 00027 public: 00028 00034 ConstituentParticleData() 00035 : theConstituentMass(ZERO), theDefaultConstituentMass(ZERO) {} 00037 00044 static PDPtr Create(long newId, string newPDGName); 00045 00049 static PDPair Create(long newId, string newPDGName, string newAntiPDGName); 00051 00052 public: 00053 00057 virtual Energy constituentMass() const { return theConstituentMass; } 00058 00059 public: 00060 00067 void persistentOutput(PersistentOStream & os) const; 00068 00074 void persistentInput(PersistentIStream & is, int version); 00076 00080 static void Init(); 00081 00082 protected: 00083 00088 ConstituentParticleData(long newId, string newPDGName); 00089 00095 virtual void readSetup(istream & is); 00096 00100 virtual PDPtr pdclone() const; 00101 00102 private: 00103 00107 void setConstituentMass(Energy m); 00108 00112 Energy defConstituentMass() const; 00113 00114 private: 00115 00119 Energy theConstituentMass; 00120 00124 Energy theDefaultConstituentMass; 00125 00126 private: 00127 00131 static ClassDescription<ConstituentParticleData> initConstituentParticleData; 00132 00136 ConstituentParticleData & operator=(const ConstituentParticleData &); 00137 00138 }; 00139 00144 template <> 00145 struct BaseClassTrait<ConstituentParticleData,1>: public ClassTraitsType { 00147 typedef ParticleData NthBase; 00148 }; 00149 00152 template <> 00153 struct ClassTraits<ConstituentParticleData>: 00154 public ClassTraitsBase<ConstituentParticleData> { 00156 static string className() { return "ThePEG::ConstituentParticleData"; } 00157 }; 00158 00161 } 00162 00163 #endif /* ThePEG_ConstituentParticleData_H */