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
21
from basf2 import set_random_seed, create_path, process, statistics
22
from simulation import add_simulation
23
from reconstruction import add_reconstruction
24
from svd import add_svd_create_recodigits
25
from validation import statistics_plots, event_timing_plot
26
from background import get_background_files
27
28
set_random_seed(12345)
29
30
# set one parallel process to exercise the basf2 parallel code
31
# set_nprocesses(1)
32
33
main = create_path()
34
35
# specify number of events to be generated
36
main.add_module("EventInfoSetter", evtNumList=[1000], runList=[1], expList=[0])
37
38
# generate BBbar events
39
main.add_module("EvtGenInput")
40
41
# detector and L1 trigger simulation
42
add_simulation(main, bkgfiles=get_background_files())
43
44
# reconstruction
45
add_reconstruction(main)
46
47
# reconstruct SVDRecoDigits not used in reconstruction
48
# but interesting for validation purposes
49
add_svd_create_recodigits(main)
50
51
main.add_module('Progress')
52
# memory profile
53
main.add_module("Profile")
54
55
# output
56
main.add_module(
57
"RootOutput"
,
58
additionalBranchNames=[
"SpacePoints"
,
"SVDSpacePoints"
],
59
outputFileName=
"../EvtGenSimRec.root"
,
60
)
61
62
process(main)
63
64
# Print call statistics
65
print(statistics)
66
67
statistics_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
)
73
event_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
)
validation
validation
EvtGenSimRec.py
Generated on Thu Nov 14 2024 03:10:18 for Belle II Software by
1.9.6