From f5a90ff57f1b0eee3c6632f44f614a7390ebc937 Mon Sep 17 00:00:00 2001
From: Ivan Novikov <ivan.novikov@desy.de>
Date: Mon, 24 Feb 2020 09:30:02 +0100
Subject: [PATCH] Fix off-by-one error in order in LHAPDF6 output

---
 src/lhapdf6_output.cc | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/lhapdf6_output.cc b/src/lhapdf6_output.cc
index ee8fc3fa5..4dd2a0f9d 100644
--- a/src/lhapdf6_output.cc
+++ b/src/lhapdf6_output.cc
@@ -554,7 +554,8 @@ void WriteLHAPDF6info(FILE* f, const LHAPDF6_Options& info, const QX_Grid& qx_gr
   //TODO: photon
 
   int order = OrderMap(XFITTER_PARS::getParamS("Order"));
-  fprintf(f, "OrderQCD: %i\n", order - 1); // qcdnum notation LO=1, ...; LHAPDF6 LO=0, ...
+  order -= 1; // qcdnum convention LO=1, NLO=2, ...; LHAPDF6 convention LO=0, NLO=1, ...
+  fprintf(f, "OrderQCD: %i\n", order);
   if (!info.flavor_scheme.empty()) fprintf(f, "FlavorScheme: %s\n", info.flavor_scheme.c_str());
   if (!info.error_type.empty())    fprintf(f, "ErrorType: %s\n"   , info.error_type.c_str());
 
@@ -579,7 +580,7 @@ void WriteLHAPDF6info(FILE* f, const LHAPDF6_Options& info, const QX_Grid& qx_gr
   BaseEvolution* pdf = info.pdf;
   //Write alphaS
   fprintf(f, "AlphaS_MZ: %g\n", pdf->getAlphaS(Mz));
-  fprintf(f, "AlphaS_OrderQCD: %i\n", order);//How is this different from OrderQCD? --Ivan
+  fprintf(f, "AlphaS_OrderQCD: %i\n", order);
   fprintf(f, "AlphaS_Type: ipol\n");//I have no idea what that is --Ivan
 
   //Tabulate alphaS
-- 
GitLab