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