Belle II Software development
simraw.py
1#!/usr/bin/env python3
2
3
10
11import basf2 as b2
12from simulation import add_simulation
13from rawdata import add_packers, add_raw_output, add_raw_seqoutput
14
15# create path
16main = b2.create_path()
17
18# specify number of events to be generated
19main.add_module('EventInfoSetter', evtNumList=[10])
20
21# generate BBbar events
22main.add_module('EvtGenInput')
23
24# detector simulation
25add_simulation(main)
26
27# pack raw data
28add_packers(main)
29
30# raw data output
31add_raw_output(main, 'raw.root')
32
33# sroot raw data output
34add_raw_seqoutput(main, 'raw.sroot')
35
36# sroot raw data output with computing group preferred naming
37add_raw_seqoutput(main, "raw.f%05d.sroot", fileNameIsPattern=True)
38
39# process events and print call statistics
40b2.process(main)
41print(b2.statistics)