def TMEF_TrackIsolationTool(name='TMEF_isolationTool', **kwargs): kwargs.setdefault('deltaZCut', 2.0 * mm) kwargs.setdefault('removeSelf', True) kwargs.setdefault('useAnnulus', False) kwargs.setdefault('useVarIso', True) # Get the track selection tool from InDetTrackSelectionTool.InDetTrackSelectionToolConf import InDet__InDetTrackSelectionTool trkseltool = InDet__InDetTrackSelectionTool() if 'LooseTSel' in name: trkseltool.CutLevel = 'Loose' elif 'TightTSel' in name: trkseltool.CutLevel = 'TightPrimary' log.debug('TMEF_TrackIsolationTool added trackselection tool:\n%s', trkseltool) kwargs.setdefault('TrackSelectionTool', trkseltool) return TrigMuonEFConf.TrigMuonEFTrackIsolationTool(name, **kwargs)
from eflowRec.eflowRecConf import PFTrackSelector PFTrackSelector=PFTrackSelector("PFTrackSelector") from eflowRec.eflowRecConf import eflowTrackCaloDummyExtensionTool TrackCaloExtensionTool=eflowTrackCaloDummyExtensionTool() PFTrackSelector.trackExtrapolatorTool = TrackCaloExtensionTool from InDetTrackSelectionTool.InDetTrackSelectionToolConf import InDet__InDetTrackSelectionTool TrackSelectionTool = InDet__InDetTrackSelectionTool() from AthenaCommon.AppMgr import ToolSvc ToolSvc += TrackSelectionTool TrackSelectionTool.CutLevel = "TightPrimary" TrackSelectionTool.minPt = 500.0 PFTrackSelector.trackSelectionTool = TrackSelectionTool topSequence += PFTrackSelector from eflowRec.eflowRecConf import PFClusterSelector PFClusterSelector=PFClusterSelector("PFClusterSelector") topSequence += PFClusterSelector import AthenaPoolCnvSvc.WriteAthenaPool logRecoOutputItemList_jobOptions = logging.getLogger( 'py:RecoOutputItemList_jobOptions' ) from OutputStreamAthenaPool.OutputStreamAthenaPool import createOutputStream
def setup_eflowCaloObjectCreator(Configured, nameModifier, mlog): if nameModifier != "EM" and nameModifier != "LC": mlog.error( "Invalid calorimeter scale was specified : should be LC or EM, but was " + nameModifier) return False try: from eflowRec.eflowRecConf import eflowPreparation eflowPreparationAlgorithm = eflowPreparation("eflow" + nameModifier + "CaloObjectBuilder") except: mlog.error("could not import eflowRec.eflowPreparation") print traceback.format_exc() return False Configured._eflowPreparationHandle = eflowPreparationAlgorithm try: from eflowRec.eflowRecConf import eflowTrackCaloExtensionTool TrackCaloExtensionTool = eflowTrackCaloExtensionTool() except: mlog.error("could not import eflowRec.eflowTrackCaloExtensionTool") print traceback.format_exc() return False eflowPreparationAlgorithm.TrackExtrapolatorTool = TrackCaloExtensionTool # sets output key of C++ algorithm equal to the python side eflowPreparationAlgorithm.EflowCaloObjectsOutputName = Configured.outputKey( ) from eflowRec.eflowRecFlags import jobproperties if "EM" == nameModifier: eflowPreparationAlgorithm.ClustersName = "CaloTopoCluster" eflowPreparationAlgorithm.CalClustersName = "CaloCalTopoClusters" elif "LC" == nameModifier: eflowPreparationAlgorithm.ClustersName = "CaloCalTopoClusters" eflowPreparationAlgorithm.CalClustersName = "" if True == jobproperties.eflowRecFlags.useLeptons: eflowPreparationAlgorithm.useLeptons = True if True == jobproperties.eflowRecFlags.storeLeptonCells: eflowPreparationAlgorithm.storeLeptonCells = True if "LC" == nameModifier: eflowPreparationAlgorithm.eflowLeptonCellsName = "eflowRec_leptonCellContainer_LC" else: eflowPreparationAlgorithm.useLeptons = False if "LC" == nameModifier: eflowPreparationAlgorithm.EflowCaloObjectsOutputName = "eflowCaloObjects_LC" eflowPreparationAlgorithm.eflowElectronsName = "eflowRec_selectedElectrons_LC" try: from InDetTrackSelectionTool.InDetTrackSelectionToolConf import InDet__InDetTrackSelectionTool TrackSelectionTool = InDet__InDetTrackSelectionTool() except: mlog.error( "could not import InDetTrackSelectionTool.InDet__InDetTrackSelectionTool" ) print traceback.format_exc() return False try: from AthenaCommon.AppMgr import ToolSvc except: mlog.error("could not import ToolSvc") print traceback.format_exc() return False ToolSvc += TrackSelectionTool TrackSelectionTool.CutLevel = "TightPrimary" TrackSelectionTool.minPt = 500.0 eflowPreparationAlgorithm.TrackSelectionTool = TrackSelectionTool from RecExConfig.ObjKeyStore import objKeyStore objKeyStore.addTransient(Configured.outputType(), Configured.outputKey()) from AthenaCommon.AlgSequence import AlgSequence topSequence = AlgSequence() topSequence += eflowPreparationAlgorithm return True
minNInnermostLayerHits = InDetPrimaryVertexingCuts.nHitInnermostLayer(), minNPixelHits = InDetPrimaryVertexingCuts.nHitPix(), maxNPixelHoles = InDetPrimaryVertexingCuts.nHolesPix(), minNSctHits = InDetPrimaryVertexingCuts.nHitSct(), minNTrtHits = InDetPrimaryVertexingCuts.nHitTrt(), minNSiHits = InDetPrimaryVertexingCuts.nHitSi(), TrackSummaryTool = InDetTrackSummaryTool, Extrapolator = InDetExtrapolator) ToolSvc += InDetTrackSelectorTool ''' from InDetTrackSelectionTool.InDetTrackSelectionToolConf import InDet__InDetTrackSelectionTool InDetTrackSelectorTool = InDet__InDetTrackSelectionTool() ToolSvc += InDetTrackSelectorTool InDetTrackSelectorTool.CutLevel = "TightPrimary" #This section should control TTST 7-12-16 from InDetPhysValMonitoring.InDetPhysValMonitoringConf import AthTruthSelectionTool AthTruthSelectionTool = AthTruthSelectionTool() if mode == "Back": # max prod. vertex radius for secondaries [mm] AthTruthSelectionTool.minPt = 5000 AthTruthSelectionTool.maxProdVertRadius = 4000 AthTruthSelectionTool.maxBarcode = -1 AthTruthSelectionTool.hasNoGrandparent = True AthTruthSelectionTool.poselectronfromgamma = True os.environ["BACKTRACKDEBUG"] = "1" print AthTruthSelectionTool
SkimmingTools=[MUON1SkimmingTool1], ThinningTools=MUON1ThinningTools) #==================================================================== # Decorate the vertices with the sum pt of their tracks #==================================================================== alg_name = "MUONVertexDecorationAlg" if not hasattr(DerivationFrameworkJob, alg_name): from DerivationFrameworkMuons.DerivationFrameworkMuonsConf import VertexDecoratorAlg from InDetTrackSelectionTool.InDetTrackSelectionToolConf import InDet__InDetTrackSelectionTool the_alg = VertexDecoratorAlg(alg_name) InDetTool = InDet__InDetTrackSelectionTool( "TrackSelectionTool_VertexDecoration") InDetTool.minPt = 400 InDetTool.CutLevel = "Loose" ToolSvc += InDetTool the_alg.TrackSelectionTool = InDetTool DerivationFrameworkJob += the_alg #==================================================================== # JetTagNonPromptLepton decorations #==================================================================== import JetTagNonPromptLepton.JetTagNonPromptLeptonConfig as JetTagConfig import LeptonTaggers.LeptonTaggersConfig as LepTagConfig if not hasattr(MUON1Seq, "Muons_decoratePromptLepton"): JetTagConfig.ConfigureAntiKt4PV0TrackJets(MUON1Seq, "MUON1") MUON1Seq += JetTagConfig.GetDecoratePromptLeptonAlgs() MUON1Seq += LepTagConfig.GetDecorateImprovedPromptLeptonAlgs() from DerivationFrameworkMuons import ConstituentPileupIso