|
|
|||
File indexing completed on 2026-08-06 09:23:59
0001 // -*- C++ -*- 0002 #ifndef Herwig_EvtGenDecayer_H 0003 #define Herwig_EvtGenDecayer_H 0004 // 0005 // This is the declaration of the EvtGenDecayer class. 0006 // 0007 0008 #include "ThePEG/PDT/Decayer.h" 0009 #include "EvtGenInterface.h" 0010 0011 namespace Herwig { 0012 0013 using namespace ThePEG; 0014 0015 /** 0016 * The EvtGenDecayer class is designed to allow the EvtGen decay package to be used 0017 * as a Decayer in the Herwig structure. 0018 * 0019 * It is a simple wrapper which uses members of the Herwig EvtGen class to perform 0020 * the decay 0021 * 0022 * @see EvtGenInterface 0023 * @see \ref EvtGenDecayerInterfaces "The interfaces" 0024 * defined for EvtGenDecayer. 0025 */ 0026 class EvtGenDecayer: public Decayer { 0027 0028 public: 0029 0030 /** 0031 * Standard constructors 0032 */ 0033 EvtGenDecayer() : check_(0) , evtOpt_(0) 0034 {} 0035 0036 public: 0037 0038 /** @name Virtual functions required by the Decayer class. */ 0039 //@{ 0040 /** 0041 * Check if this decayer can perfom the decay specified by the 0042 * given decay mode. 0043 * @param dm the DecayMode describing the decay. 0044 * @return true if this decayer can handle the given mode, otherwise false. 0045 */ 0046 virtual bool accept(const DecayMode & dm) const; 0047 0048 /** 0049 * Perform a decay for a given DecayMode and a given Particle instance. 0050 * @param dm the DecayMode describing the decay. 0051 * @param p the Particle instance to be decayed. 0052 * @return a ParticleVector containing the decay products. 0053 */ 0054 virtual ParticleVector decay(const DecayMode & dm, const Particle & p) const; 0055 //@} 0056 0057 public: 0058 0059 /** @name Functions used by the persistent I/O system. */ 0060 //@{ 0061 /** 0062 * Function used to write out object persistently. 0063 * @param os the persistent output stream written to. 0064 */ 0065 void persistentOutput(PersistentOStream & os) const; 0066 0067 /** 0068 * Function used to read in object persistently. 0069 * @param is the persistent input stream read from. 0070 * @param version the version number of the object when written. 0071 */ 0072 void persistentInput(PersistentIStream & is, int version); 0073 //@} 0074 0075 /** 0076 * The standard Init function used to initialize the interfaces. 0077 * Called exactly once for each class by the class description system 0078 * before the main function starts or 0079 * when this class is dynamically loaded. 0080 */ 0081 static void Init(); 0082 0083 protected: 0084 0085 /** 0086 * Method to check conservation of charge and momentum in the decay 0087 * for testing only 0088 * @param parent The decaying particle 0089 */ 0090 void checkDecay(PPtr parent) const; 0091 0092 /** 0093 * Method to rescale the momenta of the decay products if required to 0094 * conserve 4-momentum 0095 */ 0096 bool rescale(const Particle & parent, 0097 const ParticleVector & children) const; 0098 0099 protected: 0100 0101 /** @name Clone Methods. */ 0102 //@{ 0103 /** 0104 * Make a simple clone of this object. 0105 * @return a pointer to the new object. 0106 */ 0107 virtual IBPtr clone() const; 0108 0109 /** Make a clone of this object, possibly modifying the cloned object 0110 * to make it sane. 0111 * @return a pointer to the new object. 0112 */ 0113 virtual IBPtr fullclone() const; 0114 //@} 0115 0116 private: 0117 0118 /** 0119 * The assignment operator is private and must never be called. 0120 * In fact, it should not even be implemented. 0121 */ 0122 EvtGenDecayer & operator=(const EvtGenDecayer &) = delete; 0123 0124 private: 0125 0126 /** 0127 * Pointer to the EvtGen interface object 0128 */ 0129 EvtGenInterfacePtr evtgen_; 0130 0131 /** 0132 * Perform checks ? 0133 */ 0134 unsigned int check_; 0135 0136 /** 0137 * Option for how EvtGen is used 0138 */ 0139 unsigned int evtOpt_; 0140 0141 }; 0142 0143 } 0144 0145 #endif /* Herwig_EvtGenDecayer_H */
| [ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
|
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
|