Belle II Software  release-08-01-10
TREPSGenerationOnlypipi_discrete.py
1 #!/usr/bin/env python3
2 # -*- coding: utf-8 -*-
3 
4 
11 
12 import basf2
13 from basf2 import set_log_level, LogLevel, process, statistics
14 from beamparameters import add_beamparameters
15 from generators import add_treps_generator
16 
17 set_log_level(LogLevel.DEBUG)
18 
19 # main path
20 main = basf2.create_path()
21 
22 # event info setter
23 main.add_module("EventInfoSetter", expList=0, runList=1, evtNumList=99966)
24 main.add_module("Progress")
25 
26 # beam parameters
27 beamparameters = add_beamparameters(main, "Y4S")
28 
29 # add TREPS generator
30 add_treps_generator(main, "e+e-pi+pi-", useDiscreteAndSortedW=True)
31 
32 main.add_module("RootOutput", outputFileName="utrepsbpipi_100k_dicrete.root")
33 main.add_module("PrintMCParticles", logLevel=basf2.LogLevel.INFO, onlyPrimaries=False)
34 
35 # generate events
36 process(main)
37 
38 # show call statistics
39 print(statistics)