HepMC3 event record library
test
testPythia2.cc
1
// -*- C++ -*-
2
//
3
// This file is part of HepMC
4
// Copyright (C) 2014-2019 The HepMC collaboration (see AUTHORS for details)
5
//
6
#include "ValidationControl.h"
7
#include <iostream>
8
#include <stdio.h>
9
int
main
(
int
argc,
char
**argv)
10
{
11
FILE* Finput=fopen(
"testPythia2.input"
,
"w"
);
12
fprintf(Finput,
"\
13
#\n\
14
# Process: ee -> Z -> tau+ tau- @ 92GeV\n\
15
#\n\
16
\n\
17
WeakSingleBoson:ffbar2gmZ = on\n\
18
\n\
19
Beams:idA = 11\n\
20
Beams:idB = -11\n\
21
Beams:eCM = 92.\n\
22
\n\
23
# Simplify event as much as possible\n\
24
HadronLevel:all = off\n\
25
HadronLevel:Hadronize = off\n\
26
SpaceShower:QEDshowerByL = off\n\
27
SpaceShower:QEDshowerByQ = off\n\
28
PartonLevel:ISR = off\n\
29
PartonLevel:FSR = off\n\
30
\n\
31
# Set Z properties\n\
32
23:onMode = off\n\
33
23:onIfAny = 15\n\
34
\n\
35
# Leave tau undecayed (tau decays are very slow in Pythia 8.185)\n\
36
15:mayDecay = off\n\
37
-15:mayDecay = off\n\
38
\n"
);
39
fclose(Finput);
40
41
FILE* Fconfig=fopen(
"testPythia2.config"
,
"w"
);
42
fprintf(Fconfig,
"\
43
INPUT pythia8 testPythia2.input\n\
44
TOOL photos \n\
45
OUTPUT ascii testPythia2.hepmc\n\
46
\n"
);
47
fclose(Fconfig);
48
49
ValidationControl
control;
50
control.
read_file
(
"testPythia2.config"
);
51
control.
set_event_limit
(1000);
52
control.
initialize
();
53
while
( control.
new_event
() )
54
{
55
GenEvent
HepMCEvt(Units::GEV,Units::MM);
56
control.
process
(HepMCEvt);
57
}
58
control.
finalize
();
59
return
0;
60
}
ValidationControl::set_event_limit
void set_event_limit(int events)
Set event limit.
Definition:
ValidationControl.h:57
HepMC3::GenEvent
Stores event-related information.
Definition:
GenEvent.h:42
ValidationControl
Runs multiple validation tools.
Definition:
ValidationControl.h:23
ValidationControl::read_file
void read_file(const std::string &filename)
Read file.
Definition:
ValidationControl.cc:47
ValidationControl::initialize
void initialize()
Init function.
Definition:
ValidationControl.cc:242
ValidationControl::finalize
void finalize()
Finalize.
Definition:
ValidationControl.cc:315
ValidationControl::new_event
bool new_event()
New event.
Definition:
ValidationControl.cc:200
ValidationControl::process
void process(GenEvent &hepmc)
Process event.
Definition:
ValidationControl.cc:248
main
int main(int argc, char **argv)
Definition:
rootIOTree_example_read.cc:23
Generated on Tue Mar 24 2020 14:04:50 for HepMC3 event record library by
1.8.17