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
22
23namespace cepgen {
25
28 CG_DEBUG("Kinematics") << "Building a Kinematics parameters container "
29 << "with the following parameters:\n\t" << params_ << ".";
30
31 incoming_beams_.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
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; });
49 }
50
52 auto desc = ParametersDescription();
54 desc += CutsList::description();
55 desc.add<std::string>("kmrGridPath", "").setDescription("path to the KMR interpolation grid");
56 return desc;
57 }
58} // namespace cepgen
#define CG_DEBUG(mod)
Definition Message.h:220
void setParameters(const ParametersList &) override
Set module parameters.
static ParametersDescription description()
const ParametersList & parameters() const override
List containing all parameters handled.
void setParameters(const ParametersList &) override
Set module parameters.
Kinematics(const ParametersList &)
static ParametersDescription description()
const ParametersList & parameters() const override
List containing all parameters handled.
A description object for parameters collection.
bool has(const std::string &key) const
Check if a given parameter is handled in this list.
ParametersList & set(const std::string &, const T &)
Set a parameter value Set a recast parameter value.
ParametersList params_
Module parameters.
Definition Steerable.h:50
std::string steerPath(const std::string &key) const
Retrieve a path from common search paths.
Definition Steerable.cpp:30
Base user-steerable object.
virtual void setParameters(const ParametersList &params) override
Set module parameters.
const ParametersList & parameters() const override
Module user-defined parameters.
static GluonGrid & get(const cepgen::ParametersList &params={})
Retrieve the grid interpolator (singleton)
Definition GluonGrid.cpp:27
Common namespace for this Monte Carlo generator.
unsigned long long pdgid_t
Alias for the integer-like particle PDG id.
void setParameters(const ParametersList &) override
Set module parameters.
Definition Cuts.cpp:187
static ParametersDescription description()
Definition Cuts.cpp:224