cepgen
is hosted by
Hepforge
,
IPPP Durham
CepGen
1.2.5
Central exclusive processes event generator
Loading...
Searching...
No Matches
AlphaS.cpp
Go to the documentation of this file.
1
/*
2
* CepGen: a central exclusive processes event generator
3
* Copyright (C) 2019-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 <LHAPDF/LHAPDF.h>
20
21
#include "
CepGen/Modules/CouplingFactory.h
"
22
#include "
CepGen/Physics/Coupling.h
"
23
24
#if defined LHAPDF_MAJOR_VERSION && LHAPDF_MAJOR_VERSION == 6
25
#define LHAPDF_GE_6 1
26
#endif
27
28
namespace
cepgen
{
29
namespace
lhapdf {
31
class
AlphaS
final :
public
Coupling
{
32
public
:
33
explicit
AlphaS
(
const
ParametersList
& params)
34
:
Coupling
(params)
35
#ifdef LHAPDF_GE_6
36
,
37
lhapdf_(LHAPDF::mkPDF(
steer
<std::string>(
"pdfSet"
),
steer
<int>(
"pdfMember"
))) {
38
}
39
#else
40
{
41
LHAPDF::initPDFSet(steer<std::string>(
"pdfSet"
), LHAPDF::LHGRID, steer<int>(
"pdfMember"
));
42
}
43
#endif
44
static
ParametersDescription
description
() {
45
auto
desc =
Coupling::description
();
46
desc.setDescription(
"LHAPDF pert.PDF-orient.evol.algo."
);
47
desc.add<std::string>(
"pdfSet"
,
"cteq66"
);
48
desc.add<
int
>(
"pdfMember"
, 0);
49
return
desc;
50
}
51
52
double
operator()
(
double
q)
const override
{
53
#ifdef LHAPDF_GE_6
54
return
lhapdf_->alphasQ(q);
55
#else
56
return
LHAPDF::alphasPDF(q);
57
#endif
58
}
59
60
private
:
61
#ifdef LHAPDF_GE_6
62
const
std::unique_ptr<LHAPDF::PDF> lhapdf_;
63
#endif
64
};
65
}
// namespace lhapdf
66
}
// namespace cepgen
67
using
AlphaSLHAPDF
=
cepgen::lhapdf::AlphaS
;
68
REGISTER_ALPHAS_MODULE
(
"lhapdf"
,
AlphaSLHAPDF
);
CouplingFactory.h
REGISTER_ALPHAS_MODULE
#define REGISTER_ALPHAS_MODULE(name, obj)
Add a strong coupling evolution algorithm.
Definition
CouplingFactory.h:35
Coupling.h
cepgen::Coupling
A generic evaluation algorithm.
Definition
Coupling.h:26
cepgen::ParametersDescription
A description object for parameters collection.
Definition
ParametersDescription.h:26
cepgen::ParametersList
Definition
ParametersList.h:52
cepgen::Steerable::description
static ParametersDescription description()
Description of all object parameters.
Definition
Steerable.cpp:42
cepgen::Steerable::steer
T steer(const std::string &key) const
Retrieve a parameters as previously steered.
Definition
Steerable.h:39
cepgen::lhapdf::AlphaS
A perturbative PDF-oriented evaluator.
Definition
AlphaS.cpp:31
cepgen::lhapdf::AlphaS::operator()
double operator()(double q) const override
Compute for a given .
Definition
AlphaS.cpp:52
cepgen::lhapdf::AlphaS::AlphaS
AlphaS(const ParametersList ¶ms)
Definition
AlphaS.cpp:33
cepgen::lhapdf::AlphaS::description
static ParametersDescription description()
Definition
AlphaS.cpp:44
cepgen
Common namespace for this Monte Carlo generator.
Definition
CommandLineHandler.cpp:36
CepGenAddOns
LHAPDFWrapper
AlphaS.cpp
Generated on Mon Jul 29 2024 for CepGen by
1.9.7