herwig is hosted by Hepforge, IPPP Durham
Herwig  7.2.1
MEPP2GammaGamma.h
1 // -*- C++ -*-
2 //
3 // MEPP2GammaGamma.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_MEPP2GammaGamma_H
10 #define HERWIG_MEPP2GammaGamma_H
11 //
12 // This is the declaration of the MEPP2GammaGamma class.
13 //
14 
15 #include "Herwig/MatrixElement/HwMEBase.h"
16 #include "ThePEG/Helicity/Vertex/AbstractFFVVertex.h"
17 #include "Herwig/MatrixElement/ProductionMatrixElement.h"
18 #include "ThePEG/Helicity/WaveFunction/SpinorWaveFunction.h"
19 #include "ThePEG/Helicity/WaveFunction/VectorWaveFunction.h"
20 #include "ThePEG/Helicity/WaveFunction/SpinorBarWaveFunction.h"
21 
22 namespace Herwig {
23 
24 using namespace ThePEG;
25 using namespace ThePEG::Helicity;
26 
34 class MEPP2GammaGamma: public HwMEBase {
35 
36 public:
37 
41  MEPP2GammaGamma() : _maxflavour(5),_process(0), scalePreFactor_(1.) {
42  massOption(vector<unsigned int>(2,0));
43  }
44 
51  virtual unsigned int orderInAlphaS() const;
52 
57  virtual unsigned int orderInAlphaEW() const;
58 
66  virtual double me2() const;
67 
71  virtual Energy2 scale() const;
72 
76  virtual void getDiagrams() const;
77 
86  virtual Selector<DiagramIndex> diagrams(const DiagramVector & dv) const;
87 
96  colourGeometries(tcDiagPtr diag) const;
97 
101  virtual void constructVertex(tSubProPtr);
103 
104 
105 public:
106 
113  void persistentOutput(PersistentOStream & os) const;
114 
120  void persistentInput(PersistentIStream & is, int version);
122 
129  static void Init();
130 
131 protected:
132 
139  virtual IBPtr clone() const;
140 
145  virtual IBPtr fullclone() const;
147 
148 protected:
149 
157  virtual void doinit();
159 
160 private:
161 
174  double qqbarME(vector<SpinorWaveFunction> & fin, vector<SpinorBarWaveFunction> & ain,
175  vector<VectorWaveFunction> & p1 , vector<VectorWaveFunction> & p2 ,
176  bool me) const;
177 
186  double ggME(vector<VectorWaveFunction> & g1 , vector<VectorWaveFunction> & g2 ,
187  vector<VectorWaveFunction> & p1 , vector<VectorWaveFunction> & p2 ,
188  bool me) const;
190 
197  Complex ggme(Energy2 s,Energy2 t,Energy2 u) const {
198  double ltu(log(abs(t/u)));
199  double frac1((t-u)/s),frac2((sqr(t)+sqr(u))/sqr(s));
200  double thetatu = (t/u<0) ? 0 : 1;
201  double thetat = (t<ZERO) ? 0 : 1;
202  double thetau = (u<ZERO) ? 0 : 1;
203  using Constants::pi;
204  return Complex(1.+frac1*ltu+0.5*frac2*(sqr(ltu)+sqr(pi)*thetatu),
205  -pi*(thetat-thetau)*(frac1+frac2*ltu));
206  }
207 
208 private:
209 
214  MEPP2GammaGamma & operator=(const MEPP2GammaGamma &) = delete;
215 
216 private:
217 
221  AbstractFFVVertexPtr _photonvertex;
222 
226  unsigned int _maxflavour;
227 
231  unsigned int _process;
232 
237 
241  mutable double _diagwgt[2];
242 
247 };
248 
249 }
250 
251 #endif /* HERWIG_MEPP2GammaGamma_H */
ProductionMatrixElement _me
Matrix element for spin correlations.
unsigned int _process
Option for which processes to include.
MEPP2GammaGamma()
The default constructor.
std::complex< double > Complex
ThePEG::Ptr< InterfacedBase >::pointer IBPtr
constexpr double pi
constexpr auto sqr(const T &x) -> decltype(x *x)
Complex ggme(Energy2 s, Energy2 t, Energy2 u) const
matrix element for the helicity configuration.
The storage of the helicity amplitude expression for the matrix element of a hard process...
double scalePreFactor_
Scale prefactor.
ThePEG::Ptr< SubProcess >::transient_pointer tSubProPtr
vector< DiagPtr > DiagramVector
-*- C++ -*-
The HwMEBase class serves a number of purposes.
Definition: HwMEBase.h:35
unsigned int _maxflavour
Maximum PDG code of the quarks allowed.
AbstractFFVVertexPtr _photonvertex
Pointer to the quark-antiquark-photon vertex.
constexpr ZeroUnit ZERO
The MEPP2GammaGamma class implements the production of photon pairs in hadron hadron collisions...