cepgen is hosted by Hepforge, IPPP Durham
CepGen 1.2.5
Central exclusive processes event generator
Loading...
Searching...
No Matches
EventUtils.h
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
19#ifndef CepGenAddOns_Common_EventUtils_h
20#define CepGenAddOns_Common_EventUtils_h
21
22#include "CepGen/Event/Event.h"
23#include "CepGen/Physics/PDG.h"
24
25using namespace std;
26
27namespace cepgen {
28 namespace utils {
31 auto evt = cepgen::Event::minimal(2); // one event with two outgoing particles (leptons)
32
33 // generate positive-z incoming beam kinematics
34 auto& ib1 = evt.oneWithRole(cepgen::Particle::IncomingBeam1);
35 ib1.setPdgId(cepgen::PDG::proton);
36 ib1.setMomentum(cepgen::Momentum::fromPxPyPzE(0., 0., 6.5e3, -1.), false);
37
38 // generate negative-z incoming beam kinematics
39 auto& ib2 = evt.oneWithRole(cepgen::Particle::IncomingBeam2);
40 ib2.setPdgId(cepgen::PDG::proton);
41 ib2.setMomentum(cepgen::Momentum::fromPxPyPzE(0., 0., -6.5e3, -1.), false);
42
43 // generate positive-z outgoing beam kinematics
44 auto& ob1 = evt.oneWithRole(cepgen::Particle::OutgoingBeam1);
45 ob1.setPdgId(cepgen::PDG::proton);
46 ob1.setMomentum(cepgen::Momentum::fromPxPyPzE(-7.875321, 8.186351, 6.403512e3, 6.403704e3), true);
47
48 // generate negative-z outgoing beam kinematics
49 auto& ob2 = evt.oneWithRole(cepgen::Particle::OutgoingBeam2);
50 ob2.setPdgId(cepgen::PDG::proton);
51 ob2.setMomentum(cepgen::Momentum::fromPxPyPzE(-2.725610e-2, 7.565269e-3, -6.425336e3, 6.425336e3), false);
52
53 // generate positive-z incoming photon kinematics
54 auto& parton1 = evt.oneWithRole(cepgen::Particle::Parton1);
55 parton1.setPdgId(cepgen::PDG::photon);
56 parton1.setMomentum(cepgen::Momentum::fromPxPyPzE(7.875321, -8.186351, 9.648800e1, 9.629600e1), true);
57
58 // generate negative-z incoming photon kinematics
59 auto& parton2 = evt.oneWithRole(cepgen::Particle::Parton2);
60 parton2.setPdgId(cepgen::PDG::photon);
61 parton2.setMomentum(cepgen::Momentum::fromPxPyPzE(2.725610e-2, -7.565269e-3, -7.466409e1, 7.466409e1), true);
62 evt.oneWithRole(cepgen::Particle::Intermediate).setMomentum(parton1.momentum() + parton2.momentum(), true);
63
64 // generate dilepton system kinematics
66 oc[0].get().setPdgId(cepgen::PDG::muon, -1);
67 oc[0].get().setMomentum(cepgen::Momentum::fromPxPyPzE(2.193109e1, -6.725967e1, -4.248568e1, 8.252200e1), false);
68 oc[1].get().setPdgId(cepgen::PDG::muon, +1);
69 oc[1].get().setMomentum(cepgen::Momentum::fromPxPyPzE(-1.402852e1, 5.906575e1, 6.430959e1, 8.843809e1), false);
70 return evt;
71 }
72 } // namespace utils
73} // namespace cepgen
74
75#endif
Container for the information on the in- and outgoing particles' kinematics.
Definition Event.h:28
static Event minimal(size_t num_out_particles=1)
Build a trivial event with the minimal information.
Definition Event.cpp:52
static Momentum fromPxPyPzE(double px, double py, double pz, double e)
Build a 4-momentum from its four momentum and energy coordinates.
Definition Momentum.cpp:82
@ photon
Definition PDG.h:41
@ muon
Definition PDG.h:38
@ proton
Definition PDG.h:50
@ IncomingBeam2
incoming beam particle
Definition Particle.h:53
@ Parton2
beam incoming parton
Definition Particle.h:59
@ OutgoingBeam1
outgoing beam state/particle
Definition Particle.h:54
@ IncomingBeam1
incoming beam particle
Definition Particle.h:52
@ OutgoingBeam2
outgoing beam state/particle
Definition Particle.h:55
@ Parton1
beam incoming parton
Definition Particle.h:58
@ CentralSystem
Central particles system.
Definition Particle.h:56
@ Intermediate
Intermediate two-parton system.
Definition Particle.h:57
Event generateLPAIREvent()
Generate a standard single-dissociative LPAIR event.
Definition EventUtils.h:30
Common namespace for this Monte Carlo generator.