Belle II Software  release-05-01-25
topoana.py
1 import basf2
2 from modularAnalysis import inputMdst
3 from modularAnalysis import variablesToNtuple
4 from variables.MCGenTopo import mc_gen_topo
5 import os # Newly added statement 1!
6 
7 mypath = basf2.Path()
8 
9 # load input ROOT file
10 inputMdst('default', basf2.find_file('B02D0pi0_D02pi0pi0.root', 'examples', False), mypath)
11 
12 # Output the variables to a ntuple
13 variablesToNtuple('', mc_gen_topo(200), 'MCGenTopo', 'MCGenTopo.root', path=mypath)
14 
15 # Process the events
16 basf2.process(mypath)
17 
18 # Print out the summary
19 print(basf2.statistics)
20 
21 # Invoke the TopoAna program
22 os.system('topoana.exe topoana.card') # Newly added statement 2!
variablesToNtuple
Definition: variablesToNtuple.py:1
basf2.process
def process(path, max_event=0)
Definition: __init__.py:25
variables.MCGenTopo
Definition: MCGenTopo.py:1