|
|
|||
File indexing completed on 2026-08-06 09:38:22
0001 // -*- C++ -*- 0002 // 0003 // DecayHandler.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_DecayHandler_H 0010 #define ThePEG_DecayHandler_H 0011 // This is the declaration of the DecayHandler class. 0012 0013 #include "StepHandler.h" 0014 0015 namespace ThePEG { 0016 0017 /** 0018 * The DecayHandler is the base class of all handlers implementing the 0019 * administration of decays of unstable particles. It is derived from 0020 * the more general StepHandler class, and overrides the handle() 0021 * method. This base class simply decays all unstable particle in the 0022 * current step. 0023 * 0024 * @see \ref DecayHandlerInterfaces "The interfaces" 0025 * defined for DecayHandler. 0026 * @see StepHandler 0027 * @see EventHandler 0028 * @see SubProcessHandler 0029 * 0030 */ 0031 class DecayHandler: public StepHandler { 0032 0033 public: 0034 0035 /** @name Standard constructors and destructors. */ 0036 //@{ 0037 /** 0038 * Default constructor. 0039 */ 0040 DecayHandler() : theMaxLoop(100000), theMaxLifeTime(-1.0*mm), theLifeTimeOption(false) {} 0041 0042 /** 0043 * Destructor. 0044 */ 0045 virtual ~DecayHandler(); 0046 //@} 0047 0048 public: 0049 0050 /** @name Virtual functions required by the StepHandler class. */ 0051 //@{ 0052 /** 0053 * Look through all \a tagged particled and decay all unstable ones. 0054 * @param eh the EventHandler in charge of the generation. 0055 * @param tagged the vector of particles to consider. If empty, all 0056 * final state particles in the current Step is considered. 0057 * @param hint a possible Hint which is ignored in this implementation. 0058 */ 0059 virtual void handle(EventHandler & eh, const tPVector & tagged, 0060 const Hint & hint); 0061 //@} 0062 0063 /** 0064 * Perform the decay of one unstable particle. 0065 * @param parent the particle to be decayed. 0066 * @param s the Step where decay products are inserted. 0067 */ 0068 void performDecay(tPPtr parent, Step & s) const; 0069 0070 public: 0071 0072 /** @name Functions used by the persistent I/O system. */ 0073 //@{ 0074 /** 0075 * Function used to write out object persistently. 0076 * @param os the persistent output stream written to. 0077 */ 0078 void persistentOutput(PersistentOStream & os) const; 0079 0080 /** 0081 * Function used to read in object persistently. 0082 * @param is the persistent input stream read from. 0083 * @param version the version number of the object when written. 0084 */ 0085 void persistentInput(PersistentIStream & is, int version); 0086 //@} 0087 0088 /** 0089 * Standard Init function used to initialize the interface. 0090 */ 0091 static void Init(); 0092 0093 /** 0094 * The maximum number of failed decay attempts allowed for each 0095 * particle. 0096 */ 0097 long maxLoop() const { return theMaxLoop; } 0098 0099 /** 0100 * Get the maximum lifetime above which a particle is not decayed. 0101 */ 0102 Length maxLifeTime() const { return theMaxLifeTime; } 0103 0104 /** 0105 * Option for whether the maximum lifetime should be applied to the 0106 * mean lifetime of the particle species or the lifetime of the particle 0107 * instance 0108 */ 0109 bool lifeTimeOption() const { return theLifeTimeOption; } 0110 0111 protected: 0112 0113 /** @name Clone Methods. */ 0114 //@{ 0115 /** 0116 * Make a simple clone of this object. 0117 * @return a pointer to the new object. 0118 */ 0119 virtual IBPtr clone() const; 0120 0121 /** Make a clone of this object, possibly modifying the cloned object 0122 * to make it sane. 0123 * @return a pointer to the new object. 0124 */ 0125 virtual IBPtr fullclone() const; 0126 //@} 0127 0128 private: 0129 0130 /** 0131 * The maximum number of failed decay attempts allowed for each 0132 * particle. 0133 */ 0134 long theMaxLoop; 0135 0136 /** 0137 * The maximum lifetime above which a particle is not decayed. 0138 */ 0139 Length theMaxLifeTime; 0140 0141 /** 0142 * Option for how theMaxLifeTime should be interpreted 0143 */ 0144 bool theLifeTimeOption; 0145 0146 private: 0147 0148 /** 0149 * Describe a concrete class with persistent data. 0150 */ 0151 static ClassDescription<DecayHandler> initDecayHandler; 0152 0153 /** 0154 * Private and non-existent assignment operator. 0155 */ 0156 DecayHandler & operator=(const DecayHandler &) = delete; 0157 0158 }; 0159 0160 /** @cond TRAITSPECIALIZATIONS */ 0161 0162 /** 0163 * This template specialization informs ThePEG about the 0164 * base class of DecayHandler. 0165 */ 0166 template <> 0167 struct BaseClassTrait<DecayHandler,1>: public ClassTraitsType { 0168 /** Typedef of the base class of DecayHandler. */ 0169 typedef StepHandler NthBase; 0170 }; 0171 0172 /** 0173 * This template specialization informs ThePEG about the name of the 0174 * DecayHandler class. 0175 */ 0176 template <> 0177 struct ClassTraits<DecayHandler>: public ClassTraitsBase<DecayHandler> { 0178 /** Return the class name. */ 0179 static string className() { return "ThePEG::DecayHandler"; } 0180 }; 0181 0182 /** @endcond */ 0183 0184 } 0185 0186 #endif /* ThePEG_DecayHandler_H */
| [ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
|
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
|