Belle II Software  release-05-01-25
test0_BtoDh_hh.py
1 #!/usr/bin/env python3
2 # -*- coding: utf-8 -*-
3 # Descriptor: [B+ -> K+ (anti-D0 -> K+ pi-)]cc
4 
5 """
6 <header>
7  <output>../BtoDh_hh.dst.root</output>
8  <contact>niharikarout@physics.iitm.ac.in</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 from ROOT import Belle2
16 
17 b2.set_random_seed(12345)
18 
19 
20 # create path
21 main = b2.create_path()
22 
23 # specify number of events to be generated
24 eventinfosetter = b2.register_module('EventInfoSetter')
25 eventinfosetter.param('evtNumList', [1000])
26 eventinfosetter.param('runList', [0])
27 eventinfosetter.param('expList', [0])
28 main.add_module(eventinfosetter)
29 
30 # generate BBbar events
31 evtgeninput = b2.register_module('EvtGenInput')
32 evtgeninput.param('userDECFile', Belle2.FileSystem.findFile('/decfiles/dec/1213030001.dec'))
33 main.add_module(evtgeninput)
34 
35 # detector simulation
36 add_simulation(main)
37 
38 # reconstruction
39 add_reconstruction(main)
40 
41 
42 # Finally add mdst output
43 output_filename = "../BtoDh_hh.dst.root"
44 add_mdst_output(main, filename=output_filename)
45 
46 # process events and print call statistics
47 b2.process(main)
48 print(b2.statistics)
Belle2::FileSystem::findFile
static std::string findFile(const std::string &path, bool silent=false)
Search for given file or directory in local or central release directory, and return absolute path if...
Definition: FileSystem.cc:147