Belle II Software  release-05-01-25
test0_feiHadronicB0.py
1 #!/usr/bin/env python3
2 # -*- coding: utf-8 -*-
3 # Descriptor: [B0 -> D(*) pi]cc
4 
5 """
6 <header>
7  <output>../feiHadronicB0.dst.root</output>
8  <contact>philip.grace@adelaide.edu.au</contact>
9 </header>
10 """
11 
12 import basf2 as b2
13 from simulation import add_simulation
14 from reconstruction import add_reconstruction, add_mdst_output
15 
16 b2.set_random_seed(12345)
17 
18 
19 # create path
20 main = b2.create_path()
21 
22 # specify number of events to be generated
23 eventinfosetter = b2.register_module('EventInfoSetter')
24 eventinfosetter.param('evtNumList', [1000])
25 eventinfosetter.param('runList', [0])
26 eventinfosetter.param('expList', [0])
27 main.add_module(eventinfosetter)
28 
29 # generate BBbar events
30 evtgeninput = b2.register_module('EvtGenInput')
31 evtgeninput.param('userDECFile', b2.find_file('/skim/validation/feiHadronicB0.dec'))
32 main.add_module(evtgeninput)
33 
34 # detector simulation
35 add_simulation(main)
36 
37 # reconstruction
38 add_reconstruction(main)
39 
40 
41 # Finally add mdst output
42 output_filename = "../feiHadronicB0.dst.root"
43 add_mdst_output(main, filename=output_filename)
44 
45 # process events and print call statistics
46 b2.process(main)
47 print(b2.statistics)