Belle II Software  release-05-01-25
test0_BtoXgamma.py
1 #!/usr/bin/env python3
2 # -*- coding: utf-8 -*-
3 # Descriptor: BtoXgamma validation generation
4 
5 """
6 <header>
7  <output>../BtoXgamma.dst.root</output>
8  <contact>simon.wehle@desy.de</contact>
9 </header>
10 """
11 __author__ = "Simon Wehle"
12 
13 
14 import basf2 as b2
15 from simulation import add_simulation
16 from reconstruction import add_reconstruction, add_mdst_output
17 from ROOT import Belle2
18 
19 b2.set_random_seed(666)
20 
21 
22 # create path
23 main = b2.create_path()
24 
25 # specify number of events to be generated
26 eventinfosetter = b2.register_module('EventInfoSetter')
27 eventinfosetter.param('evtNumList', [1000])
28 eventinfosetter.param('runList', [0])
29 eventinfosetter.param('expList', [0])
30 main.add_module(eventinfosetter)
31 
32 # generate BBbar events
33 evtgeninput = b2.register_module('EvtGenInput')
34 evtgeninput.param('userDECFile', Belle2.FileSystem.findFile('/decfiles/dec/1290001004.dec'))
35 main.add_module(evtgeninput)
36 
37 # detector simulation
38 add_simulation(main)
39 
40 # reconstruction
41 add_reconstruction(main)
42 
43 
44 # Finally add mdst output
45 output_filename = "../BtoXgamma.dst.root"
46 add_mdst_output(main, filename=output_filename)
47 
48 prog = b2.register_module('ProgressBar')
49 main.add_module(prog)
50 
51 # process events and print call statistics
52 # print(main)
53 b2.process(main)
54 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