ThePEG  1.8.0
WidthGenerator.h
1 // -*- C++ -*-
2 //
3 // WidthGenerator.h is a part of ThePEG - Toolkit for HEP Event Generation
4 // Copyright (C) 1999-2011 Leif Lonnblad
5 //
6 // ThePEG is licenced under version 2 of the GPL, see COPYING for details.
7 // Please respect the MCnet academic guidelines, see GUIDELINES for details.
8 //
9 #ifndef ThePEG_WidthGenerator_H
10 #define ThePEG_WidthGenerator_H
11 // This is the declaration of the WidthGenerator class.
12 
13 #include "ThePEG/Config/ThePEG.h"
14 #include "WidthGenerator.fh"
15 #include "ThePEG/Interface/Interfaced.h"
16 #include "ThePEG/Utilities/Selector.h"
17 #include "ThePEG/PDT/DecayMode.fh"
18 
19 namespace ThePEG {
20 
31 class WidthGenerator: public Interfaced {
32 
33 public:
34 
38 
39 public:
40 
47  virtual bool accept(const ParticleData &) const = 0;
48 
52  Energy width(const Particle &) const;
53 
58  virtual Energy width(const ParticleData &, Energy m) const = 0;
59 
64  virtual Length lifeTime(const ParticleData &, Energy m, Energy w) const;
65 
69  virtual DecayMap rate(const ParticleData &) const = 0;
70 
74  virtual DecayMap rate(const Particle &);
76 
77 public:
78 
82  static void Init();
83 
84 private:
85 
91 
96 
97 };
98 
103 template <>
106  typedef Interfaced NthBase;
107 };
108 
111 template <>
112 struct ClassTraits<WidthGenerator>: public ClassTraitsBase<WidthGenerator> {
114  static string className() { return "ThePEG::WidthGenerator"; }
115 };
116 
119 }
120 
121 #endif /* ThePEG_WidthGenerator_H */