Belle II Software  release-05-01-25
EvtReconstruction.py
1 #!/usr/bin/env python3
2 # -*- coding: utf-8 -*-
3 
4 """
5 <header>
6  <input>EvtGenSim.root</input>
7  <output>EvtRec.root,EvtRec_mdst.root</output>
8  <cacheable/>
9  <contact>Software team b2soft@mail.desy.de</contact>
10  <description>
11  This steering file runs the standard reconstruction on an input file with
12  generic BBbar events.
13  </description>
14 </header>
15 """
16 
17 from basf2 import set_random_seed, create_path, process, statistics, \
18  register_module
19 from reconstruction import add_reconstruction, add_mdst_output
20 from validation import statistics_plots, event_timing_plot
21 
22 set_random_seed(12345)
23 
24 main = create_path()
25 
26 # read file of simulated events
27 main.add_module('RootInput', inputFileName='../EvtGenSim.root')
28 
29 # geometry parameter database
30 main.add_module('Gearbox')
31 
32 # detector geometry
33 main.add_module('Geometry')
34 
35 # reconstruction
36 add_reconstruction(main)
37 
38 # memory profile
39 main.add_module('Profile')
40 
41 # output
42 main.add_module('RootOutput', outputFileName='../EvtRec.root')
43 add_mdst_output(main, True, '../EvtRec_mdst.root')
44 
45 process(main)
46 
47 # Print call statistics
48 print(statistics)
49 
50 statistics_plots(
51  'EvtRec_statistics.root',
52  contact='Software team b2soft@mail.desy.de',
53  job_desc='a standard reconstruction job with generic EvtGen events',
54  prefix='EvtRec'
55 )
56 event_timing_plot(
57  '../EvtRec.root',
58  'EvtRec_statistics.root',
59  contact='Software team b2soft@mail.desy.de',
60  job_desc='a standard reconstruction job with generic EvtGen events',
61  prefix='EvtRec'
62 )