APFEL 4.8.0
A PDF evolution library in C++
Loading...
Searching...
No Matches
dglap_test_streamlined.cc
//
// APFEL++ 2017
//
// Author: Valerio Bertone: valerio.bertone@cern.ch
//
#include <apfel/apfelxx.h>
int main()
{
// Initial scale
const double mu0 = sqrt(2);
// Final scale
const double mu = 100;
// Vectors of masses and thresholds
const std::vector<double> Thresholds = {0, 0, 0, sqrt(2), 4.5, 175};
// Perturbative order
const int PerturbativeOrder = 2;
// Running coupling
apfel::AlphaQCD a{0.35, sqrt(2), Thresholds, PerturbativeOrder};
const apfel::TabulateObject<double> Alphas{a, 100, 0.9, 1001, 3};
const auto as = [&] (double const& mu) -> double{ return Alphas.Evaluate(mu); };
// x-space grid
const apfel::Grid g{{apfel::SubGrid{100, 1e-5, 3}, apfel::SubGrid{100, 1e-1, 3}, apfel::SubGrid{100, 6e-1, 3}, apfel::SubGrid{80, 8.5e-1, 5}}};
// Construct the DGLAP objects
const auto EvolvedPDFs = BuildDglap(InitializeDglapObjectsQCD(g, Thresholds), apfel::LHToyPDFs, mu0, PerturbativeOrder, as);
// Tabulate PDFs
const apfel::TabulateObject<apfel::Set<apfel::Distribution>> TabulatedPDFs{*EvolvedPDFs, 50, 1, 1000, 3};
// Print results
const std::vector<double> xlha = {1e-5, 1e-4, 1e-3, 1e-2, 1e-1, 3e-1, 5e-1, 7e-1, 9e-1};
std::cout << std::scientific;
std::cout << "\nAlphaQCD(Q) = " << Alphas.Evaluate(mu) << std::endl;
std::cout << "\n x "
<< " u-ubar "
<< " d-dbar "
<< " 2(ubr+dbr) "
<< " c+cbar "
<< " gluon "
<< std::endl;
for (auto const& x : xlha)
{
const std::map<int, double> DistMap = apfel::QCDEvToPhys(TabulatedPDFs.EvaluateMapxQ(x,mu));
std::cout.precision(1);
std::cout << x;
std::cout.precision(4);
std::cout << " " << DistMap.at(2) - DistMap.at(-2)
<< " " << DistMap.at(1) - DistMap.at(-1)
<< " " << 2 * ( DistMap.at(-2) + DistMap.at(-1) )
<< " " << DistMap.at(4) + DistMap.at(-4)
<< " " << DistMap.at(0)
<< std::endl;
}
return 0;
}
The AlphaQCD is a specialization class of the MatchedEvolution class for the computation of the QCD c...
Definition alphaqcd.h:21
The Grid class defines ab object that is essentially a collection of "SubGrid" objects plus other glo...
Definition grid.h:22
T Evaluate(double const &Q) const
Function that interpolates on the grid in Q.
Class for the x-space interpolation SubGrids.
Definition subgrid.h:23
The template TabulateObject class is a derived of the QGrid class that tabulates on object of type T ...
Definition tabulateobject.h:26
void Banner()
Function that prints the APFEL++ banner on screen. Effective according to the verbosity level.
std::map< int, double > QCDEvToPhys(std::map< int, double > const &QCDEvMap)
Rotation from the QCD evolution to the physical basis.