Belle II Software  release-05-01-25
CosmicsSimNoBkgTrackingVolume.py
1 #!/usr/bin/env python3
2 # -*- coding: utf-8 -*-
3 
4 """
5 <header>
6  <output>CosmicsSimNoBkgTrackingVolume.root</output>
7  <contact>Software team b2soft@mail.desy.de</contact>
8  <cacheable/>
9  <description>
10  This steering file produces 10000 cosmic ray events without background, for the early_phase3 geometry.
11  The particles are created on a cylinder of radius 125cm (right outside the tracking volume).
12  </description>
13 </header>
14 """
15 
16 from basf2 import create_path, statistics, set_random_seed, process
17 from simulation import add_simulation
18 from validation import statistics_plots, event_timing_plot
19 
20 set_random_seed(12345)
21 
22 main = create_path()
23 
24 # specify number of events to be generated
25 main.add_module('EventInfoSetter', evtNumList=[10000], runList=[1], expList=[1003])
26 
27 # Generate cosmic events. Note: with default settings the cosmics are
28 # generated on a cylinder of 125cm (closely outside the tracking valume)!
29 main.add_module('Cosmics')
30 
31 # detector simulation
32 add_simulation(main)
33 
34 # memory profile
35 main.add_module('Profile')
36 
37 # output
38 main.add_module('RootOutput', outputFileName='../CosmicsSimNoBkgTrackingVolume.root')
39 
40 process(main)
41 
42 # Print call statistics
43 print(statistics)
44 
45 statistics_plots(
46  'CosmicsSimNoBkgTrackingVolume_statistics.root',
47  contact='Software team b2soft@mail.desy.de',
48  job_desc='a standard simulation job with Cosmics events',
49  prefix='CosmicsSimNoBkgTrackingVolume'
50 )
51 event_timing_plot(
52  '../CosmicsSimNoBkgTrackingVolume.root', 'CosmicsSimNoBkgTrackingVolume_statistics.root',
53  contact='Software team b2soft@mail.desy.de',
54  job_desc='a standard simulation job with Cosmics events',
55  prefix='CosmicsSimNoBkgTrackingVolume'
56 )