Belle II Software  release-08-01-10
ContinuumGenOnly.py
1 #!/usr/bin/env python3
2 # -*- coding: utf-8 -*-
3 
4 
11 
12 import basf2
13 from generators import add_continuum_generator
14 
15 # suppress messages and warnings during processing
16 basf2.set_log_level(basf2.LogLevel.INFO)
17 
18 main = basf2.create_path()
19 
20 # event info setter
21 main.add_module("EventInfoSetter", expList=0, runList=1, evtNumList=100)
22 
23 # run
24 main.add_module("Progress")
25 
26 # use default continuum production
27 add_continuum_generator(main, finalstate='ccbar')
28 
29 # add full root output
30 main.add_module("RootOutput", outputFileName="continuum.root")
31 
32 # print MC particles (for debugging)
33 main.add_module("PrintMCParticles", logLevel=basf2.LogLevel.DEBUG, onlyPrimaries=False)
34 
35 # generate events
36 basf2.process(main)
37 
38 # show call statistics
39 print(basf2.statistics)