herwig is hosted by Hepforge, IPPP Durham
Herwig 7.3.0
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
20namespace Herwig {
21using namespace ThePEG;
22
32
33public:
34
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
45public:
46
54
60 void persistentInput(PersistentIStream & is, int version);
62
69 static void Init();
70
74 virtual bool preInitialize() const {
75 return true;
76 }
77
78protected:
79
87 virtual void doinit();
89
90protected:
91
98 virtual IBPtr clone() const;
99
104 virtual IBPtr fullclone() const;
106
107private:
108
114
115private:
116
123 void checkDecays(PDPtr parent);
124
128 void writeDecayModes(ostream & ofs, tcPDPtr parent) const;
129
136
137private:
138
142 vector<HPConstructorPtr> hardProcessConstructors_;
143
147 DecayConstructorPtr _theDecayConstructor;
148
153
160
167
173
178
182 unsigned int Iorder_;
183
188
192 double brMin_;
193
199
203 unsigned int decayOutput_;
204
209 double minWidth_;
210
215};
216
217}
218
219#endif /* HERWIG_ModelGenerator_H */
This class is designed to store the particles in some model and then call the appropriate function to...
int Offsel_
Which particles to treat as off-shell.
double minWidth_
Minimum fraction of particle's mass width can be for off-shell treatment.
vector< HPConstructorPtr > hardProcessConstructors_
Pointer to the TwoToTwoProcessConstructor.
bool BRnorm_
Whether to normalise the partial widths to BR*Total width for an on-shell particle.
PDVector particles_
Vector of ParticleData pointer.
void checkDecays(PDPtr parent)
Check the decay modes a given particle type.
virtual IBPtr fullclone() const
Make a clone of this object, possibly modifying the cloned object to make it sane.
void createWidthGenerator(tPDPtr p)
Create mass and width generators to simulate off-shell effects.
void persistentOutput(PersistentOStream &os) const
Function used to write out object persistently.
virtual void doinit()
Initialize this object after the setup phase before saving an EventGenerator to disk.
unsigned int Iorder_
The order for the interpolation.
PDVector offshell_
The particles to create MassGenerator and WidthGenerators
void persistentInput(PersistentIStream &is, int version)
Function used to read in object persistently.
double howOffShell_
How much a particle is allowed to be offshell.
static void Init()
The standard Init function used to initialize the interfaces.
double brMin_
The minimum branching ratio to use.
int BWshape_
The shape of the Breit-Wigner used in the mass generation.
bool twoBodyOnly_
Whether to use only two-body or all modes for running width.
int Npoints_
The number of points to include in the interpolation table.
DecayConstructorPtr _theDecayConstructor
Pointer to DecayConstructor.
virtual IBPtr clone() const
Make a simple clone of this object.
void writeDecayModes(ostream &ofs, tcPDPtr parent) const
Write out the spectrum of masses and decay modes.
unsigned int decayOutput_
Option for the outputs of the decays to a file.
ModelGenerator()
The default constructor.
virtual bool preInitialize() const
Overloaded function from Interfaced.
ModelGenerator & operator=(const ModelGenerator &)=delete
The assignment operator is private and must never be called.
-*- C++ -*-
ThePEG::Ptr< ParticleData >::transient_pointer tPDPtr
vector< PDPtr > PDVector
ThePEG::Ptr< InterfacedBase >::pointer IBPtr
ThePEG::Ptr< ParticleData >::transient_const_pointer tcPDPtr
ThePEG::Ptr< ParticleData >::pointer PDPtr