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
23
24#if defined LHAPDF_MAJOR_VERSION && LHAPDF_MAJOR_VERSION == 6
25#define LHAPDF_GE_6 1
26#endif
27
28namespace 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
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
#define REGISTER_ALPHAS_MODULE(name, obj)
Add a strong coupling evolution algorithm.
A generic evaluation algorithm.
Definition Coupling.h:26
A description object for parameters collection.
static ParametersDescription description()
Description of all object parameters.
Definition Steerable.cpp:42
T steer(const std::string &key) const
Retrieve a parameters as previously steered.
Definition Steerable.h:39
A perturbative PDF-oriented evaluator.
Definition AlphaS.cpp:31
double operator()(double q) const override
Compute for a given .
Definition AlphaS.cpp:52
AlphaS(const ParametersList &params)
Definition AlphaS.cpp:33
static ParametersDescription description()
Definition AlphaS.cpp:44
Common namespace for this Monte Carlo generator.