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