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