Belle II Software
development
CosmicsSimNoBkg.py
1
#!/usr/bin/env python3
2
3
10
11
"""
12
<header>
13
<output>CosmicsSimNoBkg.root</output>
14
<contact>arul.prakash
@physik.uni
-muenchen.de</contact>
15
<cacheable/>
16
<description>
17
This steering file produces 10000 cosmic ray events without background,
for
the early_phase3 geometry.
18
</description>
19
</header>
20
"""
21
22
from basf2 import create_path, statistics, set_random_seed, process
23
from simulation import add_simulation
24
from validation import statistics_plots, event_timing_plot
25
26
set_random_seed(12345)
27
28
main = create_path()
29
30
# specify number of events to be generated
31
main.add_module(
32
"EventInfoSetter"
, evtNumList=[10000], runList=[1], expList=[1003]
33
)
34
35
# Generate cosmic events.
36
# Set initial radius to 350 cm to include KLM (excluded by default).
37
main.add_module(
"Cosmics"
, cylindricalR=350)
38
39
# detector simulation
40
add_simulation(main)
41
42
# memory profile
43
main.add_module(
"Profile"
)
44
45
# output
46
main.add_module(
"RootOutput"
, outputFileName=
"../CosmicsSimNoBkg.root"
)
47
48
main.add_module(
'Progress'
)
49
process(main)
50
51
# Print call statistics
52
print(statistics)
53
54
statistics_plots(
55
"CosmicsSimNoBkg_statistics.root"
,
56
contact=
"arul.prakash@physik.uni-muenchen.de"
,
57
job_desc=
"a standard simulation job with Cosmics events"
,
58
prefix=
"CosmicsSimNoBkg"
,
59
)
60
event_timing_plot(
61
"../CosmicsSimNoBkg.root"
,
62
"CosmicsSimNoBkg_statistics.root"
,
63
contact=
"arul.prakash@physik.uni-muenchen.de"
,
64
job_desc=
"a standard simulation job with Cosmics events"
,
65
prefix=
"CosmicsSimNoBkg"
,
66
)
validation
validation
CosmicsSimNoBkg.py
Generated on Thu Nov 14 2024 03:10:18 for Belle II Software by
1.9.6