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/apfelxx.h>
20
21#include <cmath>
22
27#include "CepGen/Physics/PDG.h"
29
30using namespace std::string_literals;
31
32namespace cepgen {
33 namespace apfelpp {
35 public:
37 : strfun::Parameterisation(params),
38 apfel_grid_{{apfel::SubGrid{100, 1e-5, 3},
39 apfel::SubGrid{60, 1e-1, 3},
40 apfel::SubGrid{50, 6e-1, 3},
41 apfel::SubGrid{50, 8e-1, 3}}},
42 alpha_s_(AlphaSFactory::get().build(steer<ParametersList>("alphaSParameters"))) {
43 if (alpha_s_->name() != "apfelpp") // do not print twice the APFEL++ banner
44 apfel::Banner();
45 const auto thresholds = steer<std::vector<double> >("thresholds");
46 const auto mu0 = steer<double>("mu0");
47 const auto perturb_order = steer<int>("perturbativeOrder");
48
49 const auto as = [&](double mu) { return (*alpha_s_)(mu); };
50 const auto fBq = [=](double q) { return apfel::ElectroWeakCharges(q, false); }; // effective charges
51
52 const auto dglap_obj = apfel::InitializeDglapObjectsQCD(apfel_grid_, thresholds);
53 auto evolved_pdfs = apfel::BuildDglap(dglap_obj, apfel::LHToyPDFs, mu0, perturb_order, as);
54 const apfel::TabulateObject<apfel::Set<apfel::Distribution> > tabulated_pdfs{*evolved_pdfs, 50, 1, 1000, 3};
55 const auto pdfs = [&](double x, double q) { return tabulated_pdfs.EvaluateMapxQ(x, q); };
56
57 const auto process_dis = steer<std::string>("processDIS");
58 if (process_dis == "NC") {
59 const auto masses = steer<std::vector<double> >("masses");
60 const auto f2_obj = apfel::InitializeF2NCObjectsMassive(apfel_grid_, masses);
61 const auto fl_obj = apfel::InitializeFLNCObjectsMassive(apfel_grid_, masses);
62 auto f2 = apfel::BuildStructureFunctions(f2_obj, pdfs, perturb_order, as, fBq);
63 auto fl = apfel::BuildStructureFunctions(fl_obj, pdfs, perturb_order, as, fBq);
64 // tabulate structure functions
65 f2_total_.reset(new apfel::TabulateObject<apfel::Distribution>{
66 [&](double q) { return f2.at(0).Evaluate(q); }, 50, 1, 200, 3, thresholds});
67 fl_total_.reset(new apfel::TabulateObject<apfel::Distribution>{
68 [&](double q) { return fl.at(0).Evaluate(q); }, 50, 1, 200, 3, thresholds});
69 } else if (process_dis == "CC") {
70 const auto f2p_obj = apfel::InitializeF2CCPlusObjectsZM(apfel_grid_, thresholds);
71 const auto f2m_obj = apfel::InitializeF2CCMinusObjectsZM(apfel_grid_, thresholds);
72 const auto flp_obj = apfel::InitializeFLCCPlusObjectsZM(apfel_grid_, thresholds);
73 const auto flm_obj = apfel::InitializeFLCCMinusObjectsZM(apfel_grid_, thresholds);
74 auto f2p = apfel::BuildStructureFunctions(f2p_obj, pdfs, perturb_order, as, fBq);
75 auto f2m = apfel::BuildStructureFunctions(f2m_obj, pdfs, perturb_order, as, fBq);
76 auto flp = apfel::BuildStructureFunctions(flp_obj, pdfs, perturb_order, as, fBq);
77 auto flm = apfel::BuildStructureFunctions(flm_obj, pdfs, perturb_order, as, fBq);
78 // tabulate structure functions
79 f2_total_.reset(new apfel::TabulateObject<apfel::Distribution>{
80 [&](double q) { return f2p.at(0).Evaluate(q) - f2m.at(0).Evaluate(q); }, 50, 1, 200, 3, thresholds});
81 fl_total_.reset(new apfel::TabulateObject<apfel::Distribution>{
82 [&](double q) { return flp.at(0).Evaluate(q) - flm.at(0).Evaluate(q); }, 50, 1, 200, 3, thresholds});
83 }
84 }
85
88 desc.setDescription("APFEL++ DIS structure functions");
89 desc.add("mu0", 1.3).setDescription("initial scale");
90 desc.add("masses", std::vector<double>{0., 0., 0., 1.3, 4.75, 175.});
91 desc.add("thresholds", std::vector<double>{0., 0., 0.});
92 desc.add("perturbativeOrder", 0)
93 .setDescription("perturbative order for alpha(S) evolution")
94 .allow(0, "LO")
95 .allow(1, "NLO")
96 .allow(2, "NNLO")
97 .allow(3, "NNNLO");
98 desc.add("processDIS", "NC"s)
99 .setDescription("process of the structure functions (NC, or CC)")
100 .allow("NC", "neutral currents")
101 .allow("CC", "charged currents");
102 desc.add("alphaSParameters", AlphaSFactory::get().describeParameters("apfelpp"));
103 return desc;
104 }
105
106 private:
107 void eval() override {
108 const auto q = std::sqrt(args_.q2);
109 setF2(f2_total_->EvaluatexQ(args_.xbj, q));
110 setFL(fl_total_->EvaluatexQ(args_.xbj, q));
111 }
112
113 const apfel::Grid apfel_grid_; // x-space grid
114 const std::unique_ptr<Coupling> alpha_s_;
115 std::unique_ptr<apfel::TabulateObject<apfel::Distribution> > f2_total_, fl_total_;
116 };
117 } // namespace apfelpp
118} // namespace cepgen
#define REGISTER_STRFUN(name, id, obj)
Add a structure functions definition to the list of handled parameterisation.
A description object for parameters collection.
Base object for the parameterisation of nucleon structure functions.
Parameterisation(const ParametersList &)
static ParametersDescription description()
Generic description for the structure functions.
Common namespace for this Monte Carlo generator.