cepgen is hosted by Hepforge, IPPP Durham
CepGen 1.2.5
Central exclusive processes event generator
Loading...
Searching...
No Matches
simple_tau_decay.cc
Go to the documentation of this file.
1/*
2 * CepGen: a central exclusive processes event generator
3 * Copyright (C) 2022-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
20#include "CepGen/Event/Event.h"
22#include "CepGen/Generator.h"
24#include "CepGen/Physics/PDG.h"
26#include "CepGen/Utils/Test.h"
27
28int main(int argc, char* argv[]) {
29 cepgen::ArgumentsParser(argc, argv).parse();
31
32 auto tauola = cepgen::EventModifierFactory::get().build("tauola");
33 if (!tauola) {
34 CG_LOG << "Failed to retrieve the Tauola interface!";
35 return -1;
36 }
37 tauola->initialise(cepgen::RunParameters());
38
41 ev.addParticle(pho);
43 tau1.setMomentum(0., 0., 100.);
44 tau1.setChargeSign(-1);
45 tau1.addMother(pho);
46 ev.addParticle(tau1);
48 tau2.setMomentum(0., 0., -100.);
49 tau2.setChargeSign(+1);
50 tau2.addMother(pho);
51 ev.addParticle(tau2);
52 CG_LOG << ev;
53
54 double weight = 1.;
55 tauola->run(ev, weight);
56
58}
#define CG_LOG
Definition Message.h:212
#define CG_TEST_SUMMARY
Definition Test.h:127
A generic command line arguments parser.
ArgumentsParser & parse()
Associate command-line arguments to parameters.
Container for the information on the in- and outgoing particles' kinematics.
Definition Event.h:28
ParticleRef addParticle(Particle &part, bool replace=false)
Set the information on one particle in the process.
Definition Event.cpp:323
@ tau
Definition PDG.h:39
@ photon
Definition PDG.h:41
Kinematic information for one particle.
Definition Particle.h:33
Particle & setMomentum(const Momentum &, bool offshell=false)
Associate a momentum object to this particle.
Definition Particle.cpp:77
Particle & addMother(Particle &part)
Set the mother particle.
Definition Particle.cpp:47
@ FinalState
Stable, final state particle.
@ Resonance
Already decayed intermediate resonance.
@ CentralSystem
Central particles system.
Definition Particle.h:56
List of parameters used to start and run the simulation job.
void initialise(bool safe_mode)
int main()