|
|
|||
File indexing completed on 2026-08-06 09:38:29
0001 // -*- C++ -*- 0002 // 0003 // MassGenerator.h is a part of ThePEG - Toolkit for HEP Event Generation 0004 // Copyright (C) 1999-2019 Leif Lonnblad 0005 // 0006 // ThePEG is licenced under version 3 of the GPL, see COPYING for details. 0007 // Please respect the MCnet academic guidelines, see GUIDELINES for details. 0008 // 0009 #ifndef ThePEG_MassGenerator_H 0010 #define ThePEG_MassGenerator_H 0011 // This is the declaration of the MassGenerator class. 0012 0013 #include "ThePEG/Config/ThePEG.h" 0014 #include "ThePEG/Interface/Interfaced.h" 0015 #include "MassGenerator.fh" 0016 0017 namespace ThePEG { 0018 0019 /** 0020 * MassGenerator is an abstract base class used by the ParticleData 0021 * class to generate a mass for a Particle instance. 0022 * 0023 * @see \ref MassGeneratorInterfaces "The interfaces" 0024 * defined for MassGenerator. 0025 * @see ParticleData 0026 */ 0027 class MassGenerator: public Interfaced { 0028 0029 public: 0030 0031 /** @name Virtual functions to be overridden by sub-classes. */ 0032 //@{ 0033 /** 0034 * Return true if this mass generator can handle the given particle 0035 * type. 0036 */ 0037 virtual bool accept(const ParticleData &) const = 0; 0038 0039 /** 0040 * Generate a mass for an instance of a given particle type. 0041 */ 0042 virtual Energy mass(const ParticleData &) const = 0; 0043 //@} 0044 0045 public: 0046 0047 /** 0048 * Standard Init function used to initialize the interface. 0049 */ 0050 static void Init(); 0051 0052 private: 0053 0054 /** 0055 * The static object used to initialize the description of this class. 0056 * Indicates that this is an abstract class without persistent data. 0057 */ 0058 static AbstractNoPIOClassDescription<MassGenerator> initMassGenerator; 0059 0060 /** 0061 * Private and non-existent assignment operator. 0062 */ 0063 MassGenerator & operator=(const MassGenerator &) = delete; 0064 0065 }; 0066 0067 /** @cond TRAITSPECIALIZATIONS */ 0068 0069 /** This template specialization informs ThePEG about the base classes 0070 * of MassGenerator. */ 0071 template <> 0072 struct BaseClassTrait<MassGenerator,1>: public ClassTraitsType { 0073 /** Typedef of the first base class of MassGenerator. */ 0074 typedef Interfaced NthBase; 0075 }; 0076 0077 /** This template specialization informs ThePEG about the name of the 0078 * MassGenerator class. */ 0079 template <> 0080 struct ClassTraits<MassGenerator>: public ClassTraitsBase<MassGenerator> { 0081 /** Return a platform-independent class name */ 0082 static string className() { return "ThePEG::MassGenerator"; } 0083 }; 0084 0085 /** @endcond */ 0086 0087 } 0088 0089 #endif /* ThePEG_MassGenerator_H */
| [ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
|
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
|