Belle II Software  release-08-01-10
phase2_sim_reco_tracking_localDB.py
1 #!/usr/bin/env python3
2 # -*- coding: utf-8 -*-
3 
4 
11 
12 
16 
17 import basf2 as b2
18 from tracking import add_tracking_reconstruction
19 import sys
20 
21 print('***')
22 print('*** Used steering script:')
23 with open(sys.argv[0], 'r') as fin:
24  print(fin.read(), end="")
25 print('*** end of the script.')
26 print('***')
27 
28 fileIN = sys.argv[1]
29 fileOUT = sys.argv[2]
30 localdb_dir = sys.argv[3]
31 
32 main = b2.create_path()
33 main.add_module('RootInput', inputFileName=fileIN)
34 
35 main.add_module('Gearbox')
36 main.add_module('Geometry')
37 
38 # SVD reconstruction
39 main.add_module('SVDCoGTimeEstimator')
40 main.add_module('SVDSimpleClusterizer', Clusters="SVDClusters")
41 
42 # add tracking recontruction
43 add_tracking_reconstruction(main, components=['SVD'])
44 # remove cut on CoG in SpacePointCreator
45 for module in main.modules():
46  if module.name() == 'SVDSpacePointCreator':
47  module.param("MinClusterTime", -999)
48 
49 main.add_module('VXDDedxPID')
50 
51 main.add_module(
52  'RootOutput',
53  outputFileName=fileOUT,
54  branchNames=[
55  "SVDShaperDigits",
56  "SVDClusters",
57  "SVDRecoDigits",
58  "Tracks",
59  "RecoTracks",
60  "TracksToRecoTracks",
61  "TrackFitResults",
62  "MCParticles",
63  "SVDTrueHits",
64  "TracksToVXDDedxLikelihoods",
65  "TracksToVXDDedxTracks",
66  "VXDDedxLikelihoods",
67  "VXDDedxTracks"])
68 b2.print_path(main)
69 main.add_module('ProgressBar')
70 # Process events
71 b2.process(main)
72 print(b2.statistics)