Belle II Software development
EvtGenSimRec.py
1#!/usr/bin/env python3
2
3
10
11"""
12<header>
13 <output>EvtGenSimRec.root</output>
14 <cacheable/>
15 <contact>arul.prakash@physik.uni-muenchen.de</contact>
16 <description>This steering file produces 1000 generic BBbar events with EvtGen,
17 runs the detector simulation with mixed in background, and performs the standard reconstruction.</description>
18</header>
19"""
20
21from basf2 import set_random_seed, create_path, process, statistics
22from simulation import add_simulation
23from reconstruction import add_reconstruction
24from svd import add_svd_create_recodigits
25from validation import statistics_plots, event_timing_plot
26from background import get_background_files
27
28set_random_seed(12345)
29
30# set one parallel process to exercise the basf2 parallel code
31# set_nprocesses(1)
32
33main = create_path()
34
35# specify number of events to be generated
36main.add_module("EventInfoSetter", evtNumList=[1000], runList=[1], expList=[0])
37
38# generate BBbar events
39main.add_module("EvtGenInput")
40
41# detector and L1 trigger simulation
42add_simulation(main, bkgfiles=get_background_files())
43
44# reconstruction
45add_reconstruction(main)
46
47# reconstruct SVDRecoDigits not used in reconstruction
48# but interesting for validation purposes
49add_svd_create_recodigits(main)
50
51main.add_module('Progress')
52# memory profile
53main.add_module("Profile")
54
55# output
56main.add_module(
57 "RootOutput",
58 additionalBranchNames=["SpacePoints", "SVDSpacePoints"],
59 outputFileName="../EvtGenSimRec.root",
60)
61
62process(main)
63
64# Print call statistics
65print(statistics)
66
67statistics_plots(
68 "EvtGenSimRec_statistics.root",
69 contact="arul.prakash@physik.uni-muenchen.de",
70 job_desc="a standard simulation and reconstruction job with generic EvtGen events",
71 prefix="EvtGenSimRec",
72)
73event_timing_plot(
74 "../EvtGenSimRec.root",
75 "EvtGenSimRec_statistics.root",
76 contact="arul.prakash@physik.uni-muenchen.de",
77 job_desc="a standard simulation and reconstruction job with generic EvtGen events",
78 prefix="EvtGenSimRec",
79)