herwig is hosted by Hepforge, IPPP Durham
Herwig 7.3.0
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
19namespace Herwig {
20
21using namespace ThePEG;
22
34
35public:
36
41
42public:
43
48 double cmec(const DipoleSplittingInfo&) const;
49
53 virtual double evaluate(const DipoleSplittingInfo& s) const {
54 return cmec(s);
55 }
56
62 virtual double hint(const DipoleSplittingInfo& s) const {
63 if ( hintOnly(s) )
64 return cmec(s);
65 return abs(cmec(s))*lambda;
66 }
67
72 virtual bool hintOnly(const DipoleSplittingInfo& s) const {
73 return cmec(s) > 0.;
74 }
75
79 virtual void reweightFactor(const double c) {
80 assert(c > 0.0);
81 lambda = c;
82 }
83
87 virtual void negativeScaling(const double c) {
88 assert(c >= 0.0);
90 }
91
92public:
93
101
107 void persistentInput(PersistentIStream & is, int version);
109
116 static void Init();
117
118protected:
119
126 virtual IBPtr clone() const;
127
132 virtual IBPtr fullclone() const;
134
135// If needed, insert declarations of virtual function defined in the
136// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
137
138private:
139
144 double lambda;
145
152
158
159};
160
161}
162
163#endif /* Herwig_ColourMatrixElementCorrection_H */
ColourMatrixElementCorrection is implementing colour matrix element corrections through the weighted ...
ColourMatrixElementCorrection & operator=(const ColourMatrixElementCorrection &)=delete
The assignment operator is private and must never be called.
static void Init()
The standard Init function used to initialize the interfaces.
virtual IBPtr clone() const
Make a simple clone of this object.
void persistentOutput(PersistentOStream &os) const
Function used to write out object persistently.
double negCMECScaling
Scaling factor multiplying all of the negative colour matrix element corrections.
virtual void negativeScaling(const double c)
Set the factor in front of enhance used by the veto algorithm.
void persistentInput(PersistentIStream &is, int version)
Function used to read in object persistently.
double lambda
Factor to shuffle the magnitude of the CMEC between the splitting kernel and the weight in the reweig...
virtual IBPtr fullclone() const
Make a clone of this object, possibly modifying the cloned object to make it sane.
virtual double hint(const DipoleSplittingInfo &s) const
Return the absolute value of the colour matrix element correction as an enhancement hint for the samp...
virtual bool hintOnly(const DipoleSplittingInfo &s) const
Return true, if the reweight can be entirely absorbed into the hint.
virtual double evaluate(const DipoleSplittingInfo &s) const
Return the reweighting factor for the given splitting type.
ColourMatrixElementCorrection()
The default constructor.
virtual void reweightFactor(const double c)
Set the factor in front of enhance used by the veto algorithm.
double cmec(const DipoleSplittingInfo &) const
Calculate and cache the colour matrix element correction factor for the given splitting type.
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...
-*- C++ -*-
ThePEG::Ptr< InterfacedBase >::pointer IBPtr