herwig
is hosted by
Hepforge
,
IPPP Durham
Herwig
7.3.0
Shower
Dipole
AlphaS
alpha_s.h
1
// -*- C++ -*-
2
3
// couplings/alpha_s.h is part of matchbox
4
// (C) 2008 Simon Platzer -- sp@particle.uni-karlsruhe.de
5
6
#ifndef matchbox_couplings_alpha_s_h
7
#define matchbox_couplings_alpha_s_h
8
9
#include <string>
10
11
#include <array>
12
13
#include "ThePEG/Interface/Interfaced.h"
14
#include "ThePEG/StandardModel/AlphaSBase.h"
15
16
#include "gsl.h"
17
18
namespace
matchbox {
19
20
using namespace
ThePEG
;
21
22
template
<
class
AlphaS>
23
struct
solve_lambda_below
{
24
25
typedef
AlphaS alpha_s;
26
27
inline
solve_lambda_below
(alpha_s* a,
28
unsigned
int
n,
29
Energy2 lambda2n,
30
Energy2 mass2)
31
: alpha(a), nf_in(n), lambda2_nf_in(lambda2n), threshold(mass2) {}
32
33
alpha_s * alpha;
34
unsigned
int
nf_in;
35
Energy2 lambda2_nf_in;
36
Energy2 threshold;
37
38
inline
double
operator () (
double
lambda2) {
39
return
((*alpha)(threshold,lambda2_nf_in,nf_in) -
40
(*alpha)(threshold,lambda2*MeV2,nf_in-1));
41
}
42
43
};
44
45
template
<
class
AlphaS>
46
struct
solve_lambda_above
{
47
48
typedef
AlphaS alpha_s;
49
50
inline
solve_lambda_above
(alpha_s * a,
51
unsigned
int
n,
52
Energy2 lambda2n,
53
Energy2 mass2)
54
: alpha(a), nf_in(n), lambda2_nf_in(lambda2n), threshold(mass2) {}
55
56
alpha_s * alpha;
57
unsigned
int
nf_in;
58
Energy2 lambda2_nf_in;
59
Energy2 threshold;
60
61
inline
double
operator () (
double
lambda2) {
62
return
((*alpha)(threshold,lambda2_nf_in,nf_in) -
63
(*alpha)(threshold,lambda2*MeV2,nf_in+1));
64
}
65
66
};
67
68
template
<
class
AlphaS>
69
struct
solve_input_lambda
{
70
71
typedef
AlphaS alpha_s;
72
73
inline
solve_input_lambda
(alpha_s * a,
74
unsigned
int
n,
75
double
inalpha,
76
Energy2 inscale)
77
: alpha(a), nf_in(n), alpha_in(inalpha), scale_in(inscale) {}
78
79
alpha_s * alpha;
80
unsigned
int
nf_in;
81
double
alpha_in;
82
Energy2 scale_in;
83
84
inline
double
operator () (
double
lambda2) {
85
return
((*alpha)(scale_in,lambda2*MeV2,nf_in) - alpha_in);
86
}
87
88
};
89
96
class
alpha_s
97
:
public
AlphaSBase
{
98
99
public
:
100
104
alpha_s
();
105
106
public
:
107
114
virtual
inline
double
value
(Energy2 scale,
const
StandardModelBase
&)
const
{
115
return
operator()
(scale);
116
}
117
123
virtual
inline
vector<Energy2>
flavourThresholds
()
const
{
124
assert(!nfvector.empty());
125
return
nfvector;
126
}
127
132
virtual
inline
vector<Energy>
LambdaQCDs
()
const
{
133
vector<Energy> res;
134
for
(
size_t
k = 0; k < 7; ++k)
135
res.push_back(
sqrt
(lambda_squared_[k]));
136
return
res;
137
}
139
140
public
:
141
143
inline
double
operator ()
(Energy2 scale)
const
{
144
145
if
( fixed_ )
146
return
alpha_s_in_;
147
148
assert(
matched
());
149
unsigned
int
active =
active_flavours
(scale_factor_*scale);
150
return
operator ()
(scale_factor_*scale,lambda_squared_[active],active);
151
152
}
153
156
virtual
double
operator ()
(Energy2 scale,
157
Energy2 lambda2,
158
unsigned
int
nf)
const
= 0;
159
163
string
check
(
string
args);
164
165
public
:
166
168
inline
unsigned
int
min_active_flavours
()
const
{
return
min_active_flavours_; }
169
171
inline
void
min_active_flavours
(
unsigned
int
nf) { min_active_flavours_ = nf; }
172
174
inline
unsigned
int
max_active_flavours
()
const
{
return
max_active_flavours_; }
175
177
inline
void
max_active_flavours
(
unsigned
int
nf) { max_active_flavours_ = nf; }
178
180
inline
unsigned
int
active_flavours
(Energy2 scale)
const
{
181
unsigned
int
active = 0;
182
if
(scale > 0.*GeV2) {
183
while
(
quark_mass_squared
(active) < scale) {
184
if
(++active == max_active_flavours_+1)
185
break
;
186
}
187
active -= 1;
188
}
else
{
189
active = 0;
190
}
191
return
active;
192
}
193
195
inline
Energy2
lambda_squared
(
unsigned
int
f)
const
{
196
assert(f < 7);
197
return
lambda_squared_[f];
198
}
199
201
inline
Energy2
quark_mass_squared
(
unsigned
int
f)
const
{
202
assert(f < 7);
203
return
quark_masses_squared_[f];
204
}
205
207
inline
void
quark_mass_squared
(
unsigned
int
f, Energy2 m2) {
208
assert(f < 7);
209
quark_masses_squared_[f] = m2;
210
matched_ =
false
;
211
}
212
213
public
:
214
217
void
match_thresholds
();
218
221
inline
bool
matched
()
const
{
return
matched_; }
222
223
protected
:
224
227
233
virtual
inline
void
doinit
() {
234
match_thresholds
();
235
copy(quark_masses_squared_.begin()+1,
236
quark_masses_squared_.end(),nfvector.begin());
237
AlphaSBase::doinit
();
238
}
239
241
243
double
scale_factor
()
const
{
return
scale_factor_; }
244
245
public
:
246
253
void
persistentOutput(
PersistentOStream
& os)
const
;
254
260
void
persistentInput(
PersistentIStream
& is,
int
version);
262
269
static
void
Init
();
270
271
private
:
272
277
static
AbstractClassDescription<alpha_s>
initalpha_s
;
278
283
alpha_s
&
operator=
(
const
alpha_s
&) =
delete
;
284
285
private
:
286
287
unsigned
int
min_active_flavours_;
288
unsigned
int
max_active_flavours_;
289
290
bool
matched_;
291
292
double
scale_factor_;
293
294
std::array<Energy2,7> quark_masses_squared_;
295
std::array<Energy2,7> lambda_squared_;
296
vector<Energy2> nfvector=vector<Energy2>(6);
297
298
double
alpha_s_in_;
299
Energy scale_in_;
300
301
pair<Energy2,Energy2> lambda_range_;
302
303
bool
fixed_;
304
305
};
306
307
}
308
309
#include "ThePEG/Utilities/ClassTraits.h"
310
311
namespace
ThePEG
{
312
317
template
<>
318
struct
BaseClassTrait
<matchbox::alpha_s,1> {
320
typedef
AlphaSBase
NthBase
;
321
};
322
325
template
<>
326
struct
ClassTraits
<matchbox::alpha_s>
327
:
public
ClassTraitsBase
<matchbox::alpha_s> {
329
static
string
className
() {
return
"matchbox::alpha_s"
; }
337
static
string
library
() {
return
"HwDipoleShowerAlphaS.so"
; }
338
};
339
342
}
343
344
#endif
/* matchbox_couplings_alpha_s_h */
ThePEG::AbstractClassDescription
ThePEG::AlphaSBase
ThePEG::AlphaSBase::doinit
virtual void doinit()
ThePEG::PersistentIStream
ThePEG::PersistentOStream
ThePEG::StandardModelBase
matchbox::alpha_s
Base class for the strong coupling.
Definition:
alpha_s.h:97
matchbox::alpha_s::LambdaQCDs
virtual vector< Energy > LambdaQCDs() const
Return the used for different numbers of active flavours.
Definition:
alpha_s.h:132
matchbox::alpha_s::scale_factor
double scale_factor() const
return the scale factor
Definition:
alpha_s.h:243
matchbox::alpha_s::max_active_flavours
void max_active_flavours(unsigned int nf)
set maximum number of active flavours
Definition:
alpha_s.h:177
matchbox::alpha_s::quark_mass_squared
void quark_mass_squared(unsigned int f, Energy2 m2)
set the mass squared for given flavour
Definition:
alpha_s.h:207
matchbox::alpha_s::min_active_flavours
void min_active_flavours(unsigned int nf)
set minimum number of active flavours
Definition:
alpha_s.h:171
matchbox::alpha_s::value
virtual double value(Energy2 scale, const StandardModelBase &) const
The .
Definition:
alpha_s.h:114
matchbox::alpha_s::alpha_s
alpha_s()
The default constructor.
matchbox::alpha_s::match_thresholds
void match_thresholds()
perform the threshold matching given alpha_s value at reference scale
matchbox::alpha_s::Init
static void Init()
The standard Init function used to initialize the interfaces.
matchbox::alpha_s::active_flavours
unsigned int active_flavours(Energy2 scale) const
return the number of active flavours at the given scale
Definition:
alpha_s.h:180
matchbox::alpha_s::operator=
alpha_s & operator=(const alpha_s &)=delete
The assignment operator is private and must never be called.
matchbox::alpha_s::flavourThresholds
virtual vector< Energy2 > flavourThresholds() const
Return the flavour thresholds used.
Definition:
alpha_s.h:123
matchbox::alpha_s::operator()
double operator()(Energy2 scale) const
return alpha_s as function of scale
Definition:
alpha_s.h:143
matchbox::alpha_s::max_active_flavours
unsigned int max_active_flavours() const
return maximum number of active flavours
Definition:
alpha_s.h:174
matchbox::alpha_s::doinit
virtual void doinit()
Initialize this object after the setup phase before saving an EventGenerator to disk.
Definition:
alpha_s.h:233
matchbox::alpha_s::min_active_flavours
unsigned int min_active_flavours() const
return minimum number of active flavours
Definition:
alpha_s.h:168
matchbox::alpha_s::check
string check(string args)
match thresholds and write alpha_s to specified file; arguments are Q_low/GeV Q_high/GeV n_steps file...
matchbox::alpha_s::initalpha_s
static AbstractClassDescription< alpha_s > initalpha_s
The static object used to initialize the description of this class.
Definition:
alpha_s.h:277
matchbox::alpha_s::quark_mass_squared
Energy2 quark_mass_squared(unsigned int f) const
return the mass squared for given flavour
Definition:
alpha_s.h:201
matchbox::alpha_s::lambda_squared
Energy2 lambda_squared(unsigned int f) const
return the lambda squared for the given number of flavours
Definition:
alpha_s.h:195
matchbox::alpha_s::matched
bool matched() const
return true, if threshold matching has been performed
Definition:
alpha_s.h:221
ThePEG
ThePEG::sqrt
double sqrt(int x)
ThePEG::BaseClassTrait
ThePEG::BaseClassTrait::NthBase
int NthBase
ThePEG::ClassTraitsBase
ThePEG::ClassTraitsBase::className
static string className()
ThePEG::ClassTraitsBase::library
static string library()
ThePEG::ClassTraits
matchbox::solve_input_lambda
Definition:
alpha_s.h:69
matchbox::solve_lambda_above
Definition:
alpha_s.h:46
matchbox::solve_lambda_below
Definition:
alpha_s.h:23
Generated on Thu Jun 20 2024 17:50:53 for Herwig by
1.9.6