herwig is hosted by Hepforge, IPPP Durham
Herwig  7.2.1
ModelGenerator.h
1 // -*- C++ -*-
2 //
3 // ModelGenerator.h is a part of Herwig - A multi-purpose Monte Carlo event generator
4 // Copyright (C) 2002-2019 The Herwig Collaboration
5 //
6 // Herwig is licenced under version 3 of the GPL, see COPYING for details.
7 // Please respect the MCnet academic guidelines, see GUIDELINES for details.
8 //
9 #ifndef HERWIG_ModelGenerator_H
10 #define HERWIG_ModelGenerator_H
11 //
12 // This is the declaration of the ModelGenerator class.
13 //
14 
15 #include "ThePEG/Interface/Interfaced.h"
16 #include "DecayConstructor.h"
17 #include "HardProcessConstructor.h"
18 #include "ModelGenerator.fh"
19 
20 namespace Herwig {
21 using namespace ThePEG;
22 
31 class ModelGenerator: public Interfaced {
32 
33 public:
34 
38  ModelGenerator() : particles_(0), offshell_(0),
39  Offsel_(0), BRnorm_(true),
40  Npoints_(10), Iorder_(1),
41  BWshape_(0), brMin_(1e-6), twoBodyOnly_(false),
42  decayOutput_(1), minWidth_(1e-6),
43  howOffShell_(5.) {}
44 
45 public:
46 
53  void persistentOutput(PersistentOStream & os) const;
54 
60  void persistentInput(PersistentIStream & is, int version);
62 
69  static void Init();
70 
74  virtual bool preInitialize() const {
75  return true;
76  }
77 
78 protected:
79 
87  virtual void doinit();
89 
90 protected:
91 
98  virtual IBPtr clone() const;
99 
104  virtual IBPtr fullclone() const;
106 
107 private:
108 
113  ModelGenerator & operator=(const ModelGenerator &) = delete;
114 
115 private:
116 
123  void checkDecays(PDPtr parent);
124 
128  void writeDecayModes(ostream & ofs, tcPDPtr parent) const;
129 
135  void createWidthGenerator(tPDPtr p);
136 
137 private:
138 
142  vector<HPConstructorPtr> hardProcessConstructors_;
143 
147  DecayConstructorPtr _theDecayConstructor;
148 
153 
160 
166  int Offsel_;
167 
172  bool BRnorm_;
173 
177  int Npoints_;
178 
182  unsigned int Iorder_;
183 
187  int BWshape_;
188 
192  double brMin_;
193 
199 
203  unsigned int decayOutput_;
204 
209  double minWidth_;
210 
214  double howOffShell_;
215 };
216 
217 }
218 
219 #endif /* HERWIG_ModelGenerator_H */
unsigned int decayOutput_
Option for the outputs of the decays to a file.
ThePEG::Ptr< ParticleData >::transient_pointer tPDPtr
ThePEG::Ptr< InterfacedBase >::pointer IBPtr
virtual bool preInitialize() const
Overloaded function from Interfaced.
double brMin_
The minimum branching ratio to use.
int Offsel_
Which particles to treat as off-shell.
bool twoBodyOnly_
Whether to use only two-body or all modes for running width.
DecayConstructorPtr _theDecayConstructor
Pointer to DecayConstructor.
ModelGenerator()
The default constructor.
ThePEG::Ptr< ParticleData >::transient_const_pointer tcPDPtr
ThePEG::Ptr< ParticleData >::pointer PDPtr
unsigned int Iorder_
The order for the interpolation.
bool BRnorm_
Whether to normalise the partial widths to BR*Total width for an on-shell particle.
double howOffShell_
How much a particle is allowed to be offshell.
PDVector offshell_
The particles to create MassGenerator and WidthGenerators.
-*- C++ -*-
vector< PDPtr > PDVector
This class is designed to store the particles in some model and then call the appropriate function to...
vector< HPConstructorPtr > hardProcessConstructors_
Pointer to the TwoToTwoProcessConstructor.
int Npoints_
The number of points to include in the interpolation table.
PDVector particles_
Vector of ParticleData pointer.
int BWshape_
The shape of the Breit-Wigner used in the mass generation.
double minWidth_
Minimum fraction of particle&#39;s mass width can be for off-shell treatment.