thepeg is hosted by Hepforge, IPPP Durham
ThePEG  2.2.1
WidthGenerator.h
1 // -*- C++ -*-
2 //
3 // WidthGenerator.h is a part of ThePEG - Toolkit for HEP Event Generation
4 // Copyright (C) 1999-2019 Leif Lonnblad
5 //
6 // ThePEG is licenced under version 3 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 
95  WidthGenerator & operator=(const WidthGenerator &) = delete;
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 */
The Particle class is used to describe an instance of a particle.
Definition: Particle.h:83
ClassTraitsType is an empty, non-polymorphic, base class.
Definition: ClassTraits.h:30
This is the main namespace within which all identifiers in ThePEG are declared.
Definition: FactoryBase.h:28
WidthGenerator is an abstract base class to be used to encapsulate models for giving the partial deca...
Energy width(const Particle &) const
Given a Particle, calculate a width.
This is the main config header file for ThePEG.
ParticleData inherits from InterfacedBase and represents the properties of a particle type...
Definition: ParticleData.h:36
A concreate implementation of ClassDescriptionBase describing an abstract class without persistent da...
virtual Length lifeTime(const ParticleData &, Energy m, Energy w) const
Given a particle type and a mass and a width of an instance of that particle type, generate a life time.
The Interfaced class is derived from the InterfacedBase class adding a couple of things particular to...
Definition: Interfaced.h:38
WidthGenerator & operator=(const WidthGenerator &)=delete
Private and non-existent assignment operator.
The default concrete implementation of ClassTraitsBase.
Definition: ClassTraits.h:134
static AbstractNoPIOClassDescription< WidthGenerator > initWidthGenerator
The static object used to initialize the description of this class.
static void Init()
Standard Init function used to initialize the interface.
virtual bool accept(const ParticleData &) const =0
Return true if this object can be used for the given particle type with the given decay map...
BaseClassTraits describes the base classes of the templated class.
Definition: ClassTraits.h:156
virtual DecayMap rate(const ParticleData &) const =0
Return decay map for the given particle type.
Selector< tDMPtr > DecayMap
A selector of DecayModess weighted by their branching ratios.
The templated ClassTraitsBase class defines a set of default information about classes used by ThePEG...
Definition: ClassTraits.h:52