Belle II Software development
067_generate_mc.py
1#!/usr/bin/env python3
2
3import basf2 as b2
4import generators as ge
5import simulation as si
6import reconstruction as re
7import mdst
8
9# Create the steering path
10main = b2.Path()
11
12# Define number of events and experiment number
13main.add_module('EventInfoSetter', evtNumList=[10], expList=[0])
14
15# Generate B0B0bar events
16ge.add_evtgen_generator(
17 path=main,
18 finalstate='signal',
19 signaldecfile=b2.find_file('my_decay_file.dec')
20)
21
22# Simulate the detector response and the L1 trigger
23si.add_simulation(path=main)
24
25# Reconstruct the objects
26re.add_reconstruction(path=main)
27
28# Create the mDST output file
29mdst.add_mdst_output(path=main, filename='my_mdst_output.root')
30
31# Process the steering path
32b2.process(path=main)
33
34# Finally, print out some statistics about the modules execution
35print(b2.statistics)
def add_mdst_output(path, mc=True, filename='mdst.root', additionalBranches=[], dataDescription=None)
Definition: mdst.py:38