diff --git a/v2.5/toolkit/src/fnlo-tk-rootout.cc b/v2.5/toolkit/src/fnlo-tk-rootout.cc index 4d9060a96c8eae345845aa25b448bf11ab291c2a..681c54adb5411d602f60a43dae544377c464d9a1 100644 --- a/v2.5/toolkit/src/fnlo-tk-rootout.cc +++ b/v2.5/toolkit/src/fnlo-tk-rootout.cc @@ -1,8 +1,11 @@ ///******************************************************************** /// /// fastNLO_toolkit: fnlo-tk-rootout -/// Program to read fastNLO tables and write out -/// QCD cross sections into ROOT histograms +/// Program to read fastNLO tables and write out QCD cross sections +/// with uncertainty in text and ROOT format +/// +/// For more explanations type: +/// ./fnlo-tk-rootout -h /// /// K. Rabbertz /// @@ -20,6 +23,8 @@ #include <iostream> #include <string> #include <vector> +#include "fastnlotk/fastNLOAlphas.h" +#include "fastnlotk/fastNLOConstants.h" #include "fastnlotk/fastNLOLHAPDF.h" #include "fastnlotk/fastNLOTools.h" #include "fastnlotk/speaker.h" @@ -41,7 +46,19 @@ int main(int argc, char** argv) { using namespace fastNLO; //! namespace for fastNLO constants //! --- Set initial verbosity level - SetGlobalVerbosity(INFO); + // Could set verbosity level directly using enum here, but we'll need fVerbosity anyway for cmd line parsing + // SetGlobalVerbosity(WARNING); + string VerbosityLevel = "WARNING"; + say::Verbosity fVerbosity = toVerbosity()["WARNING"]; + SetGlobalVerbosity(fVerbosity); + + //--- Set verbosity level of table evaluation from command line argument if existing + if (argc > 7) { + VerbosityLevel = (const char*) argv[7]; + //! --- Reset verbosity level from here on + fVerbosity = toVerbosity()[VerbosityLevel]; + SetGlobalVerbosity(fVerbosity); + } //! --- Parse commmand line char buffer[1024]; @@ -65,33 +82,39 @@ int main(int argc, char** argv) { if (tablename == "-v") { fastNLOTools::PrintFastnloVersion(); return 0; + } else if (tablename == "-h") { + // Avoid suppressing usage printouts + SetGlobalVerbosity(INFO); } //! --- Print program purpose yell << _CSEPSC << endl; info["fnlo-tk-rootout"] << "Program to read fastNLO tables and write out" << endl; - info["fnlo-tk-rootout"] << "QCD cross sections into ROOT histograms" << endl; - yell << _SSEPSC << endl; - info["fnlo-tk-rootout"] << "For more explanations type:" << endl; + info["fnlo-tk-rootout"] << "QCD cross sections with uncertainties in text format and" << endl; + info["fnlo-tk-rootout"] << "in ROOT format" << endl; + info["fnlo-tk-rootout"] << "(If compiled without ROOT support only text printout is given)" << endl; + infosep << _SSEPSC << endl; + info["fnlo-tk-rootout"] << "For an explanation of command line arguments type:" << endl; info["fnlo-tk-rootout"] << "./fnlo-tk-rootout -h" << endl; info["fnlo-tk-rootout"] << "For version number printout type:" << endl; info["fnlo-tk-rootout"] << "./fnlo-tk-rootout -v" << endl; - yell << _CSEPSC << endl; + infosep << _CSEPSC << endl; + infosep << "" << endl; + infosep << _CSEPSC << endl; //! --- Usage info if (tablename == "-h") { - yell << _CSEPSC << endl; info["fnlo-tk-rootout"] << "fastNLO ROOT Writer" << endl; - yell << _SSEPSC << endl; - yell << " #" << endl; + infosep << _SSEPSC << endl; + infosep << " #" << endl; info["fnlo-tk-rootout"] << "This program evaluates a fastNLO table and" << endl; - info["fnlo-tk-rootout"] << "writes histograms with cross sections and PDF, statistical or" << endl; - info["fnlo-tk-rootout"] << "scale uncertainties into ROOT." << endl; + info["fnlo-tk-rootout"] << "prints out cross sections with statistical (if available), " << endl; + info["fnlo-tk-rootout"] << "scale, or PDF uncertainties in ROOT format." << endl; info["fnlo-tk-rootout"] << "" << endl; info["fnlo-tk-rootout"] << "TODO: Provide more info on histogram numbering/labelling ..." << endl; man << "" << endl; man << "Usage: ./fnlo-tk-rootout <fastNLOtable.tab> [PDF] [uncertainty]" << endl; man << " Arguments: <> mandatory; [] optional." << endl; man << "<fastNLOtable.tab>: Table input file, e.g. fnl2342b.tab" << endl; - man << "[PDF]: PDF set, def. = series of CT14nlo, MMHT2014nlo68cl, NNPDF30_nlo_as_0118, PDF4LHC15_nlo_mc" << endl; + man << "[PDF]: PDF set, def. = series of CT18NNLO, MSHT20nnlo_as118, NNPDF31_nnlo_as_0118, PDF4LHC21_mc" << endl; man << " For LHAPDF6: Specify set names WITHOUT filename extension." << endl; man << " If the PDF set still is not found, then:" << endl; man << " - Check, whether the LHAPDF environment variable is set correctly." << endl; @@ -116,11 +139,11 @@ int main(int argc, char** argv) { man << " \"scale21\", i.e. mur=scale2, muf=scale1," << endl; man << " \"kProd\", i.e. mur=muf=scale1*scale2," << endl; man << " \"kQuadraticSum\", i.e. mur=muf=sqrt(scale1^2+scale2^2)." << endl; - man << "[Verbosity]: Set verbosity level of table evaluation [DEBUG,INFO,WARNING,ERROR], def. = WARNING" << endl; - yell << " #" << endl; + man << "[Verbosity]: Set verbosity level of table evaluation [DEBUG,INFO,WARNING,ERROR,SILENT], def. = WARNING" << endl; + infosep << " #" << endl; man << "Use \"_\" to skip changing a default argument." << endl; - yell << " #" << endl; - yell << _CSEPSC << endl; + infosep << " #" << endl; + infosep << _CSEPSC << endl; return 0; } else { shout["fnlo-tk-rootout"] << "Evaluating table: " << tablename << endl; @@ -215,25 +238,19 @@ int main(int argc, char** argv) { } //--- Scale choice (flex-scale tables only; ignored for fix-scale tables) - string chflex = "kScale1"; + string chflex; if (argc > 6) { chflex = (const char*) argv[6]; } if (argc <= 6 || chflex == "_") { + chflex = "kScale1"; shout["fnlo-tk-rootout"] << "Using default mur=muf=scale 1." << endl; } else { shout["fnlo-tk-rootout"] << "Using scale definition "+chflex+"." << endl; } - //--- Set verbosity level of table evaluation - string VerbosityLevel = "WARNING"; - if (argc > 7) { - VerbosityLevel = (const char*) argv[7]; - } - if (argc <= 7 || VerbosityLevel == "_") { - VerbosityLevel = "WARNING"; - shout["fnlo-tk-rootout"] << "No request given for verbosity level, using WARNING default." << endl; - } else { + //--- Report about changed verbosity level at the beginning + if (!VerbosityLevel.empty()) { shout["fnlo-tk-rootout"] << "Using verbosity level: " << VerbosityLevel << endl; } @@ -250,7 +267,7 @@ int main(int argc, char** argv) { //! --- Prepare loop over PDF sets const int nsets = 4; - string StandardPDFSets[nsets] = {"CT14nlo", "MMHT2014nlo68cl", "NNPDF30_nlo_as_0118", "PDF4LHC15_nlo_mc"}; + string StandardPDFSets[nsets] = {"CT18NNLO", "MSHT20nnlo_as118", "NNPDF31_nnlo_as_0118", "PDF4LHC21_mc"}; EPDFUncertaintyStyle ePDFUncs[nsets] = {kHessianCTEQCL68, kHessianAsymmetricMax, kMCSampling, kMCSampling}; vector < string > PDFFiles; diff --git a/v2.5/toolkit/src/fnlo-tk-yodaout.cc b/v2.5/toolkit/src/fnlo-tk-yodaout.cc index d05b117320dba7e22379762eb18959e2604825ec..64572df21cece2b35eedac2909857c06462a1e98 100644 --- a/v2.5/toolkit/src/fnlo-tk-yodaout.cc +++ b/v2.5/toolkit/src/fnlo-tk-yodaout.cc @@ -111,7 +111,7 @@ int main(int argc, char** argv) { man << "Usage: ./fnlo-tk-yodaout <fastNLOtable.tab> [PDF] [uncertainty]" << endl; man << " Arguments: <> mandatory; [] optional." << endl; man << "<fastNLOtable.tab>: Table input file, e.g. fnl2342b.tab" << endl; - man << "[PDF]: PDF set, def. = CT10nlo" << endl; + man << "[PDF]: PDF set, def. = CT18NNLO" << endl; man << " For LHAPDF6: Specify set names WITHOUT filename extension." << endl; man << " If the PDF set still is not found, then:" << endl; man << " - Check, whether the LHAPDF environment variable is set correctly." << endl; @@ -144,7 +144,7 @@ int main(int argc, char** argv) { man << "[np]: Apply nonperturbative corrections if available, def. = no.; alternatives: \"yes\" or \"np\"." << endl; man << "[xrescale]: Rescale x axis values, def. = 1" << endl; man << "[dxsrescale]: Rescale uncertainty values, def. = 1" << endl; - man << "[Verbosity]: Set verbosity level of table evaluation [DEBUG,INFO,WARNING,ERROR], def. = WARNING" << endl; + man << "[Verbosity]: Set verbosity level of table evaluation [DEBUG,INFO,WARNING,ERROR,SILENT], def. = WARNING" << endl; infosep << " #" << endl; man << "Use \"_\" to skip changing a default argument." << endl; infosep << " #" << endl; @@ -162,7 +162,7 @@ int main(int argc, char** argv) { PDFFile = (const char*) argv[2]; } if (argc <= 2 || PDFFile == "_") { - PDFFile = "CT10nlo"; + PDFFile = "CT18NNLO"; shout["fnlo-tk-yodaout"] << "No PDF set given, taking " << PDFFile << " instead!" << endl; } else { shout["fnlo-tk-yodaout"] << "Using PDF set : " << PDFFile << endl;