Belle II Software
development
EvtGenSim.py
1
#!/usr/bin/env python3
2
3
10
11
"""
12
<header>
13
<output>EvtGenSim.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
and
runs the detector simulation
with
mixed
in
background.</description>
18
</header>
19
"""
20
21
from basf2 import set_random_seed, create_path, process, statistics
22
from simulation import add_simulation
23
from validation import statistics_plots, event_timing_plot
24
from background import get_background_files
25
26
set_random_seed(12345)
27
28
main = create_path()
29
30
# specify number of events to be generated
31
main.add_module("EventInfoSetter", evtNumList=[1000], runList=[1], expList=[0])
32
33
# generate BBbar events
34
main.add_module("EvtGenInput")
35
36
# detector and L1 trigger simulation
37
add_simulation(main, bkgfiles=get_background_files())
38
39
# memory profile
40
main.add_module("Profile")
41
42
# output
43
main.add_module("RootOutput", outputFileName="../EvtGenSim.root")
44
45
main.add_module('Progress')
46
process(main)
47
48
# Print call statistics
49
print(statistics)
50
51
statistics_plots(
52
"EvtGenSim_statistics.root"
,
53
contact=
"arul.prakash@physik.uni-muenchen.de"
,
54
job_desc=
"a standard simulation job with generic EvtGen events"
,
55
prefix=
"EvtGenSim"
,
56
)
57
event_timing_plot(
58
"../EvtGenSim.root"
,
59
"EvtGenSim_statistics.root"
,
60
contact=
"arul.prakash@physik.uni-muenchen.de"
,
61
job_desc=
"a standard simulation job with generic EvtGen events"
,
62
prefix=
"EvtGenSim"
,
63
)
validation
validation
EvtGenSim.py
Generated on Thu Nov 14 2024 03:10:18 for Belle II Software by
1.9.6