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
22
#include "
CepGen/Modules/ModuleFactory.h
"
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
43
namespace
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
52
struct
PartonFluxFactory
{
53
static
PartonFluxFactory
&
get
() {
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
ModuleFactory.h
DEFINE_FACTORY
#define DEFINE_FACTORY(name, obj_type, descr)
Define a new factory instance for the definition of modules.
Definition
ModuleFactory.h:30
cepgen::CollinearFlux
Definition
CollinearFlux.h:25
cepgen::KTFlux
Definition
KTFlux.h:25
cepgen::ParametersDescription
A description object for parameters collection.
Definition
ParametersDescription.h:26
cepgen::ParametersList
Definition
ParametersList.h:52
cepgen
Common namespace for this Monte Carlo generator.
Definition
CommandLineHandler.cpp:36
cepgen::PartonFluxFactory
A generic parton fluxes objects factory.
Definition
PartonFluxFactory.h:52
cepgen::PartonFluxFactory::get
static PartonFluxFactory & get()
Definition
PartonFluxFactory.h:53
cepgen::PartonFluxFactory::partonPdgId
int partonPdgId(const ParametersList &) const
Type of parton exchanged.
Definition
PartonFluxFactory.cpp:49
cepgen::PartonFluxFactory::elastic
bool elastic(const ParametersList &) const
Is the beam modelling elastic?
Definition
PartonFluxFactory.cpp:38
cepgen::PartonFluxFactory::describeParameters
ParametersDescription describeParameters(const std::string &name, const ParametersList ¶ms=ParametersList()) const
Definition
PartonFluxFactory.cpp:27
CepGen
Modules
PartonFluxFactory.h
Generated on Mon Jul 29 2024 for CepGen by
1.9.7