herwig is hosted by Hepforge, IPPP Durham
Herwig  7.2.1
ColourMatrixElementCorrection.h
1 // -*- C++ -*-
2 //
3 // ColourMatrixElementCorrection.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 2 of the GPL, see COPYING for details.
7 // Please respect the MCnet academic guidelines, see GUIDELINES for details.
8 //
9 #ifndef Herwig_ColourMatrixElementCorrection_H
10 #define Herwig_ColourMatrixElementCorrection_H
11 //
12 // This is the declaration of the ColourMatrixElementCorrection class.
13 //
14 
15 #include "Herwig/Shower/Dipole/Base/DipoleSplittingReweight.h"
16 
17 #include <tuple>
18 
19 namespace Herwig {
20 
21 using namespace ThePEG;
22 
34 
35 public:
36 
43 
49 
50 public:
51 
56  double cmec(const DipoleSplittingInfo&) const;
57 
61  virtual double evaluate(const DipoleSplittingInfo& s) const {
62  return cmec(s);
63  }
64 
70  virtual double hint(const DipoleSplittingInfo& s) const {
71  if ( hintOnly(s) )
72  return cmec(s);
73  return abs(cmec(s))*lambda;
74  }
75 
80  virtual bool hintOnly(const DipoleSplittingInfo& s) const {
81  return cmec(s) > 0.;
82  }
83 
87  virtual void reweightFactor(const double c) {
88  assert(c > 0.0);
89  lambda = c;
90  }
91 
95  virtual void negativeScaling(const double c) {
96  assert(c >= 0.0);
97  negCMECScaling = c;
98  }
99 
100 public:
101 
108  void persistentOutput(PersistentOStream & os) const;
109 
115  void persistentInput(PersistentIStream & is, int version);
117 
124  static void Init();
125 
126 protected:
127 
134  virtual IBPtr clone() const;
135 
140  virtual IBPtr fullclone() const;
142 
143 // If needed, insert declarations of virtual function defined in the
144 // InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
145 
146 private:
147 
152  double lambda;
153 
160 
166 
167 };
168 
169 }
170 
171 #endif /* Herwig_ColourMatrixElementCorrection_H */
virtual void reweightFactor(const double c)
Set the factor in front of enhance used by the veto algorithm.
ThePEG::Ptr< InterfacedBase >::pointer IBPtr
virtual double hint(const DipoleSplittingInfo &s) const
Return the absolute value of the colour matrix element correction as an enhancement hint for the samp...
double lambda
Factor to shuffle the magnitude of the CMEC between the splitting kernel and the weight in the reweig...
virtual double evaluate(const DipoleSplittingInfo &s) const
Return the reweighting factor for the given splitting type.
double negCMECScaling
Scaling factor multiplying all of the negative colour matrix element corrections. ...
virtual bool hintOnly(const DipoleSplittingInfo &s) const
Return true, if the reweight can be entirely absorbed into the hint.
ColourMatrixElementCorrection is implementing colour matrix element corrections through the weighted ...
-*- C++ -*-
DipoleSplittingInfo contains all parameters to generate a full dipole splitting.
DipoleSplittingReweight is used by the dipole shower to reweight splittings from a given dipole split...
virtual void negativeScaling(const double c)
Set the factor in front of enhance used by the veto algorithm.