herwig is hosted by Hepforge, IPPP Durham
Herwig  7.2.1
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 
14 namespace Herwig {
15 
16 struct Branching;
17 
18 using namespace ThePEG;
19 
20 typedef Ptr<BeamParticleData>::transient_const_pointer tcBeamPtr;
21 
35 class HwMEBase: public MEBase {
36 
37 public:
38 
42  HwMEBase() : lastTHat_(ZERO), lastUHat_(ZERO),
43  lastPhi_(0.0), rescaleOption_(1)
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 
138 public:
139 
146  void persistentOutput(PersistentOStream & os) const;
147 
153  void persistentInput(PersistentIStream & is, int version);
155 
162  static void Init();
163 
164 protected:
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 
249 private:
250 
255  HwMEBase & operator=(const HwMEBase &) = delete;
256 
257 private:
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 */
Ptr< BeamParticleData >::transient_const_pointer tcBeamPtr
A typedef for the BeamParticleData.
Definition: HwMEBase.h:20
ThePEG::Ptr< Particle >::pointer PPtr
void massOption(vector< unsigned int > iopt)
Set the treatment of the outgoing masses.
Definition: HwMEBase.h:206
ShowerInteraction
Handy header file to be included in all Shower classes.
void tHat(Energy2 e2)
Set the of the last set phase space point.
Definition: HwMEBase.h:189
virtual POWHEGType hasPOWHEGCorrection()
Has a POWHEG style correction.
Definition: HwMEBase.h:92
Energy2 tHat() const
Return the of the last set phase space point.
Definition: HwMEBase.h:171
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
virtual bool hasMECorrection()
Has an old fashioned ME correction.
Definition: HwMEBase.h:97
void phi(double phi)
Set the azimuth angle of the last set phase space point.
Definition: HwMEBase.h:199
HwMEBase()
Default constructor.
Definition: HwMEBase.h:42
const vector< Lorentz5Momentum > & rescaledMomenta() const
Access to the rescaled momenta.
Definition: HwMEBase.h:232
void rescalingOption(unsigned int iopt)
Rescaled momenta for the helicity ME.
Definition: HwMEBase.h:219
void uHat(Energy2 e2)
Set the of the last set phase space point.
Definition: HwMEBase.h:194
vector< cPDPtr > cPDVector
POWHEGType
Virtual members to be overridden by inheriting classes which implement hard corrections.
Definition: HwMEBase.h:87
vector< Lorentz5Momentum > rescaledMomenta_
Rescaled momenta for use in ME calculations.
Definition: HwMEBase.h:287
Energy2 lastTHat_
The of the last set phase space point.
Definition: HwMEBase.h:267
double lastPhi_
The azimuth angle of the last set phase space point.
Definition: HwMEBase.h:277
-*- C++ -*-
unsigned int rescaleOption_
Produced to produce rescaled momenta.
Definition: HwMEBase.h:282
double phi() const
Return the azimuth angle of the last set phase space point.
Definition: HwMEBase.h:181
The HwMEBase class serves a number of purposes.
Definition: HwMEBase.h:35
constexpr ZeroUnit ZERO
Energy2 lastUHat_
The of the last set phase space point.
Definition: HwMEBase.h:272