Belle II Software  release-05-01-25
KKGenGenerationOnly_tauola_bbb.py
1 #!/usr/bin/env python3
2 # -*- coding: utf-8 -*-
3 
4 
9 
10 from basf2 import *
11 from ROOT import Belle2
12 from beamparameters import add_beamparameters
13 
14 set_random_seed(12345)
15 set_log_level(LogLevel.INFO)
16 
17 # main path
18 main = create_path()
19 
20 # event info setter
21 main.add_module("EventInfoSetter", expList=0, runList=1, evtNumList=1000000)
22 
23 # beam parameters
24 beamparameters = add_beamparameters(main, "Y4S")
25 # beamparameters.param("generateCMS", True)
26 # beamparameters.param("smearVertex", False)
27 
28 # to run the framework the used modules need to be registered
29 kkgeninput = register_module('KKGenInput')
30 kkgeninput.param('tauinputFile', Belle2.FileSystem.findFile('data/generators/kkmc/tauola_bbb.input.dat'))
31 kkgeninput.param('KKdefaultFile', Belle2.FileSystem.findFile('data/generators/kkmc/KK2f_defaults.dat'))
32 # kkgeninput.param('taudecaytableFile', Belle2.FileSystem.findFile('data/generators/kkmc/tau_decaytable.dat'))
33 # above line makes decay table to be read by Pythia; uncomment next line to make tau decay table to be read by Tauola
34 kkgeninput.param('taudecaytableFile', '')
35 kkgeninput.param('kkmcoutputfilename', 'kkmc_tautau_bbb.txt')
36 
37 # run
38 main.add_module("Progress")
39 main.add_module(kkgeninput)
40 main.add_module("RootOutput", outputFileName="kkmc_tautau_bbb.root")
41 main.add_module("HepMCOutput", OutputFilename='kkmc_tautau_bbb.hepmc', StoreVirtualParticles=True)
42 # main.add_module("PrintTauTauMCParticles", logLevel=LogLevel.INFO, onlyPrimaries=False)
43 # main.add_module("PrintMCParticles", logLevel=LogLevel.INFO, onlyPrimaries=False)
44 
45 # generate events
46 process(main)
47 
48 # show call statistics
49 print(statistics)
Belle2::FileSystem::findFile
static std::string findFile(const std::string &path, bool silent=false)
Search for given file or directory in local or central release directory, and return absolute path if...
Definition: FileSystem.cc:147