herwig is hosted by Hepforge, IPPP Durham
Herwig  7.1.5
MatchboxCurrents.h
1 // -*- C++ -*-
2 //
3 // MatchboxCurrents.h is a part of Herwig - A multi-purpose Monte Carlo event generator
4 // Copyright (C) 2002-2017 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_MatchboxCurrents_H
10 #define Herwig_MatchboxCurrents_H
11 //
12 // This is the declaration of the MatchboxCurrents class.
13 //
14 
15 #include "Herwig/MatrixElement/Matchbox/Utility/AmplitudeCache.h"
16 #include "Herwig/MatrixElement/Matchbox/Utility/SpinorHelicity.h"
17 #include "Herwig/Models/StandardModel/StandardCKM.h"
18 #include "ThePEG/StandardModel/StandardModelBase.h"
19 
20 namespace Herwig {
21 
22 using namespace ThePEG;
23 using namespace SpinorHelicity;
24 
32  : public AmplitudeCache<pair<size_t,size_t> > {
33 
34 
38  Ptr<StandardCKM>::tcptr theStandardCKM;
39 
43  Ptr<StandardCKM>::tcptr standardCKM(const StandardModelBase& SM) {
44  if ( !theStandardCKM )
45  theStandardCKM = dynamic_ptr_cast<Ptr<StandardCKM>::tcptr>(SM.CKM());
46  assert(theStandardCKM);
47  return theStandardCKM;
48  }
49 
53  Energy MZ;
54 
58  Energy GZ;
59 
63  Energy MW;
64 
68  Energy GW;
69 
73  double CA;
74 
78  double CF;
79 
84  template<size_t slot>
85  pair<size_t,size_t> hash(const int ct, const int tl,
86  const int p1, const int h1,
87  const int p2, const int h2,
88  const int p3 = -1, const int h3 = -2,
89  const int p4 = -1, const int h4 = -2) const {
90  return
91  pair<size_t,size_t>(slot,
92  (p4 + 1)*1 + (h4 + 2)*10 +
93  (p3 + 1)*100 + (h3 + 2)*1000 +
94  (p2 + 1)*10000 + (h2 + 2)*100000 +
95  (p1 + 1)*1000000 + (h1 + 2)*10000000 +
96  (ct + 1)*100000000 + (tl + 1)*1000000000);
97  }
98 
102  void setupLeptons(const int l, const Lorentz5Momentum& pl,
103  const int lbar, const Lorentz5Momentum& plbar);
104 
108  void setupQuarks(const int q, const Lorentz5Momentum& pq,
109  const int qbar, const Lorentz5Momentum& pqbar);
110 
114  const LorentzVector<Complex>& llbarLeftCurrent(const int l, const int lHel,
115  const int lbar, const int lbarHel);
116 
120  const LorentzVector<Complex>& llbarRightCurrent(const int l, const int lHel,
121  const int lbar, const int lbarHel);
122 
126  const LorentzVector<Complex>& qqbarLeftCurrent(const int q, const int qHel,
127  const int qbar, const int qbarHel);
128 
132  const LorentzVector<Complex>& qqbarRightCurrent(const int q, const int qHel,
133  const int qbar, const int qbarHel);
134 
138  const LorentzVector<Complex>& qqbargLeftCurrent(const int q, const int qHel,
139  const int qbar, const int qbarHel,
140  const int g, const int gHel);
141 
145  const LorentzVector<Complex>& qqbargRightCurrent(const int q, const int qHel,
146  const int qbar, const int qbarHel,
147  const int g, const int gHel);
148 
152  const LorentzVector<Complex>& qqbarggLeftCurrent(const int q, const int qHel,
153  const int qbar, const int qbarHel,
154  const int g1, const int g1Hel,
155  const int g2, const int g2Hel);
156 
160  const LorentzVector<Complex>& qqbarggRightCurrent(const int q, const int qHel,
161  const int qbar, const int qbarHel,
162  const int g1, const int g1Hel,
163  const int g2, const int g2Hel);
164 
168  const LorentzVector<Complex>& qqbarqqbarLeftCurrent(const int q, const int qHel,
169  const int qbar, const int qbarHel,
170  const int k, const int kHel,
171  const int kbar, const int kbarHel);
172 
176  const LorentzVector<Complex>& qqbarqqbarRightCurrent(const int q, const int qHel,
177  const int qbar, const int qbarHel,
178  const int k, const int kHel,
179  const int kbar, const int kbarHel);
180 
184  const LorentzVector<Complex>& qqbarLeftOneLoopCurrent(const int q, const int qHel,
185  const int qbar, const int qbarHel);
186 
190  const LorentzVector<Complex>& qqbarRightOneLoopCurrent(const int q, const int qHel,
191  const int qbar, const int qbarHel);
192 
196  const LorentzVector<Complex>& qqbargLeftOneLoopCurrent(const int q, const int qHel,
197  const int qbar, const int qbarHel,
198  const int g, const int gHel);
199 
203  const LorentzVector<Complex>& qqbargRightOneLoopCurrent(const int q, const int qHel,
204  const int qbar, const int qbarHel,
205  const int g, const int gHel);
206 
207 private:
208 
212  LorentzVector<Complex> qqbarggGeneralLeftCurrent(const int q, const int qHel,
213  const int qbar, const int qbarHel,
214  const int g1, const int g1Hel,
215  const int g2, const int g2Hel,
216  const int n);
217 
221  LorentzVector<Complex> qqbarggFixedLeftCurrent(const int q, const int qHel,
222  const int qbar, const int qbarHel,
223  const int g1, const int g1Hel,
224  const int g2, const int g2Hel);
225 
229  LorentzVector<Complex> qqbarggGeneralRightCurrent(const int q, const int qHel,
230  const int qbar, const int qbarHel,
231  const int g1, const int g1Hel,
232  const int g2, const int g2Hel,
233  const int n);
234 
238  LorentzVector<Complex> qqbarggFixedRightCurrent(const int q, const int qHel,
239  const int qbar, const int qbarHel,
240  const int g1, const int g1Hel,
241  const int g2, const int g2Hel);
242 
247  vector<Complex> qqbargLoops;
248 
253  void qqbargLoopCoefficients(const int q, const int qbar, const int g);
254 
258  Complex box6(const int i, const int j, const int k);
259 
263  LorentzVector<Complex> qqbargGeneralLeftLoopCurrent(const int q, const int qHel,
264  const int qbar, const int qbarHel,
265  const int g, const int gHel,
266  const int n);
267 
271  LorentzVector<Complex> qqbargFixedLeftLoopCurrent(const int q, const int qHel,
272  const int qbar, const int qbarHel,
273  const int g, const int gHel);
274 
278  LorentzVector<Complex> qqbargGeneralRightLoopCurrent(const int q, const int qHel,
279  const int qbar, const int qbarHel,
280  const int g, const int gHel,
281  const int n);
282 
286  LorentzVector<Complex> qqbargFixedRightLoopCurrent(const int q, const int qHel,
287  const int qbar, const int qbarHel,
288  const int g, const int gHel);
289 
290 
291 //#define CHECK_MatchboxCurrents
292 
293 #ifdef CHECK_MatchboxCurrents
294 
295 private:
296 
300  static map<string,ofstream*>& checkStreams();
301 
305  static ostream& checkStream(const string&);
306 
310  void checkCurrent(const string& id,
311  const LorentzVector<Complex>& current,
312  const LorentzVector<double>& q);
313 
314 #endif // CHECK_MatchboxCurrents
315 
316 };
317 
318 }
319 
320 #endif // Herwig_MatchboxCurrents_H
Energy MW
The W mass.
Ptr< StandardCKM >::tcptr standardCKM(const StandardModelBase &SM)
Return the Herwig StandardCKM object.
std::complex< double > Complex
Energy GZ
The Z width.
pair< size_t, size_t > hash(const int ct, const int tl, const int p1, const int h1, const int p2, const int h2, const int p3=-1, const int h3=-2, const int p4=-1, const int h4=-2) const
Generate a hash value for the current; second member of the pair reserved for combinations.
Ptr< StandardCKM >::tcptr theStandardCKM
The Herwig StandardCKM object.
Energy MZ
The Z mass.
-*- C++ -*-
Caching for amplitudes using spinor helicity techniques.
vector< Complex > qqbargLoops
Container for the coefficients of the standard matrix elements for the one-loop qqbarg currents...
Energy GW
The W width.
MatchboxCurrents.