Belle II Software  release-05-01-25
test0_BottomoniumGammaUpsilon.py
1 #!/usr/bin/env python3
2 # -*- coding: utf-8 -*-
3 # Descriptor: [Upsilon3S -> gam chib -> gam Y(1S)(ll)]
4 
5 """
6 <header>
7  <output>../BottomoniumGammaUpsilon.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 BottomoniumGammaUpsilonskimpath = b2.Path()
26 
27 # set the BeamParameters for running at Y(3S)
28 beamparameters = add_beamparameters(BottomoniumGammaUpsilonskimpath, "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 BottomoniumGammaUpsilonskimpath.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/1730822030.dec'))
42 BottomoniumGammaUpsilonskimpath.add_module(evtgeninput)
43 
44 # detector simulation
45 add_simulation(BottomoniumGammaUpsilonskimpath)
46 
47 # reconstruction
48 add_reconstruction(BottomoniumGammaUpsilonskimpath)
49 
50 
51 # Finally add mdst output
52 output_filename = "../BottomoniumGammaUpsilon.dst.root"
53 add_mdst_output(BottomoniumGammaUpsilonskimpath, filename=output_filename)
54 
55 # process events and print call statistics
56 b2.process(BottomoniumGammaUpsilonskimpath)
57 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