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
19
#include "
CepGen/Core/RunParameters.h
"
20
#include "
CepGen/Event/Event.h
"
21
#include "
CepGen/EventFilter/EventModifier.h
"
22
#include "
CepGen/Generator.h
"
23
#include "
CepGen/Modules/EventModifierFactory.h
"
24
#include "
CepGen/Physics/PDG.h
"
25
#include "
CepGen/Utils/ArgumentsParser.h
"
26
#include "
CepGen/Utils/Test.h
"
27
28
int
main
(
int
argc,
char
* argv[]) {
29
cepgen::ArgumentsParser
(argc, argv).
parse
();
30
cepgen::initialise
();
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
39
cepgen::Event
ev;
40
cepgen::Particle
pho(
cepgen::Particle::Role::CentralSystem
,
cepgen::PDG::photon
,
cepgen::Particle::Status::Resonance
);
41
ev.
addParticle
(pho);
42
cepgen::Particle
tau1(
cepgen::Particle::Role::CentralSystem
,
cepgen::PDG::tau
,
cepgen::Particle::Status::FinalState
);
43
tau1.
setMomentum
(0., 0., 100.);
44
tau1.setChargeSign(-1);
45
tau1.
addMother
(pho);
46
ev.
addParticle
(tau1);
47
cepgen::Particle
tau2(
cepgen::Particle::Role::CentralSystem
,
cepgen::PDG::tau
,
cepgen::Particle::Status::FinalState
);
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
57
CG_TEST_SUMMARY
;
58
}
ArgumentsParser.h
EventModifierFactory.h
EventModifier.h
Event.h
Generator.h
CG_LOG
#define CG_LOG
Definition
Message.h:212
PDG.h
RunParameters.h
Test.h
CG_TEST_SUMMARY
#define CG_TEST_SUMMARY
Definition
Test.h:127
cepgen::ArgumentsParser
A generic command line arguments parser.
Definition
ArgumentsParser.h:31
cepgen::ArgumentsParser::parse
ArgumentsParser & parse()
Associate command-line arguments to parameters.
Definition
ArgumentsParser.cpp:106
cepgen::Event
Container for the information on the in- and outgoing particles' kinematics.
Definition
Event.h:28
cepgen::Event::addParticle
ParticleRef addParticle(Particle &part, bool replace=false)
Set the information on one particle in the process.
Definition
Event.cpp:323
cepgen::PDG::tau
@ tau
Definition
PDG.h:39
cepgen::PDG::photon
@ photon
Definition
PDG.h:41
cepgen::Particle
Kinematic information for one particle.
Definition
Particle.h:33
cepgen::Particle::setMomentum
Particle & setMomentum(const Momentum &, bool offshell=false)
Associate a momentum object to this particle.
Definition
Particle.cpp:77
cepgen::Particle::addMother
Particle & addMother(Particle &part)
Set the mother particle.
Definition
Particle.cpp:47
cepgen::Particle::Status::FinalState
@ FinalState
Stable, final state particle.
cepgen::Particle::Status::Resonance
@ Resonance
Already decayed intermediate resonance.
cepgen::Particle::CentralSystem
@ CentralSystem
Central particles system.
Definition
Particle.h:56
cepgen::RunParameters
List of parameters used to start and run the simulation job.
Definition
RunParameters.h:41
cepgen::initialise
void initialise(bool safe_mode)
Definition
GlobalFunctions.cpp:91
main
int main()
Definition
pythia6_decay.cc:9
CepGenAddOns
PhotosTauolaWrapper
test
simple_tau_decay.cc
Generated on Mon Jul 29 2024 for CepGen by
1.9.7