diff --git a/InnerDetector/InDetConfig/python/BackTrackingConfig.py b/InnerDetector/InDetConfig/python/BackTrackingConfig.py index 51b0de0028dfe4ca5d7c29926b7c38841c973c02..fc121d8dc1537a37dbc84d32cfc47181f567efe3 100644 --- a/InnerDetector/InDetConfig/python/BackTrackingConfig.py +++ b/InnerDetector/InDetConfig/python/BackTrackingConfig.py @@ -36,12 +36,16 @@ def SimpleTRT_SeededSpacePointFinder_ATLCfg(flags, name='InDetTRT_SeededSpFinder # --- decide if use the association tool # if len(InputCollections) > 0: + usePrdAssociationTool = True prefix = 'InDetSegment' suffix = '' - asso_tool = acc.popToolsAndMerge(TC.ConstPRD_AssociationToolCfg(namePrefix = prefix, nameSuffix = suffix)) - acc.addPublicTool(asso_tool) + else: + prefix = '' + suffix = '' + usePrdAssociationTool = False - kwargs.setdefault("SpacePointsSCTName", 'SCT_SpacePoints') # InDetKeys.SCT_SpacePoints() + kwargs.setdefault("SpacePointsSCTName", 'SCT_SpacePoints') + kwargs.setdefault("PRDtoTrackMap", prefix+'PRDtoTrackMap'+suffix if usePrdAssociationTool else "") kwargs.setdefault("PerigeeCut", 1000.) kwargs.setdefault("DirectionPhiCut", .3) kwargs.setdefault("DirectionEtaCut", 1.) @@ -100,11 +104,10 @@ def TRT_SeededTrackFinder_ATLCfg(flags, name='InDetTRT_SeededTrackMaker', InputC # # --- decide which TRT seed space point finder to use # - if flags.InDet.loadTRTSeededSPFinder: - InDetTRT_SeededSpacePointFinder = acc.popToolsAndMerge(TRT_SeededSpacePointFinder_ATLCfg(flags, - InputCollections=InputCollections)) - elif flags.InDet.loadSimpleTRTSeededSPFinder: + if flags.InDet.Tracking.loadSimpleTRTSeededSPFinder: InDetTRT_SeededSpacePointFinder = acc.popToolsAndMerge(SimpleTRT_SeededSpacePointFinder_ATLCfg(flags, InputCollections=InputCollections)) + else: + InDetTRT_SeededSpacePointFinder = acc.popToolsAndMerge(TRT_SeededSpacePointFinder_ATLCfg(flags, InputCollections=InputCollections)) acc.addPublicTool(InDetTRT_SeededSpacePointFinder) @@ -324,21 +327,16 @@ def BackTrackingCfg(flags, InputCollections = None, TrackCollectionKeys=[] , Tra # # ------------------------------------------------------------ - if flags.InDet.doTRTSeededTrackFinder: - # - # --- decide which TRT seed space point finder to use - # - acc.merge(TRT_SeededTrackFinderCfg( flags, - InputCollections=InputCollections)) + acc.merge(TRT_SeededTrackFinderCfg(flags, + InputCollections = InputCollections)) # ------------------------------------------------------------ # - # --- Resolve back tracking tracks ? + # --- Resolve back tracking tracks # # ------------------------------------------------------------ - if flags.InDet.doResolveBackTracks: - acc.merge(TrkAmbiguityScoreCfg(flags)) - acc.merge(TrkAmbiguitySolverCfg(flags, - ClusterSplitProbContainer = ClusterSplitProbContainer)) + acc.merge(TrkAmbiguityScoreCfg(flags)) + acc.merge(TrkAmbiguitySolverCfg(flags, + ClusterSplitProbContainer = ClusterSplitProbContainer)) return acc @@ -379,7 +377,9 @@ if __name__ == "__main__": if not flags.InDet.doDBMstandalone: from InDetConfig.TRTPreProcessing import TRTPreProcessingCfg - top_acc.merge(TRTPreProcessingCfg(flags,(not flags.InDet.doTRTPhaseCalculation or flags.Beam.Type =="collisions"),False)) + top_acc.merge(TRTPreProcessingCfg(flags, + useTimeInfo = not flags.InDet.Tracking.doTRTPhaseCalculation or flags.Beam.Type=="collisions", + usePhase = False)) ######################################## TRTSegmentFinding Configuration ########################################### InputCollections = [] diff --git a/InnerDetector/InDetConfig/python/InDetConfigFlags.py b/InnerDetector/InDetConfig/python/InDetConfigFlags.py index 308b11aa3f4d0ebc760424690affbc1ef0e56209..f4a004a4df609933a345b902a73cf062f362b35b 100644 --- a/InnerDetector/InDetConfig/python/InDetConfigFlags.py +++ b/InnerDetector/InDetConfig/python/InDetConfigFlags.py @@ -32,6 +32,9 @@ def createInDetConfigFlags(): icf.addFlag("InDet.Tracking.useBeamSpotInfoNN", True) # use beam spot position in pixel NN icf.addFlag("InDet.Tracking.nnCutLargeD0Threshold", -1.0) # Enable check for dead modules and FEs icf.addFlag("InDet.Tracking.trtExtensionType", 'xk') # which extension type ("xk"/"DAF") + icf.addFlag("InDet.Tracking.redoTRT_LR", True) # use smart TRT LR/tube hit creator and redo ROTs + icf.addFlag("InDet.Tracking.doTRTPhaseCalculation", False) # control to run TRT phase calculation + icf.addFlag("InDet.Tracking.loadSimpleTRTSeededSPFinder", False) # control which TRT SP finder is used ### Tracking passes/configurations scheduled @@ -53,12 +56,6 @@ def createInDetConfigFlags(): icf.addFlag("InDet.Tracking.doTrackSegmentsDisappearing", True) icf.addFlag("InDet.Tracking.doBeamGas", False) # Turn running of BeamGas second pass on and off - icf.addFlag("InDet.redoTRT_LR", True) # use smart TRT LR/tube hit creator and redo ROTs - icf.addFlag("InDet.doTRTPhaseCalculation", False) # control to run TRT phase calculation - icf.addFlag("InDet.doTRTSeededTrackFinder", True) # control running the back tracking - icf.addFlag("InDet.loadTRTSeededSPFinder", True) # control which SP finder is used exclusive with loadSimpleTRTSeededSPFinder control which SP finder is used - icf.addFlag("InDet.loadSimpleTRTSeededSPFinder", True) - icf.addFlag("InDet.doResolveBackTracks", True) # control running the ambi on back tracking icf.addFlag("InDet.refitROT", True) # control if refit is done from PRD or ROT icf.addFlag("InDet.perigeeExpression", "BeamLine") # Express track parameters wrt. to : 'BeamLine','BeamSpot','Vertex' (first primary vertex) # icf.addFlag("InDet.secondaryVertexCutSetup", "PileUp") # string to store the type of cuts to be used in PV reconstruction: 'StartUp', 'PileUp' diff --git a/InnerDetector/InDetConfig/python/TRTExtensionConfig.py b/InnerDetector/InDetConfig/python/TRTExtensionConfig.py index 2ee5fb1ee3b8b58195823ebc67b12cdc94bad7e0..232a17d95f0765478779df7734dc2e400c7640e7 100644 --- a/InnerDetector/InDetConfig/python/TRTExtensionConfig.py +++ b/InnerDetector/InDetConfig/python/TRTExtensionConfig.py @@ -232,7 +232,9 @@ if __name__ == "__main__": ################# TRTPreProcessing Configuration ###################### if not ConfigFlags.InDet.doDBMstandalone: from InDetConfig.TRTPreProcessing import TRTPreProcessingCfg - top_acc.merge(TRTPreProcessingCfg(ConfigFlags,(not ConfigFlags.InDet.doTRTPhaseCalculation or ConfigFlags.Beam.Type =="collisions"),False)) + top_acc.merge(TRTPreProcessingCfg(ConfigFlags, + useTimeInfo = not ConfigFlags.InDet.Tracking.doTRTPhaseCalculation or ConfigFlags.Beam.Type=="collisions", + usePhase = False)) ################ TRTSegmentFinding Configuration ###################### from InDetConfig.TRTSegmentFindingConfig import TRTSegmentFindingCfg diff --git a/InnerDetector/InDetConfig/python/TRTPreProcessing.py b/InnerDetector/InDetConfig/python/TRTPreProcessing.py index b3a1e933b7c9b89d743a7be5ef0ad4290ee7ab07..d60288e5ae600fe4d29a57d763bf450945ee9dba 100644 --- a/InnerDetector/InDetConfig/python/TRTPreProcessing.py +++ b/InnerDetector/InDetConfig/python/TRTPreProcessing.py @@ -1,4 +1,4 @@ -# Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration # ------------------------------------------------------------ # # ----------- TRT Data-Preparation stage @@ -306,7 +306,9 @@ if __name__ == "__main__": top_acc.merge( SCT_ReadoutGeometryCfg(ConfigFlags) ) if not ConfigFlags.InDet.doDBMstandalone: - top_acc.merge(TRTPreProcessingCfg(ConfigFlags,(not ConfigFlags.InDet.doTRTPhaseCalculation or ConfigFlags.Beam.Type =="collisions"),False)) + top_acc.merge(TRTPreProcessingCfg(ConfigFlags, + useTimeInfo = not ConfigFlags.InDet.Tracking.doTRTPhaseCalculation or ConfigFlags.Beam.Type=="collisions", + usePhase = False)) iovsvc = top_acc.getService('IOVDbSvc') iovsvc.OutputLevel=5 diff --git a/InnerDetector/InDetConfig/python/TRTSegmentFindingConfig.py b/InnerDetector/InDetConfig/python/TRTSegmentFindingConfig.py index d0ad3700204d2fc45f22f286cf4ca70ee98d6ad5..0c367d0db44f66d34a4a011474b1d05381916cea 100644 --- a/InnerDetector/InDetConfig/python/TRTSegmentFindingConfig.py +++ b/InnerDetector/InDetConfig/python/TRTSegmentFindingConfig.py @@ -226,12 +226,14 @@ if __name__ == "__main__": if not flags.InDet.doDBMstandalone: from InDetConfig.TRTPreProcessing import TRTPreProcessingCfg - top_acc.merge(TRTPreProcessingCfg(flags,(not flags.InDet.doTRTPhaseCalculation or flags.Beam.Type =="collisions"),False)) + top_acc.merge(TRTPreProcessingCfg(flags, + useTimeInfo = not flags.InDet.Tracking.doTRTPhaseCalculation or flags.Beam.Type =="collisions", + usePhase = False)) top_acc.merge(TRTSegmentFindingCfg( flags, - "", - InputCombinedInDetTracks, - 'TRTSegments')) # InDetKeys.TRT_Segments + extension = "", + InputCollections = InputCombinedInDetTracks, + BarrelSegments = 'TRTSegments')) ############################################################################# iovsvc = top_acc.getService('IOVDbSvc') diff --git a/InnerDetector/InDetConfig/python/TrackTruthConfig.py b/InnerDetector/InDetConfig/python/TrackTruthConfig.py index af17d7072f0228c41f9355581f150929a3f3a775..521781fa7b478cf0170c1a27f6e8b5fde8f70994 100644 --- a/InnerDetector/InDetConfig/python/TrackTruthConfig.py +++ b/InnerDetector/InDetConfig/python/TrackTruthConfig.py @@ -102,7 +102,9 @@ if __name__ == "__main__": top_acc.merge(InDetRecPreProcessingSiliconCfg(ConfigFlags)) #################### TRTPreProcessing Configurations ##################### from InDetConfig.TRTPreProcessing import TRTPreProcessingCfg - top_acc.merge(TRTPreProcessingCfg(ConfigFlags,(not ConfigFlags.InDet.doTRTPhaseCalculation or ConfigFlags.Beam.Type =="collisions"),False)) + top_acc.merge(TRTPreProcessingCfg(ConfigFlags, + useTimeInfo = not ConfigFlags.InDet.Tracking.doTRTPhaseCalculation or ConfigFlags.Beam.Type=="collisions", + usePhase = False)) #//// TrackingSiPatternConfig configurations from Temporary location ///// ################# SiSPSeededTrackFinder Configurations ################### diff --git a/InnerDetector/InDetConfig/python/TrackingCommonConfig.py b/InnerDetector/InDetConfig/python/TrackingCommonConfig.py index 00aeec99be681622f99df27b54b08471409eedbc..3383706fe3381a254be9300623ffc7468bcdb880 100644 --- a/InnerDetector/InDetConfig/python/TrackingCommonConfig.py +++ b/InnerDetector/InDetConfig/python/TrackingCommonConfig.py @@ -323,7 +323,7 @@ def InDetRefitRotCreatorCfg(flags, name='InDetRefitRotCreator', **kwargs): acc = ComponentAccumulator() default_ScaleHitUncertainty = 2.5 ScaleHitUncertainty = kwargs.pop('ScaleHitUncertainty', default_ScaleHitUncertainty) - if flags.Detector.EnableTRT and flags.InDet.redoTRT_LR: + if flags.Detector.EnableTRT and flags.InDet.Tracking.redoTRT_LR: if 'ToolTRT_DriftCircle' not in kwargs : ToolTRT_DriftCircle = acc.popToolsAndMerge(InDetTRT_DriftCircleOnTrackUniversalToolCfg(ScaleHitUncertainty = ScaleHitUncertainty)) kwargs.setdefault("ToolTRT_DriftCircle", ToolTRT_DriftCircle)