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