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