26from setup_modules
import setup_VXDTF2
31arg_parser = argparse.ArgumentParser(description=
'VXDTF2 evaluation:\
32 Applies VXDTF2 to selected dataset \n\
33 Usage: basf2 testVXDTF2.py -i <inputFileName> -- --secmap <secmapFile>')
35arg_parser.add_argument(
'--secmap',
'-s', type=str,
36 help=
'Inclusion of the root file containing the trained SecMap for the application of the VXDTF2.')
38arguments = arg_parser.parse_args(sys.argv[1:])
39sec_map_file = arguments.secmap
47setup_name =
'SVDOnlyDefault'
49 setup_name =
'SVDPXDDefault'
54b2.set_log_level(b2.LogLevel.ERROR)
55b2.log_to_file(
'logVXDTF2Evaluation.log', append=
False)
59path = b2.create_path()
62rootInput = b2.register_module(
'RootInput')
63path.add_module(rootInput)
66eventinfoprinter = b2.register_module(
'EventInfoPrinter')
67path.add_module(eventinfoprinter)
70gearbox = b2.register_module(
'Gearbox')
71path.add_module(gearbox)
75geometry = b2.register_module(
'Geometry')
76geometry.param(
'components', [
'BeamPipe',
77 'MagneticFieldConstant4LimitedRSVD',
80path.add_module(geometry)
83setup_VXDTF2(path=path,
85 sec_map_file=sec_map_file,
86 setup_name=setup_name,
87 overlap_filter=
'hopfield',
88 quality_estimator=
'circleFit')
91 genFitExtrapolation = b2.register_module(
'SetupGenfitExtrapolation')
92 path.add_module(genFitExtrapolation)
94 fitter = b2.register_module(
'DAFRecoFitter')
95 path.add_module(fitter)
96 path.add_module(
'TrackCreator', pdgCodes=[211, 13, 321, 2212])
99mcTrackMatcherModule = b2.register_module(
'MCRecoTracksMatcher')
100mcTrackMatcherModule.param({
103 'UsePXDHits': usePXD,
104 'mcRecoTracksStoreArrayName':
'MCRecoTracks',
105 'MinimalPurity': .66,
107path.add_module(mcTrackMatcherModule)
110trackingValidationModule = CombinedTrackingValidationModule(
113 output_file_name=
"VXDTF2Validation.root",
115path.add_module(trackingValidationModule)
117path.add_module(
'Progress')