Belle II Software  release-05-01-25
test0_CharmlessHad2BodyNeutral.py
1 #!/usr/bin/env python3
2 # -*- coding: utf-8 -*-
3 # Descriptor: Validation of CharmlessHad2Body skim using B -> K_S0 pi0
4 
5 """
6 <header>
7  <output>../CharmlessHad2BodyNeutral.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 charmless2neutralpath = 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 charmless2neutralpath.add_module(eventinfosetter)
32 
33 # .dec file for B -> K_S0 pi0
34 evtgeninput = b2.register_module('EvtGenInput')
35 evtgeninput.param('userDECFile', Belle2.FileSystem.findFile('/decfiles/dec/1110022100.dec'))
36 charmless2neutralpath.add_module(evtgeninput)
37 
38 # detector simulation
39 add_simulation(path=charmless2neutralpath)
40 
41 # reconstruction
42 add_reconstruction(path=charmless2neutralpath)
43 
44 
45 # Finally add mdst output
46 output_filename = "../CharmlessHad2BodyNeutral.dst.root"
47 add_mdst_output(charmless2neutralpath, filename=output_filename)
48 
49 # process events and print call statistics
50 b2.process(charmless2neutralpath)
51 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