Belle II Software  release-08-01-10
phase2sim_SVDChargeSharingAnalysis.py
1 #!/usr/bin/env python3
2 # -*- coding: utf-8 -*-
3 
4 
11 
12 import basf2 as b2
13 import sys
14 
15 fileIN = sys.argv[1]
16 dirOUT = sys.argv[2]
17 
18 main = b2.create_path()
19 main.add_module('RootInput', inputFileName=str(fileIN))
20 
21 gearbox = b2.register_module('Gearbox')
22 geomfile = '/geometry/Beast2_phase2.xml'
23 if geomfile != 'None':
24  gearbox.param('fileName', geomfile)
25 main.add_module(gearbox)
26 geometry = b2.register_module('Geometry', components=['SVD'])
27 main.add_module(geometry, useDB=False)
28 
29 main.add_module('SVDChargeSharingAnalysis', outputDirName=str(dirOUT), outputRootFileName='test.root',
30  useTrackInfo=True, is2017TBanalysis=False)
31 main.add_module('Progress')
32 b2.print_path(main)
33 b2.process(main)
34 print(b2.statistics)