Belle II Software  release-05-01-25
BBBremGenerationOnly.py
1 #!/usr/bin/env python3
2 # -*- coding: utf-8 -*-
3 
4 
10 
11 import basf2
12 
13 # Set the global log level
14 basf2.set_log_level(basf2.LogLevel.INFO)
15 
16 main = basf2.create_path()
17 
18 main.add_module("EventInfoSetter", expList=0, runList=1, evtNumList=10000)
19 
20 # Register the BBBremInput module
21 bbbrem = basf2.register_module('BBBremInput')
22 
23 # Set the fraction of the minimum photon energy.
24 # bbbrem.param('MinPhotonEnergyFraction', 0.000001)
25 
26 # Produce unweighted or weighted events.
27 bbbrem.param('Unweighted', True)
28 
29 # Set the max weight (only for Unweighted=True).
30 bbbrem.param('MaxWeight', 5.0e6)
31 
32 # Set the mode for bunch density correction (none=0, hard=1 (default), soft=2).
33 bbbrem.param('DensityCorrectionMode', 1)
34 
35 # Set the Density correction parameter tc.
36 bbbrem.param('DensityCorrectionParameter', 1.68e-17)
37 
38 # Set the logging level for the BBBREM module to INFO
39 # bbbrem.set_log_level(LogLevel.INFO)
40 
41 # Register the Progress module and the Python histogram module
42 progress = basf2.register_module('Progress')
43 
44 # output
45 output = basf2.register_module('RootOutput')
46 output.param('outputFileName', './bbbremgen.root')
47 
48 # Create the main path and add the modules
49 
50 main.add_module(progress)
51 main.add_module(bbbrem)
52 
53 main.add_module("PrintMCParticles", logLevel=basf2.LogLevel.DEBUG, onlyPrimaries=False)
54 
55 main.add_module(output)
56 
57 # generate events
58 basf2.process(main)
59 
60 # show call statistics
61 print(basf2.statistics)
basf2.process
def process(path, max_event=0)
Definition: __init__.py:25