HepMC3 event record library
testTauola1.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* F=fopen("testTauola1.config","w");
12  fprintf(F,"\
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 Tauola1 8.185)\n\
36 15:mayDecay = off\n\
37 -15:mayDecay = off\n\
38 \n");
39  fclose(F);
40  FILE* Fconfig=fopen("testTauola1.config","w");
41  fprintf(Fconfig,"\
42 INPUT pythia8 testTauola1.input\n\
43 TOOL tauola \n\
44 EVENTS 1000\n\
45 \n");
46  fclose(Fconfig);
47 
48  ValidationControl control;
49  control.read_file("testTauola1.config");
50  control.set_event_limit(1000);
51  control.initialize();
52  while( control.new_event() )
53  {
54  GenEvent HepMCEvt(Units::GEV,Units::MM);
55  control.process(HepMCEvt);
56  }
57  control.finalize();
58  return 0;
59 }
void set_event_limit(int events)
Set event limit.
void read_file(const std::string &filename)
Read file.
void initialize()
Init function.
Stores event-related information.
Definition: GenEvent.h:41
void finalize()
Finalize.
int main(int argc, char **argv)
bool new_event()
New event.
Runs multiple validation tools.
void process(GenEvent &hepmc)
Process event.