Belle II Software  release-05-01-25
test0_CharmlessHad2BodyCharged.py
1 #!/usr/bin/env python3
2 # -*- coding: utf-8 -*-
3 # Descriptor: Validation of CharmlessHad2Body skim using B -> K*+ rho0
4 
5 """
6 <header>
7  <output>../CharmlessHad2BodyCharged.dst.root</output>
8  <contact>khsmith@student.unimelb.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 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 path
24 charmless2chargedpath = b2.Path()
25 
26 # specify number of events to be generated
27 eventinfosetter = b2.register_module('EventInfoSetter')
28 eventinfosetter.param('evtNumList', [1000])
29 eventinfosetter.param('runList', [1])
30 eventinfosetter.param('expList', [0])
31 charmless2chargedpath.add_module(eventinfosetter)
32 
33 # .dec file for B -> K*+ rho0
34 evtgeninput = b2.register_module('EvtGenInput')
35 
36 evtgeninput.param('userDECFile', Belle2.FileSystem.findFile('/decfiles/dec/1210050105.dec'))
37 charmless2chargedpath.add_module(evtgeninput)
38 
39 # detector simulation
40 add_simulation(path=charmless2chargedpath)
41 
42 # reconstruction
43 add_reconstruction(path=charmless2chargedpath)
44 
45 
46 # Finally add mdst output
47 output_filename = "../CharmlessHad2BodyCharged.dst.root"
48 add_mdst_output(charmless2chargedpath, filename=output_filename)
49 
50 # process events and print call statistics
51 b2.process(charmless2chargedpath)
52 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