Belle II Software  release-05-01-25
test0_GenericB_GENSIMRECtoDST.py
1 #!/usr/bin/env python3
2 # -*- coding: utf-8 -*-
3 
4 """
5 <header>
6  <output>../GenericB_GENSIMRECtoDST.dst.root</output>
7  <contact>Luis Pesantez; pesantez@uni-bonn.de</contact>
8 </header>
9 """
10 
11 import basf2
12 from simulation import add_simulation
13 from reconstruction import add_reconstruction
14 from beamparameters import add_beamparameters
15 
16 basf2.set_random_seed(12345)
17 
18 main = basf2.create_path()
19 
20 # specify number of events to be generated
21 eventinfosetter = basf2.register_module('EventInfoSetter')
22 eventinfosetter.param('evtNumList', [1000])
23 eventinfosetter.param('runList', [0])
24 eventinfosetter.param('expList', [0])
25 main.add_module(eventinfosetter)
26 
27 # set the BeamParameters for running at Y(4S)
28 beamparameters = add_beamparameters(main, "Y4S")
29 basf2.print_params(beamparameters)
30 
31 # generate BBbar events
32 evtgeninput = basf2.register_module('EvtGenInput')
33 main.add_module(evtgeninput)
34 
35 # detector simulation, digitisers and clusterisers
36 add_simulation(main)
37 
38 # reconstruction
39 add_reconstruction(main)
40 
41 # dst output
42 output = basf2.register_module('RootOutput')
43 output.param('outputFileName', '../GenericB_GENSIMRECtoDST.dst.root')
44 main.add_module(output)
45 
46 # Go!
47 basf2.process(main)
48 
49 # Print call statistics
50 print(basf2.statistics)
basf2.process
def process(path, max_event=0)
Definition: __init__.py:25