Belle II Software  release-05-01-25
test0_CharmoniumPsi.py
1 #!/usr/bin/env python3
2 # -*- coding: utf-8 -*-
3 # Descriptor: [J/psi psi(2S)]
4 
5 """
6 <header>
7  <output>../CharmoniumPsi.dst.root</output>
8  <contact>jiasen@buaa.edu.cn</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 import glob
17 
18 b2.set_random_seed(12345)
19 
20 # background (collision) files
21 bg = glob.glob('./BG/[A-Z]*.root')
22 
23 # create a new path
24 path = b2.Path()
25 
26 # specify number of events to be generated
27 eventinfosetter = b2.register_module('EventInfoSetter')
28 eventinfosetter.param('evtNumList', [500])
29 eventinfosetter.param('runList', [1])
30 eventinfosetter.param('expList', [0])
31 path.add_module(eventinfosetter)
32 
33 # generate BBbar events
34 evtgeninput = b2.register_module('EvtGenInput')
35 evtgeninput.param('userDECFile', Belle2.FileSystem.findFile('decfiles/dec/1211530000.dec'))
36 path.add_module(evtgeninput)
37 
38 # detector simulation
39 add_simulation(path)
40 
41 # reconstruction
42 add_reconstruction(path)
43 
44 # Finally add mdst output
45 output_filename = "../CharmoniumPsi.dst.root"
46 add_mdst_output(path, filename=output_filename)
47 
48 # process events and print call statistics
49 b2.process(path)
50 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