cepgen is hosted by Hepforge, IPPP Durham
CepGen 1.2.5
Central exclusive processes event generator
Loading...
Searching...
No Matches
DocumentationGenerator.cpp
Go to the documentation of this file.
1/*
2 * CepGen: a central exclusive processes event generator
3 * Copyright (C) 2024 Laurent Forthomme
4 *
5 * This program is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation, either version 3 of the License, or
8 * any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 */
18
21#include "CepGen/Utils/String.h"
22
23// list of factories documented
40
41namespace cepgen {
42 namespace utils {
44 const auto categories = steer<std::vector<std::string> >("categories"),
45 mod_names = steer<std::vector<std::string> >("modules");
46 const auto add_category = [&categories, &mod_names, this](const std::string& name,
47 const std::string& title,
48 const std::string& description,
49 auto& factory) -> void {
50 if (!categories.empty() && !contains(categories, name))
51 return;
52 category_t cat;
53 cat.name = name;
54 cat.title = title;
56 for (const auto& mod : factory.modules())
57 if (mod_names.empty() || contains(mod_names, utils::toString(mod)) ||
59 cat.modules[mod] = factory.describeParameters(mod).setKey(mod);
60 for (const auto& index_vs_modname : factory.indices())
61 if (index_vs_modname.second == mod)
62 cat.modules_indices[mod] = index_vs_modname.first;
63 }
64 categories_.emplace_back(std::make_pair(name, cat));
65 };
66 add_category("proc", "Processes", "", cepgen::ProcessFactory::get());
67 add_category("cards", "Cards handler", "", cepgen::CardsHandlerFactory::get());
68 add_category("formfac", "Form factors", "", cepgen::FormFactorsFactory::get());
69 add_category("strfun", "Structure functions", "", cepgen::StructureFunctionsFactory::get());
70 add_category("sigrat",
71 "Longitudinal/transverse cross section ratio parameterisations",
72 "",
73 cepgen::SigmaRatiosFactory::get());
74 add_category("psmap", "Phase space mapper", "", cepgen::PhaseSpaceGeneratorFactory::get());
75 add_category("collflux", "Collinear parton flux modelling", "", cepgen::CollinearFluxFactory::get());
76 add_category("ktflux", "KT-factorised parton flux modelling", "", cepgen::KTFluxFactory::get());
77 add_category("alphaem", "Electromagnetic coupling evolution", "", cepgen::AlphaEMFactory::get());
78 add_category("alphas", "Strong coupling evolution", "", cepgen::AlphaSFactory::get());
79 add_category("integr", "Integrator algorithms", "", cepgen::IntegratorFactory::get());
80 add_category("func", "Functional parsers", "", cepgen::FunctionalFactory::get());
81 add_category("rndgen", "Random number generators", "", cepgen::RandomGeneratorFactory::get());
82 add_category("drawer", "Drawing tools", "", cepgen::DrawerFactory::get());
83 add_category("evtgen", "Event generation algorithms", "", cepgen::GeneratorWorkerFactory::get());
84 add_category("evtimp", "Event import algorithms", "", cepgen::EventImporterFactory::get());
85 add_category("evtmod", "Event modification algorithms", "", cepgen::EventModifierFactory::get());
86 add_category("evtout", "Event export modules", "", cepgen::EventExporterFactory::get());
87 add_category("docs", "Documentation generator modules", "", cepgen::DocumentationGeneratorFactory::get());
88 }
89
91 auto desc = ParametersDescription();
92 return desc;
93 }
94 } // namespace utils
95} // namespace cepgen
Base runtime module object.
Definition NamedModule.h:28
const std::string & name() const
Module unique indexing name.
Definition NamedModule.h:42
A description object for parameters collection.
T steer(const std::string &key) const
Retrieve a parameters as previously steered.
Definition Steerable.h:39
std::map< std::string, ParametersDescription > modules
static ParametersDescription description()
std::vector< std::pair< std::string, category_t > > categories_
std::string toString(const std::wstring &str)
Convert a wide characters to a standard characters string.
Definition String.cpp:151
std::string toCamelCase(const std::string &in, bool lower)
Convert any case into a camelCase string.
Definition String.cpp:186
bool contains(const std::vector< T > &coll, const T &item)
Check if a vector contains an item.
Definition Collections.h:47
Common namespace for this Monte Carlo generator.
static CardsHandlerFactory & get()