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>giacomo.pietro@kit.edu</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
22from simulation import add_simulation
23from validation import statistics_plots, event_timing_plot
24from validationgenerators import add_evtgen_for_validation
25from background import get_background_files
26
27set_random_seed(12345)
28
29main = create_path()
30
31# specify number of events to be generated
32main.add_module("EventInfoSetter", evtNumList=[1000], runList=[1], expList=[0])
33
34# generate BBbar events
35add_evtgen_for_validation(main)
36
37# detector and L1 trigger simulation
38add_simulation(main, bkgfiles=get_background_files())
39
40# memory profile
41main.add_module("Profile")
42
43# output
44main.add_module("RootOutput", outputFileName="../EvtGenSim.root")
45
46main.add_module('Progress')
47process(main, calculateStatistics=True)
48
49statistics_plots(
50 "EvtGenSim_statistics.root",
51 contact="giacomo.pietro@kit.edu",
52 job_desc="a standard simulation job with generic EvtGen events",
53 prefix="EvtGenSim",
54)
55event_timing_plot(
56 "../EvtGenSim.root",
57 "EvtGenSim_statistics.root",
58 contact="giacomo.pietro@kit.edu",
59 job_desc="a standard simulation job with generic EvtGen events",
60 prefix="EvtGenSim",
61)