Belle II Software  release-05-01-25
test0_BottomoniumPiPiUpsilon.py
1 #!/usr/bin/env python3
2 # -*- coding: utf-8 -*-
3 # Descriptor: [Upsilon3S pi+pi- Y(1S)]
4 
5 """
6 <header>
7  <output>../BottomoniumPiPiUpsilon.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 beamparameters import add_beamparameters
16 from ROOT import Belle2
17 import glob
18 
19 b2.set_random_seed(12345)
20 
21 # background (collision) files
22 bg = glob.glob('./BG/[A-Z]*.root')
23 
24 # create a new path
25 BottomoniumPiPiUpsilonskimpath = b2.Path()
26 
27 # set the BeamParameters for running at Y(3S)
28 beamparameters = add_beamparameters(BottomoniumPiPiUpsilonskimpath, "Y3S")
29 b2.print_params(beamparameters)
30 
31 # specify number of events to be generated
32 eventinfosetter = b2.register_module('EventInfoSetter')
33 eventinfosetter.param('evtNumList', [5000])
34 eventinfosetter.param('runList', [1])
35 eventinfosetter.param('expList', [0])
36 BottomoniumPiPiUpsilonskimpath.add_module(eventinfosetter)
37 
38 # generate BBbar events
39 evtgeninput = b2.register_module('EvtGenInput')
40 evtgeninput.param('ParentParticle', 'Upsilon(3S)')
41 evtgeninput.param('userDECFile', Belle2.FileSystem.findFile('/decfiles/dec/1730840030.dec'))
42 BottomoniumPiPiUpsilonskimpath.add_module(evtgeninput)
43 
44 # detector simulation
45 add_simulation(BottomoniumPiPiUpsilonskimpath)
46 
47 # reconstruction
48 add_reconstruction(BottomoniumPiPiUpsilonskimpath)
49 
50 # Finally add mdst output
51 output_filename = "../BottomoniumPiPiUpsilon.dst.root"
52 add_mdst_output(BottomoniumPiPiUpsilonskimpath, filename=output_filename)
53 
54 # process events and print call statistics
55 b2.process(BottomoniumPiPiUpsilonskimpath)
56 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