00001 // -*- C++ -*- 00002 // 00003 // V2PPDecayer.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_V2PPDecayer_H 00010 #define THEPEG_V2PPDecayer_H 00011 // This is the declaration of the V2PPDecayer class. 00012 00013 #include "ThePEG/PDT/FlatDecayer.h" 00014 00015 namespace ThePEG { 00016 00030 class V2PPDecayer: public FlatDecayer { 00031 00032 public: 00033 00039 virtual ~V2PPDecayer(); 00041 00042 public: 00043 00053 virtual bool accept(const DecayMode & dm) const; 00054 00061 virtual ParticleVector decay(const DecayMode & dm, const Particle & p) const; 00062 00074 virtual double reweight(const DecayMode & dm, const Particle & parent, 00075 const ParticleVector & children) const; 00077 00078 public: 00079 00080 00087 void persistentOutput(PersistentOStream & os) const; 00088 00094 void persistentInput(PersistentIStream & is, int version); 00096 00100 static void Init(); 00101 00102 protected: 00103 00104 00105 protected: 00106 00113 virtual IBPtr clone() const; 00114 00119 virtual IBPtr fullclone() const; 00121 00122 private: 00123 00127 mutable tPPtr grandParent; 00128 00132 mutable tPPtr sibling; 00133 00134 private: 00135 00139 static ClassDescription<V2PPDecayer> initV2PPDecayer; 00140 00144 V2PPDecayer & operator=(const V2PPDecayer &); 00145 00146 }; 00147 00148 } 00149 00150 00151 namespace ThePEG { 00152 00157 template <> 00158 struct BaseClassTrait<V2PPDecayer,1>: public ClassTraitsType { 00160 typedef FlatDecayer NthBase; 00161 }; 00162 00166 template <> 00167 struct ClassTraits<V2PPDecayer> 00168 : public ClassTraitsBase<V2PPDecayer> { 00170 static string className() { return "ThePEG::V2PPDecayer"; } 00174 static string library() { return "V2PPDecayer.so"; } 00175 }; 00176 00179 } 00180 00181 #endif /* THEPEG_V2PPDecayer_H */