Belle II Software  release-05-01-25
test0_Dz2BodyHadronic.py
1 #!/usr/bin/env python3
2 # -*- coding: utf-8 -*-
3 # Descriptor: [D*+ -> [D0 -> K- pi+] pi+ ]
4 
5 """
6 <header>
7  <output>./WG6_DstToD0pi_D0ToKpi.dst.root</output>
8  <contact>lilongke@ihep.ac.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 
17 b2.set_random_seed(12345)
18 
19 # background (collision) files
20 # bg = glob.glob('./BG/[A-Z]*.root')
21 
22 # create path
23 myMain = 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 myMain.add_module(eventinfosetter)
31 
32 # Generator
33 # to run the framework the used modules need to be registered
34 evtgeninput = b2.register_module('EvtGenInput')
35 evtgeninput.param('ParentParticle', 'vpho')
36 evtgeninput.param('userDECFile', Belle2.FileSystem.findFile('skim/validation/WG6_validation.dec'))
37 evtgeninput.param('InclusiveParticle', 'D*+')
38 evtgeninput.param('InclusiveType', 2)
39 myMain.add_module(evtgeninput)
40 
41 # detector simulation
42 # add_simulation(myMain, bkgfiles=bg)
43 add_simulation(myMain)
44 
45 # reconstruction
46 add_reconstruction(myMain)
47 
48 
49 # Finally add mdst output
50 output_filename = "../WG6_DstToD0pi_D0ToKpi.dst.root"
51 add_mdst_output(myMain, filename=output_filename)
52 
53 # process events and print call statistics
54 b2.process(myMain)
55 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