cepgen is hosted by Hepforge, IPPP Durham
CepGen 1.2.5
Central exclusive processes event generator
Loading...
Searching...
No Matches
PartonFluxFactory.h
Go to the documentation of this file.
1/*
2 * CepGen: a central exclusive processes event generator
3 * Copyright (C) 2023-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
19#ifndef CepGen_Modules_PartonFluxFactory_h
20#define CepGen_Modules_PartonFluxFactory_h
21
23
25#define REGISTER_COLLINEAR_FLUX(name, obj) \
26 namespace cepgen { \
27 struct BUILDERNM(obj) { \
28 BUILDERNM(obj)() { CollinearFluxFactory::get().registerModule<obj>(name); } \
29 }; \
30 static const BUILDERNM(obj) gCollinearFlux##obj; \
31 } \
32 static_assert(true, "")
34#define REGISTER_KT_FLUX(name, id, obj) \
35 namespace cepgen { \
36 struct BUILDERNM(obj) { \
37 BUILDERNM(obj)() { KTFluxFactory::get().addIndex(id, name).registerModule<obj>(name); } \
38 }; \
39 static const BUILDERNM(obj) gKTFlux##obj; \
40 } \
41 static_assert(true, "")
42
43namespace cepgen {
44 class CollinearFlux;
45 class KTFlux;
47 DEFINE_FACTORY(CollinearFluxFactory, CollinearFlux, "Collinear parton flux estimators factory");
49 DEFINE_FACTORY(KTFluxFactory, KTFlux, "KT-factorised flux estimators factory");
50
54 static PartonFluxFactory instance;
55 return instance;
56 }
57
58 ParametersDescription describeParameters(const std::string& name,
59 const ParametersList& params = ParametersList()) const;
60 bool elastic(const ParametersList&) const;
61 int partonPdgId(const ParametersList&) const;
62 };
63} // namespace cepgen
64
65#endif
#define DEFINE_FACTORY(name, obj_type, descr)
Define a new factory instance for the definition of modules.
A description object for parameters collection.
Common namespace for this Monte Carlo generator.
A generic parton fluxes objects factory.
static PartonFluxFactory & get()
int partonPdgId(const ParametersList &) const
Type of parton exchanged.
bool elastic(const ParametersList &) const
Is the beam modelling elastic?
ParametersDescription describeParameters(const std::string &name, const ParametersList &params=ParametersList()) const