thepeg is hosted by Hepforge, IPPP Durham
ThePEG 2.3.0
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
14#include "WidthGenerator.fh"
15#include "ThePEG/Interface/Interfaced.h"
16#include "ThePEG/Utilities/Selector.h"
17#include "ThePEG/PDT/DecayMode.fh"
18
19namespace ThePEG {
20
32
33public:
34
38
39public:
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
77public:
78
82 static void Init();
83
84private:
85
91
96
97};
98
103template <>
106 typedef Interfaced NthBase;
107};
108
111template <>
112struct ClassTraits<WidthGenerator>: public ClassTraitsBase<WidthGenerator> {
114 static string className() { return "ThePEG::WidthGenerator"; }
115};
116
119}
120
121#endif /* ThePEG_WidthGenerator_H */
This is the main config header file for ThePEG.
A concreate implementation of ClassDescriptionBase describing an abstract class without persistent da...
The Interfaced class is derived from the InterfacedBase class adding a couple of things particular to...
Definition: Interfaced.h:38
ParticleData inherits from InterfacedBase and represents the properties of a particle type.
Definition: ParticleData.h:36
The Particle class is used to describe an instance of a particle.
Definition: Particle.h:83
Selector is a templated class for storing objects associated with probabilities in a way such that,...
Definition: Selector.h:46
WidthGenerator is an abstract base class to be used to encapsulate models for giving the partial deca...
static void Init()
Standard Init function used to initialize the interface.
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,...
Energy width(const Particle &) const
Given a Particle, calculate a width.
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.
virtual DecayMap rate(const ParticleData &) const =0
Return decay map for the given particle type.
virtual DecayMap rate(const Particle &)
Return a decay map for a given Particle instance.
WidthGenerator & operator=(const WidthGenerator &)=delete
Private and non-existent assignment operator.
static AbstractNoPIOClassDescription< WidthGenerator > initWidthGenerator
The static object used to initialize the description of this class.
virtual Energy width(const ParticleData &, Energy m) const =0
Given a particle type and a mass of an instance of that particle type, calculate a width.
Selector< tDMPtr > DecayMap
A selector of DecayModess weighted by their branching ratios.
This is the main namespace within which all identifiers in ThePEG are declared.
Definition: FactoryBase.h:28
BaseClassTraits describes the base classes of the templated class.
Definition: ClassTraits.h:156
int NthBase
The type of the BaseN'th base class (int means there are no further base classes).
Definition: ClassTraits.h:161
static string className()
Return the name of class T.
Definition: ClassTraits.h:66
ClassTraitsType is an empty, non-polymorphic, base class.
Definition: ClassTraits.h:30