Belle II Software  release-05-01-25
test0_DstToD0Pi_D0ToHpJm.py
1 #!/usr/bin/env python3
2 # -*- coding: utf-8 -*-
3 # Descriptor: [D0 -> K- pi+ ]cc
4 
5 """
6 <header>
7  <output>../DstToD0Pi_D0ToHpJm.dst.root</output>
8  <contact>gonggd@mail.ustc.edu.cn</contact>
9 </header>
10 """
11 
12 import basf2 as b2
13 from generators import add_inclusive_continuum_generator
14 from simulation import add_simulation
15 from reconstruction import add_reconstruction, add_mdst_output
16 from ROOT import Belle2
17 
18 b2.set_random_seed(12345)
19 decfile = Belle2.FileSystem.findFile('/decfiles/dec/2610030000.dec')
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 inclusive continuum events
33 add_inclusive_continuum_generator(main, finalstate='ccbar', particles=['D*+'], userdecfile=decfile, include_conjugates=1)
34 
35 # detector simulation
36 add_simulation(main)
37 
38 # reconstruction
39 add_reconstruction(main)
40 
41 
42 # Finally add mdst output
43 output_filename = "../DstToD0Pi_D0ToHpJm.dst.root"
44 add_mdst_output(main, filename=output_filename)
45 
46 # process events and print call statistics
47 b2.process(main)
48 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