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
22from basf2 import create_path, statistics, set_random_seed, process
23from simulation import add_simulation
24from validation import statistics_plots, event_timing_plot
25
26set_random_seed(12345)
27
28main = create_path()
29
30# specify number of events to be generated
31main.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).
37main.add_module("Cosmics", cylindricalR=350)
38
39# detector simulation
40add_simulation(main)
41
42# memory profile
43main.add_module("Profile")
44
45# output
46main.add_module("RootOutput", outputFileName="../CosmicsSimNoBkg.root")
47
48main.add_module('Progress')
49process(main)
50
51# Print call statistics
52print(statistics)
53
54statistics_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)
60event_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)