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