Belle II Software  release-08-01-10
fastTSIM.py
1 #!/usr/bin/env python3
2 # -*- coding: utf-8 -*-
3 
4 
11 
12 # The example of running simulation of L1 trigger
13 
14 import basf2 as b2
15 from simulation import add_simulation
16 
17 # b2.set_log_level(b2.LogLevel.DEBUG)
18 
19 main = b2.create_path()
20 eventinfosetter = b2.register_module('EventInfoSetter')
21 eventinfosetter.param({'evtNumList': [10], 'runList': [1]})
22 main.add_module(eventinfosetter)
23 
24 babayaganlo = b2.register_module('BabayagaNLOInput')
25 babayaganlo.param('FMax', 7.5e4)
26 babayaganlo.param('FinalState', 'ee')
27 babayaganlo.param('MaxAcollinearity', 180.0)
28 babayaganlo.param('ScatteringAngleRange', [15, 165])
29 # babayaganlo.param('VacuumPolarization', 'hadr5')
30 babayaganlo.param('VacuumPolarization', 'hlmnt')
31 babayaganlo.param('SearchMax', 10000)
32 babayaganlo.param('VPUncertainty', True)
33 main.add_module(babayaganlo)
34 
35 
36 # trigger simulation is included by default
37 add_simulation(main, simulateT0jitter=True, usePXDDataReduction=False, forceSetPXDDataReduction=True)
38 
39 for m in main.modules():
40  if m.name() == "TRGGDL":
41  m.set_log_level(b2.LogLevel.DEBUG)
42 # m.set_debug_level(25)
43 
44 # output
45 rootoutput = b2.register_module('RootOutput')
46 rootoutput.param('outputFileName', "test.root")
47 main.add_module(rootoutput)
48 
49 
50 # main
51 b2.process(main)
52 print(b2.statistics)
53 # ===<END>