herwig is hosted by Hepforge, IPPP Durham
Herwig 7.3.0
YFSFormFactors.h
1// -*- C++ -*-
2//
3// YFSFormFactors.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_YFSFormFactors_H
10#define HERWIG_YFSFormFactors_H
11//
12// This is the declaration of the YFSFormFactors class.
13//
14
16#include "Herwig/Utilities/Maths.h"
17
18namespace Herwig {
19
20using namespace ThePEG;
21
27
28public:
29
33 static const double _alpha;
34
35private:
39 static const Energy _mgamma;
40
44 static const Energy2 _tcut;
45
49 static const Energy _ecut;
50
51public:
52
71 static double exponentialYFSIF(double beta0,double ombeta0,
72 double beta1,double ombeta1,
73 Energy en0 ,Energy en1 ,
74 Energy m0 ,Energy m1 ,
75 Energy2 t ,double charge ,
76 Energy emin) {
77 return exp(YFSIF(beta0,ombeta0,beta1,ombeta1,en0,en1,m0,m1,t,charge,emin));
78 }
94 static double exponentialYFSFF(double beta1, double ombeta1,
95 double beta2, double ombeta2,
96 Energy en1 , Energy en2 ,
97 Energy m1 , Energy m2 ,
98 Energy2 s , double charge ,
99 Energy emin) {
100 return exp(YFSFF(beta1,ombeta1,beta2,ombeta2,en1,en2,m1,m2,s,charge,emin));
101 }
103
121 static double YFSIF(double beta0 ,double ombeta0 ,
122 double beta1 ,double ombeta1 ,
123 Energy en0 ,Energy en1 ,
124 Energy m0 ,Energy m1 ,
125 Energy2 t ,double charge ,
126 Energy emin) {
127 return BtildeIF(beta0,ombeta0,beta1,ombeta1,en0,en1,m0,m1,t,charge,emin,false)
128 +ReBIF(m0,m1,t,charge,false);
129 }
145 static double YFSFF(double beta1 ,double ombeta1 ,
146 double beta2 ,double ombeta2 ,
147 Energy en1 ,Energy en2 ,
148 Energy m1 ,Energy m2 ,
149 Energy2 s ,double charge ,
150 Energy emin) {
151 return BtildeFF(beta1,ombeta1,beta2,ombeta2,en1,en2,m1,m2,s,charge,emin,false)
152 +ReBFF(m1,m2,s,charge,false);
153 }
155
170 static double nbarFF(double beta1, double ombeta1,
171 double beta2, double ombeta2,
172 double charge,
173 Energy Emax , Energy Emin,
174 bool massterms=false) {
175 if(!massterms)
176 return -_alpha/Constants::pi*charge*
177 ((1.+beta1*beta2)/(beta1+beta2)*(+log((1.+beta1)/ombeta1)
178 +log((1.+beta2)/ombeta2)))*log(Emax/Emin);
179 else
180 return -_alpha/Constants::pi*charge*
181 ((1.+beta1*beta2)/(beta1+beta2)*(+log((1.+beta1)/ombeta1)
182 +log((1.+beta2)/ombeta2))-2.)*log(Emax/Emin);
183 }
184
196 static double nbarIF(double beta, double ombeta,
197 double charge,
198 Energy Emax , Energy Emin,
199 bool massterms=false) {
200 if(!massterms)
201 return -_alpha/Constants::pi*charge/beta* log((1.+beta)/ombeta) *log(Emax/Emin);
202 else
203 return -_alpha/Constants::pi*charge/beta*(log((1.+beta)/ombeta)-2.)*log(Emax/Emin);
204 }
205
219 static double ReBIF(Energy m0 ,Energy m1 , Energy2 t ,
220 double charge ,bool includegamma=true,
221 Energy mgamma=_mgamma);
222
232 static double ReBFF(Energy m1,Energy m2,Energy2 s,double charge,
233 bool includegamma=true,Energy mgamma=_mgamma);
235
256 static double BtildeIF(double beta0 ,double ombeta0 ,
257 double beta1 ,double ombeta1 ,
258 Energy en0 ,Energy en1 ,
259 Energy m0 ,Energy m1 ,
260 Energy2 t ,double charge ,
261 Energy emin ,bool includegamma=true,
262 Energy mgamma=_mgamma);
263
280 static double BtildeFF(double beta1 ,double ombeta1 ,
281 double beta2 ,double ombeta2 ,
282 Energy en1 ,Energy en2 ,
283 Energy m1 ,Energy m2 ,
284 Energy2 s ,double charge ,
285 Energy emin ,bool includegamma=true,
286 Energy mgamma=_mgamma);
288
292 static Energy photonMass() {return _mgamma;}
293
294private:
295
311 static InvEnergy2 A4FFFull(Energy inen1 ,Energy inen2,
312 double beta1,double beta2,
313 Energy inm1 ,Energy inm2,Energy2 s );
314
328 static InvEnergy2 A4IF(double beta0 ,double ombeta0 ,
329 double beta1 ,double ombeta1 ,
330 Energy en0 ,Energy en1 , Energy m0 ,Energy m1 ,
331 Energy2 t);
332
337 static double A4single(double beta,double ombeta) {
338 if(beta>0.01) return log(ombeta/(1.+beta))/beta;
339 else return -2.-2./3.*sqr(beta)*(1+0.6*sqr(beta));
340 }
341
348 static InvEnergy2 A4IFRestZero(Energy m0, Energy m1) {
349 Energy2 mdiff(m0*m0-m1*m1);
350 return -2./mdiff*(sqr(log(m0/m1))+Math::ReLi2(mdiff/sqr(m0)));
351 }
352
363 static InvEnergy2 A4IFZero(double beta0, double beta1,
364 double ombeta1, Energy en0,
365 Energy en1 , Energy m0 , Energy m1);
366
376 static InvEnergy2 A4IFRest(Energy m0 ,Energy m1, double beta1,
377 double ombeta1, Energy E1);
378
389 static InvEnergy2 A4IFFull(Velocity beta0,Velocity beta1,
390 Energy en0 ,Energy en1 ,
391 Energy m0 ,Energy m1 , Energy2 t);
393
405 template <typename T>
406 static double Zij(T eta, T yi, T yj) {
407 return 2.*Math::ReLi2((yj-yi)/(eta-yi))+0.5*sqr(log(abs((eta-yi)/(eta-yj))));
408 }
409
419 template <typename T>
420 static double Xijkl(T eta,T yi, T yj, T yk, T yl) {
421 return log(abs((eta-yi)*(eta-yj)/(eta-yk)/(eta-yl)));
422 }
424
425};
426
427}
428
429#endif /* HERWIG_YFSFormFactors_H */
The YFSFormFactors class is a pure static class which implements the various YFS form factors we need...
static const Energy2 _tcut
The cut-off on the value of for the switch to the $t=0$ result.
static InvEnergy2 A4FFFull(Energy inen1, Energy inen2, double beta1, double beta2, Energy inm1, Energy inm2, Energy2 s)
Various special cases of the functions of hep-ph/0302065 for the initial-final dipole.
static double ReBFF(Energy m1, Energy m2, Energy2 s, double charge, bool includegamma=true, Energy mgamma=_mgamma)
The function for the final-final dipole.
static const double _alpha
The value of at .
static double nbarIF(double beta, double ombeta, double charge, Energy Emax, Energy Emin, bool massterms=false)
Crude multiplicity for the initial-final dipole.
static const Energy _mgamma
The default value of the photon mass.
static const Energy _ecut
The cut-off on the energy of a particle for it to be considered in its rest frame.
static double Zij(T eta, T yi, T yj)
Functions from hep-ph/9606429 for the calculation of the functions.
static Energy photonMass()
Access to the photon mass.
static double exponentialYFSIF(double beta0, double ombeta0, double beta1, double ombeta1, Energy en0, Energy en1, Energy m0, Energy m1, Energy2 t, double charge, Energy emin)
Exponentials of the YFS form factors.
static double A4single(double beta, double ombeta)
The function of hep-ph/0302065 for a single particle, without the pre-factor.
static InvEnergy2 A4IF(double beta0, double ombeta0, double beta1, double ombeta1, Energy en0, Energy en1, Energy m0, Energy m1, Energy2 t)
The function of hep-ph0302065 using the special cases where necessary for numerical stability.
static double Xijkl(T eta, T yi, T yj, T yk, T yl)
The function from hep-ph/9606429 for the evaluation of the function.
static double BtildeIF(double beta0, double ombeta0, double beta1, double ombeta1, Energy en0, Energy en1, Energy m0, Energy m1, Energy2 t, double charge, Energy emin, bool includegamma=true, Energy mgamma=_mgamma)
The real emission terms for initial-final and final-final dipoles.
static InvEnergy2 A4IFFull(Velocity beta0, Velocity beta1, Energy en0, Energy en1, Energy m0, Energy m1, Energy2 t)
The function for the full initial-final dipole.
static double exponentialYFSFF(double beta1, double ombeta1, double beta2, double ombeta2, Energy en1, Energy en2, Energy m1, Energy m2, Energy2 s, double charge, Energy emin)
The exponential of the YFS form factor for the final-final dipole The function for the final-final d...
static double YFSIF(double beta0, double ombeta0, double beta1, double ombeta1, Energy en0, Energy en1, Energy m0, Energy m1, Energy2 t, double charge, Energy emin)
The YFS form factors for the initial-final and final-final dipoles.
static InvEnergy2 A4IFRest(Energy m0, Energy m1, double beta1, double ombeta1, Energy E1)
The function for the initial-final dipole in the rest frame of the decaying particle.
static InvEnergy2 A4IFRestZero(Energy m0, Energy m1)
The function of hep-ph/0302065 for the initial-final dipole with in the rest frame.
static double YFSFF(double beta1, double ombeta1, double beta2, double ombeta2, Energy en1, Energy en2, Energy m1, Energy m2, Energy2 s, double charge, Energy emin)
The YFS form factor for the final-final dipole The function for the final-final dipole.
static double BtildeFF(double beta1, double ombeta1, double beta2, double ombeta2, Energy en1, Energy en2, Energy m1, Energy m2, Energy2 s, double charge, Energy emin, bool includegamma=true, Energy mgamma=_mgamma)
The function for the final-final dipole.
static double nbarFF(double beta1, double ombeta1, double beta2, double ombeta2, double charge, Energy Emax, Energy Emin, bool massterms=false)
Crude average multiplicities for initial-final and final-final dipoles.
static double ReBIF(Energy m0, Energy m1, Energy2 t, double charge, bool includegamma=true, Energy mgamma=_mgamma)
The virtual piece for the initial-final and final-final dipoles.
static InvEnergy2 A4IFZero(double beta0, double beta1, double ombeta1, Energy en0, Energy en1, Energy m0, Energy m1)
The function for the initial-final dipole with .
long double ReLi2(long double)
The real part of the dilog function taken from FORTRAN Herwig.
-*- C++ -*-
constexpr double pi
constexpr auto sqr(const T &x) -> decltype(x *x)