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