thepeg is hosted by Hepforge, IPPP Durham
ThePEG  2.1.5
MassGenerator.h
1 // -*- C++ -*-
2 //
3 // MassGenerator.h is a part of ThePEG - Toolkit for HEP Event Generation
4 // Copyright (C) 1999-2017 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_MassGenerator_H
10 #define ThePEG_MassGenerator_H
11 // This is the declaration of the MassGenerator class.
12 
13 #include "ThePEG/Config/ThePEG.h"
14 #include "ThePEG/Interface/Interfaced.h"
15 #include "MassGenerator.fh"
16 
17 namespace ThePEG {
18 
27 class MassGenerator: public Interfaced {
28 
29 public:
30 
37  virtual bool accept(const ParticleData &) const = 0;
38 
42  virtual Energy mass(const ParticleData &) const = 0;
44 
45 public:
46 
50  static void Init();
51 
52 private:
53 
59 
63  MassGenerator & operator=(const MassGenerator &) = delete;
64 
65 };
66 
71 template <>
74  typedef Interfaced NthBase;
75 };
76 
79 template <>
80 struct ClassTraits<MassGenerator>: public ClassTraitsBase<MassGenerator> {
82  static string className() { return "ThePEG::MassGenerator"; }
83 };
84 
87 }
88 
89 #endif /* ThePEG_MassGenerator_H */
static AbstractNoPIOClassDescription< MassGenerator > initMassGenerator
The static object used to initialize the description of this class.
Definition: MassGenerator.h:58
virtual bool accept(const ParticleData &) const =0
Return true if this mass generator can handle the given particle type.
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
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...
static void Init()
Standard Init function used to initialize the interface.
MassGenerator & operator=(const MassGenerator &)=delete
Private and non-existent assignment operator.
The Interfaced class is derived from the InterfacedBase class adding a couple of things particular to...
Definition: Interfaced.h:38
The default concrete implementation of ClassTraitsBase.
Definition: ClassTraits.h:134
virtual Energy mass(const ParticleData &) const =0
Generate a mass for an instance of a given particle type.
BaseClassTraits describes the base classes of the templated class.
Definition: ClassTraits.h:156
MassGenerator is an abstract base class used by the ParticleData class to generate a mass for a Parti...
Definition: MassGenerator.h:27
The templated ClassTraitsBase class defines a set of default information about classes used by ThePEG...
Definition: ClassTraits.h:52