Belle II Software development
Convert.py
1#!/usr/bin/env python3
2
3
10
11import os
12import basf2
13from b2biiConversion import convertBelleMdstToBelleIIMdst
14
15os.environ['USE_GRAND_REPROCESS_DATA'] = '1'
16os.environ['PGUSER'] = 'g0db'
17
18main = basf2.create_path()
19
20# add all modules necessary to read and convert the mdst file
21inputfile = basf2.find_file('b2bii_input_evtgen_exp_07_BptoD0pip-D0toKpipi0-0.mdst', 'examples', False)
22convertBelleMdstToBelleIIMdst(inputfile, applySkim=True, path=main)
23
24# Store the converted Belle II dataobjects in ROOT
25output = basf2.register_module('RootOutput')
26output.param('outputFileName', 'B2BII_Convert_Example.mdst.root')
27main.add_module(output)
28
29# progress
30main.add_module('Progress')
31
32basf2.process(main)
33
34# Print call statistics
35print(basf2.statistics)