herwig is hosted by Hepforge, IPPP Durham
Herwig 7.3.0
NBodyDecayConstructorBase.h
1// -*- C++ -*-
2//
3// NBodyDecayConstructorBase.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_NBodyDecayConstructorBase_H
10#define HERWIG_NBodyDecayConstructorBase_H
11//
12// This is the declaration of the NBodyDecayConstructorBase class.
13//
14
15#include "ThePEG/Interface/Interfaced.h"
16#include "ThePEG/Utilities/Exception.h"
17#include "ThePEG/PDT/ParticleData.h"
18#include "NBodyDecayConstructorBase.fh"
19#include "PrototypeVertex.h"
20#include "DecayConstructor.fh"
21
22namespace Herwig {
23
24using namespace ThePEG;
25
35
36public:
37
38 struct MassOrdering {
39 bool operator()(PDPtr p1, PDPtr p2) const {
40 return p1->mass() < p2->mass() || (p1->mass()==p2->mass() && p1->id()>p2->id());
41 }
42 };
43
44public:
45
50 init_(true),iteration_(1), points_(1000), info_(false),
55 {}
56
63 virtual void DecayList(const set<PDPtr,MassOrdering> & particles);
64
68 virtual unsigned int numBodies() const = 0;
69
73 void decayConstructor(tDecayConstructorPtr d) {
75 }
76
82 }
83
87 bool removeSmallVertices() const {
89 }
90
94 double minVertexNorm() const {
95 return minVertexNorm_;
96 }
97
98protected:
99
103 virtual void createDecayMode(vector<NBDiagram> & mode,
104 bool possibleOnShell,
105 double symfac);
106
107
115 void setBranchingRatio(tDMPtr dm, Energy pwidth);
116
122 void setDecayerInterfaces(string name) const;
123
127 bool initialize() const { return init_; }
128
132 int iteration() const { return iteration_; }
133
137 int points() const { return points_; }
138
142 bool info() const { return info_; }
143
147 bool createDecayModes() const { return createModes_; }
148
152 unsigned int maximumGaugeBosons() const { return maxBoson_;}
153
157 unsigned int maximumList() const { return maxList_;}
158
163
167 tDecayConstructorPtr decayConstructor() const {
168 return decayConstructor_;
169 }
170
174 unsigned int removeOnShell() const { return removeOnShell_; }
175
179 bool excluded(VertexBasePtr vertex) const {
180 // skip an effective vertex
181 if( excludeEffective_ &&
182 vertex->orderInAllCouplings() != int(vertex->getNpoint())-2)
183 return true;
184 // check if explicitly forbidden
185 return excludedVerticesSet_.find(vertex)!=excludedVerticesSet_.end();
186 }
187
188public:
189
197
203 void persistentInput(PersistentIStream & is, int version);
205
212 static void Init();
213
214protected:
215
223 virtual void doinit();
225
226private:
227
233
234private:
235
239 bool init_;
240
245
250
254 bool info_;
255
260
264 unsigned int removeOnShell_;
265
269 vector<VertexBasePtr> excludedVerticesVector_;
270
274 set<VertexBasePtr> excludedVerticesSet_;
275
280
285
290
294 tDecayConstructorPtr decayConstructor_;
295
301
305 unsigned int maxBoson_;
306
310 unsigned int maxList_;
311
316
321
326
331};
332
336
337 public:
338
340
341 NBodyDecayConstructorError(const string & str,
342 Severity sev) : Exception(str,sev)
343 {}
344 };
345
346}
347
348#endif /* HERWIG_NBodyDecayConstructorBase_H */
This is the base class for NBodyDecayConstructors.
double minVertexNorm_
Minimum norm for vertex removal.
unsigned int removeOnShell() const
Option for on-shell particles.
bool initialize() const
Whether to initialize decayers or not.
bool info() const
Whether to output information on the decayers.
NBodyDecayConstructorBase()
The default constructor.
void setBranchingRatio(tDMPtr dm, Energy pwidth)
Set the branching ratio of this mode.
virtual unsigned int numBodies() const =0
Number of outgoing lines.
set< PDPtr > excludedParticlesSet_
Excluded Particles.
bool excludeEffective_
Whether or not to exclude effective vertices.
unsigned int maximumList() const
Maximum number of particles from the list whose decays we are calculating.
void persistentInput(PersistentIStream &is, int version)
Function used to read in object persistently.
tDecayConstructorPtr decayConstructor() const
Get the pointer to the DecayConstructor object.
vector< VertexBasePtr > excludedVerticesVector_
Excluded Vertices.
unsigned int maximumGaugeBosons() const
Maximum number of electroweak gauge bosons.
int points() const
Number of points to do in initialization.
static void Init()
The standard Init function used to initialize the interfaces.
NBodyDecayConstructorBase & operator=(const NBodyDecayConstructorBase &)=delete
The assignment operator is private and must never be called.
virtual void createDecayMode(vector< NBDiagram > &mode, bool possibleOnShell, double symfac)
Method to set up the decay mode, should be overidden in inheriting class.
bool removeSmallVertices_
Remove small vertices ?
virtual void doinit()
Initialize this object after the setup phase before saving an EventGenerator to disk.
bool includeTopOnShell_
Include on-shell for .
bool init_
Whether to initialize decayers or not.
int iteration_
Number of iterations if initializing (default 1)
double minReleaseFraction_
The minimum energy release for a three-body decay as a fraction of the parent mass.
unsigned int maxList_
Maximum number of particles from the decaying particle list.
bool removeSmallVertices() const
Remove small vertices ?
vector< PDPtr > excludedParticlesVector_
Excluded Particles.
void persistentOutput(PersistentOStream &os) const
Function used to write out object persistently.
tDecayConstructorPtr decayConstructor_
A pointer to the DecayConstructor object.
double minVertexNorm() const
Minimum norm for vertex removal.
bool createDecayModes() const
Whether to create the DecayModes as well as the Decayer objects.
int points_
Number of points to do in initialization.
void setDecayerInterfaces(string name) const
Set the interfaces of the decayers depending on the flags stored.
unsigned int maxBoson_
Maximum number of EW gauge bosons.
bool removeFlavourChangingVertices() const
Remove flavour changing vertices ?
double minimumReleaseFraction() const
Minimum energy release fraction.
bool removeFlavourChangingVertices_
Remove flavour changing vertices ?
bool excluded(VertexBasePtr vertex) const
Check if a vertex is excluded.
bool info_
Whether to output information on the decayers.
int iteration() const
Number of iterations if initializing (default 1)
virtual void DecayList(const set< PDPtr, MassOrdering > &particles)
Function used to determine allowed decaymodes, to be implemented in derived class.
set< VertexBasePtr > excludedVerticesSet_
Excluded Vertices.
bool createModes_
Whether to create the DecayModes as well as the Decayer objects.
void decayConstructor(tDecayConstructorPtr d)
Set the pointer to the DecayConstrcutor.
unsigned int removeOnShell_
Whether or not to remove on-shell diagrams.
An Exception class that can be used by all inheriting classes to indicate a setup problem.
string name() const
-*- C++ -*-
ThePEG::Ptr< DecayMode >::transient_pointer tDMPtr
ThePEG::Ptr< ParticleData >::pointer PDPtr