Belle II Software  release-06-00-14
B2A902-PrintOutMCParticles.py
1 #!/usr/bin/env python3
2 
3 
10 
11 
22 
23 import basf2 as b2
24 import modularAnalysis as ma
25 
26 # create path
27 my_path = b2.create_path()
28 
29 # load input ROOT file
30 ma.inputMdst(environmentType='default',
31  filename=b2.find_file('B2pi0D_D2hh_D2hhh_B2munu.root', 'examples', False),
32  path=my_path)
33 
34 # print out the contents of the StoreArray<MCParticle>
35 ma.printPrimaryMCParticles(path=my_path)
36 
37 # Process the events
38 b2.process(my_path)
39 
40 # print out the summary
41 print(b2.statistics)