Belle II Software development
KShortGenSimNoBkg.py
1#!/usr/bin/env python3
2
3
10
11"""
12<header>
13 <output>KShortGenSimNoBkg.root</output>
14 <contact>arul.prakash@physik.uni-muenchen.de</contact>
15 <cacheable/>
16 <description>This steering file produces 500 events with five KLong each
17 and runs the detector simulation without mixing in background.</description>
18</header>
19"""
20
21from basf2 import (
22 set_random_seed,
23 create_path,
24 process,
25 statistics,
26 register_module,
27)
28from simulation import add_simulation
29from validation import statistics_plots, event_timing_plot
30
31set_random_seed(1337)
32
33main = create_path()
34
35main.add_module("EventInfoSetter", evtNumList=[1500], runList=[1], expList=[0])
36
37main.add_module(
38 "ParticleGun",
39 pdgCodes=[310],
40 nTracks=5,
41 momentumGeneration="uniform",
42 momentumParams=[0.000, 1.000],
43 thetaGeneration="uniform",
44 thetaParams=[17, 150],
45 phiGeneration="uniform",
46 phiParams=[0, 360],
47 vertexGeneration="uniform",
48 xVertexParams=[0.0, 0.0],
49 yVertexParams=[0.0, 0.0],
50 zVertexParams=[0.0, 0.0],
51)
52
53add_simulation(main)
54
55main.add_module(register_module("Profile"))
56main.add_module("RootOutput", outputFileName="../KShortGenSimNoBkg.root")
57
58main.add_module('Progress')
59process(main)
60
61# Print call statistics
62print(statistics)
63
64statistics_plots(
65 "KShortGenSimNoBkg_statistics.root",
66 contact="arul.prakash@physik.uni-muenchen.de",
67 job_desc="a standard simulation job with KShortGenSimNoBkg particleGun",
68 prefix="KShortGenSimNoBkg",
69)
70event_timing_plot(
71 "../KShortGenSimNoBkg.root",
72 "KShortGenSimNoBkg_statistics.root",
73 contact="arul.prakash@physik.uni-muenchen.de",
74 job_desc="a standard simulation job with Klong particleGun",
75 prefix="KShortGenSimNoBkg",
76)