diff --git a/Trigger/TrigTools/TrigInDetConfig/python/TrigInDetConfig.py b/Trigger/TrigTools/TrigInDetConfig/python/TrigInDetConfig.py index b8bb91cab32874b3fb033f4df73952eff8c14548..c2c7042dabf581bf310565d6642ab4874dfc3620 100644 --- a/Trigger/TrigTools/TrigInDetConfig/python/TrigInDetConfig.py +++ b/Trigger/TrigTools/TrigInDetConfig/python/TrigInDetConfig.py @@ -24,7 +24,7 @@ def SiDetElementsRoadMaker_xkCfg( flags, **kwargs ): PropagatorTool = acc.getPublicTool( "InDetTrigPatternPropagator" ), usePixel = flags.Detector.RecoPixel, # DetFlags.haveRIO.pixel_on(), useSCT = flags.Detector.RecoSCT, #DetFlags.haveRIO.SCT_on(), - RoadWidth = 10, #InDetTrigCutValues.RoadWidth() + RoadWidth = flags.InDet.Tracking.roadWidth, ) acc.addPublicTool( tool ) return acc @@ -131,16 +131,16 @@ def SiTrackMaker_xkCfg(flags, **kwargs): tool = CompFactory.InDet.SiTrackMaker_xk( name, RoadTool = acc.getPublicTool( "InDetTrigSiDetElementsRoadMaker" ), CombinatorialTrackFinder = combTrackFinderTool, - pTmin = 1000*Unit.MeV, # TODO use flag for these props - nClustersMin = 7, - nHolesMax = 3, - nHolesGapMax = 3, - SeedsFilterLevel = 0, - Xi2max = 15, - Xi2maxNoAdd = 35, - nWeightedClustersMin = 6, + pTmin = flags.InDet.Tracking.minPT, + nClustersMin = flags.InDet.Tracking.minClusters, + nHolesMax = flags.InDet.Tracking.nHolesMax, + nHolesGapMax = flags.InDet.Tracking.nHolesGapMax, + SeedsFilterLevel = flags.InDet.Tracking.seedFilterLevel, + Xi2max = flags.InDet.Tracking.Xi2max, + Xi2maxNoAdd = flags.InDet.Tracking.Xi2maxNoAdd, + nWeightedClustersMin = flags.InDet.Tracking.nWeightedClustersMin, #CosmicTrack = InDetFlags.doCosmics(), - Xi2maxMultiTracks = 15, + Xi2maxMultiTracks = flags.InDet.Tracking.Xi2max, # follwoing: Trigger/TrigTools/TrigInDetConfig/python/EFIDTracking.py UseAssociationTool = False ) acc.addPublicTool( tool ) return acc @@ -208,7 +208,7 @@ def InDetTrackSummaryHelperToolCfg(flags, **kwargs): TRTStrawSummarySvc = trtStrawSummaryTool, usePixel = flags.Detector.RecoPixel, #DetFlags.haveRIO.pixel_on(), useSCT = flags.Detector.RecoSCT, #DetFlags.haveRIO.SCT_on(), - useTRT = True, # flags.Detector.TRTOn, #DetFlags.haveRIO.TRT_on() + useTRT = flags.Detector.RecoTRT, # flags.Detector.TRTOn, #DetFlags.haveRIO.TRT_on() ) acc.addPublicTool( tool ) @@ -433,6 +433,7 @@ def TrigInDetCondCfg( flags ): return acc def TrigInDetConfig( flags, roisKey="EMRoIs", signatureName='' ): + #If signature specified add suffix to the name of each algorithms signature = "_" + signatureName if signatureName else '' @@ -682,20 +683,20 @@ def TrigInDetConfig( flags, roisKey="EMRoIs", signatureName='' ): RoIs = roisKey, trigZFinder = CompFactory.TrigZFinder(), doZFinder = False, # this and all below, copied over from comparison with running JOs, TODO find a proper surce of this settings - SeedRadBinWidth = 2, - TrackInitialD0Max = 20.0, + SeedRadBinWidth = flags.InDet.Tracking.seedRadBinWidth, + TrackInitialD0Max = 1000. if flags.InDet.Tracking.extension == 'cosmics' else 20.0, TracksName = "TrigFastTrackFinder_Tracks"+signature, OutputCollectionSuffix = signature, TripletDoPSS = False, - Triplet_D0Max = 4.0, - Triplet_D0_PPS_Max = 1.7, + Triplet_D0Max = flags.InDet.Tracking.d0SeedMax, + Triplet_D0_PPS_Max = flags.InDet.Tracking.d0SeedPPSMax, Triplet_MaxBufferLength = 3, Triplet_MinPtFrac = 1, Triplet_nMaxPhiSlice = 53, - doCloneRemoval = True, - doResMon = False, - doSeedRedundancyCheck = True, - pTmin = 1000.0, + doCloneRemoval = flags.InDet.Tracking.doCloneRemoval, + doResMon = flags.InDet.Tracking.doResMon, + doSeedRedundancyCheck = flags.InDet.Tracking.checkRedundantSeeds, + pTmin = flags.InDet.Tracking.minPT, useNewLayerNumberScheme = True, MinHits = 5 ) @@ -723,10 +724,14 @@ def TrigInDetConfig( flags, roisKey="EMRoIs", signatureName='' ): return acc -def indetInViewRecoCfg( flags, viewMakerName, signature='' ): +def indetInViewRecoCfg( inflags, viewMakerName, signature='' ): """ TBD if this function should be defined here or moved to the menu are, for sake of symmetry it is kept here now There would certainly be additional algorithms """ + # redirect InDet.Tracking flags to point to a specific trigger setting + flags = inflags.cloneAndReplace("InDet.Tracking", "Trigger.InDetTracking.Electron") + + from TriggerMenuMT.HLTMenuConfig.Menu.MenuComponents import InViewReco reco = InViewReco( viewMakerName ) algAcc = TrigInDetConfig( flags, roisKey=reco.inputMaker().InViewRoIs, signatureName=signature ) diff --git a/Trigger/TrigTools/TrigInDetConfig/python/TrigTrackingCutFlags.py b/Trigger/TrigTools/TrigInDetConfig/python/TrigTrackingCutFlags.py new file mode 100644 index 0000000000000000000000000000000000000000..526d07c446ec12816aba8bb1e08c250ffa004436 --- /dev/null +++ b/Trigger/TrigTools/TrigInDetConfig/python/TrigTrackingCutFlags.py @@ -0,0 +1,39 @@ +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration +import AthenaCommon.SystemOfUnits as Units +from AthenaConfiguration.AthConfigFlags import AthConfigFlags +from InDetConfig.TrackingCutsFlags import createTrackingFlags + + +def __sliceFlags(): + flags = createTrackingFlags() + flags.minPT = Units.GeV * 0.5 # TODO revise values + flags.addFlag("seedRadBinWidth", 2) + flags.addFlag("d0SeedMax", 4.0) + flags.addFlag("d0SeedPPSMax", 1.7) + flags.addFlag("doCloneRemoval", True) + flags.addFlag("doResMon", False) + flags.addFlag("checkRedundantSeeds", False) + return flags + +def __electronFlags(): + flags = __sliceFlags() + flags.checkRedundantSeeds=True + return flags + +def createTrigTrackingFlags(): + flags = AthConfigFlags() + flags.addFlagsCategory('Trigger.InDetTracking.Electron', __electronFlags, prefix=True) + return flags + +if __name__ == "__main__": + from AthenaCommon.Logging import logging + _msg = logging.getLogger('AthConfigFlags') + _msg.setLevel(2) + from AthenaConfiguration.AllConfigFlags import ConfigFlags as flags + flags.Trigger.doID + flags.dump(".*Trig") + + flags.Trigger.InDetTracking.Electron.minPT = 2.0 * Units.GeV + newflags = flags.cloneAndReplace('InDet.Tracking', 'Trigger.InDetTracking.Electron') + assert newflags.InDet.Tracking.minPT == 2.0 * Units.GeV + flags.dump() \ No newline at end of file diff --git a/Trigger/TriggerCommon/TriggerJobOpts/python/TriggerConfigFlags.py b/Trigger/TriggerCommon/TriggerJobOpts/python/TriggerConfigFlags.py index a44e40225d6898f8f95da5c7e149b17572aa5d9b..20b243769ba91f9e613c0a16f74f0d592d7db22a 100644 --- a/Trigger/TriggerCommon/TriggerJobOpts/python/TriggerConfigFlags.py +++ b/Trigger/TriggerCommon/TriggerJobOpts/python/TriggerConfigFlags.py @@ -275,6 +275,8 @@ def createTriggerFlags(): return createMuonConfigFlags() flags.addFlagsCategory('Trigger.Offline', __muon, prefix=True) + from TrigInDetConfig.TrigTrackingCutFlags import createTrigTrackingFlags + flags.addFlagsCategory( 'Trigger.InDetTracking', createTrigTrackingFlags ) from TriggerJobOpts.MenuConfigFlags import createMenuFlags flags.join( createMenuFlags() )