00001 // -*- C++ -*- 00002 // 00003 // WidthGenerator.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_WidthGenerator_H 00010 #define ThePEG_WidthGenerator_H 00011 // This is the declaration of the WidthGenerator class. 00012 00013 #include "ThePEG/Config/ThePEG.h" 00014 #include "WidthGenerator.fh" 00015 #include "ThePEG/Interface/Interfaced.h" 00016 #include "ThePEG/Utilities/Selector.h" 00017 #include "ThePEG/PDT/DecayMode.fh" 00018 00019 namespace ThePEG { 00020 00031 class WidthGenerator: public Interfaced { 00032 00033 public: 00034 00037 typedef Selector<tDMPtr> DecayMap; 00038 00039 public: 00040 00047 virtual bool accept(const ParticleData &) const = 0; 00048 00052 Energy width(const Particle &) const; 00053 00058 virtual Energy width(const ParticleData &, Energy m) const = 0; 00059 00064 virtual Length lifeTime(const ParticleData &, Energy m, Energy w) const; 00065 00069 virtual DecayMap rate(const ParticleData &) const = 0; 00070 00074 virtual DecayMap rate(const Particle &); 00076 00077 public: 00078 00082 static void Init(); 00083 00084 private: 00085 00090 static AbstractNoPIOClassDescription<WidthGenerator> initWidthGenerator; 00091 00095 WidthGenerator & operator=(const WidthGenerator &); 00096 00097 }; 00098 00103 template <> 00104 struct BaseClassTrait<WidthGenerator,1>: public ClassTraitsType { 00106 typedef Interfaced NthBase; 00107 }; 00108 00111 template <> 00112 struct ClassTraits<WidthGenerator>: public ClassTraitsBase<WidthGenerator> { 00114 static string className() { return "ThePEG::WidthGenerator"; } 00115 }; 00116 00119 } 00120 00121 #endif /* ThePEG_WidthGenerator_H */