cepgen
is hosted by
Hepforge
,
IPPP Durham
CepGen
1.2.5
Central exclusive processes event generator
Loading...
Searching...
No Matches
Kinematics.cpp
Go to the documentation of this file.
1
/*
2
* CepGen: a central exclusive processes event generator
3
* Copyright (C) 2013-2022 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
#include "
CepGen/Physics/GluonGrid.h
"
20
#include "
CepGen/Physics/Kinematics.h
"
21
#include "
CepGen/Utils/Message.h
"
22
23
namespace
cepgen
{
24
Kinematics::Kinematics
(
const
ParametersList
& params) :
SteeredObject
(params) {}
25
26
void
Kinematics::setParameters
(
const
ParametersList
& params) {
27
SteeredObject::setParameters
(params);
28
CG_DEBUG
(
"Kinematics"
) <<
"Building a Kinematics parameters container "
29
<<
"with the following parameters:\n\t"
<<
params_
<<
"."
;
30
31
incoming_beams_.
setParameters
(
params_
);
32
cuts_.
setParameters
(
params_
);
33
if
(
params_
.
has
<std::vector<int> >(
"minFinalState"
))
// outgoing particles definition
34
for
(
const
auto
&
pdg
: steer<std::vector<int> >(
"minFinalState"
))
35
minimum_final_state_.emplace_back((
pdgid_t
)
pdg
);
36
37
if
(
const
auto
kmr_grid_path =
steerPath
(
"kmrGridPath"
); !kmr_grid_path.empty())
// grid path for gluon emission
38
kmr::GluonGrid::get
(
ParametersList
(
params_
).
set
<std::string>(
"path"
, kmr_grid_path));
39
}
40
41
const
ParametersList
&
Kinematics::parameters
()
const
{
42
params_
+= incoming_beams_.
parameters
() + cuts_.
parameters
();
43
// minimum final state content
44
std::transform(minimum_final_state_.begin(),
45
minimum_final_state_.end(),
46
std::back_inserter(
params_
.operator[]<std::vector<int> >(
"minFinalState"
)),
47
[](
const
auto
&
pdg
) { return (int)pdg; });
48
return
SteeredObject::parameters
();
49
}
50
51
ParametersDescription
Kinematics::description
() {
52
auto
desc =
ParametersDescription
();
53
desc +=
IncomingBeams::description
();
54
desc +=
CutsList::description
();
55
desc.add<std::string>(
"kmrGridPath"
,
""
).setDescription(
"path to the KMR interpolation grid"
);
56
return
desc;
57
}
58
}
// namespace cepgen
GluonGrid.h
Kinematics.h
Message.h
CG_DEBUG
#define CG_DEBUG(mod)
Definition
Message.h:220
cepgen::IncomingBeams::setParameters
void setParameters(const ParametersList &) override
Set module parameters.
Definition
IncomingBeams.cpp:38
cepgen::IncomingBeams::description
static ParametersDescription description()
Definition
IncomingBeams.cpp:258
cepgen::IncomingBeams::parameters
const ParametersList & parameters() const override
List containing all parameters handled.
Definition
IncomingBeams.cpp:240
cepgen::Kinematics::setParameters
void setParameters(const ParametersList &) override
Set module parameters.
Definition
Kinematics.cpp:26
cepgen::Kinematics::Kinematics
Kinematics(const ParametersList &)
Definition
Kinematics.cpp:24
cepgen::Kinematics::description
static ParametersDescription description()
Definition
Kinematics.cpp:51
cepgen::Kinematics::parameters
const ParametersList & parameters() const override
List containing all parameters handled.
Definition
Kinematics.cpp:41
cepgen::ParametersDescription
A description object for parameters collection.
Definition
ParametersDescription.h:26
cepgen::ParametersList
Definition
ParametersList.h:52
cepgen::ParametersList::has
bool has(const std::string &key) const
Check if a given parameter is handled in this list.
Definition
ParametersList.cpp:386
cepgen::ParametersList::set
ParametersList & set(const std::string &, const T &)
Set a parameter value Set a recast parameter value.
Definition
ParametersList.cpp:401
cepgen::Steerable::params_
ParametersList params_
Module parameters.
Definition
Steerable.h:50
cepgen::Steerable::steerPath
std::string steerPath(const std::string &key) const
Retrieve a path from common search paths.
Definition
Steerable.cpp:30
cepgen::SteeredObject
Base user-steerable object.
Definition
SteeredObject.h:41
cepgen::SteeredObject::setParameters
virtual void setParameters(const ParametersList ¶ms) override
Set module parameters.
Definition
SteeredObject.h:62
cepgen::SteeredObject::parameters
const ParametersList & parameters() const override
Module user-defined parameters.
Definition
SteeredObject.h:54
kmr::GluonGrid::get
static GluonGrid & get(const cepgen::ParametersList ¶ms={})
Retrieve the grid interpolator (singleton)
Definition
GluonGrid.cpp:27
cepgen
Common namespace for this Monte Carlo generator.
Definition
CommandLineHandler.cpp:36
cepgen::pdgid_t
unsigned long long pdgid_t
Alias for the integer-like particle PDG id.
Definition
ParticleProperties.h:26
pdg
Definition
MCDFileParser.cpp:28
cepgen::CutsList::setParameters
void setParameters(const ParametersList &) override
Set module parameters.
Definition
Cuts.cpp:187
cepgen::CutsList::description
static ParametersDescription description()
Definition
Cuts.cpp:224
CepGen
Physics
Kinematics.cpp
Generated on Mon Jul 29 2024 for CepGen by
1.9.7