cepgen is hosted by Hepforge, IPPP Durham
CepGen 1.2.5
Central exclusive processes event generator
Loading...
Searching...
No Matches
DummyProcess2to4.cpp
Go to the documentation of this file.
1/*
2 * CepGen: a central exclusive processes event generator
3 * Copyright (C) 2023 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
20#include "CepGen/Event/Event.h"
22#include "CepGen/Physics/PDG.h"
23#include "CepGen/Process/Process2to4.h"
24
25using namespace cepgen;
26
28class DummyProcess2to4 final : public cepgen::proc::Process2to4 {
29public:
31 : Process2to4(params, params.get<ParticleProperties>("pair").pdgid), value_(steer<double>("value")) {}
32
34 auto desc = cepgen::proc::Process2to4::description();
35 desc.setDescription("Dummy 2-to-4 process");
36 desc.add<double>("value", 1.);
37 return desc;
38 }
39
40private:
41 void prepareProcessKinematics() override {
42 // this method allows you to prepare the matrix element computation with the kinematics information
43 // retrieved from the `kin_` member inherited from the cepgen::proc::Process base object.
44 const auto& cs_prop = PDG::get()(produced_parts_.at(0));
45 CG_DEBUG("DummyProcess2to4:prepare") << "Produced particles: " << cs_prop.descr << " ("
46 << "mass = " << cs_prop.mass << " GeV.";
47 }
48 double computeCentralMatrixElement() const override { return value_; }
49
50 const double value_;
51};
52
53// register process
#define CG_DEBUG(mod)
Definition Message.h:220
#define REGISTER_PROCESS(name, obj)
Add a generic process definition to the list of handled processes.
Compute a dummy 2-to-4 matrix element.
static ParametersDescription description()
DummyProcess2to4(const cepgen::ParametersList &params)
A description object for parameters collection.
Common namespace for this Monte Carlo generator.
A collection of physics constants associated to a single particle.