cepgen
is hosted by
Hepforge
,
IPPP Durham
CepGen
N/A
Central exclusive processes event generator
Toggle main menu visibility
Main Page
Related Pages
Packages
Package List
Package Members
All
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
x
y
Functions
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
x
y
Variables
Typedefs
Enumerations
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
a
b
c
d
e
f
g
h
i
k
l
m
n
p
q
r
s
t
u
v
w
x
y
z
Typedefs
Enumerations
Enumerator
b
c
d
e
g
h
i
l
m
n
p
r
t
u
w
x
y
z
Related Symbols
d
g
h
o
u
v
Files
File List
File Members
All
_
a
b
c
d
e
h
o
p
r
s
Functions
Variables
Macros
_
b
c
d
e
p
r
s
▼
CepGen
Reference manual
Bibliography
►
Packages
►
Classes
▼
Files
▼
File List
▼
include
▼
CepGen
►
Cards
▼
Core
►
Exception.h
►
GeneratorWorker.h
►
ParametersDescription.h
►
ParametersList.h
►
RunParameters.h
►
Steerable.h
►
SteeredObject.h
►
Event
►
EventFilter
►
FormFactors
►
Integration
►
Modules
►
PartonFluxes
►
Physics
►
Process
►
StructureFunctions
►
Utils
►
Generator.h
►
Version.h
►
CepGenBoost
►
CepGenHepMC2
►
CepGenHepMC3
►
CepGenHerwig6
►
CepGenMadGraph
►
CepGenPythia6
►
CepGenPythia8
►
CepGenPython
►
CepGenRoot
►
File Members
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
Loading...
Searching...
No Matches
RunParameters.h
Go to the documentation of this file.
1
/*
2
* CepGen: a central exclusive processes event generator
3
* Copyright (C) 2013-2025 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_Core_RunParameters_h
20
#define CepGen_Core_RunParameters_h
21
22
#include "
CepGen/Physics/Kinematics.h
"
23
24
namespace
cepgen
{
25
class
EventExporter;
26
class
EventModifier;
27
class
ParametersList;
28
enum class
IntegratorType;
29
}
// namespace cepgen
30
namespace
cepgen::proc
{
31
class
Process;
32
}
// namespace cepgen::proc
33
namespace
cepgen::utils
{
34
class
Functional
;
35
class
TimeKeeper
;
36
}
// namespace cepgen::utils
33
namespace
cepgen::utils
{
…
}
37
38
namespace
cepgen
{
39
using
EventModifiersSequence
= std::vector<std::unique_ptr<EventModifier> >;
40
using
EventExportersSequence
= std::vector<std::unique_ptr<EventExporter> >;
41
using
TamingFunctionsSequence
= std::vector<std::unique_ptr<utils::Functional> >;
42
}
// namespace cepgen
43
44
namespace
cepgen
{
46
class
RunParameters
:
public
SteeredObject
<RunParameters> {
47
public
:
48
RunParameters
();
49
RunParameters
(
RunParameters
&);
50
RunParameters
(
const
RunParameters
&);
51
~RunParameters
()
override
;
// required for unique_ptr initialisation!
52
53
static
ParametersDescription
description
();
54
55
RunParameters
&
operator=
(
RunParameters
);
56
57
friend
std::ostream&
operator<<
(std::ostream&,
const
RunParameters
&);
58
59
void
setTimeKeeper
(
utils::TimeKeeper
*);
60
utils::TimeKeeper
*
timeKeeper
() {
return
timer_.get(); }
61
const
utils::TimeKeeper
*
timeKeeper
()
const
{
return
timer_.get(); }
62
63
void
initialiseModules
();
64
65
inline
ParametersList
&
integrator
() {
return
integrator_; }
66
inline
const
ParametersList
&
integrator
()
const
{
return
integrator_; }
67
68
//----- process to compute
69
70
inline
bool
hasProcess
()
const
{
return
!!process_; }
71
proc::Process
&
process
();
72
const
proc::Process
&
process
()
const
;
73
std::string
processName
()
const
;
74
void
clearProcess
();
75
void
setProcess
(std::unique_ptr<proc::Process>);
76
void
setProcess
(
proc::Process
*);
77
78
//----- events kinematics
79
81
const
Kinematics
&
kinematics
()
const
;
82
83
//----- events generation
84
86
class
Generation
:
public
SteeredObject
<Generation> {
87
public
:
89
explicit
Generation
(
const
ParametersList
& =
ParametersList
());
90
91
static
ParametersDescription
description
();
92
93
inline
void
setTargetLuminosity
(
double
lumi) { target_lumi_ = lumi; }
94
inline
double
targetLuminosity
()
const
{
return
target_lumi_; }
95
inline
void
setMaxGen
(
size_t
max_gen) { max_gen_ = max_gen; }
96
inline
size_t
maxGen
()
const
{
return
max_gen_; }
97
inline
bool
enabled
()
const
{
return
max_gen_ > 0; }
98
inline
void
setPrintEvery
(
size_t
every) { gen_print_every_ = every; }
99
inline
size_t
printEvery
()
const
{
return
gen_print_every_; }
100
inline
void
setSymmetrise
(
bool
sym) { symmetrise_ = sym; }
101
inline
bool
symmetrise
()
const
{
return
symmetrise_; }
102
inline
void
setNumThreads
(
size_t
nt) { num_threads_ = nt; }
103
inline
size_t
numThreads
()
const
{
return
num_threads_; }
104
inline
void
setNumPoints
(
size_t
np) { num_points_ = np; }
105
inline
size_t
numPoints
()
const
{
return
num_points_; }
106
107
private
:
108
int
max_gen_;
109
int
gen_print_every_;
110
double
target_lumi_;
111
bool
symmetrise_;
112
int
num_threads_;
113
int
num_points_;
114
};
115
inline
Generation
&
generation
() {
return
generation_; }
116
inline
const
Generation
&
generation
()
const
{
return
generation_; }
117
118
//----- event modification (e.g. hadronisation, decay) algorithm
119
120
EventModifier
&
eventModifier
(
size_t
)
const
;
122
inline
EventModifiersSequence
&
eventModifiersSequence
() {
return
evt_modifiers_; }
124
inline
const
EventModifiersSequence
&
eventModifiersSequence
()
const
{
return
evt_modifiers_; }
125
void
clearEventModifiersSequence
();
126
void
addModifier
(std::unique_ptr<EventModifier>);
127
void
addModifier
(
EventModifier
*);
128
129
//----- event output algorithms
130
131
EventExporter
&
eventExporter
(
size_t
)
const
;
133
inline
EventExportersSequence
&
eventExportersSequence
() {
return
evt_exporters_; }
135
inline
const
EventExportersSequence
&
eventExportersSequence
()
const
{
return
evt_exporters_; }
136
void
clearEventExportersSequence
();
137
void
addEventExporter
(std::unique_ptr<EventExporter>);
138
void
addEventExporter
(
EventExporter
*);
139
140
//----- taming functions
141
143
inline
const
TamingFunctionsSequence
&
tamingFunctions
()
const
{
return
taming_functions_; }
144
void
addTamingFunction
(std::unique_ptr<utils::Functional>);
145
146
//----- run operations
147
148
void
prepareRun
();
149
152
void
addGenerationTime
(
double
generation_time);
153
inline
double
totalGenerationTime
()
const
{
return
total_gen_time_; }
154
inline
unsigned
int
numGeneratedEvents
()
const
{
return
num_gen_events_; }
155
156
private
:
157
std::unique_ptr<proc::Process> process_;
158
EventModifiersSequence
evt_modifiers_;
159
EventExportersSequence
evt_exporters_;
160
TamingFunctionsSequence
taming_functions_;
161
double
total_gen_time_{0.};
162
unsigned
long
num_gen_events_{0ul};
163
ParametersList integrator_;
164
Generation generation_;
165
std::unique_ptr<utils::TimeKeeper> timer_;
166
};
167
}
// namespace cepgen
168
169
#endif
154
inline
unsigned
int
numGeneratedEvents
()
const
{
return
num_gen_events_; } {
…
}
120
EventModifier
&
eventModifier
(
size_t
)
const
; {
…
}
116
inline
const
Generation
&
generation
()
const
{
return
generation_; } {
…
}
105
inline
size_t
numPoints
()
const
{
return
num_points_; } {
…
}
104
inline
void
setNumPoints
(
size_t
np) { num_points_ = np; } {
…
}
103
inline
size_t
numThreads
()
const
{
return
num_threads_; } {
…
}
102
inline
void
setNumThreads
(
size_t
nt) { num_threads_ = nt; } {
…
}
101
inline
bool
symmetrise
()
const
{
return
symmetrise_; } {
…
}
100
inline
void
setSymmetrise
(
bool
sym) { symmetrise_ = sym; } {
…
}
99
inline
size_t
printEvery
()
const
{
return
gen_print_every_; } {
…
}
98
inline
void
setPrintEvery
(
size_t
every) { gen_print_every_ = every; } {
…
}
97
inline
bool
enabled
()
const
{
return
max_gen_ > 0; } {
…
}
96
inline
size_t
maxGen
()
const
{
return
max_gen_; } {
…
}
95
inline
void
setMaxGen
(
size_t
max_gen) { max_gen_ = max_gen; } {
…
}
94
inline
double
targetLuminosity
()
const
{
return
target_lumi_; } {
…
}
86
class
Generation
:
public
SteeredObject
<Generation> {
…
};
71
proc::Process
&
process
(); {
…
}
70
inline
bool
hasProcess
()
const
{
return
!!process_; } {
…
}
66
inline
const
ParametersList
&
integrator
()
const
{
return
integrator_; } {
…
}
63
void
initialiseModules
(); {
…
}
61
const
utils::TimeKeeper
*
timeKeeper
()
const
{
return
timer_.get(); } {
…
}
46
class
RunParameters
:
public
SteeredObject
<RunParameters> {
…
};
Kinematics.h
cepgen::EventExporter
Output format handler for events export.
Definition
EventExporter.h:30
cepgen::EventModifier
Class template to interface (external/internal) events modification algorithms.
Definition
EventModifier.h:29
cepgen::Kinematics
List of kinematic constraints to apply on the process phase space.
Definition
Kinematics.h:27
cepgen::ParametersDescription
A description object for parameters collection.
Definition
ParametersDescription.h:26
cepgen::ParametersList
Definition
ParametersList.h:52
cepgen::RunParameters::Generation
Collection of events generation parameters.
Definition
RunParameters.h:86
cepgen::RunParameters::Generation::setSymmetrise
void setSymmetrise(bool sym)
Symmetrisation of the z-axis for each event?
Definition
RunParameters.h:100
cepgen::RunParameters::Generation::numPoints
size_t numPoints() const
Number of points to "shoot" in each integration bin.
Definition
RunParameters.h:105
cepgen::RunParameters::Generation::numThreads
size_t numThreads() const
Number of threads to perform event generation.
Definition
RunParameters.h:103
cepgen::RunParameters::Generation::printEvery
size_t printEvery() const
Periodicity of event displays.
Definition
RunParameters.h:99
cepgen::RunParameters::Generation::setNumThreads
void setNumThreads(size_t nt)
Set number of threads for event generation.
Definition
RunParameters.h:102
cepgen::RunParameters::Generation::setPrintEvery
void setPrintEvery(size_t every)
Set the events display periodicity.
Definition
RunParameters.h:98
cepgen::RunParameters::Generation::symmetrise
bool symmetrise() const
Symmetrise events wrt the -axis?
Definition
RunParameters.h:101
cepgen::RunParameters::Generation::maxGen
size_t maxGen() const
Maximal number of events to generate.
Definition
RunParameters.h:96
cepgen::RunParameters::Generation::setTargetLuminosity
void setTargetLuminosity(double lumi)
Set target luminosity, in pb^-1.
Definition
RunParameters.h:93
cepgen::RunParameters::Generation::description
static ParametersDescription description()
cepgen::RunParameters::Generation::setNumPoints
void setNumPoints(size_t np)
Set number of points to probe in each integr.bin.
Definition
RunParameters.h:104
cepgen::RunParameters::Generation::setMaxGen
void setMaxGen(size_t max_gen)
Set the maximal number of events to generate.
Definition
RunParameters.h:95
cepgen::RunParameters::Generation::targetLuminosity
double targetLuminosity() const
Target luminosity to reach, in pb^-1.
Definition
RunParameters.h:94
cepgen::RunParameters::Generation::Generation
Generation(const ParametersList &=ParametersList())
Build a generation parameters collection from a user input.
cepgen::RunParameters::Generation::enabled
bool enabled() const
Are we generating events?
Definition
RunParameters.h:97
cepgen::RunParameters
List of parameters used to start and run the simulation job.
Definition
RunParameters.h:46
cepgen::RunParameters::kinematics
const Kinematics & kinematics() const
Events kinematics for phase space definition.
cepgen::RunParameters::eventModifiersSequence
const EventModifiersSequence & eventModifiersSequence() const
List of event modification algos.
Definition
RunParameters.h:124
cepgen::RunParameters::initialiseModules
void initialiseModules()
Initialise the event handling modules for an event generation.
cepgen::RunParameters::~RunParameters
~RunParameters() override
cepgen::RunParameters::process
proc::Process & process()
Process object for cross-section computation/events generation.
cepgen::RunParameters::timeKeeper
const utils::TimeKeeper * timeKeeper() const
Pointer to a timekeeper instance.
Definition
RunParameters.h:61
cepgen::RunParameters::addGenerationTime
void addGenerationTime(double generation_time)
Add a new timing into the total generation time.
cepgen::RunParameters::addEventExporter
void addEventExporter(EventExporter *)
Set the pointer to an output module.
cepgen::RunParameters::clearEventModifiersSequence
void clearEventModifiersSequence()
Remove all event modifiers from the sequence.
cepgen::RunParameters::numGeneratedEvents
unsigned int numGeneratedEvents() const
Number of events generated in run.
Definition
RunParameters.h:154
cepgen::RunParameters::eventModifier
EventModifier & eventModifier(size_t) const
Event modification algorithm List of event modification algos.
cepgen::RunParameters::addModifier
void addModifier(std::unique_ptr< EventModifier >)
Add a new event modification algorithm to the sequence.
cepgen::RunParameters::addModifier
void addModifier(EventModifier *)
Add a new event modification algorithm to the sequence.
cepgen::RunParameters::RunParameters
RunParameters(RunParameters &)
Copy constructor (transfers ownership to process/event modification algorithm)
cepgen::RunParameters::eventExporter
EventExporter & eventExporter(size_t) const
Output module List of event output modules.
cepgen::RunParameters::eventExportersSequence
EventExportersSequence & eventExportersSequence()
Definition
RunParameters.h:133
cepgen::RunParameters::operator<<
friend std::ostream & operator<<(std::ostream &, const RunParameters &)
User-readable dump of runtime parameters.
cepgen::RunParameters::timeKeeper
utils::TimeKeeper * timeKeeper()
Pointer to a timekeeper instance.
Definition
RunParameters.h:60
cepgen::RunParameters::operator=
RunParameters & operator=(RunParameters)
Assignment operator.
cepgen::RunParameters::tamingFunctions
const TamingFunctionsSequence & tamingFunctions() const
List of all taming functions definitions.
Definition
RunParameters.h:143
cepgen::RunParameters::description
static ParametersDescription description()
cepgen::RunParameters::prepareRun
void prepareRun()
Reset total generation time and number of events generated for this run, prepare kinematics.
cepgen::RunParameters::generation
const Generation & generation() const
Event generation parameters.
Definition
RunParameters.h:116
cepgen::RunParameters::clearEventExportersSequence
void clearEventExportersSequence()
Remove all output modules from sequence.
cepgen::RunParameters::setProcess
void setProcess(std::unique_ptr< proc::Process >)
Set a process configuration.
cepgen::RunParameters::processName
std::string processName() const
Name of the process considered.
cepgen::RunParameters::RunParameters
RunParameters()
cepgen::RunParameters::hasProcess
bool hasProcess() const
Are we holding any physics process?
Definition
RunParameters.h:70
cepgen::RunParameters::addTamingFunction
void addTamingFunction(std::unique_ptr< utils::Functional >)
Set a new taming function definition.
cepgen::RunParameters::eventModifiersSequence
EventModifiersSequence & eventModifiersSequence()
Definition
RunParameters.h:122
cepgen::RunParameters::clearProcess
void clearProcess()
Remove the process pointer.
cepgen::RunParameters::integrator
const ParametersList & integrator() const
Integrator specific user parameters.
Definition
RunParameters.h:66
cepgen::RunParameters::process
const proc::Process & process() const
Process object for cross-section computation/events generation.
cepgen::RunParameters::integrator
ParametersList & integrator()
Integrator specific user parameters.
Definition
RunParameters.h:65
cepgen::RunParameters::addEventExporter
void addEventExporter(std::unique_ptr< EventExporter >)
Set a new output module definition.
cepgen::RunParameters::setTimeKeeper
void setTimeKeeper(utils::TimeKeeper *)
Initialise the timekeeper instance.
cepgen::RunParameters::setProcess
void setProcess(proc::Process *)
Set a process configuration.
cepgen::RunParameters::eventExportersSequence
const EventExportersSequence & eventExportersSequence() const
List of event output modules.
Definition
RunParameters.h:135
cepgen::RunParameters::generation
Generation & generation()
Event generation parameters.
Definition
RunParameters.h:115
cepgen::RunParameters::totalGenerationTime
double totalGenerationTime() const
Total generation time in s for this run.
Definition
RunParameters.h:153
cepgen::RunParameters::RunParameters
RunParameters(const RunParameters &)
Const copy constructor (all but process + event handling algorithms)
cepgen::SteeredObject
Base user-steerable object.
Definition
SteeredObject.h:41
cepgen::proc::Process
Class template to define any process to compute using this MC integrator/events generator.
Definition
Process.h:34
cepgen::utils::Functional
A string-to-functional parser.
Definition
Functional.h:32
cepgen::utils::TimeKeeper
Collection of clocks to benchmark execution blocks.
Definition
TimeKeeper.h:34
cepgen::proc
Location for all physics processes to be generated.
Definition
GeneratorWorker.h:31
cepgen::utils
Collection of utilities.
Definition
RunParameters.h:33
cepgen
Common namespace for this Monte Carlo generator.
Definition
Handler.h:26
cepgen::EventModifiersSequence
std::vector< std::unique_ptr< EventModifier > > EventModifiersSequence
Event modification algos collection.
Definition
RunParameters.h:39
cepgen::EventExportersSequence
std::vector< std::unique_ptr< EventExporter > > EventExportersSequence
Event export modules collection.
Definition
RunParameters.h:40
cepgen::TamingFunctionsSequence
std::vector< std::unique_ptr< utils::Functional > > TamingFunctionsSequence
Function evaluators collection.
Definition
RunParameters.h:41
include
CepGen
Core
RunParameters.h
Generated on Tue Apr 22 2025 for CepGen by
1.10.0