herwig is hosted by Hepforge, IPPP Durham
Herwig 7.3.0
DipoleSplittingReweight.h
1// -*- C++ -*-
2//
3// DipoleSplittingReweight.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_DipoleSplittingReweight_H
10#define HERWIG_DipoleSplittingReweight_H
11//
12// This is the declaration of the DipoleSplittingReweight class.
13//
14
15#include "ThePEG/Handlers/HandlerBase.h"
16#include "DipoleSplittingInfo.h"
17
18#include "Herwig/Shower/Dipole/DipoleShowerHandler.fh"
19
20namespace Herwig {
21
22using namespace ThePEG;
23
35
36public:
37
44
50
51public:
52
57 virtual bool firstInteraction() const { return true; }
58
63 virtual bool secondaryInteractions() const { return false; }
64
69
73 Ptr<DipoleShowerHandler>::tptr currentHandler() const;
74
78 virtual double evaluate(const DipoleSplittingInfo&) const = 0;
79
84 virtual double hint(const DipoleSplittingInfo&) const {
85 return 1.;
86 }
87
92 virtual bool hintOnly(const DipoleSplittingInfo&) const {
93 return false;
94 }
95
99 virtual void reweightFactor(const double) {
100 return;
101 }
102
106 virtual void negativeScaling(const double) {
107 return;
108 }
109
110public:
111
119
125 void persistentInput(PersistentIStream & is, int version);
127
134 static void Init();
135
136// If needed, insert declarations of virtual function defined in the
137// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
138
139private:
140
146
152
156 Ptr<DipoleShowerHandler>::tptr theCurrentHandler;
157
158};
159
160}
161
162#include "ThePEG/Utilities/ClassTraits.h"
163
164namespace ThePEG {
165
170template <>
171struct BaseClassTrait<Herwig::DipoleSplittingReweight,1> {
173 typedef HandlerBase NthBase;
174};
175
178template <>
179struct ClassTraits<Herwig::DipoleSplittingReweight>
180 : public ClassTraitsBase<Herwig::DipoleSplittingReweight> {
182 static string className() { return "Herwig::DipoleSplittingReweight"; }
190 static string library() { return "HwDipoleShower.so"; }
191};
192
195}
196
197#endif /* HERWIG_DipoleSplittingReweight_H */
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 bool firstInteraction() const
Return true, if the reweighting should be applied to the first interaction.
virtual ~DipoleSplittingReweight()
The destructor.
void persistentOutput(PersistentOStream &os) const
Function used to write out object persistently.
static AbstractClassDescription< DipoleSplittingReweight > initDipoleSplittingReweight
The static object used to initialize the description of this class.
virtual bool hintOnly(const DipoleSplittingInfo &) const
Return true, if the reweight can be entirely absorbed into the hint.
Ptr< DipoleShowerHandler >::tptr theCurrentHandler
A pointer to the currently active dipole shower handler object.
virtual double hint(const DipoleSplittingInfo &) const
Return an enhancement hint for the sampling of the un-reweighted splitting kernel.
void updateCurrentHandler()
Update the pointer to the currently active dipole shower handler object.
virtual void negativeScaling(const double)
Scaling factor for negative reweights.
virtual bool secondaryInteractions() const
Return true, if the reweighting should be applied to the secondary interactions.
static void Init()
The standard Init function used to initialize the interfaces.
virtual double evaluate(const DipoleSplittingInfo &) const =0
Return the reweighting factor for the given splitting type.
void persistentInput(PersistentIStream &is, int version)
Function used to read in object persistently.
DipoleSplittingReweight()
The default constructor.
DipoleSplittingReweight & operator=(const DipoleSplittingReweight &)=delete
The assignment operator is private and must never be called.
virtual void reweightFactor(const double)
Set the factor in front of enhance used by the veto algorithm.
Ptr< DipoleShowerHandler >::tptr currentHandler() const
Return the pointer to the currently active dipole shower handler object.
-*- C++ -*-
static string className()
static string library()