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