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