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