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