herwig is hosted by Hepforge, IPPP Durham
Herwig  7.2.1
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 
22 namespace Herwig {
23 
24 using namespace ThePEG;
25 
35 
36 public:
37 
42  init_(true),iteration_(1), points_(1000), info_(false),
43  createModes_(true), removeOnShell_(1), excludeEffective_(true),
44  minReleaseFraction_(1e-3), maxBoson_(1), maxList_(1),
45  includeTopOnShell_(false ), removeFlavourChangingVertices_(false),
46  removeSmallVertices_(false), minVertexNorm_(1e-8)
47  {}
48 
55  virtual void DecayList(const set<PDPtr> & particles);
56 
60  virtual unsigned int numBodies() const = 0;
61 
65  void decayConstructor(tDecayConstructorPtr d) {
66  decayConstructor_ = d;
67  }
68 
73  return removeFlavourChangingVertices_;
74  }
75 
79  bool removeSmallVertices() const {
80  return removeSmallVertices_;
81  }
82 
86  double minVertexNorm() const {
87  return minVertexNorm_;
88  }
89 
90 protected:
91 
95  virtual void createDecayMode(vector<NBDiagram> & mode,
96  bool possibleOnShell,
97  double symfac);
98 
99 
107  void setBranchingRatio(tDMPtr dm, Energy pwidth);
108 
114  void setDecayerInterfaces(string name) const;
115 
119  bool initialize() const { return init_; }
120 
124  int iteration() const { return iteration_; }
125 
129  int points() const { return points_; }
130 
134  bool info() const { return info_; }
135 
139  bool createDecayModes() const { return createModes_; }
140 
144  unsigned int maximumGaugeBosons() const { return maxBoson_;}
145 
149  unsigned int maximumList() const { return maxList_;}
150 
154  double minimumReleaseFraction() const {return minReleaseFraction_;}
155 
159  tDecayConstructorPtr decayConstructor() const {
160  return decayConstructor_;
161  }
162 
166  unsigned int removeOnShell() const { return removeOnShell_; }
167 
171  bool excluded(VertexBasePtr vertex) const {
172  // skip an effective vertex
173  if( excludeEffective_ &&
174  vertex->orderInAllCouplings() != int(vertex->getNpoint())-2)
175  return true;
176  // check if explicitly forbidden
177  return excludedVerticesSet_.find(vertex)!=excludedVerticesSet_.end();
178  }
179 
180 public:
181 
188  void persistentOutput(PersistentOStream & os) const;
189 
195  void persistentInput(PersistentIStream & is, int version);
197 
204  static void Init();
205 
206 protected:
207 
215  virtual void doinit();
217 
218 private:
219 
224  NBodyDecayConstructorBase & operator=(const NBodyDecayConstructorBase &) = delete;
225 
226 private:
227 
231  bool init_;
232 
237 
241  int points_;
242 
246  bool info_;
247 
252 
256  unsigned int removeOnShell_;
257 
261  vector<VertexBasePtr> excludedVerticesVector_;
262 
266  set<VertexBasePtr> excludedVerticesSet_;
267 
272 
277 
282 
286  tDecayConstructorPtr decayConstructor_;
287 
293 
297  unsigned int maxBoson_;
298 
302  unsigned int maxList_;
303 
308 
313 
318 
323 };
324 
328 
329  public:
330 
332 
333  NBodyDecayConstructorError(const string & str,
334  Severity sev) : Exception(str,sev)
335  {}
336  };
337 
338 }
339 
340 #endif /* HERWIG_NBodyDecayConstructorBase_H */
bool removeFlavourChangingVertices_
Remove flavour changing vertices ?
set< PDPtr > excludedParticlesSet_
Excluded Particles.
bool info() const
Whether to output information on the decayers.
bool removeSmallVertices_
Remove small vertices ?
An Exception class that can be used by all inheriting classes to indicate a setup problem...
bool excluded(VertexBasePtr vertex) const
Check if a vertex is excluded.
int points() const
Number of points to do in initialization.
int iteration_
Number of iterations if initializing (default 1)
unsigned int maxBoson_
Maximum number of EW gauge bosons.
tDecayConstructorPtr decayConstructor() const
Get the pointer to the DecayConstructor object.
bool init_
Whether to initialize decayers or not.
bool createModes_
Whether to create the DecayModes as well as the Decayer objects.
vector< VertexBasePtr > excludedVerticesVector_
Excluded Vertices.
tDecayConstructorPtr decayConstructor_
A pointer to the DecayConstructor object.
unsigned int removeOnShell_
Whether or not to remove on-shell diagrams.
unsigned int removeOnShell() const
Option for on-shell particles.
unsigned int maximumList() const
Maximum number of particles from the list whose decays we are calculating.
This is the base class for NBodyDecayConstructors.
double minVertexNorm_
Minimum norm for vertex removal.
void decayConstructor(tDecayConstructorPtr d)
Set the pointer to the DecayConstrcutor.
int iteration() const
Number of iterations if initializing (default 1)
ThePEG::Ptr< DecayMode >::transient_pointer tDMPtr
set< VertexBasePtr > excludedVerticesSet_
Excluded Vertices.
bool createDecayModes() const
Whether to create the DecayModes as well as the Decayer objects.
bool includeTopOnShell_
Include on-shell for .
bool info_
Whether to output information on the decayers.
int points_
Number of points to do in initialization.
double minVertexNorm() const
Minimum norm for vertex removal.
-*- C++ -*-
NBodyDecayConstructorBase()
The default constructor.
bool initialize() const
Whether to initialize decayers or not.
bool removeFlavourChangingVertices() const
Remove flavour changing vertices ?
bool removeSmallVertices() const
Remove small vertices ?
unsigned int maximumGaugeBosons() const
Maximum number of electroweak gauge bosons.
vector< PDPtr > excludedParticlesVector_
Excluded Particles.
bool excludeEffective_
Whether or not to exclude effective vertices.
double minimumReleaseFraction() const
Minimum energy release fraction.
unsigned int maxList_
Maximum number of particles from the decaying particle list.
double minReleaseFraction_
The minimum energy release for a three-body decay as a fraction of the parent mass.