def TrackEnergyInCaloToolCfg(flags, name ='TrackEnergyInCaloTool', **kwargs ): result = AtlasExtrapolatorCfg(flags) extrapolator = result.popPrivateTools() result.addPublicTool( extrapolator ) kwargs.setdefault("ExtrapolatorHandle", extrapolator ) tool = CompFactory.TrackEnergyInCaloTool(name, **kwargs ) result.setPrivateTools(tool) return result
def MuonCombinedInDetDetailedTrackSelectorToolCfg(flags, name="MuonCombinedInDetDetailedTrackSelectorTool",**kwargs): if flags.Beam.Type == 'collisions': kwargs.setdefault("pTMin", 2000 ) kwargs.setdefault("IPd0Max", 50.0 ) kwargs.setdefault("IPz0Max", 9999.0 ) kwargs.setdefault("z0Max", 9999.0 ) kwargs.setdefault("useTrackSummaryInfo", True ) kwargs.setdefault("nHitBLayer", 0 ) kwargs.setdefault("nHitPix", 1 ) kwargs.setdefault("nHitBLayerPlusPix", 0 ) kwargs.setdefault("nHitSct", 3 ) kwargs.setdefault("nHitSi", 4 ) kwargs.setdefault("nHitTrt", 0 ) kwargs.setdefault("useTrackQualityInfo", False ) else: kwargs.setdefault("pTMin", 500 ) kwargs.setdefault("IPd0Max", 19999.0 ) kwargs.setdefault("IPz0Max", 19999.0 ) kwargs.setdefault("z0Max", 19999.0 ) kwargs.setdefault("useTrackSummaryInfo", False ) kwargs.setdefault("useTrackQualityInfo", False ) result = AtlasExtrapolatorCfg(flags) extrapolator = result.getPrimary() kwargs.setdefault("Extrapolator", extrapolator ) # FIXME the configuration of TrackSummaryTool should probably be centralised. acc = MuonCombinedTrackSummaryToolCfg(flags) kwargs.setdefault("TrackSummaryTool", acc.popPrivateTools() ) result.merge(acc) # Has two CondKeys # SG::ReadCondHandleKey<InDet::BeamSpotData> m_beamSpotKey { this, "BeamSpotKey", "BeamSpotData", "SG key for beam spot" }; # FIXME - let's put this someplace central? result.merge(addFoldersSplitOnline(flags,"INDET","/Indet/Onl/Beampos","/Indet/Beampos", className='AthenaAttributeList')) result.addCondAlgo(CompFactory.BeamSpotCondAlg("BeamSpotCondAlg")) # SG::ReadCondHandleKey<AtlasFieldCacheCondObj> m_fieldCacheCondObjInputKey {this, "AtlasFieldCacheCondObj", "fieldCondObj", "Name of the Magnetic Field conditions object key"}; # FIXME - handle this ^ tool = CompFactory.InDet.InDetDetailedTrackSelectorTool(name,**kwargs) result.addPublicTool(tool) result.setPrivateTools(tool) return result
def MuonCombinedTrackSummaryToolCfg(flags, name="", **kwargs): # Based on https://gitlab.cern.ch/atlas/athena/blob/release/22.0.8/Reconstruction/MuonIdentification/MuonCombinedRecExample/python/CombinedMuonTrackSummary.py # FIXME - check all of this once the ID configuration is available, because probably we can simplify this a lot result = AtlasExtrapolatorCfg(flags) extrapolator = result.getPrimary() result.addPublicTool(extrapolator) from InDetConfig.InDetRecToolConfig import InDetTrackHoleSearchToolCfg acc = InDetTrackHoleSearchToolCfg(flags, name = "CombinedMuonIDHoleSearch", Extrapolator = extrapolator, CountDeadModulesAfterLastHit = True, Cosmics = (flags.Beam.Type=="cosmics")) indet_hole_search_tool = acc.getPrimary() result.addPublicTool(indet_hole_search_tool) result.merge(acc) #FIXME - need InDet to provide configuration for PixelConditionsSummaryTool # Also assuming we don't use DetailedPixelHoleSearch (since it seems to be off in standard workflows) from InDetConfig.InDetRecToolConfig import InDetTrackSummaryHelperToolCfg acc = InDetTrackSummaryHelperToolCfg(flags, name="CombinedMuonIDSummaryHelper", AssoTool = None, PixelToTPIDTool = None, TestBLayerTool = None, DoSharedHits = False, HoleSearch = indet_hole_search_tool) indet_track_summary_helper_tool = acc.getPrimary() result.addPublicTool(indet_track_summary_helper_tool) result.merge(acc) from MuonConfig.MuonRecToolsConfig import MuonTrackSummaryHelperToolCfg acc = MuonTrackSummaryHelperToolCfg(flags) muon_track_summary_helper_tool = acc.getPrimary() track_summary_tool = CompFactory.Trk.TrackSummaryTool(name="CombinedMuonTrackSummary", doSharedHits = False, doHolesInDet = True, doHolesMuon = False, AddDetailedInDetSummary = True, AddDetailedMuonSummary = True, InDetSummaryHelperTool = indet_track_summary_helper_tool, TRT_ElectronPidTool = None, PixelToTPIDTool = None, MuonSummaryHelperTool = muon_track_summary_helper_tool, PixelExists = True ) result.merge(acc) result.addPublicTool(track_summary_tool) result.setPrivateTools(track_summary_tool) return result