Belle II Software development
EvtGenSimNoBkg.py
1#!/usr/bin/env python3
2
3
10
11"""
12<header>
13 <output>EvtGenSimNoBkg.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 without 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
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
34add_evtgen_for_validation(main)
35
36# detector and L1 trigger simulation WITHOUT beam background
37add_simulation(main)
38
39# memory profile
40main.add_module("Profile")
41
42# output
43main.add_module("RootOutput", outputFileName="../EvtGenSimNoBkg.root")
44
45main.add_module('Progress')
46process(main, calculateStatistics=True)
47
48statistics_plots(
49 "EvtGenSimNoBkg_statistics.root",
50 contact="giacomo.pietro@kit.edu",
51 job_desc="a standard simulation job with generic EvtGen events and no beam background",
52 prefix="EvtGenSimNoBkg",
53)
54event_timing_plot(
55 "../EvtGenSimNoBkg.root",
56 "EvtGenSimNoBkg_statistics.root",
57 contact="giacomo.pietro@kit.edu",
58 job_desc="a standard simulation job with generic EvtGen events and no beam background",
59 prefix="EvtGenSimNoBkg",
60)