Belle II Software  release-08-01-10
KLMScintillatorSimulator.py
1 #!/usr/bin/env python3
2 
3 
10 
11 # KLM scintillator-simulator output study.
12 
13 import basf2
14 
15 # Set the log level to show only error and fatal messages
16 basf2.set_log_level(basf2.LogLevel.WARNING)
17 
18 # EventInfoSetter - generate event meta data
19 eventinfosetter = basf2.register_module('EventInfoSetter')
20 eventinfosetter.param('evtNumList', [1])
21 
22 # XML reader
23 xmldata = basf2.register_module('Gearbox')
24 
25 # KLM scintillator simulator.
26 eklmadc = basf2.register_module('KLMScintillatorSimulator')
27 eklmadc.param('Mode', 'Shape')
28 eklmadc.param('OutputFile', 'FPGA.root')
29 # For generation of the histograms for strips.
30 # eklmadc.param('Mode', 'Strips')
31 # eklmadc.param('OutputFile', 'KLMScintillatorSimulator.root')
32 
33 # Create main path
34 main = basf2.create_path()
35 
36 # Add modules to main path
37 main.add_module(eventinfosetter)
38 main.add_module(xmldata)
39 main.add_module(eklmadc)
40 
41 # Run
42 basf2.process(main)