cepgen
is hosted by
Hepforge
,
IPPP Durham
CepGen
1.2.5
Central exclusive processes event generator
Loading...
Searching...
No Matches
EvolutionStructureFunctions.cpp
Go to the documentation of this file.
1
/*
2
* CepGen: a central exclusive processes event generator
3
* Copyright (C) 2024 Laurent Forthomme
4
*
5
* This program is free software: you can redistribute it and/or modify
6
* it under the terms of the GNU General Public License as published by
7
* the Free Software Foundation, either version 3 of the License, or
8
* any later version.
9
*
10
* This program is distributed in the hope that it will be useful,
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
* GNU General Public License for more details.
14
*
15
* You should have received a copy of the GNU General Public License
16
* along with this program. If not, see <http://www.gnu.org/licenses/>.
17
*/
18
19
#include <APFEL/APFEL.h>
20
21
#include <cmath>
22
23
#include "
CepGen/Core/Exception.h
"
24
#include "
CepGen/Modules/StructureFunctionsFactory.h
"
25
#include "
CepGen/Physics/PDG.h
"
26
#include "
CepGen/StructureFunctions/Parameterisation.h
"
27
28
using namespace
std::string_literals;
29
30
namespace
cepgen
{
31
namespace
apfel {
32
class
EvolutionStructureFunctions
final :
public
strfun::Parameterisation
{
33
public
:
34
explicit
EvolutionStructureFunctions
(
const
ParametersList
& params)
35
: strfun::
Parameterisation
(params),
36
proc_(
steer
<std::string>(
"processDIS"
)),
37
q2_range_(
steer
<
Limits
>(
"q2range"
)),
38
xbj_min_(
steer
<double>(
"xBjmin"
)) {
39
if
(!q2_range_.
valid
())
40
throw
CG_FATAL
(
"apfel:EvolutionStructureFunctions"
) <<
"Invalid Q^2 range: "
<< q2_range_ <<
"."
;
41
const
auto
qrange = q2_range_.
compute
([](
double
lim) {
return
std::sqrt(lim); });
42
APFEL::SetMassScheme(steer<std::string>(
"massScheme"
));
43
APFEL::SetProcessDIS(proc_);
44
APFEL::SetQLimits(qrange.min(), qrange.max());
45
APFEL::SetPerturbativeOrder(steer<int>(
"perturbativeOrder"
));
46
APFEL::SetMaxFlavourAlpha(steer<int>(
"maxFlavourAlpha"
));
47
APFEL::SetMaxFlavourPDFs(steer<int>(
"maxFlavourPDFs"
));
48
APFEL::SetPDFSet(steer<std::string>(
"pdfSet"
));
49
APFEL::SetTargetDIS(steer<std::string>(
"targetDIS"
));
50
APFEL::InitializeAPFEL_DIS();
51
APFEL::ComputeStructureFunctionsAPFEL(qrange.min(), qrange.max());
52
APFEL::CacheStructureFunctionsAPFEL(qrange.min());
53
}
54
55
static
ParametersDescription
description
() {
56
auto
desc =
strfun::Parameterisation::description
();
57
desc.setDescription(
"APFEL DIS structure functions"
);
58
desc.add(
"q2range"
,
Limits
{1., 1.e6}).setDescription(
"evolution scale range, in GeV^2"
);
59
desc.add<
double
>(
"xBjmin"
, 2.e-6).setDescription(
"minimum Bjorken-x reachable for this PDF set"
);
60
desc.add(
"massScheme"
,
"FFNS"
s
/*"FONLL-A"s*/
).setDescription(
"mass scheme for the structure functions"
);
61
desc.add(
"processDIS"
,
"NC"
s).setDescription(
"process of the structure functions (EM, NC, or CC)"
);
62
desc.add(
"perturbativeOrder"
, 0)
63
.setDescription(
"perturbative order for alpha(S) evolution"
)
64
.allow(0,
"LO"
)
65
.allow(1,
"NLO"
)
66
.allow(2,
"NNLO"
)
67
.allow(3,
"NNNLO"
);
68
desc.add<
int
>(
"maxFlavourAlpha"
, 5)
69
.setDescription(
"maximum number of flavours that the evolution of alpha(S) and alpha(EM) can reach"
);
70
desc.add<
int
>(
"maxFlavourPDFs"
, 5)
71
.setDescription(
"maximum number of flavours that the evolution of PDFs can reach"
);
72
desc.add(
"pdfSet"
,
"CT14lo"
s).setDescription(
"name of the PDF set to be used at the initial scale"
);
73
desc.add(
"targetDIS"
,
"isoscalar"
s);
74
return
desc;
75
}
76
77
private
:
78
void
eval()
override
{
79
if
(!q2_range_.
contains
(
args_
.
q2
) ||
args_
.
xbj
< xbj_min_) {
80
CG_WARNING
(
"apfel:EvolutionStructureFunctions"
)
81
<<
"(xBj="
<<
args_
.
xbj
<<
", Q^2="
<<
args_
.
q2
<<
")"
82
<<
" not in validity range (min.xBj = "
<< xbj_min_ <<
", Q^2 = "
<< q2_range_ <<
")."
;
83
clear
();
84
return
;
85
}
86
const
auto
q = std::sqrt(
args_
.
q2
);
87
setF2
(APFEL::StructureFunctionxQ(proc_,
"F2"
,
"total"
,
args_
.
xbj
, q));
88
setFL
(APFEL::StructureFunctionxQ(proc_,
"FL"
,
"total"
,
args_
.
xbj
, q));
89
}
90
91
const
std::string proc_;
92
const
Limits q2_range_;
93
const
double
xbj_min_;
94
};
95
}
// namespace apfel
96
}
// namespace cepgen
97
using
ApfelEvolutionStructureFunctions
=
cepgen::apfel::EvolutionStructureFunctions
;
98
REGISTER_STRFUN
(
"apfelEvol"
, 404,
ApfelEvolutionStructureFunctions
);
Exception.h
CG_FATAL
#define CG_FATAL(mod)
Definition
Exception.h:61
CG_WARNING
#define CG_WARNING(mod)
Definition
Message.h:228
PDG.h
StructureFunctionsFactory.h
REGISTER_STRFUN
#define REGISTER_STRFUN(name, id, obj)
Add a structure functions definition to the list of handled parameterisation.
Definition
StructureFunctionsFactory.h:25
Parameterisation.h
cepgen::Limits
Validity interval for a variable.
Definition
Limits.h:28
cepgen::Limits::valid
bool valid() const
Is there a lower and upper limit?
Definition
Limits.cpp:85
cepgen::Limits::compute
Limits compute(double(*)(double)) const
Compute a copy of limits with an operator applied on boundaries Compute a copy of limits with an oper...
Definition
Limits.cpp:152
cepgen::Limits::contains
bool contains(double val, bool exclude_boundaries=false) const
Check if value is inside limits' boundaries.
Definition
Limits.cpp:77
cepgen::ParametersDescription
A description object for parameters collection.
Definition
ParametersDescription.h:26
cepgen::ParametersList
Definition
ParametersList.h:52
cepgen::Steerable::steer
T steer(const std::string &key) const
Retrieve a parameters as previously steered.
Definition
Steerable.h:39
cepgen::apfel::EvolutionStructureFunctions
Definition
EvolutionStructureFunctions.cpp:32
cepgen::apfel::EvolutionStructureFunctions::description
static ParametersDescription description()
Definition
EvolutionStructureFunctions.cpp:55
cepgen::apfel::EvolutionStructureFunctions::EvolutionStructureFunctions
EvolutionStructureFunctions(const ParametersList ¶ms)
Definition
EvolutionStructureFunctions.cpp:34
cepgen::strfun::Parameterisation
Base object for the parameterisation of nucleon structure functions.
Definition
Parameterisation.h:30
cepgen::strfun::Parameterisation::clear
Parameterisation & clear()
Reset the structure functions values.
Definition
Parameterisation.cpp:51
cepgen::strfun::Parameterisation::args_
Arguments args_
Last couple computed.
Definition
Parameterisation.h:109
cepgen::strfun::Parameterisation::setF2
Parameterisation & setF2(double f2)
Definition
Parameterisation.cpp:83
cepgen::strfun::Parameterisation::Parameterisation
Parameterisation(const ParametersList &)
Definition
Parameterisation.cpp:27
cepgen::strfun::Parameterisation::description
static ParametersDescription description()
Generic description for the structure functions.
Definition
Parameterisation.cpp:148
cepgen::strfun::Parameterisation::setFL
Parameterisation & setFL(double fl)
Definition
Parameterisation.cpp:88
cepgen
Common namespace for this Monte Carlo generator.
Definition
CommandLineHandler.cpp:36
cepgen::strfun::Parameterisation::Arguments::xbj
double xbj
Definition
Parameterisation.h:60
cepgen::strfun::Parameterisation::Arguments::q2
double q2
Definition
Parameterisation.h:60
CepGenAddOns
APFELWrapper
EvolutionStructureFunctions.cpp
Generated on Mon Jul 29 2024 for CepGen by
1.9.7