|
|
|||
File indexing completed on 2026-08-06 09:24:06
0001 // -*- C++ -*- 0002 // 0003 // Hw64Decayer.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_Hw64Decayer_H 0010 #define HERWIG_Hw64Decayer_H 0011 // 0012 // This is the declaration of the Hw64Decayer class. 0013 // 0014 #include <ThePEG/Config/ThePEG.h> 0015 #include <HwDecayerBase.h> 0016 #include <ThePEG/Interface/Interfaced.h> 0017 #include <ThePEG/PDT/DecayMode.h> 0018 #include <ThePEG/Repository/Strategy.fh> 0019 #include <fstream> 0020 0021 namespace Herwig { 0022 0023 using namespace ThePEG; 0024 0025 /** \ingroup Decay 0026 * 0027 * <code>Hw64Decayer</code> is a class that defines all the general routines 0028 * used in HERWIG++ to imitate the HERWIG 6.4 decays. The goal is to have an exact 0029 * copy of HERWIG 6.4 decay routines. This will allow for easy 'callibration' 0030 * of the new C++ code with the old Fortran code. 0031 * 0032 * This class handles the non-partonic decays. In general it is used for 0033 * exclusive meson and baryon decays. Three different matrix elements are supported 0034 * 0035 * - MECode=0 flat-phase space. 0036 * - MECode=100 free V-A matrix element 0037 * - MECode=101 bound V-A matrix element 0038 * 0039 * @see HeavyDecayer 0040 * @see QuarkoniumDecayer 0041 * @see Decayer 0042 * 0043 */ 0044 class Hw64Decayer: public HwDecayerBase { 0045 0046 public: 0047 0048 /** 0049 * Default constructor 0050 */ 0051 Hw64Decayer() : MECode(0),_masstry(50) {} 0052 0053 /** 0054 * return true if this decayer can perfom the decay specified by the 0055 * given decay mode. 0056 */ 0057 virtual bool accept(tcPDPtr parent, const tPDVector & children) const; 0058 0059 /** 0060 * for a given decay mode and a given particle instance, perform the 0061 * decay and return the decay products. 0062 */ 0063 virtual ParticleVector decay(const Particle & parent, 0064 const tPDVector & children) const; 0065 0066 /** 0067 * Output the setup information for the particle database 0068 * @param os The stream to output the information to 0069 * @param header Whether or not to output the information for MySQL 0070 */ 0071 virtual void dataBaseOutput(ofstream & os,bool header) const; 0072 0073 public: 0074 0075 /** 0076 * Standard Init function used to initialize the interface. 0077 */ 0078 static void Init(); 0079 0080 /** @name Functions used by the persistent I/O system. */ 0081 //@{ 0082 /** 0083 * Function used to write out object persistently. 0084 * @param os the persistent output stream written to. 0085 */ 0086 void persistentOutput(PersistentOStream & os) const; 0087 0088 /** 0089 * Function used to read in object persistently. 0090 * @param is the persistent input stream read from. 0091 * @param version the version number of the object when written. 0092 */ 0093 void persistentInput(PersistentIStream & is, int version); 0094 //@} 0095 0096 protected: 0097 0098 /** @name Clone Methods. */ 0099 //@{ 0100 /** 0101 * Make a simple clone of this object. 0102 * @return a pointer to the new object. 0103 */ 0104 virtual IBPtr clone() const {return new_ptr(*this);} 0105 0106 /** Make a clone of this object, possibly modifying the cloned object 0107 * to make it sane. 0108 * @return a pointer to the new object. 0109 */ 0110 virtual IBPtr fullclone() const {return new_ptr(*this);} 0111 //@} 0112 0113 private: 0114 0115 /** 0116 * Weighting of phase space for V-A matrix elements 0117 */ 0118 static double VAWt(Energy2 t0, Energy2 t1, Energy2 t2, InvEnergy4 t3); 0119 0120 /** 0121 * Take an array of momenta and set the momentum member of the particles. 0122 * @param moms The input momenta to be assigned to the particles. 0123 * @param particles The particles whose momenta is to be set. 0124 * @param out The particles outputted with their momenta set. 0125 */ 0126 void setParticleMomentum(ParticleVector & out, const cPDVector & particles, 0127 const vector<Lorentz5Momentum> & moms) const { 0128 unsigned int numProds = particles.size(); 0129 for(unsigned int ix=0;ix<numProds;++ix) 0130 out.push_back(particles[ix]->produceParticle(moms[ix])); 0131 } 0132 0133 private: 0134 0135 /** 0136 * Private and non-existent assignment operator. 0137 */ 0138 const Hw64Decayer & operator=(const Hw64Decayer &) = delete; 0139 0140 private: 0141 0142 /** 0143 * The code for the matrix element being used. 0144 */ 0145 int MECode; 0146 0147 /** 0148 * Maximum number of attempts to generate the off-shell masses 0149 */ 0150 unsigned int _masstry; 0151 }; 0152 0153 } 0154 0155 #endif /* HERWIG_Hw64Decayer_H */
| [ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
|
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
|