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, 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, calculateStatistics=True)
50
51statistics_plots(
52 "CosmicsSimNoBkg_statistics.root",
53 contact="arul.prakash@physik.uni-muenchen.de",
54 job_desc="a standard simulation job with Cosmics events",
55 prefix="CosmicsSimNoBkg",
56)
57event_timing_plot(
58 "../CosmicsSimNoBkg.root",
59 "CosmicsSimNoBkg_statistics.root",
60 contact="arul.prakash@physik.uni-muenchen.de",
61 job_desc="a standard simulation job with Cosmics events",
62 prefix="CosmicsSimNoBkg",
63)