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 register_module,
26)
27from simulation import add_simulation
28from validation import statistics_plots, event_timing_plot
29
30set_random_seed(1337)
31
32main = create_path()
33
34main.add_module("EventInfoSetter", evtNumList=[1500], runList=[1], expList=[0])
35
36main.add_module(
37 "ParticleGun",
38 pdgCodes=[310],
39 nTracks=5,
40 momentumGeneration="uniform",
41 momentumParams=[0.000, 1.000],
42 thetaGeneration="uniform",
43 thetaParams=[17, 150],
44 phiGeneration="uniform",
45 phiParams=[0, 360],
46 vertexGeneration="uniform",
47 xVertexParams=[0.0, 0.0],
48 yVertexParams=[0.0, 0.0],
49 zVertexParams=[0.0, 0.0],
50)
51
52add_simulation(main)
53
54main.add_module(register_module("Profile"))
55main.add_module("RootOutput", outputFileName="../KShortGenSimNoBkg.root")
56
57main.add_module('Progress')
58process(main, calculateStatistics=True)
59
60statistics_plots(
61 "KShortGenSimNoBkg_statistics.root",
62 contact="arul.prakash@physik.uni-muenchen.de",
63 job_desc="a standard simulation job with KShortGenSimNoBkg particleGun",
64 prefix="KShortGenSimNoBkg",
65)
66event_timing_plot(
67 "../KShortGenSimNoBkg.root",
68 "KShortGenSimNoBkg_statistics.root",
69 contact="arul.prakash@physik.uni-muenchen.de",
70 job_desc="a standard simulation job with Klong particleGun",
71 prefix="KShortGenSimNoBkg",
72)