def TMEF_CombinedMuonTrackBuilder(name='TMEF_CombinedMuonTrackBuilder', **kwargs): from MuonRecExample.MuonStandaloneFlags import muonStandaloneFlags kwargs.setdefault("CaloEnergyParam", "TMEF_CaloEnergyTool") kwargs.setdefault("CaloTSOS", "TMEF_CaloTrackStateOnSurface") kwargs.setdefault("CscRotCreator", "") # enabled with special version in Muid offline kwargs.setdefault("Fitter", "TMEF_iPatFitter") kwargs.setdefault("SLFitter", "TMEF_iPatSLFitter") kwargs.setdefault("MaterialAllocator", "TMEF_MaterialAllocator") kwargs.setdefault("MdtRotCreator", "MdtDriftCircleOnTrackCreator") kwargs.setdefault("MuonHoleRecovery", "") kwargs.setdefault("Propagator", "TMEF_Propagator") kwargs.setdefault("SLPropagator", "TMEF_Propagator") kwargs.setdefault("CleanCombined", True) kwargs.setdefault("CleanStandalone", True) kwargs.setdefault("BadFitChi2", 2.5) kwargs.setdefault("LargeMomentumError", 0.5) #kwargs.setdefault("LineMomentum", muonStandaloneFlags.straightLineFitMomentum()) kwargs.setdefault("LowMomentum", 10. * GeV) kwargs.setdefault("MinEnergy", 0.3 * GeV) kwargs.setdefault("PerigeeAtSpectrometerEntrance", True) kwargs.setdefault("ReallocateMaterial", False) kwargs.setdefault("Vertex2DSigmaRPhi", 100. * mm) kwargs.setdefault("Vertex3DSigmaRPhi", 6. * mm) kwargs.setdefault("Vertex3DSigmaZ", 60. * mm) if not TriggerFlags.run2Config == '2016': kwargs.setdefault("MuonErrorOptimizer", '') # note - the TrackSummaryTool is done as follows offline: # import MuonCombinedRecExample.CombinedMuonTrackSummary # combinedMuonTrackBuilder.TrackSummaryTool = ToolSvc.CombinedMuonTrackSummary # should check our config is really ok here kwargs.setdefault("TrackSummaryTool", 'TMEF_TrackSummaryTool') # extra w.r.t. Muid Offline kwargs.setdefault("Cleaner", "TMEF_TrackCleaner") from MuonRecExample.MuonRecFlags import muonRecFlags if muonRecFlags.doSegmentT0Fit(): kwargs.setdefault("MdtRotCreator", "") kwargs.setdefault("UseCaloTG", True) kwargs.setdefault("CaloMaterialProvider", "TMEF_TrkMaterialProviderTool") if muonRecFlags.enableErrorTuning(): kwargs.setdefault( "MuonErrorOptimizer", CfgGetter.getPublicToolClone( "TMEF_MuidErrorOptimisationTool", "MuonErrorOptimisationTool", PrepareForFit=False, RecreateStartingParameters=False, RefitTool=CfgGetter.getPublicToolClone( "TMEF_MuidRefitTool", "MuonRefitTool", AlignmentErrors=False, Fitter=CfgGetter.getPublicTool("iPatFitter")))) return CfgMgr.Rec__CombinedMuonTrackBuilder(name, **kwargs)
def __init__(self, name="TrigMuonEFStandaloneTrackTool", **kwargs): super(TrigMuonEFStandaloneTrackToolConfig, self).__init__(name, **kwargs) self.CscClusterProvider = CfgGetter.getPublicTool( "CscThresholdClusterBuilderTool") self.SegmentsFinderTool = CfgGetter.getPublicToolClone( "TMEF_SegmentsFinderTool", "MooSegmentFinder", WriteIntermediateResults=False, HoughPatternFinder=CfgGetter.getPublicTool("MuonLayerHoughTool"), DoSegmentCombinations=True) CfgGetter.getPublicTool("MuonHoughPatternFinderTool").RecordAll = False CfgGetter.getPublicTool("MuonLayerHoughTool").DoTruth = False CfgGetter.getPublicTool("MooTrackFitter").SLFit = False # use seeded decoding if (TriggerFlags.MuonSlice.doEFRoIDrivenAccess()): self.useMdtSeededDecoding = True self.useRpcSeededDecoding = True self.useTgcSeededDecoding = True self.useCscSeededDecoding = True # use ROB based seeded decoding instead of PRD based self.useMdtRobDecoding = True self.useRpcRobDecoding = True self.useTgcRobDecoding = False # neither available nor needed self.useCscRobDecoding = False # neither available nor needed from MuonRecExample.MuonRecFlags import muonRecFlags self.useRpcData = muonRecFlags.doRPCs() self.useTgcData = muonRecFlags.doTGCs() self.useCscData = muonRecFlags.doCSCs() # to select barrel(useMdtData=2), endcap(useMdtData=3) if muonRecFlags.doMDTs(): self.useMdtData = 1 else: self.useMdtData = 0 self.useTGCInPriorNextBC = False self.doTimeOutChecks = False self.doTimeOutGuard = False self.maxTgcHits = 0 self.maxCscHits = 0 self.maxRpcHits = 0 self.maxMdtHits = 0 self.doCache = True self.IgnoreMisalginedCSCs = True self.TrackBuilderTool = "TMEF_TrackBuilderTool" self.TrkSummaryTool = "TMEF_TrackSummaryTool" self.MuonCandidateTool = "TMEF_MuonCandidateTool" self.TrackToTrackParticleConvTool = "MuonParticleCreatorTool"
def InDetKalmanTrackFitterBase(name='InDetKalmanTrackFitterBase', **kwargs): from InDetRecExample import TrackingCommon as TrackingCommon from TrkKalmanFitter.TrkKalmanFitterConf import Trk__KalmanFitter from AthenaCommon.AppMgr import ToolSvc split_cluster_map_extension = kwargs.get('SplitClusterMapExtension', '') kwargs.setdefault('ExtrapolatorHandle', TrackingCommon.getInDetExtrapolator()) if 'RIO_OnTrackCreatorHandle' not in kwargs: from InDetRecExample import TrackingCommon as TrackingCommon kwargs = setDefaults( kwargs, RIO_OnTrackCreatorHandle=TrackingCommon.getInDetRefitRotCreator( SplitClusterMapExtension=split_cluster_map_extension)) kwargs.setdefault('MeasurementUpdatorHandle', ToolSvc.InDetUpdator) setTool('KalmanSmootherHandle', 'InDetBKS', kwargs) setTool('KalmanOutlierLogicHandle', 'InDetKOL', kwargs) kwargs.setdefault('DynamicNoiseAdjustorHandle', None) kwargs.setdefault('BrempointAnalyserHandle', None) kwargs.setdefault('AlignableSurfaceProviderHandle', None) if len(split_cluster_map_extension) > 0: if 'RecalibratorHandle' not in kwargs: the_tool_name = 'InDetMeasRecalibST' kwargs.setdefault( 'RecalibratorHandle', CfgGetter.getPublicToolClone( the_tool_name + split_cluster_map_extension, the_tool_name, SplitClusterMapExtension=split_cluster_map_extension)) else: setTool('RecalibratorHandle', 'InDetMeasRecalibST', kwargs) # setTool('InternalDAFHandle','KalmanInternalDAF',kwargs ) # from InDetRecExample.InDetJobProperties import InDetFlags # kwargs.setdefault('DoDNAForElectronsOnly', True if InDetFlags.doBremRecovery() and InDetFlags.trackFitterType() is 'KalmanFitter' else False) return Trk__KalmanFitter(name, **kwargs)
def __init__(self, name="TrigMuonEFStandaloneTrackTool", **kwargs): super(TrigMuonEFStandaloneTrackToolConfig, self).__init__(name, **kwargs) if MuonGeometryFlags.hasCSC(): self.CscClusterProvider = CfgGetter.getPublicTool( "CscThresholdClusterBuilderTool") self.SegmentsFinderTool = CfgGetter.getPublicToolClone( "TMEF_SegmentsFinderTool", "MooSegmentFinder", HoughPatternFinder=CfgGetter.getPublicTool("MuonLayerHoughTool"), Csc2dSegmentMaker=("Csc2dSegmentMaker/Csc2dSegmentMaker" if MuonGeometryFlags.hasCSC() else ""), Csc4dSegmentMaker=("Csc4dSegmentMaker/Csc4dSegmentMaker" if MuonGeometryFlags.hasCSC() else "")) CfgGetter.getPublicTool("MuonHoughPatternFinderTool").RecordAll = False CfgGetter.getPublicTool("MuonLayerHoughTool").DoTruth = False CfgGetter.getPublicTool("MooTrackFitter").SLFit = False self.MdtRawDataProvider = "TMEF_MdtRawDataProviderTool" self.CscRawDataProvider = "TMEF_CscRawDataProviderTool" self.RpcRawDataProvider = "TMEF_RpcRawDataProviderTool" self.TgcRawDataProvider = "TMEF_TgcRawDataProviderTool" #Need to run non-MT version of decoding tools in the trigger since the caching is not available in MT versions #Need different PRD container names to run offline and trigger in same jobs, but there are many tools that depend on these containers... #Since this is legacy code only used for validation comparisons against the Run 3 triggers, will do the not-particularly-nice solution of #creating containers with unique names only if we are running offline and trigger in the same jobs, and otherwise just use the default names. #This means that the trigger output when running the trigger as part of RAWtoESD is not 100% correct (the pattern finding uses the correct containers, #so it's a small effect overall anyway), but that's an use case not currently needed for trigger validation purposes from AthenaCommon.AppMgr import ToolSvc #MDT from MuonMDT_CnvTools.MuonMDT_CnvToolsConf import Muon__MdtRdoToPrepDataTool from MuonCSC_CnvTools.MuonCSC_CnvToolsConf import Muon__CscRdoToCscPrepDataTool from MuonTGC_CnvTools.MuonTGC_CnvToolsConf import Muon__TgcRdoToPrepDataTool from MuonRPC_CnvTools.MuonRPC_CnvToolsConf import Muon__RpcRdoToPrepDataTool MdtRdoToMdtPrepDataTool = Muon__MdtRdoToPrepDataTool( name="TrigEFMdtRdoToPrepDataTool") CscRdoToCscPrepDataTool = Muon__CscRdoToCscPrepDataTool( name="TrigEFCscRdoToPrepDataTool") TgcRdoToTgcPrepDataTool = Muon__TgcRdoToPrepDataTool( name="TrigEFTgcRdoToPrepDataTool") RpcRdoToRpcPrepDataTool = Muon__RpcRdoToPrepDataTool( name="TrigEFRpcRdoToPrepDataTool") if not rec.doRDOTrigger and rec.doESD: MdtRdoToMdtPrepDataTool.OutputCollection = "TrigMDT_DriftCircles" CscRdoToCscPrepDataTool.OutputCollection = "TrigCSC_Measurements" TgcRdoToTgcPrepDataTool.OutputCollection = "TrigTGC_Measurements" TgcRdoToTgcPrepDataTool.OutputCoinCollection = "TrigerT1CoinDataCollection" RpcRdoToRpcPrepDataTool.TriggerOutputCollection = "TrigRPC_Measurements" #InputCollection is really the output RPC coin collection... RpcRdoToRpcPrepDataTool.InputCollection = "TrigRPC_triggerHits" else: MdtRdoToMdtPrepDataTool.OutputCollection = "MDT_DriftCircles" CscRdoToCscPrepDataTool.OutputCollection = "CSC_Measurements" TgcRdoToTgcPrepDataTool.OutputCollection = "TGC_Measurements" TgcRdoToTgcPrepDataTool.OutputCoinCollection = "TrigT1CoinDataCollection" RpcRdoToRpcPrepDataTool.TriggerOutputCollection = "RPC_Measurements" RpcRdoToRpcPrepDataTool.InputCollection = "RPC_triggerHits" ToolSvc += MdtRdoToMdtPrepDataTool self.MdtPrepDataContainer = MdtRdoToMdtPrepDataTool.OutputCollection self.MdtPrepDataProvider = MdtRdoToMdtPrepDataTool #CSC ToolSvc += CscRdoToCscPrepDataTool self.CscPrepDataProvider = CscRdoToCscPrepDataTool #We use the clusters not the PRD hits directly for CSCs self.CscPrepDataContainer = "CSC_Clusters" #TGC ToolSvc += TgcRdoToTgcPrepDataTool self.TgcPrepDataProvider = TgcRdoToTgcPrepDataTool self.TgcPrepDataContainer = TgcRdoToTgcPrepDataTool.OutputCollection #RPC ToolSvc += RpcRdoToRpcPrepDataTool self.RpcPrepDataProvider = RpcRdoToRpcPrepDataTool self.RpcPrepDataContainer = RpcRdoToRpcPrepDataTool.TriggerOutputCollection self.DecodeMdtBS = DetFlags.readRDOBS.MDT_on() self.DecodeRpcBS = DetFlags.readRDOBS.RPC_on() self.DecodeTgcBS = DetFlags.readRDOBS.TGC_on() if MuonGeometryFlags.hasCSC(): self.DecodeCscBS = DetFlags.readRDOBS.CSC_on() # use seeded decoding if (TriggerFlags.MuonSlice.doEFRoIDrivenAccess()): self.useMdtSeededDecoding = True self.useRpcSeededDecoding = True self.useTgcSeededDecoding = True if MuonGeometryFlags.hasCSC(): self.useCscSeededDecoding = True # use ROB based seeded decoding instead of PRD based self.useTgcRobDecoding = False # neither available nor needed self.useCscRobDecoding = False # neither available nor needed self.useRpcData = muonRecFlags.doRPCs() self.useTgcData = muonRecFlags.doTGCs() self.useCscData = muonRecFlags.doCSCs() # to select barrel(useMdtData=2), endcap(useMdtData=3) if muonRecFlags.doMDTs(): self.useMdtData = 1 else: self.useMdtData = 0 self.useTGCInPriorNextBC = False self.doTimeOutChecks = False self.doTimeOutGuard = False self.maxTgcHits = 0 self.maxCscHits = 0 self.maxRpcHits = 0 self.maxMdtHits = 0 self.doCache = True self.IgnoreMisalginedCSCs = False self.TrackBuilderTool = "TMEF_TrackBuilderTool" self.TrkSummaryTool = "TMEF_TrackSummaryTool" self.MuonCandidateTool = "TMEF_MuonCandidateTool" self.TrackToTrackParticleConvTool = "MuonParticleCreatorTool" import MuonCondAlg.MdtCondDbAlgConfig # noqa: F401 (MDT conditions, needed for the MuonStationIntersectSvc)
def __init__(self, InputCollections=None, ResolvedTrackCollectionKey=None, SiSPSeededTrackCollectionKey=None, NewTrackingCuts=None, TrackCollectionKeys=[], TrackCollectionTruthKeys=[]): from InDetRecExample.InDetJobProperties import InDetFlags from InDetRecExample.InDetKeys import InDetKeys import InDetRecExample.TrackingCommon as TrackingCommon # # --- get ToolSvc and topSequence # from AthenaCommon.AppMgr import ToolSvc from AthenaCommon.AlgSequence import AlgSequence topSequence = AlgSequence() # # --- decide if use the association tool # if (len(InputCollections) > 0) and ( NewTrackingCuts.mode() == "LowPt" or NewTrackingCuts.mode() == "VeryLowPt" or NewTrackingCuts.mode() == "LargeD0" or NewTrackingCuts.mode() == "R3LargeD0" or NewTrackingCuts.mode() == "LowPtLargeD0" or NewTrackingCuts.mode() == "BeamGas" or NewTrackingCuts.mode() == "ForwardTracks" or NewTrackingCuts.mode() == "ForwardSLHCTracks" or NewTrackingCuts.mode() == "Disappearing" or NewTrackingCuts.mode() == "VeryForwardSLHCTracks" or NewTrackingCuts.mode() == "SLHCConversionFinding"): usePrdAssociationTool = True else: usePrdAssociationTool = False # # --- get list of already associated hits (always do this, even if no other tracking ran before) # asso_tool = None if usePrdAssociationTool: prefix = 'InDet' suffix = NewTrackingCuts.extension() InDetPRD_Association = TrackingCommon.getInDetTrackPRD_Association( namePrefix=prefix, nameSuffix=suffix, TracksName=list(InputCollections)) # asso_tool = TrackingCommon.getConstPRD_AssociationTool(namePrefix = prefix, nameSuffix = suffix) topSequence += InDetPRD_Association if (InDetFlags.doPrintConfigurables()): printfunc(InDetPRD_Association) # ------------------------------------------------------------ # # ----------- SiSPSeededTrackFinder # # ------------------------------------------------------------ if InDetFlags.doSiSPSeededTrackFinder(): # # --- Space points seeds maker, use different ones for cosmics and collisions # if NewTrackingCuts.mode() == "DBM": from SiSpacePointsSeedTool_xk.SiSpacePointsSeedTool_xkConf import InDet__SiSpacePointsSeedMaker_ATLxk as SiSpacePointsSeedMaker elif InDetFlags.doCosmics(): from SiSpacePointsSeedTool_xk.SiSpacePointsSeedTool_xkConf import InDet__SiSpacePointsSeedMaker_Cosmic as SiSpacePointsSeedMaker elif InDetFlags.doHeavyIon(): from SiSpacePointsSeedTool_xk.SiSpacePointsSeedTool_xkConf import InDet__SiSpacePointsSeedMaker_HeavyIon as SiSpacePointsSeedMaker elif NewTrackingCuts.mode() == "LowPt" or NewTrackingCuts.mode( ) == "VeryLowPt" or (NewTrackingCuts.mode() == "Pixel" and InDetFlags.doMinBias()): from SiSpacePointsSeedTool_xk.SiSpacePointsSeedTool_xkConf import InDet__SiSpacePointsSeedMaker_LowMomentum as SiSpacePointsSeedMaker elif NewTrackingCuts.mode() == "BeamGas": from SiSpacePointsSeedTool_xk.SiSpacePointsSeedTool_xkConf import InDet__SiSpacePointsSeedMaker_BeamGas as SiSpacePointsSeedMaker elif NewTrackingCuts.mode() == "SLHC" or NewTrackingCuts.mode( ) == "ForwardSLHCTracks" or NewTrackingCuts.mode( ) == "VeryForwardSLHCTracks": from SiSpacePointsSeedTool_xk.SiSpacePointsSeedTool_xkConf import InDet__SiSpacePointsSeedMaker_ITK as SiSpacePointsSeedMaker else: from SiSpacePointsSeedTool_xk.SiSpacePointsSeedTool_xkConf import InDet__SiSpacePointsSeedMaker_ATLxk as SiSpacePointsSeedMaker InDetSiSpacePointsSeedMaker = SiSpacePointsSeedMaker( name="InDetSpSeedsMaker" + NewTrackingCuts.extension(), pTmin=NewTrackingCuts.minPT(), maxdImpact=NewTrackingCuts.maxPrimaryImpact(), maxZ=NewTrackingCuts.maxZImpact(), minZ=-NewTrackingCuts.maxZImpact(), usePixel=NewTrackingCuts.usePixel(), SpacePointsPixelName=InDetKeys.PixelSpacePoints(), # useSCT = NewTrackingCuts.useSCT(), useSCT=(NewTrackingCuts.useSCT() and NewTrackingCuts.useSCTSeeding()), SpacePointsSCTName=InDetKeys.SCT_SpacePoints(), # useOverlapSpCollection = NewTrackingCuts.useSCT(), useOverlapSpCollection=(NewTrackingCuts.useSCT() and NewTrackingCuts.useSCTSeeding()), SpacePointsOverlapName=InDetKeys.OverlapSpacePoints(), radMax=NewTrackingCuts.radMax(), RapidityCut=NewTrackingCuts.maxEta()) if NewTrackingCuts.mode() == "Offline" or InDetFlags.doHeavyIon( ) or NewTrackingCuts.mode() == "ForwardTracks": InDetSiSpacePointsSeedMaker.maxdImpactPPS = NewTrackingCuts.maxdImpactPPSSeeds( ) InDetSiSpacePointsSeedMaker.maxdImpactSSS = NewTrackingCuts.maxdImpactSSSSeeds( ) if not InDetFlags.doHeavyIon(): InDetSiSpacePointsSeedMaker.maxSeedsForSpacePointStrips = NewTrackingCuts.MaxSeedsPerSP_Strips( ) InDetSiSpacePointsSeedMaker.maxSeedsForSpacePointPixels = NewTrackingCuts.MaxSeedsPerSP_Pixels( ) InDetSiSpacePointsSeedMaker.alwaysKeepConfirmedStripSeeds = NewTrackingCuts.KeepAllConfirmedStripSeeds( ) InDetSiSpacePointsSeedMaker.alwaysKeepConfirmedPixelSeeds = NewTrackingCuts.KeepAllConfirmedPixelSeeds( ) if NewTrackingCuts.mode() == "R3LargeD0": InDetSiSpacePointsSeedMaker.optimisePhiBinning = False InDetSiSpacePointsSeedMaker.usePixel = False InDetSiSpacePointsSeedMaker.etaMax = NewTrackingCuts.maxEta() InDetSiSpacePointsSeedMaker.maxSeedsForSpacePointStrips = NewTrackingCuts.MaxSeedsPerSP_Strips( ) InDetSiSpacePointsSeedMaker.alwaysKeepConfirmedStripSeeds = NewTrackingCuts.KeepAllConfirmedStripSeeds( ) InDetSiSpacePointsSeedMaker.maxdRadius = 150 InDetSiSpacePointsSeedMaker.seedScoreBonusConfirmationSeed = -2000 #let's be generous if usePrdAssociationTool: # not all classes have that property !!! InDetSiSpacePointsSeedMaker.PRDtoTrackMap = prefix+'PRDtoTrackMap'+suffix \ if usePrdAssociationTool else '' if not InDetFlags.doCosmics(): InDetSiSpacePointsSeedMaker.maxRadius1 = 0.75 * NewTrackingCuts.radMax( ) InDetSiSpacePointsSeedMaker.maxRadius2 = NewTrackingCuts.radMax( ) InDetSiSpacePointsSeedMaker.maxRadius3 = NewTrackingCuts.radMax( ) if NewTrackingCuts.mode() == "LowPt" or NewTrackingCuts.mode( ) == "VeryLowPt" or (NewTrackingCuts.mode() == "Pixel" and InDetFlags.doMinBias()): try: InDetSiSpacePointsSeedMaker.pTmax = NewTrackingCuts.maxPT() except: pass InDetSiSpacePointsSeedMaker.mindRadius = 4.0 if NewTrackingCuts.mode() == "SLHC" or NewTrackingCuts.mode( ) == "SLHCConversionFinding": InDetSiSpacePointsSeedMaker.minRadius1 = 0 InDetSiSpacePointsSeedMaker.minRadius2 = 0 InDetSiSpacePointsSeedMaker.minRadius3 = 0 InDetSiSpacePointsSeedMaker.maxRadius1 = 1000. * Units.mm InDetSiSpacePointsSeedMaker.maxRadius2 = 1000. * Units.mm InDetSiSpacePointsSeedMaker.maxRadius3 = 1000. * Units.mm if NewTrackingCuts.mode( ) == "ForwardTracks" or NewTrackingCuts.mode( ) == "ForwardSLHCTracks" or NewTrackingCuts.mode( ) == "VeryForwardSLHCTracks": InDetSiSpacePointsSeedMaker.checkEta = True InDetSiSpacePointsSeedMaker.etaMin = NewTrackingCuts.minEta() InDetSiSpacePointsSeedMaker.etaMax = NewTrackingCuts.maxEta() InDetSiSpacePointsSeedMaker.RapidityCut = NewTrackingCuts.maxEta( ) if NewTrackingCuts.mode() == "DBM": InDetSiSpacePointsSeedMaker.etaMin = NewTrackingCuts.minEta() InDetSiSpacePointsSeedMaker.etaMax = NewTrackingCuts.maxEta() InDetSiSpacePointsSeedMaker.useDBM = True #InDetSiSpacePointsSeedMaker.OutputLevel = VERBOSE ToolSvc += InDetSiSpacePointsSeedMaker if (InDetFlags.doPrintConfigurables()): printfunc(InDetSiSpacePointsSeedMaker) # # --- Z-coordinates primary vertices finder (only for collisions) # if InDetFlags.useZvertexTool() and NewTrackingCuts.mode() != "DBM": from SiZvertexTool_xk.SiZvertexTool_xkConf import InDet__SiZvertexMaker_xk InDetZvertexMaker = InDet__SiZvertexMaker_xk( name='InDetZvertexMaker' + NewTrackingCuts.extension(), Zmax=NewTrackingCuts.maxZImpact(), Zmin=-NewTrackingCuts.maxZImpact(), minRatio=0.17) # not default InDetZvertexMaker.SeedMakerTool = InDetSiSpacePointsSeedMaker if InDetFlags.doHeavyIon(): InDetZvertexMaker.HistSize = 2000 ###InDetZvertexMaker.minContent = 200 InDetZvertexMaker.minContent = 30 ToolSvc += InDetZvertexMaker if (InDetFlags.doPrintConfigurables()): printfunc(InDetZvertexMaker) else: InDetZvertexMaker = None # # --- SCT and Pixel detector elements road builder # from SiDetElementsRoadTool_xk.SiDetElementsRoadTool_xkConf import InDet__SiDetElementsRoadMaker_xk InDetSiDetElementsRoadMaker = InDet__SiDetElementsRoadMaker_xk( name='InDetSiRoadMaker' + NewTrackingCuts.extension(), PropagatorTool=InDetPatternPropagator, usePixel=NewTrackingCuts.usePixel(), PixManagerLocation=InDetKeys.PixelManager(), useSCT=NewTrackingCuts.useSCT(), SCTManagerLocation=InDetKeys.SCT_Manager(), RoadWidth=NewTrackingCuts.RoadWidth()) if (InDetFlags.doPrintConfigurables()): printfunc(InDetSiDetElementsRoadMaker) # Condition algorithm for InDet__SiDetElementsRoadMaker_xk if DetFlags.haveRIO.pixel_on(): # Condition algorithm for SiCombinatorialTrackFinder_xk from AthenaCommon.AlgSequence import AthSequencer condSeq = AthSequencer("AthCondSeq") if not hasattr(condSeq, "InDetSiDetElementBoundaryLinksPixelCondAlg"): from SiCombinatorialTrackFinderTool_xk.SiCombinatorialTrackFinderTool_xkConf import InDet__SiDetElementBoundaryLinksCondAlg_xk condSeq += InDet__SiDetElementBoundaryLinksCondAlg_xk( name="InDetSiDetElementBoundaryLinksPixelCondAlg", ReadKey="PixelDetectorElementCollection", WriteKey="PixelDetElementBoundaryLinks_xk", UsePixelDetectorManager=True) if NewTrackingCuts.useSCT(): from AthenaCommon.AlgSequence import AthSequencer condSeq = AthSequencer("AthCondSeq") if not hasattr(condSeq, "InDet__SiDetElementsRoadCondAlg_xk"): from SiDetElementsRoadTool_xk.SiDetElementsRoadTool_xkConf import InDet__SiDetElementsRoadCondAlg_xk condSeq += InDet__SiDetElementsRoadCondAlg_xk( name="InDet__SiDetElementsRoadCondAlg_xk") if not hasattr(condSeq, "InDetSiDetElementBoundaryLinksSCTCondAlg"): from SiCombinatorialTrackFinderTool_xk.SiCombinatorialTrackFinderTool_xkConf import InDet__SiDetElementBoundaryLinksCondAlg_xk condSeq += InDet__SiDetElementBoundaryLinksCondAlg_xk( name="InDetSiDetElementBoundaryLinksSCTCondAlg", ReadKey="SCT_DetectorElementCollection", WriteKey="SCT_DetElementBoundaryLinks_xk") # # --- Local track finding using sdCaloSeededSSSpace point seed # # @TODO ensure that PRD association map is used if usePrdAssociationTool is set is_dbm = InDetFlags.doDBMstandalone() or NewTrackingCuts.extension( ) == 'DBM' rot_creator_digital = TrackingCommon.getInDetRotCreatorDigital( ) if not is_dbm else TrackingCommon.getInDetRotCreatorDBM() from SiCombinatorialTrackFinderTool_xk.SiCombinatorialTrackFinderTool_xkConf import InDet__SiCombinatorialTrackFinder_xk track_finder = InDet__SiCombinatorialTrackFinder_xk( name='InDetSiComTrackFinder' + NewTrackingCuts.extension(), PropagatorTool=InDetPatternPropagator, UpdatorTool=InDetPatternUpdator, RIOonTrackTool=rot_creator_digital, usePixel=DetFlags.haveRIO.pixel_on(), useSCT=DetFlags.haveRIO.SCT_on() if not is_dbm else False, PixelClusterContainer=InDetKeys.PixelClusters(), SCT_ClusterContainer=InDetKeys.SCT_Clusters()) if is_dbm: track_finder.MagneticFieldMode = "NoField" track_finder.TrackQualityCut = 9.3 if (DetFlags.haveRIO.SCT_on()): track_finder.SctSummaryTool = InDetSCT_ConditionsSummaryTool else: track_finder.SctSummaryTool = None ToolSvc += track_finder useBremMode = NewTrackingCuts.mode( ) == "Offline" or NewTrackingCuts.mode( ) == "SLHC" or NewTrackingCuts.mode() == "DBM" from SiTrackMakerTool_xk.SiTrackMakerTool_xkConf import InDet__SiTrackMaker_xk as SiTrackMaker InDetSiTrackMaker = SiTrackMaker( name='InDetSiTrackMaker' + NewTrackingCuts.extension(), useSCT=NewTrackingCuts.useSCT(), usePixel=NewTrackingCuts.usePixel(), RoadTool=InDetSiDetElementsRoadMaker, CombinatorialTrackFinder=track_finder, pTmin=NewTrackingCuts.minPT(), pTminBrem=NewTrackingCuts.minPTBrem(), pTminSSS=InDetFlags.pT_SSScut(), nClustersMin=NewTrackingCuts.minClusters(), nHolesMax=NewTrackingCuts.nHolesMax(), nHolesGapMax=NewTrackingCuts.nHolesGapMax(), SeedsFilterLevel=NewTrackingCuts.seedFilterLevel(), Xi2max=NewTrackingCuts.Xi2max(), Xi2maxNoAdd=NewTrackingCuts.Xi2maxNoAdd(), nWeightedClustersMin=NewTrackingCuts.nWeightedClustersMin(), CosmicTrack=InDetFlags.doCosmics(), Xi2maxMultiTracks=NewTrackingCuts.Xi2max(), # was 3. useSSSseedsFilter=InDetFlags.doSSSfilter(), doMultiTracksProd=True, useBremModel=InDetFlags.doBremRecovery() and useBremMode, # only for NewTracking the brem is debugged !!! doCaloSeededBrem=InDetFlags.doCaloSeededBrem(), doHadCaloSeedSSS=InDetFlags.doHadCaloSeededSSS(), phiWidth=NewTrackingCuts.phiWidthBrem(), etaWidth=NewTrackingCuts.etaWidthBrem(), InputClusterContainerName=InDetKeys.CaloClusterROIContainer( ), # "InDetCaloClusterROIs" InputHadClusterContainerName=InDetKeys. HadCaloClusterROIContainer(), # "InDetCaloClusterROIs" UseAssociationTool=usePrdAssociationTool) if NewTrackingCuts.mode() == "SLHC" or NewTrackingCuts.mode( ) == "ForwardSLHCTracks" or NewTrackingCuts.mode( ) == "VeryForwardSLHCTracks": InDetSiTrackMaker.ITKGeometry = True if NewTrackingCuts.mode() == "DBM": InDetSiTrackMaker.MagneticFieldMode = "NoField" InDetSiTrackMaker.useBremModel = False InDetSiTrackMaker.doMultiTracksProd = False InDetSiTrackMaker.TrackPatternRecoInfo = 'SiSPSeededFinder' InDetSiTrackMaker.pTminSSS = -1 InDetSiTrackMaker.CosmicTrack = False InDetSiTrackMaker.useSSSseedsFilter = False InDetSiTrackMaker.doCaloSeededBrem = False InDetSiTrackMaker.doHadCaloSeedSSS = False elif InDetFlags.doCosmics(): InDetSiTrackMaker.TrackPatternRecoInfo = 'SiSpacePointsSeedMaker_Cosmic' elif InDetFlags.doHeavyIon(): InDetSiTrackMaker.TrackPatternRecoInfo = 'SiSpacePointsSeedMaker_HeavyIon' elif NewTrackingCuts.mode() == "LowPt": InDetSiTrackMaker.TrackPatternRecoInfo = 'SiSpacePointsSeedMaker_LowMomentum' elif NewTrackingCuts.mode() == "VeryLowPt" or ( NewTrackingCuts.mode() == "Pixel" and InDetFlags.doMinBias()): InDetSiTrackMaker.TrackPatternRecoInfo = 'SiSpacePointsSeedMaker_VeryLowMomentum' elif NewTrackingCuts.mode() == "BeamGas": InDetSiTrackMaker.TrackPatternRecoInfo = 'SiSpacePointsSeedMaker_BeamGas' elif NewTrackingCuts.mode() == "ForwardTracks": InDetSiTrackMaker.TrackPatternRecoInfo = 'SiSpacePointsSeedMaker_ForwardTracks' elif NewTrackingCuts.mode() == "ForwardSLHCTracks": InDetSiTrackMaker.TrackPatternRecoInfo = 'SiSpacePointsSeedMaker_ForwardSLHCTracks' elif NewTrackingCuts.mode() == "VeryForwardSLHCTracks": InDetSiTrackMaker.TrackPatternRecoInfo = 'SiSpacePointsSeedMaker_VeryForwardSLHCTracks' elif NewTrackingCuts.mode() == "SLHCConversionFinding": InDetSiTrackMaker.TrackPatternRecoInfo = 'SiSpacePointsSeedMaker_SLHCConversionTracks' elif NewTrackingCuts.mode() == "LargeD0" or NewTrackingCuts.mode( ) == "R3LargeD0" or NewTrackingCuts.mode() == "LowPtLargeD0": InDetSiTrackMaker.TrackPatternRecoInfo = 'SiSpacePointsSeedMaker_LargeD0' else: InDetSiTrackMaker.TrackPatternRecoInfo = 'SiSPSeededFinder' if InDetFlags.doStoreTrackSeeds(): from SeedToTrackConversionTool.SeedToTrackConversionToolConf import InDet__SeedToTrackConversionTool InDet_SeedToTrackConversion = InDet__SeedToTrackConversionTool( name="InDet_SeedToTrackConversion", OutputName=InDetKeys.SiSPSeedSegments() + NewTrackingCuts.extension()) InDetSiTrackMaker.SeedToTrackConversion = InDet_SeedToTrackConversion InDetSiTrackMaker.SeedSegmentsWrite = True #InDetSiTrackMaker.OutputLevel = VERBOSE ToolSvc += InDetSiTrackMaker if (InDetFlags.doPrintConfigurables()): printfunc(InDetSiTrackMaker) # # set output track collection name # self.__SiTrackCollection = SiSPSeededTrackCollectionKey # # --- Setup Track finder using space points seeds # from SiSPSeededTrackFinder.SiSPSeededTrackFinderConf import InDet__SiSPSeededTrackFinder if NewTrackingCuts.mode( ) == "ForwardSLHCTracks" or NewTrackingCuts.mode( ) == "ForwardTracks": InDetSiSPSeededTrackFinder = InDet__SiSPSeededTrackFinder(name = 'InDetSiSpTrackFinder'+NewTrackingCuts.extension(), TrackTool = InDetSiTrackMaker, PRDtoTrackMap = prefix+'PRDtoTrackMap'+suffix \ if usePrdAssociationTool else '', TrackSummaryTool = TrackingCommon.getInDetTrackSummaryToolNoHoleSearch(), TracksLocation = self.__SiTrackCollection, SeedsTool = InDetSiSpacePointsSeedMaker, useZvertexTool = InDetFlags.useZvertexTool(), ZvertexTool = InDetZvertexMaker, useNewStrategy = False, useMBTSTimeDiff = InDetFlags.useMBTSTimeDiff(), useZBoundFinding = False) if InDetFlags.doHeavyIon(): InDetSiSPSeededTrackFinder.FreeClustersCut = 2 #Heavy Ion optimization from Igor else: InDetSiSPSeededTrackFinder = InDet__SiSPSeededTrackFinder(name = 'InDetSiSpTrackFinder'+NewTrackingCuts.extension(), TrackTool = InDetSiTrackMaker, PRDtoTrackMap = prefix+'PRDtoTrackMap'+suffix \ if usePrdAssociationTool else '', TrackSummaryTool = TrackingCommon.getInDetTrackSummaryToolNoHoleSearch(), TracksLocation = self.__SiTrackCollection, SeedsTool = InDetSiSpacePointsSeedMaker, useZvertexTool = InDetFlags.useZvertexTool() and NewTrackingCuts.mode() != "DBM", ZvertexTool = InDetZvertexMaker, useNewStrategy = InDetFlags.useNewSiSPSeededTF() and NewTrackingCuts.mode() != "DBM", useMBTSTimeDiff = InDetFlags.useMBTSTimeDiff(), useZBoundFinding = NewTrackingCuts.doZBoundary() and NewTrackingCuts.mode() != "DBM") if InDetFlags.doHeavyIon(): InDetSiSPSeededTrackFinder.FreeClustersCut = 2 #Heavy Ion optimization from Igor #InDetSiSPSeededTrackFinder.OutputLevel =VERBOSE topSequence += InDetSiSPSeededTrackFinder if (InDetFlags.doPrintConfigurables()): printfunc(InDetSiSPSeededTrackFinder) if not InDetFlags.doSGDeletion(): if InDetFlags.doTruth(): # # set up the truth info for this container # include("InDetRecExample/ConfiguredInDetTrackTruth.py") InDetTracksTruth = ConfiguredInDetTrackTruth( self.__SiTrackCollection, self.__SiTrackCollection + "DetailedTruth", self.__SiTrackCollection + "TruthCollection") # # add final output for statistics # TrackCollectionKeys += [InDetTracksTruth.Tracks()] TrackCollectionTruthKeys += [ InDetTracksTruth.TracksTruth() ] else: TrackCollectionKeys += [self.__SiTrackCollection] # ------------------------------------------------------------ # # ---------- Ambiguity solving # # ------------------------------------------------------------ if InDetFlags.doAmbiSolving(): # # --- load InnerDetector TrackSelectionTool # prob1 = InDetFlags.pixelClusterSplitProb1() prob2 = InDetFlags.pixelClusterSplitProb2() nhitsToAllowSplitting = 9 from AtlasGeoModel.CommonGMJobProperties import CommonGeometryFlags if CommonGeometryFlags.Run() == 1: prob1 = InDetFlags.pixelClusterSplitProb1_run1() prob2 = InDetFlags.pixelClusterSplitProb2_run1() nhitsToAllowSplitting = 8 if InDetFlags.doTIDE_Ambi() and not ( NewTrackingCuts.mode() == "ForwardSLHCTracks" or NewTrackingCuts.mode() == "ForwardTracks" or NewTrackingCuts.mode() == "DBM"): from InDetAmbiTrackSelectionTool.InDetAmbiTrackSelectionToolConf import InDet__InDetDenseEnvAmbiTrackSelectionTool as AmbiTrackSelectionTool else: from InDetAmbiTrackSelectionTool.InDetAmbiTrackSelectionToolConf import InDet__InDetAmbiTrackSelectionTool as AmbiTrackSelectionTool InDetAmbiTrackSelectionTool = AmbiTrackSelectionTool( name='InDetAmbiTrackSelectionTool' + NewTrackingCuts.extension(), DriftCircleCutTool=InDetTRTDriftCircleCut, AssociationTool=TrackingCommon. getInDetPRDtoTrackMapToolGangedPixels(), minHits=NewTrackingCuts.minClusters(), minNotShared=NewTrackingCuts.minSiNotShared(), maxShared=NewTrackingCuts.maxShared(), minTRTHits=0, # used for Si only tracking !!! sharedProbCut=0.10, UseParameterization=False, Cosmics=InDetFlags.doCosmics(), doPixelSplitting=InDetFlags.doPixelClusterSplitting() and NewTrackingCuts.mode != "DBM") if InDetFlags.doTIDE_Ambi() and not ( NewTrackingCuts.mode() == "ForwardSLHCTracks" or NewTrackingCuts.mode() == "ForwardTracks" or NewTrackingCuts.mode() == "DBM"): InDetAmbiTrackSelectionTool.sharedProbCut = prob1 InDetAmbiTrackSelectionTool.sharedProbCut2 = prob2 InDetAmbiTrackSelectionTool.minSiHitsToAllowSplitting = nhitsToAllowSplitting InDetAmbiTrackSelectionTool.minUniqueSCTHits = 4 InDetAmbiTrackSelectionTool.minTrackChi2ForSharedHits = 3 InDetAmbiTrackSelectionTool.InputHadClusterContainerName = InDetKeys.HadCaloClusterROIContainer( ) + "Bjet" InDetAmbiTrackSelectionTool.doHadCaloSeed = InDetFlags.doCaloSeededAmbi( ) #Do special cuts in region of interest InDetAmbiTrackSelectionTool.minPtSplit = InDetFlags.pixelClusterSplitMinPt( ) #Only allow split clusters on track withe pt greater than this MeV InDetAmbiTrackSelectionTool.maxSharedModulesInROI = 3 #Maximum number of shared modules for tracks in ROI InDetAmbiTrackSelectionTool.minNotSharedInROI = 2 #Minimum number of unique modules for tracks in ROI InDetAmbiTrackSelectionTool.minSiHitsToAllowSplittingInROI = 7 #Minimum number of Si hits to allow splittings for tracks in ROI InDetAmbiTrackSelectionTool.phiWidth = 0.1 #Split cluster ROI size InDetAmbiTrackSelectionTool.etaWidth = 0.1 #Split cluster ROI size InDetAmbiTrackSelectionTool.InputEmClusterContainerName = InDetKeys.CaloClusterROIContainer( ) InDetAmbiTrackSelectionTool.doEmCaloSeed = False #Only split in cluster in region of interest InDetAmbiTrackSelectionTool.minPtConv = 10000 #Only allow split clusters on track withe pt greater than this MeV InDetAmbiTrackSelectionTool.phiWidthEM = 0.05 #Split cluster ROI size InDetAmbiTrackSelectionTool.etaWidthEM = 0.05 #Split cluster ROI size if NewTrackingCuts.mode() == "DBM": InDetAmbiTrackSelectionTool.Cosmics = False InDetAmbiTrackSelectionTool.UseParameterization = False InDetAmbiTrackSelectionTool.doPixelSplitting = False InDetAmbiTrackSelectionTool.maxShared = 1000 InDetAmbiTrackSelectionTool.maxTracksPerSharedPRD = 2 InDetAmbiTrackSelectionTool.minHits = 0 InDetAmbiTrackSelectionTool.minNotShared = 0 InDetAmbiTrackSelectionTool.minScoreShareTracks = 0.0 InDetAmbiTrackSelectionTool.minTRTHits = 0 InDetAmbiTrackSelectionTool.sharedProbCut = 0.1 # if NewTrackingCuts.mode() == "ForwardTracks": # InDetAmbiTrackSelectionTool.OutputLevel = VERBOSE ToolSvc += InDetAmbiTrackSelectionTool if (InDetFlags.doPrintConfigurables()): printfunc(InDetAmbiTrackSelectionTool) # # --- set up different Scoring Tool for collisions and cosmics # if InDetFlags.doCosmics() and NewTrackingCuts.mode() != "DBM": InDetAmbiScoringTool = TrackingCommon.getInDetCosmicsScoringTool( NewTrackingCuts) elif (NewTrackingCuts.mode() == "R3LargeD0" and InDetFlags.nnCutLargeD0Threshold > 0): # Set up NN config InDetAmbiScoringTool = TrackingCommon.getInDetNNScoringTool( NewTrackingCuts) else: InDetAmbiScoringTool = TrackingCommon.getInDetAmbiScoringTool( NewTrackingCuts) # # --- load Ambiguity Processor # useBremMode = NewTrackingCuts.mode( ) == "Offline" or NewTrackingCuts.mode() == "SLHC" if InDetFlags.doTIDE_Ambi() and not ( NewTrackingCuts.mode() == "ForwardSLHCTracks" or NewTrackingCuts.mode() == "ForwardTracks" or NewTrackingCuts.mode() == "DBM"): # DenseEnvironmentsAmbiguityProcessorTool from TrkAmbiguityProcessor.TrkAmbiguityProcessorConf import Trk__DenseEnvironmentsAmbiguityProcessorTool as ProcessorTool use_low_pt_fitter = True if NewTrackingCuts.mode( ) == "LowPt" or NewTrackingCuts.mode() == "VeryLowPt" or ( NewTrackingCuts.mode() == "Pixel" and InDetFlags.doMinBias()) else False from AthenaCommon import CfgGetter from InDetRecExample.TrackingCommon import setDefaults if len(NewTrackingCuts.extension()) > 0: fitter_args = setDefaults( {}, SplitClusterMapExtension=NewTrackingCuts.extension()) fitter_list=[ CfgGetter.getPublicToolClone('InDetTrackFitter'+NewTrackingCuts.extension(), 'InDetTrackFitter',**fitter_args) if not use_low_pt_fitter \ else CfgGetter.getPublicToolClone('InDetTrackFitterLowPt'+NewTrackingCuts.extension(), 'InDetTrackFitterLowPt',**fitter_args)] else: fitter_list=[ CfgGetter.getPublicTool('InDetTrackFitter') if not use_low_pt_fitter \ else CfgGetter.getPublicTool('InDetTrackFitterLowPt')] if InDetFlags.doRefitInvalidCov(): from AthenaCommon import CfgGetter if len(NewTrackingCuts.extension()) > 0: fitter_args = setDefaults( {}, SplitClusterMapExtension=NewTrackingCuts.extension( )) fitter_list.append( CfgGetter.getPublicToolClone( 'KalmanFitter' + NewTrackingCuts.extension(), 'KalmanFitter', **fitter_args)) fitter_list.append( CfgGetter.getPublicToolClone( 'ReferenceKalmanFitter' + NewTrackingCuts.extension(), 'ReferenceKalmanFitter', **fitter_args)) else: fitter_list.append( CfgGetter.getPublicTool('KalmanFitter')) fitter_list.append( CfgGetter.getPublicTool('ReferenceKalmanFitter')) InDetAmbiguityProcessor = ProcessorTool( name='InDetAmbiguityProcessor' + NewTrackingCuts.extension(), Fitter=fitter_list, AssociationTool=TrackingCommon. getInDetPRDtoTrackMapToolGangedPixels(), AssociationMapName='PRDToTrackMap' + NewTrackingCuts.extension(), TrackSummaryTool=TrackingCommon.getInDetTrackSummaryTool(), ScoringTool=InDetAmbiScoringTool, SelectionTool=InDetAmbiTrackSelectionTool, SuppressHoleSearch=False, tryBremFit=InDetFlags.doBremRecovery() and useBremMode and NewTrackingCuts.mode() != "DBM", caloSeededBrem=InDetFlags.doCaloSeededBrem() and NewTrackingCuts.mode() != "DBM", pTminBrem=NewTrackingCuts.minPTBrem(), RefitPrds=True, doHadCaloSeed=InDetFlags.doCaloSeededRefit(), InputHadClusterContainerName=InDetKeys. HadCaloClusterROIContainer() + "Bjet") # DenseEnvironmentsAmbiguityScoreProcessorTool from TrkAmbiguityProcessor.TrkAmbiguityProcessorConf import Trk__DenseEnvironmentsAmbiguityScoreProcessorTool as ScoreProcessorTool InDetAmbiguityScoreProcessor = ScoreProcessorTool( name='InDetAmbiguityScoreProcessor' + NewTrackingCuts.extension(), ScoringTool=InDetAmbiScoringTool, SplitProbTool=NnPixelClusterSplitProbTool if InDetFlags.doPixelClusterSplitting() and 'NnPixelClusterSplitProbTool' in globals() else None, AssociationTool=TrackingCommon. getInDetPRDtoTrackMapToolGangedPixels(), AssociationToolNotGanged=TrackingCommon. getPRDtoTrackMapTool(), AssociationMapName='PRDToTrackMap' + NewTrackingCuts.extension(), SelectionTool=InDetAmbiTrackSelectionTool) # hasScoreProcessorTool = True else: from AthenaCommon import CfgGetter from TrkAmbiguityProcessor.TrkAmbiguityProcessorConf import Trk__SimpleAmbiguityProcessorTool as ProcessorTool InDetAmbiguityProcessor = ProcessorTool( name='InDetAmbiguityProcessor' + NewTrackingCuts.extension(), Fitter=CfgGetter.getPublicTool('InDetTrackFitter'), AssociationTool=TrackingCommon. getInDetPRDtoTrackMapToolGangedPixels(), TrackSummaryTool=TrackingCommon.getInDetTrackSummaryTool(), ScoringTool=InDetAmbiScoringTool, SelectionTool=InDetAmbiTrackSelectionTool, SuppressHoleSearch=False, tryBremFit=InDetFlags.doBremRecovery() and useBremMode and NewTrackingCuts.mode() != "DBM", caloSeededBrem=InDetFlags.doCaloSeededBrem() and NewTrackingCuts.mode() != "DBM", pTminBrem=NewTrackingCuts.minPTBrem(), RefitPrds=True) InDetAmbiguityScoreProcessor = None if InDetFlags.doTIDE_Ambi() and not ( NewTrackingCuts.mode() == "ForwardSLHCTracks" or NewTrackingCuts.mode() == "ForwardTracks" or NewTrackingCuts.mode() == "DBM") and 'NnPixelClusterSplitProbTool' in globals(): if InDetAmbiguityScoreProcessor is not None: InDetAmbiguityScoreProcessor.sharedProbCut = prob1 InDetAmbiguityScoreProcessor.sharedProbCut2 = prob2 if NewTrackingCuts.extension() == "": InDetAmbiguityScoreProcessor.SplitClusterMap_old = "" elif NewTrackingCuts.extension() == "Disappearing": InDetAmbiguityScoreProcessor.SplitClusterMap_old = InDetKeys.SplitClusterAmbiguityMap( ) InDetAmbiguityScoreProcessor.SplitClusterMap_new = InDetKeys.SplitClusterAmbiguityMap( ) + NewTrackingCuts.extension() if InDetFlags.doTIDE_RescalePixelCovariances(): InDetAmbiguityProcessor.applydRcorrection = True if NewTrackingCuts.mode() == "Pixel" or NewTrackingCuts.mode( ) == "DBM": InDetAmbiguityProcessor.SuppressHoleSearch = True if NewTrackingCuts.mode() == "LowPt" or NewTrackingCuts.mode( ) == "VeryLowPt" or (NewTrackingCuts.mode() == "Pixel" and InDetFlags.doMinBias()): if InDetAmbiguityProcessor.getName().find('Dense'): pass else: from AthenaCommon import CfgGetter InDetAmbiguityProcessor.Fitter = CfgGetter.getPublicTool( 'InDetTrackFitterLowPt') if InDetFlags.materialInteractions(): InDetAmbiguityProcessor.MatEffects = InDetFlags.materialInteractionsType( ) else: InDetAmbiguityProcessor.MatEffects = 0 # if NewTrackingCuts.mode() == "ForwardTracks": # InDetAmbiguityProcessor.OutputLevel = VERBOSE ToolSvc += InDetAmbiguityProcessor if (InDetFlags.doPrintConfigurables()): printfunc(InDetAmbiguityProcessor) # add InDetAmbiguityScoreProcessor if InDetAmbiguityScoreProcessor is not None: ToolSvc += InDetAmbiguityScoreProcessor # # --- set input and output collection # InputTrackCollection = self.__SiTrackCollection self.__SiTrackCollection = ResolvedTrackCollectionKey # # --- configure Ambiguity (score) solver # from TrkAmbiguitySolver.TrkAmbiguitySolverConf import Trk__TrkAmbiguityScore # from RecExConfig.hideInput import hideInput # hideInput ('TrackCollection', self.__SiTrackCollection) InDetAmbiguityScore = Trk__TrkAmbiguityScore( name='InDetAmbiguityScore' + NewTrackingCuts.extension(), TrackInput=[InputTrackCollection], TrackOutput='ScoredMap' + 'InDetAmbiguityScore' + NewTrackingCuts.extension(), AmbiguityScoreProcessor=InDetAmbiguityScoreProcessor ) ## TODO: check the case when it is None object topSequence += InDetAmbiguityScore if (InDetFlags.doPrintConfigurables()): printfunc(InDetAmbiguityScore) # # --- configure Ambiguity solver # from TrkAmbiguitySolver.TrkAmbiguitySolverConf import Trk__TrkAmbiguitySolver from RecExConfig.hideInput import hideInput hideInput('TrackCollection', self.__SiTrackCollection) InDetAmbiguitySolver = Trk__TrkAmbiguitySolver( name='InDetAmbiguitySolver' + NewTrackingCuts.extension(), TrackInput='ScoredMap' + 'InDetAmbiguityScore' + NewTrackingCuts.extension(), TrackOutput=self.__SiTrackCollection, AmbiguityProcessor=InDetAmbiguityProcessor) topSequence += InDetAmbiguitySolver if (InDetFlags.doPrintConfigurables()): printfunc(InDetAmbiguitySolver) # # --- Delete Silicon Sp-Seeded tracks # from InDetRecExample.ConfiguredInDetSGDeletion import InDetSGDeletionAlg InDetSGDeletionAlg(key=SiSPSeededTrackCollectionKey) if ((NewTrackingCuts.mode() in ["Pixel", "SCT"]) or not InDetFlags.doSGDeletion()): if InDetFlags.doTruth(): # # set up the truth info for this container # include("InDetRecExample/ConfiguredInDetTrackTruth.py") InDetTracksTruth = ConfiguredInDetTrackTruth( self.__SiTrackCollection, self.__SiTrackCollection + "DetailedTruth", self.__SiTrackCollection + "TruthCollection") # # add final output for statistics # TrackCollectionKeys += [InDetTracksTruth.Tracks()] TrackCollectionTruthKeys += [ InDetTracksTruth.TracksTruth() ] else: TrackCollectionKeys += [self.__SiTrackCollection]