#include <iomanip>
int main()
{
const apfel::Grid g{{
apfel::SubGrid{100,1e-5,3},
apfel::SubGrid{60,1e-1,3},
apfel::SubGrid{50,6e-1,3},
apfel::SubGrid{50,8e-1,3}}};
const double mu0 = sqrt(2);
const std::vector<double> Thresholds = {0, 0, 0, sqrt(2), 4.5, 175};
const int PerturbativeOrder = 2;
const auto as = [&] (
double const& mu) ->
double{
return Alphas.
Evaluate(mu); };
std::function<std::vector<double>(
double const&)> fBq = [=] (
double const& Q) -> std::vector<double> {
return apfel::ElectroWeakCharges(Q,
false); };
const auto DglapObj = InitializeDglapObjectsQCDpol(g, Thresholds);
auto EvolvedPDFs = BuildDglap(DglapObj, apfel::LHToyPDFs, mu0, PerturbativeOrder, as);
const auto PDFs = [&] (
double const& x,
double const& Q) -> std::map<int, double> {
return TabulatedPDFs.
EvaluateMapxQ(x, Q); };
const auto g4Obj = Initializeg4NCObjectsZM(g, Thresholds);
const auto gLObj = InitializegLNCObjectsZM(g, Thresholds);
const auto g1Obj = Initializeg1NCObjectsZM(g, Thresholds);
const auto g4 = BuildStructureFunctions(g4Obj, PDFs, PerturbativeOrder, as, fDq);
const auto gL = BuildStructureFunctions(gLObj, PDFs, PerturbativeOrder, as, fDq);
const auto g1 = BuildStructureFunctions(g1Obj, PDFs, PerturbativeOrder, as, fBq);
const double Q = 100;
std::cout << std::scientific << std::endl;
std::cout << "Alphas(Q) = " << as(Q) << std::endl;
std::cout << std::endl;
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 << " x "
<< " g4light "
<< " g4charm "
<< " g4bottom "
<< " g4total "
<< std::endl;
for (double const& x : xlha)
std::cout << std::setprecision(1) << x << " " << std::setprecision(4)
<< g4light.EvaluatexQ(x, Q) << " "
<< g4charm.EvaluatexQ(x, Q) << " "
<< g4bottom.EvaluatexQ(x, Q) << " "
<< g4total.EvaluatexQ(x, Q) << " "
<< std::endl;
std::cout << std::endl;
std::cout << " x "
<< " gLlight "
<< " gLcharm "
<< " gLbottom "
<< " gLtotal "
<< std::endl;
for (double const& x : xlha)
std::cout << std::setprecision(1) << x << " " << std::setprecision(4)
<< gLlight.EvaluatexQ(x, Q) << " "
<< gLcharm.EvaluatexQ(x, Q) << " "
<< gLbottom.EvaluatexQ(x, Q) << " "
<< gLtotal.EvaluatexQ(x, Q) << " "
<< std::endl;
std::cout << std::endl;
std::cout << " x "
<< " g1light "
<< " g1charm "
<< " g1bottom "
<< " g1total "
<< std::endl;
for (double const& x : xlha)
std::cout << std::setprecision(1) << x << " " << std::setprecision(4)
<< g1light.EvaluatexQ(x, Q) << " "
<< g1charm.EvaluatexQ(x, Q) << " "
<< g1bottom.EvaluatexQ(x, Q) << " "
<< g1total.EvaluatexQ(x, Q) << " "
<< std::endl;
std::cout << std::endl;
const int k = 1000000;
std::cout << "Interpolating " << k << " times g1 on the grid... ";
for (int i = 0; i < k; i++)
g1total.EvaluatexQ(0.05, Q);
return 0;
}
The AlphaQCD is a specialization class of the MatchedEvolution class for the computation of the QCD c...
Definition alphaqcd.h:21
The Distribution class defines one of the basic objects of APFEL++. This is essentially the discretis...
Definition distribution.h:22
The Grid class defines ab object that is essentially a collection of "SubGrid" objects plus other glo...
Definition grid.h:22
double Evaluate(double const &x) const
Function that evaluates the interpolated function on the joint grid.
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
std::map< int, double > EvaluateMapxQ(double const &x, double const &Q) const
This function interpolates in x and Q and returns a map. It is used for T = Set<Distribution>.
The Timer class computes the time elapsed between start and stop.
Definition timer.h:20
void stop(bool const &ForceDisplay=false)
This function stops the timer and reports the elapsed time in seconds since the last time the timer w...
Definition timer.h:36
void start()
This function starts the timer.
Definition timer.h:30
void Banner()
Function that prints the APFEL++ banner on screen. Effective according to the verbosity level.
std::vector< double > ParityViolatingElectroWeakCharges(double const &Q, bool const &virt, int const &Comp=TOTAL)
Utility function for the computation of the parity-violating electroweak charges, for both time-like ...
std::vector< double > ElectroWeakCharges(double const &Q, bool const &virt, int const &Comp=TOTAL)
Utility function for the computation of the electroweak charges, for both time-like and space-like vi...