Belle II Software  release-08-01-10
Analyse.py
1 #!/usr/bin/env python3
2 # -*- coding: utf-8 -*-
3 
4 
11 
12 import basf2 as b2
13 b2.logging.log_level = b2.LogLevel.WARNING
14 
15 # -------------------------
16 # here we register modules
17 # -------------------------
18 
19 progress = b2.register_module('Progress')
20 paramloader = b2.register_module('Gearbox')
21 geometry = b2.register_module('Geometry')
22 geometry.param('Components', ['TOP'])
23 input = b2.register_module('RootInput')
24 topdigi = b2.register_module('TOPDigitizer')
25 topback = b2.register_module('TOPBackground')
26 
27 param_back = {'TimeOfSimulation': 10.0, 'Type': 'Touschek_HER',
28  'Output': 'Background_Touschek_HER.root'}
29 # TimeOfSimulation in us
30 # Type the backgound type just for labeing
31 
32 topback.param(param_back)
33 # --------------------------------------
34 # here we set the parameters of modules
35 # --------------------------------------
36 
37 input.param('inputFileName', '/home/belle/petric/Touschek_HER.root')
38 
39 # create path
40 main = b2.create_path()
41 
42 # add modules to path
43 
44 main.add_module(input)
45 main.add_module(progress)
46 main.add_module(paramloader)
47 main.add_module(geometry)
48 main.add_module(topdigi)
49 main.add_module(topback)
50 
51 b2.process(main)
52 
53 print(b2.statistics)