|
|
|||
File indexing completed on 2026-08-06 09:24:06
0001 // -*- C++ -*- 0002 // 0003 // HwDecayHandler.h is a part of Herwig - A multi-purpose Monte Carlo event generator 0004 // Copyright (C) 2002-2019 The Herwig Collaboration 0005 // 0006 // Herwig 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 HERWIG_HwDecayHandler_H 0010 #define HERWIG_HwDecayHandler_H 0011 // 0012 // This is the declaration of the HwDecayHandler class. 0013 // 0014 #include "ThePEG/Handlers/DecayHandler.h" 0015 #include "ThePEG/EventRecord/Particle.h" 0016 0017 0018 namespace Herwig { 0019 using namespace ThePEG; 0020 0021 /** \ingroup Decay 0022 * The <code>HwDecayHandler</code> is the Herwig decay handler which 0023 * administers the decays of unstable particles in Herwig. It 0024 * is derived from ThePEG::DecayHandler and includes a different handle 0025 * method in order to simulate decays including spin correlations. 0026 * 0027 * The handle method decays all particles in the current step, including 0028 * spin correlations. Another feature of the DecayHandler is that it correctly 0029 * handles mutlistep decays where a Decayer supplys intermediate decay products 0030 * in addition to the outgoing particles. 0031 * 0032 * @see ThePEG::StepHandler 0033 * @see ThePEG::CollisionHandler 0034 * @see ThePEG::SubProcessHandler 0035 * @see ThePEG::DecayHandler 0036 * 0037 */ 0038 0039 class HwDecayHandler: public DecayHandler { 0040 0041 public: 0042 0043 /** 0044 * Default constructor 0045 */ 0046 HwDecayHandler() : DecayHandler(), _newstep(true) 0047 {} 0048 0049 public: 0050 0051 /** 0052 * Look through all \a tagged particled and decay all unstable ones. 0053 * @param eh the EventHandler in charge of the generation. 0054 * @param tagged the vector of particles to consider. If empty, all 0055 * final state particles in the current Step is considered. 0056 * @param hint a possible Hint which is ignored in this implementation. 0057 */ 0058 virtual void handle(EventHandler & eh, const tPVector & tagged, 0059 const Hint & hint) 0060 ; 0061 0062 /** 0063 * Perform the decay of one unstable particle. 0064 * @param parent the particle to be decayed. 0065 * @param s the Step where decay products are inserted. 0066 * @throws Veto if the Handler requires the current step to be discarded. 0067 * @throws Exception if something goes wrong. 0068 */ 0069 virtual void performDecay(tPPtr parent, Step & s) const 0070 ; 0071 0072 /** 0073 * add the decay products of in intermediate particle produced in a decay 0074 * @param parent the particle which has been decayed. 0075 * @param s the Step where decay products are inserted. 0076 * @throws Veto if the Handler requires the current step to be discarded. 0077 * @throws Exception if something goes wrong. 0078 */ 0079 void addDecayedParticle(tPPtr parent, Step & s) const 0080 ; 0081 0082 /** 0083 * Standard Init function 0084 */ 0085 static void Init(); 0086 0087 public: 0088 0089 /** @name Functions used by the persistent I/O system. */ 0090 //@{ 0091 /** 0092 * Function used to write out object persistently. 0093 * @param os the persistent output stream written to. 0094 */ 0095 void persistentOutput(PersistentOStream & os) const; 0096 0097 /** 0098 * Function used to read in object persistently. 0099 * @param is the persistent input stream read from. 0100 * @param version the version number of the object when written. 0101 */ 0102 void persistentInput(PersistentIStream & is, int version); 0103 //@} 0104 0105 protected: 0106 0107 /** @name Clone Methods. */ 0108 //@{ 0109 /** 0110 * Make a simple clone of this object. 0111 * @return a pointer to the new object. 0112 */ 0113 virtual IBPtr clone() const {return new_ptr(*this);} 0114 0115 /** Make a clone of this object, possibly modifying the cloned object 0116 * to make it sane. 0117 * @return a pointer to the new object. 0118 */ 0119 virtual IBPtr fullclone() const {return new_ptr(*this);} 0120 //@} 0121 0122 protected: 0123 0124 /** @name Standard Interfaced functions. */ 0125 //@{ 0126 /** 0127 * Initialize this object after the setup phase before saving an 0128 * EventGenerator to disk. 0129 * @throws InitException if object could not be initialized properly. 0130 */ 0131 virtual void doinit(); 0132 //@} 0133 0134 protected: 0135 0136 /** 0137 * Develop a stable particle 0138 */ 0139 void develop(tPPtr particle) const { 0140 tcSpinPtr hwspin = particle->spinInfo(); 0141 if ( hwspin ) 0142 hwspin->develop(); 0143 } 0144 0145 private: 0146 0147 /** 0148 * Private and non-existent assignment operator. 0149 */ 0150 HwDecayHandler & operator=(const HwDecayHandler &) = delete; 0151 0152 private: 0153 0154 /** 0155 * Option for adding particles in a new Step 0156 */ 0157 bool _newstep; 0158 0159 /** 0160 * Particles which should not be decayed 0161 */ 0162 set<tcPDPtr> _excluded; 0163 0164 /** 0165 * Vector to fill the set as an interface 0166 */ 0167 vector<PDPtr> _excludedVector; 0168 0169 }; 0170 } 0171 0172 #endif /* HERWIG_HwDecayHandler_H */
| [ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
|
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
|