herwig is hosted by Hepforge, IPPP Durham
Herwig  7.1.5
HwDecayerBase.h
1 // -*- C++ -*-
2 //
3 // HwDecayerBase.h is a part of Herwig - A multi-purpose Monte Carlo event generator
4 // Copyright (C) 2002-2017 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_HwDecayerBase_H
10 #define HERWIG_HwDecayerBase_H
11 //
12 // This is the declaration of the HwDecayerBase class.
13 //
14 
15 #include "ThePEG/PDT/Decayer.h"
16 #include "Herwig/Shower/Core/Base/ShowerParticle.fh"
17 #include "Herwig/Shower/Core/Base/ShowerProgenitor.fh"
18 #include "Herwig/Shower/RealEmissionProcess.fh"
19 #include "HwDecayerBase.fh"
20 
21 namespace Herwig {
22 
23 struct Branching;
24 
25 using namespace ThePEG;
26 
39 class HwDecayerBase: public Decayer {
40 
41 public:
42 
46  HwDecayerBase() : _initialize(false), _dbOutput(false) {}
47 
56  virtual bool accept(const DecayMode & dm) const;
57 
64  virtual ParticleVector decay(const DecayMode & dm, const Particle & p) const;
66 
67 public:
68 
74 
78  enum POWHEGType {No, ISR, FSR, Both};
79 
80 
84  virtual POWHEGType hasPOWHEGCorrection() {return No;}
85 
86 
90  virtual bool hasMECorrection() {return false;}
91 
95  virtual void initializeMECorrection(RealEmissionProcessPtr , double & ,
96  double & );
97 
101  virtual RealEmissionProcessPtr applyHardMatrixElementCorrection(RealEmissionProcessPtr);
102 
111  virtual bool softMatrixElementVeto(ShowerProgenitorPtr initial,
112  ShowerParticlePtr parent,
113  Branching br);
114 
118  virtual RealEmissionProcessPtr generateHardest(RealEmissionProcessPtr);
120 
121 protected:
122 
134  virtual bool accept(tcPDPtr parent, const tPDVector & children) const = 0;
135 
142  virtual ParticleVector decay(const Particle & parent,
143  const tPDVector & children) const = 0;
145 
146 public:
147 
154  void persistentOutput(PersistentOStream & os) const;
155 
161  void persistentInput(PersistentIStream & is, int version);
163 
170  static void Init();
171 
172 public:
173 
183  virtual void dataBaseOutput(ofstream & os,bool header) const = 0;
184 
188  bool initialize() const {return _initialize;}
189 
193  bool databaseOutput() const {return _dbOutput;}
195 
196 protected:
197 
204  virtual void dofinish();
206 
207 private:
208 
214 
219  HwDecayerBase & operator=(const HwDecayerBase &) = delete;
220 
221 private:
222 
227 
231  bool _dbOutput;
232 };
233 
234 }
235 
236 #include "ThePEG/Utilities/ClassTraits.h"
237 
238 namespace ThePEG {
239 
244 template <>
245 struct BaseClassTrait<Herwig::HwDecayerBase,1> {
247  typedef Decayer NthBase;
248 };
249 
252 template <>
253 struct ClassTraits<Herwig::HwDecayerBase>
254  : public ClassTraitsBase<Herwig::HwDecayerBase> {
256  static string className() { return "Herwig::HwDecayerBase"; }
257 };
258 
261 }
262 
263 #endif /* HERWIG_HwDecayerBase_H */
virtual bool hasMECorrection()
Has an old fashioned ME correction.
Definition: HwDecayerBase.h:90
HwDecayerBase()
The default constructor.
Definition: HwDecayerBase.h:46
vector< tPDPtr > tPDVector
POWHEGType
Virtual members to be overridden by inheriting classes which implement hard corrections.
Definition: HwDecayerBase.h:78
bool initialize() const
Access to the initialize variable.
ThePEG::Ptr< ParticleData >::transient_const_pointer tcPDPtr
bool databaseOutput() const
Access the database output variable.
The branching struct is used to store information on the branching.
Definition: Branching.h:20
static AbstractClassDescription< HwDecayerBase > initHwDecayerBase
The static object used to initialize the description of this class.
The HwDecayerBase class is the base class for Decayers in Herwig.
Definition: HwDecayerBase.h:39
Both loose and tight b-tag.
Definition: PGSInterface.h:35
-*- C++ -*-
bool _initialize
perform initialisation
vector< PPtr > ParticleVector
virtual POWHEGType hasPOWHEGCorrection()
Has a POWHEG style correction.
Definition: HwDecayerBase.h:84
bool _dbOutput
Print out database.