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