Belle II Software  release-08-01-10
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 main.add_module('Progress')
60 process(main)
61 
62 # Print call statistics
63 print(statistics)
64 
65 statistics_plots(
66  "KShortGenSimNoBkg_statistics.root",
67  contact="Software team b2soft@mail.desy.de",
68  job_desc="a standard simulation job with KShortGenSimNoBkg particleGun",
69  prefix="KShortGenSimNoBkg",
70 )
71 event_timing_plot(
72  "../KShortGenSimNoBkg.root",
73  "KShortGenSimNoBkg_statistics.root",
74  contact="Software team b2soft@mail.desy.de",
75  job_desc="a standard simulation job with Klong particleGun",
76  prefix="KShortGenSimNoBkg",
77 )