Belle II Software development
MCGenTopo.py
1
8import basf2
9from modularAnalysis import inputMdst
10from modularAnalysis import variablesToNtuple
11from variables.MCGenTopo import mc_gen_topo
12
13mypath = basf2.Path()
14
15# load input ROOT file
16inputMdst(basf2.find_file('B02D0pi0_D02pi0pi0.root', 'examples', False), mypath)
17
18# Output the variables to a ntuple
19variablesToNtuple('', mc_gen_topo(200), 'MCGenTopo', 'MCGenTopo.root', path=mypath)
20
21# Process the events
22basf2.process(mypath)
23
24# Print out the summary
25print(basf2.statistics)