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
21from basf2 import set_random_seed, create_path, process, statistics
22from simulation import add_simulation
23from validation import statistics_plots, event_timing_plot
24from background import get_background_files
25
26set_random_seed(12345)
27
28main = create_path()
29
30# specify number of events to be generated
31main.add_module("EventInfoSetter", evtNumList=[1000], runList=[1], expList=[0])
32
33# generate BBbar events
34main.add_module("EvtGenInput")
35
36# detector and L1 trigger simulation
37add_simulation(main, bkgfiles=get_background_files())
38
39# memory profile
40main.add_module("Profile")
41
42# output
43main.add_module("RootOutput", outputFileName="../EvtGenSim.root")
44
45main.add_module('Progress')
46process(main)
47
48# Print call statistics
49print(statistics)
50
51statistics_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)
57event_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)