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>
9int main(int /*argc*/, char** /*argv*/)
10{
11 FILE* F=fopen("testTauola1.input","w");
12 fprintf(F,"\
13#\n\
14# Process: ee -> Z -> tau+ tau- @ 92GeV\n\
15#\n\
16\n\
17WeakSingleBoson:ffbar2gmZ = on\n\
18\n\
19Beams:idA = 11\n\
20Beams:idB = -11\n\
21Beams:eCM = 92.\n\
22\n\
23# Simplify event as much as possible\n\
24HadronLevel:all = off\n\
25HadronLevel:Hadronize = off\n\
26SpaceShower:QEDshowerByL = off\n\
27SpaceShower:QEDshowerByQ = off\n\
28PartonLevel:ISR = off\n\
29PartonLevel:FSR = off\n\
30\n\
31# Set Z properties\n\
3223:onMode = off\n\
3323:onIfAny = 15\n\
34\n\
35# Leave tau undecayed (tau decays are very slow in Tauola1 8.185)\n\
3615:mayDecay = off\n\
37-15:mayDecay = off\n\
38\n");
39 fclose(F);
40 FILE* Fconfig=fopen("testTauola1.config","w");
41 fprintf(Fconfig,"\
42INPUT pythia8 testTauola1.input\n\
43TOOL tauola \n\
44EVENTS 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 int counter=0;
53 while( control.new_event() )
54 {
55 GenEvent HepMCEvt(Units::GEV,Units::MM);
56 control.process(HepMCEvt);
57 counter++;
58 }
59 control.finalize();
60 return 1*(counter-1000);
61}
Stores event-related information.
Definition: GenEvent.h:41
Runs multiple validation tools.
bool new_event()
New event.
void initialize()
Init function.
void set_event_limit(int events)
Set event limit.
void process(GenEvent &hepmc)
Process event.
void finalize()
Finalize.
void read_file(const std::string &filename)
Read file.