herwig
is hosted by
Hepforge
,
IPPP Durham
Herwig
7.3.0
Decay
ResonanceHelpers.h
1
// -*- C++ -*-
2
//
3
// ResonanceHelpers.h is a part of Herwig - A multi-purpose Monte Carlo event generator
4
// Copyright (C) 2018 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_ResonanceHelpers_H
10
#define HERWIG_ResonanceHelpers_H
11
12
namespace
Herwig
{
13
using namespace
ThePEG
;
14
namespace
Resonance {
15
19
inline
double
beta2(
const
Energy2 & s,
const
Energy & m1,
const
Energy & m2) {
20
return
max(0.,(1.-
sqr
(m1+m2)/s)*(1.-
sqr
(m1-m2)/s));
21
}
22
26
inline
double
beta(
const
Energy2 & s,
const
Energy & m1,
const
Energy & m2) {
27
return
sqrt
(beta2(s,m1,m2));
28
}
29
34
inline
double
dHhatds(
const
Energy & mRes,
const
Energy & gamma,
35
const
Energy & m1,
const
Energy & m2) {
36
double
v2 = beta2(
sqr
(mRes),m1,m2);
37
double
v
=
sqrt
(v2);
38
double
r = (
sqr
(m1) +
sqr
(m2))/
sqr
(mRes);
39
return
gamma
/
Constants::pi
/mRes/v2*
40
((3.-2.*v2- 3.*r)*log((1.+v)/(1.-
v
)) + 2.*
v
*(1.- r/(1.-v2)));
41
}
42
46
inline
Energy2 Hhat(
const
Energy2 & s,
const
Energy & mRes,
const
Energy & gamma,
47
const
Energy & m1,
const
Energy & m2) {
48
double
vR = beta(
sqr
(mRes),m1,m2);
49
double
v
= beta( s ,m1,m2);
50
return
gamma
/mRes/
Constants::pi
*
s
*
pow
(v/vR,3)*log((1.+v)/(1.-v));
51
}
52
56
inline
Energy2 H(
const
Energy2 & s,
const
Energy & mRes,
const
Energy & gamma,
57
const
Energy & m1,
const
Energy & m2,
58
const
double
& dH,
const
Energy2 & Hres) {
59
if
(s!=
ZERO
)
60
return
Hhat(s,mRes,gamma,m1,m2) - Hres - (
s
-
sqr
(mRes))*dH;
61
else
62
return
-2.*
sqr
(m1+m2)/
Constants::pi
*
gamma
/mRes/
pow
(beta(
sqr
(mRes),m1,m2),3) - Hres +
sqr
(mRes)*dH;
63
}
64
68
inline
Energy2 H(
const
Energy2 & s,
const
Energy & mRes,
const
Energy & gamma,
69
const
Energy & m1,
const
Energy & m2) {
70
double
dH = dHhatds(mRes,gamma,m1,m2);
71
Energy2 Hres = Hhat(
sqr
(mRes),mRes,gamma,m1,m2);
72
return
H(s,mRes,gamma,m1,m2,dH,Hres);
73
}
74
78
inline
Energy
gammaP(
const
Energy2 & s,
const
Energy & mRes,
const
Energy & gamma,
79
const
Energy & m1,
const
Energy & m2) {
80
double
v2 = beta2(s,m1,m2);
81
if
(v2<=0.)
return
ZERO
;
82
double
vR2 = beta2(
sqr
(mRes),m1,m2);
83
double
rp =
sqrt
(v2/vR2);
84
return
sqrt
(s)/mRes*
pow
(rp,3)*
gamma
;
85
}
86
90
inline
Energy
gammaD(
const
Energy2 & s,
const
Energy & mRes,
const
Energy & gamma,
91
const
Energy & m1,
const
Energy & m2) {
92
double
v2 = beta2(s,m1,m2);
93
if
(v2<=0.)
return
ZERO
;
94
double
vR2 = beta2(
sqr
(mRes),m1,m2);
95
double
rp =
sqrt
(v2/vR2);
96
return
pow
(
sqrt
(s)/mRes,3)*
pow
(rp,5)*
gamma
;
97
}
98
102
inline
Energy
gammaS(
const
Energy2 & s,
const
Energy & mRes,
const
Energy & gamma,
103
const
Energy & m1,
const
Energy & m2) {
104
double
v2 = beta2(s,m1,m2);
105
if
(v2<=0.)
return
ZERO
;
106
double
vR2 = beta2(
sqr
(mRes),m1,m2);
107
double
rp =
sqrt
(v2/vR2);
108
return
mRes/
sqrt
(s)*rp*
gamma
;
109
}
110
114
inline
Complex
BreitWignerGS(
const
Energy2 & s,
const
Energy & mRes,
const
Energy & gamma,
115
const
Energy & m1,
const
Energy & m2,
116
const
Energy2 & H0,
const
double
&dH,
const
Energy2 & Hres) {
117
Energy2 mR2=
sqr
(mRes);
118
return
(mR2+H0)/(mR2-
s
+H(s,mRes,gamma,m1,m2,dH,Hres)-
Complex
(0.,1.)*
sqrt
(s)*gammaP(s,mRes,gamma,m1,m2));
119
}
120
124
inline
Complex
BreitWignerGS(
const
Energy2 & s,
const
Energy & mRes,
125
const
Energy & gamma,
126
const
Energy & m1,
const
Energy & m2) {
127
double
dH = dHhatds(mRes,gamma,m1,m2);
128
Energy2 Hres = Hhat(
sqr
(mRes),mRes,gamma,m1,m2);
129
Energy2
H0
= H(
ZERO
,mRes,gamma,m1,m2,dH,Hres);
130
return
BreitWignerGS(s,mRes,gamma,m1,m2,H0,dH,Hres);
131
}
132
136
inline
Complex
BreitWignerPWave(
const
Energy2 & s,
const
Energy & mRes,
const
Energy & gamma,
137
const
Energy & m1,
const
Energy & m2) {
138
Energy2 mR2=
sqr
(mRes);
139
return
mR2/(mR2-
s
-
Complex
(0.,1.)*
sqrt
(s)*gammaP(s,mRes,gamma,m1,m2));
140
}
141
145
inline
Complex
BreitWignerSWave(
const
Energy2 & s,
const
Energy & mRes,
const
Energy & gamma,
146
const
Energy & m1,
const
Energy & m2) {
147
Energy2 mR2=
sqr
(mRes);
148
return
mR2/(mR2-
s
-
Complex
(0.,1.)*
sqrt
(s)*gammaS(s,mRes,gamma,m1,m2));
149
}
150
154
inline
Complex
BreitWignerDWave(
const
Energy2 & s,
const
Energy & mRes,
const
Energy & gamma,
155
const
Energy & m1,
const
Energy & m2) {
156
Energy2 mR2=
sqr
(mRes);
157
return
mR2/(mR2-
s
-
Complex
(0.,1.)*
sqrt
(s)*gammaD(s,mRes,gamma,m1,m2));
158
}
159
163
inline
Complex
BreitWignerFW(
const
Energy2 & s,
const
Energy & mRes,
const
Energy & gamma) {
164
Energy2 mR2=
sqr
(mRes);
165
return
mR2/(mR2-
s
-
Complex
(0.,1.)*mRes*
gamma
);
166
}
167
171
inline
Complex
BreitWignerFW_GN(
const
Energy2 & s,
const
Energy & mRes,
const
Energy & gamma) {
172
Energy2 mR2=
sqr
(mRes);
173
complex<Energy2> fact = mR2 -
Complex
(0.,1.)*mRes*
gamma
;
174
return
fact/(fact-
s
);
175
}
176
180
Complex
H(
const
Energy & mass,
const
Energy & width,
const
Energy2 & sp,
const
Energy2 & sm,
181
const
Energy2 & s0,
const
Energy & mp,
const
Energy & m0) {
182
return
183
Resonance::BreitWignerPWave(sp,mass,width,mp,m0)+
184
Resonance::BreitWignerPWave(sm,mass,width,mp,m0)+
185
Resonance::BreitWignerPWave(s0,mass,width,mp,mp);
186
}
187
191
template
<
typename
Value>
192
Complex
F_rho(
const
Energy2 & s,
193
const
vector<Value> weights,
194
const
vector<Energy> & mass,
195
const
vector<Energy> & width,
196
const
Energy & m1,
const
Energy & m2) {
197
Value norm(0.);
198
Complex
output;
199
for
(
unsigned
int
ix=0;ix<weights.size();++ix) {
200
norm += weights[ix];
201
output += weights[ix]*
202
BreitWignerPWave(s,mass[ix],width[ix],m1,m2);
203
}
204
return
output/norm;
205
}
206
207
double
ga1(
const
Energy2 &s) {
208
static
const
Energy
mpi=0.13957*GeV;
209
if
(s<9.*
sqr
(mpi)) {
210
return
0.;
211
}
212
else
if
(s>0.838968432668*GeV2) {
213
double
Q2 =
s
/GeV2;
214
return
1.623*Q2+10.38-9.32/Q2+0.65/
sqr
(Q2);
215
}
216
else
{
217
double
Q2 = (
s
-9.*
sqr
(mpi))/GeV2;
218
return
4.1*Q2*
sqr
(Q2)*(1.-3.3*Q2+5.8*
sqr
(Q2));
219
}
220
}
221
225
Complex
BreitWignera1(
const
Energy2 & s,
const
Energy & mRes,
226
const
Energy & gamma) {
227
Energy2 mR2 =
sqr
(mRes);
228
return
mR2/(mR2-
s
-
Complex
(0.,1)*
gamma
*mRes*ga1(s)/ga1(mR2));
229
}
230
234
complex<InvEnergy2> BreitWignerDiff(
const
Energy2 & s,
235
const
Energy & mRes1,
const
Energy & gamma1,
236
const
Energy & mRes2,
const
Energy & gamma2,
237
const
Energy & m1,
const
Energy & m2) {
238
return
239
BreitWignerPWave(s,mRes1,gamma1,m1,m2)/
sqr
(mRes1)-
240
BreitWignerPWave(s,mRes2,gamma2,m1,m2)/
sqr
(mRes2);
241
}
242
}
243
244
}
245
#endif
Herwig
-*- C++ -*-
Definition:
BasicConsistency.h:17
ThePEG::Constants::pi
constexpr double pi
SpinorType::v
@ v
ThePEG::ParticleID::gamma
gamma
ThePEG::ParticleID::s
s
ThePEG::ParticleID::H0
H0
ThePEG::Units::Energy
Qty< 0, 1, 0 > Energy
ThePEG
ThePEG::sqrt
double sqrt(int x)
ThePEG::Complex
std::complex< double > Complex
ThePEG::pow
constexpr double pow(double x, ExponentT p)
ThePEG::ZERO
constexpr ZeroUnit ZERO
ThePEG::sqr
constexpr auto sqr(const T &x) -> decltype(x *x)
Generated on Thu Jun 20 2024 17:50:52 for Herwig by
1.9.6