herwig is hosted by Hepforge, IPPP Durham
Herwig 7.3.0
ShowerApproximationGenerator.h
1// -*- C++ -*-
2//
3// ShowerApproximationGenerator.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_ShowerApproximationGenerator_H
10#define Herwig_ShowerApproximationGenerator_H
11//
12// This is the declaration of the ShowerApproximationGenerator class.
13//
14
15#include "ThePEG/Handlers/StepHandler.h"
16#include "Herwig/MatrixElement/Matchbox/Matching/ShowerApproximationKernel.h"
17#include "Herwig/MatrixElement/Matchbox/Phasespace/MatchboxPhasespace.h"
18#include "Herwig/MatrixElement/Matchbox/MatchboxFactory.h"
19
20namespace Herwig {
21
22using namespace ThePEG;
23
33
34public:
35
40
41public:
42
60 virtual void handle(EventHandler & eh, const tPVector & tagged,
61 const Hint & hint);
63
64public:
65
69 bool prepare(bool didproject);
70
75 bool generate(const vector<double>&);
76
80 void restore();
81
82protected:
83
87 double generateFraction(tcPDPtr, double, double) const;
88
92 double invertFraction(tcPDPtr, double, double) const;
93
97 Energy ffPtCut() const { return theShowerApproximation->ffPtCut(); }
98
102 Energy fiPtCut() const { return theShowerApproximation->fiPtCut(); }
103
107 Energy iiPtCut() const { return theShowerApproximation->iiPtCut(); }
108
109public:
110
118
124 void persistentInput(PersistentIStream & is, int version);
126
133 static void Init();
134
135protected:
136
143 virtual IBPtr clone() const;
144
149 virtual IBPtr fullclone() const;
151
152
153// If needed, insert declarations of virtual function defined in the
154// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
155
156
157private:
158
162 Ptr<ShowerApproximation>::ptr theShowerApproximation;
163
167 Ptr<MatchboxPhasespace>::ptr thePhasespace;
168
172 map<cPDVector,set<Ptr<ShowerApproximationKernel>::ptr> > theKernelMap;
173
177 unsigned long thePresamplingPoints;
178
182 unsigned long theMaxTry;
183
188 unsigned long theFreezeGrid;
189
193 tStdXCombPtr lastIncomingXComb;
194
195 // the next three are filled from the incoming xcomb in the prepare method
196
200 Ptr<MatchboxMEBase>::ptr theLastBornME;
201
205 vector<Lorentz5Momentum> theLastMomenta;
206
210 vector<Lorentz5Momentum> theLastPresamplingMomenta;
211
216 vector<double> theLastRandomNumbers;
217
221 tStdXCombPtr theLastBornXComb;
222
227
232
238
239};
240
241}
242
243#endif /* Herwig_ShowerApproximationGenerator_H */
ShowerApproximationGenerator generates emissions according to a shower approximation entering a NLO m...
static void Init()
The standard Init function used to initialize the interfaces.
double invertFraction(tcPDPtr, double, double) const
Invert the momentum fraction for the given parton species.
Energy fiPtCut() const
Return the pt cut to be applied for final-initial dipoles.
bool generate(const vector< double > &)
Generate a Born phase space point while kernels are being presampled.
vector< Lorentz5Momentum > theLastPresamplingMomenta
The last Born phase space point used while presampling.
Ptr< MatchboxMEBase >::ptr theLastBornME
The last internal Born matrix element dealt with.
map< cPDVector, set< Ptr< ShowerApproximationKernel >::ptr > > theKernelMap
Map hard processes to the respective kernels.
unsigned long theFreezeGrid
Return the number of accepted points after which the grid should be frozen.
unsigned long theMaxTry
The maximum number of trials to generate a splitting.
virtual IBPtr clone() const
Make a simple clone of this object.
vector< Lorentz5Momentum > theLastMomenta
The last Born phase space point.
Energy iiPtCut() const
Return the pt cut to be applied for initial-initial dipoles.
virtual void handle(EventHandler &eh, const tPVector &tagged, const Hint &hint)
The main function called by the EventHandler class to perform a step.
PPair theLastPartons
The last internal incoming partons dealt with.
Ptr< ShowerApproximation >::ptr theShowerApproximation
The shower approximation to consider.
ShowerApproximationGenerator & operator=(const ShowerApproximationGenerator &)=delete
The assignment operator is private and must never be called.
Energy ffPtCut() const
Return the pt cut to be applied for final-final dipoles.
void persistentOutput(PersistentOStream &os) const
Function used to write out object persistently.
void persistentInput(PersistentIStream &is, int version)
Function used to read in object persistently.
ShowerApproximationGenerator()
The default constructor.
Ptr< MatchboxPhasespace >::ptr thePhasespace
The (invertible) phase space generator to use.
double generateFraction(tcPDPtr, double, double) const
Generate a momentum fraction for the given parton species.
unsigned long thePresamplingPoints
The number of points to presample this splitting generator.
tStdXCombPtr lastIncomingXComb
The last external Born XComb dealt with.
tStdXCombPtr theLastBornXComb
The last internal Born XComb dealt with.
bool prepare(bool didproject)
Fill information on the Born process.
bool theDoCompensate
True, if sampler should apply compensation.
void restore()
Restore information on the Born process.
virtual IBPtr fullclone() const
Make a clone of this object, possibly modifying the cloned object to make it sane.
vector< double > theLastRandomNumbers
The random numbers which have produced the last Born phase space point.
-*- C++ -*-
pair< PPtr, PPtr > PPair
ThePEG::Ptr< InterfacedBase >::pointer IBPtr
vector< tPPtr > tPVector
ThePEG::Ptr< ParticleData >::transient_const_pointer tcPDPtr