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