cepgen is hosted by Hepforge, IPPP Durham
CepGen 1.2.5
Central exclusive processes event generator
Loading...
Searching...
No Matches
MadGraphProcess.cpp
Go to the documentation of this file.
1/*
2 * CepGen: a central exclusive processes event generator
3 * Copyright (C) 2020-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
22
23namespace cepgen {
25 : NamedModule(params),
26 incoming_pdgids_(steer<std::vector<int> >("incomingSystem")),
27 central_pdgids_(steer<std::vector<int> >("outgoingSystem")) {}
28
30 if (i >= mom_.size())
31 throw CG_FATAL("MadGraphProcess") << "Invalid index for momentum: " << i << "!";
32 mom_[i][0] = mom.energy();
33 mom_[i][1] = mom.px();
34 mom_[i][2] = mom.py();
35 mom_[i][3] = mom.pz();
36 return *this;
37 }
38
40 auto desc = ParametersDescription();
41 desc.setDescription("generic mg5_aMC@NLO process");
42 desc.add<std::vector<int> >("incomingSystem", {}).setDescription("list of incoming partons for the process");
43 desc.add<std::vector<int> >("outgoingSystem", {}).setDescription("list of central particles generated");
44 return desc;
45 }
46} // namespace cepgen
#define CG_FATAL(mod)
Definition Exception.h:61
Wrapper around a generic MadGraph process definition.
MadGraphProcess & setMomentum(size_t i, const Momentum &mom)
MadGraphProcess(const ParametersList &)
std::vector< double * > mom_
static ParametersDescription description()
Container for a particle's 4-momentum, along with useful methods to ease the development of any matri...
Definition Momentum.h:33
double pz() const
Longitudinal momentum (in GeV)
Definition Momentum.h:120
double px() const
Momentum along the -axis (in GeV)
Definition Momentum.h:112
double py() const
Momentum along the -axis (in GeV)
Definition Momentum.h:116
double energy() const
Energy (in GeV)
Definition Momentum.h:136
Base runtime module object.
Definition NamedModule.h:28
A description object for parameters collection.
Common namespace for this Monte Carlo generator.