26 from setup_modules
import setup_VXDTF2
32 arg_parser = argparse.ArgumentParser(description=
'VXDTF2 application:\
33 Applies trained SecMap on provided data and returns RecoTrackCands.\n\
34 Usage: basf2 testVXDTF2.py -i <inputFileName> -o <outputFileName> -- --secmap <secmapFile>')
36 arg_parser.add_argument(
'--secmap',
'-s', type=str,
37 help=
'Inclusion of the root file containing the trained SecMap for the application of the VXDTF2.')
39 arguments = arg_parser.parse_args(sys.argv[1:])
40 secmap_name = arguments.secmap
49 generateTimeSeedAfterFit =
False
52 b2.set_log_level(b2.LogLevel.ERROR)
53 b2.log_to_file(
'logVXDTF2Execution.log', append=
False)
57 path = b2.create_path()
60 rootInput = b2.register_module(
'RootInput')
61 path.add_module(rootInput)
64 eventinfoprinter = b2.register_module(
'EventInfoPrinter')
65 path.add_module(eventinfoprinter)
68 gearbox = b2.register_module(
'Gearbox')
69 path.add_module(gearbox)
72 geometry = b2.register_module(
'Geometry')
73 geometry.param(
'components', [
'BeamPipe',
74 'MagneticFieldConstant4LimitedRSVD',
77 path.add_module(geometry)
81 setup_VXDTF2(path=path,
83 sec_map_file=secmap_name,
84 overlap_filter=
'hopfield',
85 quality_estimator=
'circleFit')
90 genFitExtrapolation = b2.register_module(
'SetupGenfitExtrapolation')
91 path.add_module(genFitExtrapolation)
93 if not generateTimeSeedAfterFit:
94 timeSeed = b2.register_module(
'IPTrackTimeEstimator')
95 timeSeed.param(
'useFittedInformation',
False)
96 path.add_module(timeSeed)
98 fitter = b2.register_module(
'DAFRecoFitter')
99 path.add_module(fitter)
101 if generateTimeSeedAfterFit:
102 timeSeedAfterFit = b2.register_module(
'IPTrackTimeEstimator')
103 timeSeedAfterFit.param(
'useFittedInformation',
True)
104 path.add_module(timeSeedAfterFit)
107 output = b2.register_module(
'RootOutput')
108 path.add_module(output)
112 display = b2.register_module(
'Display')
113 display.param(
'showAllPrimaries',
True)
114 path.add_module(display)
116 path.add_module(
'Progress')