Belle II Software  release-08-01-10
BHWideGenerationOnly.py
1 #!/usr/bin/env python3
2 # -*- coding: utf-8 -*-
3 
4 
11 
12 import basf2
13 # Set the global log level
14 basf2.set_log_level(basf2.LogLevel.INFO)
15 
16 main = basf2.create_path()
17 
18 # event info setter
19 main.add_module("EventInfoSetter", expList=0, runList=1, evtNumList=100)
20 
21 # Register the BHWIDE module
22 bhwide = basf2.register_module('BHWideInput')
23 bhwide.set_log_level(basf2.LogLevel.INFO)
24 
25 # min/max angle in CMS, applied to positron, in degrees CMS
26 bhwide.param('ScatteringAngleRangePositron', [15., 165.])
27 
28 # min/max angle in CMS, applied to electron, in degrees CMS
29 bhwide.param('ScatteringAngleRangeElectron', [15., 165.])
30 
31 # maximum acollinearity angle between finale state electron and positron, in degrees CMS
32 bhwide.param('MaxAcollinearity', 180.0)
33 
34 # Minimal energy of the electron and positron in GeV CMS
35 bhwide.param('MinEnergy', 0.10)
36 
37 # Vacuum polarization switch: off, eidelman, bhlumi and burkhardt (default)
38 bhwide.param('VacuumPolarization', 'burkhardt')
39 
40 # EW corrections on (default) or off
41 bhwide.param('WeakCorrections', True)
42 
43 # Maximum weight, default=3.0, for <0: automatic search
44 bhwide.param('WtMax', 3.0)
45 
46 # gearbox
47 gearbox = basf2.register_module('Gearbox')
48 
49 # Create the main path and add the modules
50 main.add_module("Progress")
51 main.add_module(gearbox)
52 main.add_module(bhwide)
53 main.add_module("RootOutput", outputFileName="bhwide.root")
54 
55 main.add_module("PrintMCParticles", logLevel=basf2.LogLevel.DEBUG, onlyPrimaries=False)
56 
57 # generate events
58 basf2.process(main)
59 
60 # show call statistics
61 print(basf2.statistics)