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) 2021-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
24#include "CepGen/Physics/PDG.h"
25
26namespace cepgen {
27 namespace apfel {
28 class AlphaS final : public cepgen::Coupling {
29 public:
30 explicit AlphaS(const ParametersList& params) : cepgen::Coupling(params), q_range_(steer<Limits>("qrange")) {
31 APFEL::SetPerturbativeOrder(steer<int>("order"));
32 APFEL::SetPoleMasses(PDG::get().mass(4), PDG::get().mass(5), PDG::get().mass(6));
33 APFEL::InitializeAPFEL();
34 APFEL::EvolveAPFEL(q_range_.min(), q_range_.max());
35 if (steer<bool>("checkAPFEL") && !APFEL::CheckAPFEL())
36 throw CG_FATAL("apfel:AlphaS") << "Something is wrong with your APFEL configuration.";
37 }
40 desc.setDescription("APFEL alpha(S) evolution algorithm");
41 desc.add<bool>("checkAPFEL", false).setDescription("perform full check of APFEL configuration");
42 desc.add<int>("order", 2).setDescription("QCD perturbative evolution order");
43 desc.add<Limits>("qrange", {1., 1.e4}).setDescription("Q range reachable for evolution (in GeV)");
44 return desc;
45 }
46
47 double operator()(double q) const override {
48 if (!q_range_.contains(q))
49 CG_WARNING("apfel:AlphaS:get") << "q = " << q << " outside the evolution range" << q_range_ << ".";
50 return APFEL::AlphaQCD(q);
51 }
52
53 private:
54 const Limits q_range_;
55 };
56 } // namespace apfel
57} // namespace cepgen
#define REGISTER_ALPHAS_MODULE(name, obj)
Add a strong coupling evolution algorithm.
#define CG_FATAL(mod)
Definition Exception.h:61
#define CG_WARNING(mod)
Definition Message.h:228
A generic evaluation algorithm.
Definition Coupling.h:26
Validity interval for a variable.
Definition Limits.h:28
double min() const
Lower limit to apply on the variable.
Definition Limits.h:52
bool contains(double val, bool exclude_boundaries=false) const
Check if value is inside limits' boundaries.
Definition Limits.cpp:77
double max() const
Upper limit to apply on the variable.
Definition Limits.h:54
static PDG & get()
Retrieve a unique instance of this particles info collection.
Definition PDG.cpp:41
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
double operator()(double q) const override
Compute for a given .
Definition AlphaS.cpp:47
AlphaS(const ParametersList &params)
Definition AlphaS.cpp:30
static ParametersDescription description()
Definition AlphaS.cpp:38
Common namespace for this Monte Carlo generator.