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