Belle II Software light-2406-ragdoll
Monitor.py
1#!/usr/bin/env python3
2
3
10
11import os
12
13import basf2
14from b2biiConversion import convertBelleMdstToBelleIIMdst
15from b2biiMonitors import addBeamParamsConversionMonitors
16from b2biiMonitors import addTrackConversionMonitors
17from b2biiMonitors import addKshortConversionMonitors
18from b2biiMonitors import addConvertedPhotonConversionMonitors
19from b2biiMonitors import addLambda0ConversionMonitors
20from b2biiMonitors import addNeutralsConversionMonitors
21from b2biiMonitors import addMCParticlesConversionMonitors
22from b2biiMonitors import addKlongConversionMonitors
23
24os.environ['USE_GRAND_REPROCESS_DATA'] = '1'
25os.environ['PGUSER'] = 'g0db'
26
27# Convert
28mypath = basf2.create_path()
29inputfile = basf2.find_file('b2bii_input_evtgen_exp_07_BptoD0pip-D0toKpipi0-0.mdst', 'examples', False)
30convertBelleMdstToBelleIIMdst(inputfile, path=mypath)
31
32# Reconstruct
33# Create monitoring histograms
34addBeamParamsConversionMonitors(path=mypath)
35addTrackConversionMonitors(path=mypath)
36addKshortConversionMonitors(path=mypath)
37addKlongConversionMonitors(path=mypath)
38addLambda0ConversionMonitors(path=mypath)
39addConvertedPhotonConversionMonitors(path=mypath)
40addNeutralsConversionMonitors(path=mypath)
41addMCParticlesConversionMonitors(path=mypath)
42
43# progress
44mypath.add_module('Progress')
45
46basf2.process(mypath)
47
48# Print call statistics
49print(basf2.statistics)