Belle II Software  release-08-01-10
topoana.py
1 
8 import basf2
9 from modularAnalysis import inputMdst
10 from modularAnalysis import variablesToNtuple
11 from variables.MCGenTopo import mc_gen_topo
12 import os # Newly added statement 1!
13 
14 mypath = basf2.Path()
15 
16 # load input ROOT file
17 inputMdst(basf2.find_file('B02D0pi0_D02pi0pi0.root', 'examples', False), mypath)
18 
19 # Output the variables to a ntuple
20 variablesToNtuple('', mc_gen_topo(200), 'MCGenTopo', 'MCGenTopo.root', path=mypath)
21 
22 # Process the events
23 basf2.process(mypath)
24 
25 # Print out the summary
26 print(basf2.statistics)
27 
28 # Invoke the TopoAna program
29 os.system('topoana.exe topoana.card') # Newly added statement 2!