herwig is hosted by Hepforge, IPPP Durham
Herwig 7.3.0
HwMEBase.h
1// -*- C++ -*-
2#ifndef HERWIG_HwMEBase_H
3#define HERWIG_HwMEBase_H
4//
5// This is the declaration of the HwMEBase class.
6//
7
8#include "ThePEG/MatrixElement/MEBase.h"
9#include "Herwig/Shower/RealEmissionProcess.fh"
10#include "Herwig/Shower/ShowerInteraction.h"
11#include "ThePEG/PDF/BeamParticleData.h"
12#include "HwMEBase.fh"
13
14namespace Herwig {
15
16struct Branching;
17
18using namespace ThePEG;
19
20typedef Ptr<BeamParticleData>::transient_const_pointer tcBeamPtr;
21
35class HwMEBase: public MEBase {
36
37public:
38
44 {}
45
52 virtual int nDim() const;
53
61 virtual bool generateKinematics(const double * r);
62
68 virtual CrossSection dSigHatDR() const;
69
75 virtual void setKinematics();
77
83
87 enum POWHEGType {No, ISR, FSR, Both};
88
92 virtual POWHEGType hasPOWHEGCorrection() {return No;}
93
97 virtual bool hasMECorrection() {return false;}
98
102 virtual void initializeMECorrection(RealEmissionProcessPtr , double & ,
103 double & );
104
108 virtual RealEmissionProcessPtr applyHardMatrixElementCorrection(RealEmissionProcessPtr);
109
122 virtual bool softMatrixElementVeto(PPtr parent,
123 PPtr progenitor,
124 const bool & fs,
125 const Energy & highestpT,
126 const vector<tcPDPtr> & ids,
127 const double & z,
128 const Energy & scale,
129 const Energy & pT);
130
134 virtual RealEmissionProcessPtr generateHardest(RealEmissionProcessPtr,
137
138public:
139
147
153 void persistentInput(PersistentIStream & is, int version);
155
162 static void Init();
163
164protected:
165
171 Energy2 tHat() const { return lastTHat_; }
172
176 Energy2 uHat() const { return lastUHat_; }
177
181 double phi() const { return lastPhi_; }
183
189 void tHat(Energy2 e2) { lastTHat_ = e2; }
190
194 void uHat(Energy2 e2) { lastUHat_ = e2; }
195
199 void phi(double phi) { lastPhi_ = phi; }
201
206 void massOption(vector<unsigned int> iopt) {
207 massOption_ = iopt;
208 }
209
219 void rescalingOption(unsigned int iopt) {
220 rescaleOption_=iopt;
221 }
222
226 bool rescaleMomenta(const vector<Lorentz5Momentum> &,
227 const cPDVector &);
228
232 const vector<Lorentz5Momentum> & rescaledMomenta() const {
233 return rescaledMomenta_;
234 }
236
240 bool generateMasses(vector<Energy> & masses, double & mjac,
241 const double *r);
242
247 virtual double getCosTheta(double cthmin, double cthmax, const double r);
248
249private:
250
255 HwMEBase & operator=(const HwMEBase &) = delete;
256
257private:
258
262 vector<unsigned int> massOption_;
263
267 Energy2 lastTHat_;
268
272 Energy2 lastUHat_;
273
277 double lastPhi_;
278
282 unsigned int rescaleOption_;
283
287 vector<Lorentz5Momentum> rescaledMomenta_;
288
289};
290
291}
292
293#endif /* HERWIG_HwMEBase_H */
The HwMEBase class serves a number of purposes.
Definition: HwMEBase.h:35
Energy2 lastUHat_
The of the last set phase space point.
Definition: HwMEBase.h:272
virtual POWHEGType hasPOWHEGCorrection()
Has a POWHEG style correction.
Definition: HwMEBase.h:92
HwMEBase & operator=(const HwMEBase &)=delete
The assignment operator is private and must never be called.
virtual RealEmissionProcessPtr generateHardest(RealEmissionProcessPtr, ShowerInteraction)
Apply the POWHEG style correction.
virtual RealEmissionProcessPtr applyHardMatrixElementCorrection(RealEmissionProcessPtr)
Apply the hard matrix element correction to a given hard process or decay.
Energy2 uHat() const
Return the of the last set phase space point.
Definition: HwMEBase.h:176
vector< unsigned int > massOption_
Option for the treatment of the particle masses.
Definition: HwMEBase.h:262
void persistentInput(PersistentIStream &is, int version)
Function used to read in object persistently.
void rescalingOption(unsigned int iopt)
Rescaled momenta for the helicity ME.
Definition: HwMEBase.h:219
Energy2 tHat() const
Return the of the last set phase space point.
Definition: HwMEBase.h:171
Energy2 lastTHat_
The of the last set phase space point.
Definition: HwMEBase.h:267
virtual double getCosTheta(double cthmin, double cthmax, const double r)
Used internally by generateKinematics, after calculating the limits on cos(theta).
void uHat(Energy2 e2)
Set the of the last set phase space point.
Definition: HwMEBase.h:194
unsigned int rescaleOption_
Produced to produce rescaled momenta.
Definition: HwMEBase.h:282
void tHat(Energy2 e2)
Set the of the last set phase space point.
Definition: HwMEBase.h:189
virtual CrossSection dSigHatDR() const
Return the matrix element for the kinematical configuation previously provided by the last call to se...
virtual void initializeMECorrection(RealEmissionProcessPtr, double &, double &)
Initialize the ME correction.
virtual bool hasMECorrection()
Has an old fashioned ME correction.
Definition: HwMEBase.h:97
void persistentOutput(PersistentOStream &os) const
Function used to write out object persistently.
double phi() const
Return the azimuth angle of the last set phase space point.
Definition: HwMEBase.h:181
virtual int nDim() const
The number of internal degreed of freedom used in the matrix element.
virtual bool generateKinematics(const double *r)
Generate internal degrees of freedom given 'nDim()' uniform random numbers in the interval ]0,...
virtual void setKinematics()
Set the typed and momenta of the incoming and outgoing partons to be used in subsequent calls to me()...
vector< Lorentz5Momentum > rescaledMomenta_
Rescaled momenta for use in ME calculations.
Definition: HwMEBase.h:287
double lastPhi_
The azimuth angle of the last set phase space point.
Definition: HwMEBase.h:277
const vector< Lorentz5Momentum > & rescaledMomenta() const
Access to the rescaled momenta.
Definition: HwMEBase.h:232
HwMEBase()
Default constructor.
Definition: HwMEBase.h:42
void massOption(vector< unsigned int > iopt)
Set the treatment of the outgoing masses.
Definition: HwMEBase.h:206
POWHEGType
Virtual members to be overridden by inheriting classes which implement hard corrections.
Definition: HwMEBase.h:87
bool generateMasses(vector< Energy > &masses, double &mjac, const double *r)
Generate the masses of the particles.
bool rescaleMomenta(const vector< Lorentz5Momentum > &, const cPDVector &)
rescale the momenta for the computation of the helicity matrix element
void phi(double phi)
Set the azimuth angle of the last set phase space point.
Definition: HwMEBase.h:199
static void Init()
The standard Init function used to initialize the interfaces.
virtual bool softMatrixElementVeto(PPtr parent, PPtr progenitor, const bool &fs, const Energy &highestpT, const vector< tcPDPtr > &ids, const double &z, const Energy &scale, const Energy &pT)
Apply the soft matrix element correction.
virtual Energy2 scale() const=0
ShowerInteraction
Handy header file to be included in all Shower classes.
-*- C++ -*-
Ptr< BeamParticleData >::transient_const_pointer tcBeamPtr
A typedef for the BeamParticleData.
Definition: HwMEBase.h:20
ThePEG::Ptr< Particle >::pointer PPtr
constexpr ZeroUnit ZERO
vector< cPDPtr > cPDVector