|
|
|||
File indexing completed on 2026-08-06 09:24:17
0001 // -*- C++ -*- 0002 // 0003 // ModelGenerator.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_ModelGenerator_H 0010 #define HERWIG_ModelGenerator_H 0011 // 0012 // This is the declaration of the ModelGenerator class. 0013 // 0014 0015 #include "ThePEG/Interface/Interfaced.h" 0016 #include "DecayConstructor.h" 0017 #include "HardProcessConstructor.h" 0018 #include "ModelGenerator.fh" 0019 0020 namespace Herwig { 0021 using namespace ThePEG; 0022 0023 /** 0024 * This class is designed to store the particles in some model and 0025 * then call the appropriate function to setup the model 0026 * 0027 * @see \ref ModelGeneratorInterfaces "The interfaces" 0028 * defined for ModelGenerator. 0029 * @see Interfaced 0030 */ 0031 class ModelGenerator: public Interfaced { 0032 0033 public: 0034 0035 /** 0036 * The default constructor. 0037 */ 0038 ModelGenerator() : particles_(0), offshell_(0), 0039 Offsel_(0), BRnorm_(true), 0040 Npoints_(10), Iorder_(1), 0041 BWshape_(0), brMin_(1e-6), twoBodyOnly_(false), 0042 decayOutput_(1), minWidth_(1e-6), 0043 howOffShell_(5.) {} 0044 0045 public: 0046 0047 /** @name Functions used by the persistent I/O system. */ 0048 //@{ 0049 /** 0050 * Function used to write out object persistently. 0051 * @param os the persistent output stream written to. 0052 */ 0053 void persistentOutput(PersistentOStream & os) const; 0054 0055 /** 0056 * Function used to read in object persistently. 0057 * @param is the persistent input stream read from. 0058 * @param version the version number of the object when written. 0059 */ 0060 void persistentInput(PersistentIStream & is, int version); 0061 //@} 0062 0063 /** 0064 * The standard Init function used to initialize the interfaces. 0065 * Called exactly once for each class by the class description system 0066 * before the main function starts or 0067 * when this class is dynamically loaded. 0068 */ 0069 static void Init(); 0070 0071 /** 0072 * Overloaded function from Interfaced 0073 */ 0074 virtual bool preInitialize() const { 0075 return true; 0076 } 0077 0078 protected: 0079 0080 /** @name Standard Interfaced functions. */ 0081 //@{ 0082 /** 0083 * Initialize this object after the setup phase before saving an 0084 * EventGenerator to disk. 0085 * @throws InitException if object could not be initialized properly. 0086 */ 0087 virtual void doinit(); 0088 //@} 0089 0090 protected: 0091 0092 /** @name Clone Methods. */ 0093 //@{ 0094 /** 0095 * Make a simple clone of this object. 0096 * @return a pointer to the new object. 0097 */ 0098 virtual IBPtr clone() const; 0099 0100 /** Make a clone of this object, possibly modifying the cloned object 0101 * to make it sane. 0102 * @return a pointer to the new object. 0103 */ 0104 virtual IBPtr fullclone() const; 0105 //@} 0106 0107 private: 0108 0109 /** 0110 * The assignment operator is private and must never be called. 0111 * In fact, it should not even be implemented. 0112 */ 0113 ModelGenerator & operator=(const ModelGenerator &) = delete; 0114 0115 private: 0116 0117 /** 0118 * Check the decay modes a given particle type. This checks whether 0119 * the decay has quarks in the final state and that they can be put on 0120 * mass-shell during the shower. 0121 * @param parent The parent particle 0122 */ 0123 void checkDecays(PDPtr parent); 0124 0125 /** 0126 * Write out the spectrum of masses and decay modes 0127 */ 0128 void writeDecayModes(ostream & ofs, tcPDPtr parent) const; 0129 0130 /** 0131 * Create mass and width generators to simulate off-shell effects 0132 * @param p A pointer to the ParticleData object to create 0133 * the width and mass generators for. 0134 */ 0135 void createWidthGenerator(tPDPtr p); 0136 0137 private: 0138 0139 /** 0140 * Pointer to the TwoToTwoProcessConstructor 0141 */ 0142 vector<HPConstructorPtr> hardProcessConstructors_; 0143 0144 /** 0145 * Pointer to DecayConstructor 0146 */ 0147 DecayConstructorPtr _theDecayConstructor; 0148 0149 /** 0150 * Vector of ParticleData pointer 0151 */ 0152 PDVector particles_; 0153 0154 /** @name Width and Mass Generator variables. */ 0155 //@{ 0156 /** 0157 * The particles to create MassGenerator and WidthGenerators 0158 */ 0159 PDVector offshell_; 0160 0161 /** 0162 * Which particles to treat as off-shell. 1 treats all particles in 0163 * particles_ vector as off-shell, 0 allows selection via 0164 * offshell_ vector. 0165 */ 0166 int Offsel_; 0167 0168 /** 0169 * Whether to normalise the partial widths to BR*Total width for 0170 * an on-shell particle 0171 */ 0172 bool BRnorm_; 0173 0174 /** 0175 * The number of points to include in the interpolation table 0176 */ 0177 int Npoints_; 0178 0179 /** 0180 * The order for the interpolation 0181 */ 0182 unsigned int Iorder_; 0183 0184 /** 0185 * The shape of the Breit-Wigner used in the mass generation 0186 */ 0187 int BWshape_; 0188 0189 /** 0190 * The minimum branching ratio to use 0191 */ 0192 double brMin_; 0193 0194 /** 0195 * Whether to use only two-body or all modes for running width 0196 */ 0197 bool twoBodyOnly_; 0198 //@} 0199 0200 /** 0201 * Option for the outputs of the decays to a file 0202 */ 0203 unsigned int decayOutput_; 0204 0205 /** 0206 * Minimum fraction of particle's mass width can be for off-shell 0207 * treatment 0208 */ 0209 double minWidth_; 0210 0211 /** 0212 * How much a particle is allowed to be offshell 0213 */ 0214 double howOffShell_; 0215 }; 0216 0217 } 0218 0219 #endif /* HERWIG_ModelGenerator_H */
| [ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
|
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
|