Belle II Software light-2406-ragdoll
BelleMCGeneration.py
1#!/usr/bin/env python3
2
3
10
11# Generation of Belle MC.
12
13import basf2
14from generators import add_evtgen_generator
15
16# Use B2BII local cache
17basf2.conditions.metadata_providers = ["/sw/belle/b2bii/database/conditions/b2bii.sqlite"]
18basf2.conditions.payload_locations = ["/sw/belle/b2bii/database/conditions/"]
19
20# Use B2BII global tag.
21basf2.conditions.override_globaltags()
22basf2.conditions.prepend_globaltag('b2bii_beamParameters_with_smearing')
23
24# Path.
25main = basf2.create_path()
26
27# Generate for experiment 55, run 0 (run-independent MC).
28main.add_module('EventInfoSetter', expList=55, runList=0, evtNumList=100)
29
30# Add generator.
31add_evtgen_generator(path=main, finalstate='charged')
32
33# Add output.
34main.add_module('BelleMCOutput', outputFileName='charged.dat')
35
36# Progress.
37main.add_module('Progress')
38
39# Generate events.
40basf2.process(main)
41
42# Statistics.
43print(basf2.statistics)