15#include <LHAPDF/LHAPDF.h>
16#include <LHAPDF/GridPDF.h>
28 const std::map<double, std::map<int, apfel::LHKnotArray>> ka = ev.
KnotArray();
31 LHAPDF::KnotArray data;
35 for (
auto const& sg : ka)
38 if (data.xs().empty())
39 data.setxknots() = sg.second.begin()->second.xs;
42 data.setq2knots().insert(data.setq2knots().end(), sg.second.begin()->second.q2s.begin(), sg.second.begin()->second.q2s.end());
45 if (data.setPids().empty())
46 for (
auto const&
id : sg.second)
47 data.setPids().push_back((id.first == 0 ? 21 : id.first));
51 data.setShape() = std::vector<size_t> {data.xs().size(), data.q2s().size(), data.setPids().size()};
56 data.setGrid().resize(data.shape(0) * data.shape(1) * data.shape(2), 0.);
60 for (
auto const& sg : ka)
66 const int q2size = (int) sg.second.begin()->second.xfs.size() / data.shape(0);
69 for (
auto const&
id : sg.second)
72 const std::vector<double> f =
id.second.xfs;
75 for (
int ix = 0; ix < (int) data.shape(0); ix++)
79 for (
int iqs = 0; iqs < q2size; iqs++)
80 data.setGrid()[ix * data.shape(2) * data.shape(1) + iq++ * data.shape(2) + ifl] = f[ix * q2size + iqs];
88 std::vector<double> als;
89 for (
auto const& q2 : data.q2s())
90 als.push_back(ev.Alphas(sqrt(q2)));
93 LHAPDF::AlphaS_Ipol* as =
new LHAPDF::AlphaS_Ipol{};
94 as->setQ2Values(data.q2s());
95 as->setAlphaSValues(als);
98 LHAPDF::GridPDF* dist =
new LHAPDF::GridPDF{};
104 dist->setInterpolator((std::string)
"logcubic");
107 dist->setExtrapolator((std::string)
"continuation");
110 dist->setFlavors(data.setPids());
116 dist->info().set_entry(
"QMin", sqrt(data.q2s().front()));
117 dist->info().set_entry(
"QMax", sqrt(data.q2s().back()));
120 dist->info().set_entry(
"XMin", data.xs().front());
121 dist->info().set_entry(
"XMax", data.xs().back());
124 const std::vector<std::string> Qnames{
"Down",
"Up",
"Strange",
"Charm",
"Bottom",
"Top"};
126 for (
int iq = 0; iq < (int) Qnames.size(); iq++)
128 dist->info().set_entry(
"M" + Qnames[iq], (iq < (
int) trhs.size() ? trhs[iq] : 1e8 + iq));
129 dist->info().set_entry(
"Threshold" + Qnames[iq], (iq < (
int) trhs.size() ? trhs[iq] : 1e8 + iq));
The InitialiseEvolution performs all the operations to initialise a DGLAP evolution using an Evolutio...
Definition initialiseevolution.h:37
std::map< double, std::map< int, LHKnotArray > > KnotArray() const
Function that returns the full set of distributions tabulated on the (x,Q2) grid.
Definition initialiseevolution.h:114
EvolutionSetup GetEvolutionSetup() const
Function that returns the EvolutionSetup object.
Definition initialiseevolution.h:127
std::vector< double > Thresholds
Heavy-quark thresholds.
Definition evolutionsetup.h:84