diff --git a/Trigger/TrigAlgorithms/TrigEgammaRec/CMakeLists.txt b/Trigger/TrigAlgorithms/TrigEgammaRec/CMakeLists.txt index 05d83570f98c90a56df79cdab52567fa5dfc9eed..6a20162541dac4776f423f88769c96afcad4f408 100644 --- a/Trigger/TrigAlgorithms/TrigEgammaRec/CMakeLists.txt +++ b/Trigger/TrigAlgorithms/TrigEgammaRec/CMakeLists.txt @@ -1,44 +1,12 @@ -################################################################################ -# Package: TrigEgammaRec -################################################################################ +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration # Declare the package name: atlas_subdir( TrigEgammaRec ) -# Declare the package's dependencies: -atlas_depends_on_subdirs( PRIVATE - Event/xAOD/xAODEgamma - Event/xAOD/xAODPrimitives - GaudiKernel - LumiBlock/LumiBlockComps - Reconstruction/RecoTools/RecoToolInterfaces - Reconstruction/egamma/egammaInterfaces - Reconstruction/egamma/egammaRecEvent - Trigger/TrigEvent/TrigCaloEvent - Trigger/TrigEvent/TrigParticle - Trigger/TrigEvent/TrigSteeringEvent - Trigger/TrigSteer/TrigInterfaces - Calorimeter/CaloEvent - Calorimeter/CaloUtils - Event/xAOD/xAODCaloEvent - Event/xAOD/xAODEgammaCnv - Event/xAOD/xAODEventShape - Event/xAOD/xAODTracking - PhysicsAnalysis/Interfaces/EgammaAnalysisInterfaces - Reconstruction/egamma/egammaEvent - Reconstruction/egamma/egammaUtils - Trigger/TrigTools/TrigTimeAlgs ) - -# External dependencies: -find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread ) - # Component(s) in the package: atlas_add_component( TrigEgammaRec src/*.cxx src/components/*.cxx - INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} - LINK_LIBRARIES ${ROOT_LIBRARIES} xAODEgamma xAODPrimitives GaudiKernel CaloUtilsLib LumiBlockCompsLib RecoToolInterfaces egammaRecEvent TrigCaloEvent TrigParticle TrigSteeringEvent TrigInterfacesLib CaloEvent xAODCaloEvent xAODEventShape xAODTracking EgammaAnalysisInterfacesLib egammaEvent egammaUtils TrigTimeAlgsLib ) + LINK_LIBRARIES CaloDetDescrLib CaloEvent EgammaAnalysisInterfacesLib GaudiKernel LumiBlockCompsLib RecoToolInterfaces TrigInterfacesLib TrigParticle TrigSteeringEvent TrigTimeAlgsLib egammaEvent egammaInterfacesLib egammaRecEvent xAODCaloEvent xAODEgamma xAODEgammaCnvLib xAODEventShape xAODPrimitives xAODTracking ) # Install files from the package: -atlas_install_python_modules( python/*.py ) -atlas_install_joboptions( share/*.py ) - +atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} ) diff --git a/Trigger/TrigAlgorithms/TrigEgammaRec/doc/packagedoc.h b/Trigger/TrigAlgorithms/TrigEgammaRec/doc/packagedoc.h deleted file mode 100644 index 22edadd894f68580c3e87b27f85404aaba731c50..0000000000000000000000000000000000000000 --- a/Trigger/TrigAlgorithms/TrigEgammaRec/doc/packagedoc.h +++ /dev/null @@ -1,16 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - - -/** - -@page TrigEgammaRec_page -@author P. Urquijo - -@section TrigEgammaRec_MyPackageOverview Overview -This package contains the Event Filter reconstruction trigger algorithms for the Electron and Photon slices. Algorithms are adaptations of the offline/Reconstruction/egammaRec/egammaBuilder.cxx - - - -*/ diff --git a/Trigger/TrigAlgorithms/TrigEgammaRec/python/TrigEgammaRecConfig.py b/Trigger/TrigAlgorithms/TrigEgammaRec/python/TrigEgammaRecConfig.py index 5bd243b7c2673817708e6f27743b220999d2ff86..69e8543a34d34661fc0ed59617895aff8ee8c587 100755 --- a/Trigger/TrigAlgorithms/TrigEgammaRec/python/TrigEgammaRecConfig.py +++ b/Trigger/TrigAlgorithms/TrigEgammaRec/python/TrigEgammaRecConfig.py @@ -1,14 +1,8 @@ # Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration -# configurables for TrigEgammaRec fexes -from AthenaCommon.Logging import logging -import traceback -from AthenaCommon.AppMgr import ToolSvc - from TrigEgammaRec import TrigEgammaRecConf - -from egammaRec.Factories import Factory, ToolFactory, FcnWrapper, getPropertyValue +from egammaRec.Factories import Factory # The following tools use the offline configuration from egammaTools.egammaToolsFactories import EMConversionBuilder, EGammaAmbiguityTool,EMFourMomBuilder diff --git a/Trigger/TrigAlgorithms/TrigEgammaRec/python/TrigEgammaToolFactories.py b/Trigger/TrigAlgorithms/TrigEgammaRec/python/TrigEgammaToolFactories.py index 0cd53ff7fd32613bee9f0c02191d91b3bf33d3d5..382cd2919447f0890b78a235c9d1e240f3327708 100644 --- a/Trigger/TrigAlgorithms/TrigEgammaRec/python/TrigEgammaToolFactories.py +++ b/Trigger/TrigAlgorithms/TrigEgammaRec/python/TrigEgammaToolFactories.py @@ -2,7 +2,7 @@ # -*- coding: utf-8 -*- # vim:fenc=utf-8 # -# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration # """ @@ -14,11 +14,11 @@ __author__ = "Ryan Mackenzie White" import logging from AthenaCommon import CfgMgr from AthenaCommon.AppMgr import ToolSvc -from AthenaCommon.SystemOfUnits import GeV,MeV,deg +from AthenaCommon.SystemOfUnits import GeV # New configuration for use in rel 19.X with xAOD # Adapted from egammaRec/egammaGetter.py # Factory tools, handles configuration of tools and dependencies -from egammaRec.Factories import Factory, ToolFactory, PublicToolFactory, FcnWrapper, getPropertyValue +from egammaRec.Factories import Factory, ToolFactory, PublicToolFactory # Import tools required for trigger reconstruction # Following offline tools not used at HLT: @@ -35,8 +35,7 @@ ElectronPidTools() PhotonPidTools() # Following tools have TrigEgamma factories -from egammaTools.egammaToolsFactories import EMTrackMatchBuilder, EMFourMomBuilder, EMShowerBuilder -from egammaTools import egammaToolsConf +from egammaTools.egammaToolsFactories import EMTrackMatchBuilder, EMShowerBuilder from egammaTools.egammaToolsConf import EMPIDBuilder from CaloClusterCorrection import CaloClusterCorrectionConf as Cccc @@ -129,7 +128,6 @@ TrigPhotonPIDBuilder = PublicToolFactory( EMPIDBuilder, name = "TrigPhotonPIDBui photonIsEMselectorResultNames = ["Loose","Medium","Tight"], ) -from egammaTrackTools.egammaTrackToolsFactories import EMExtrapolationTools TrigEMExtrapolationTools=EMExtrapolationTools.copyPublic(name="TrigEMExtrapolationTools", useCaching=False) @@ -156,10 +154,9 @@ TrigEMShowerBuilder = EMShowerBuilder.copyPublic( ) from TriggerMenu.egamma.EgammaSliceFlags import EgammaSliceFlags -from egammaMVACalib.TrigEgammaMVACalibFactories import TrigElectronMVATool, TrigPhotonMVATool -mlog.info("MVA version version %s"%EgammaSliceFlags.calibMVAVersion() ) -mlog.info("Cluster Correction version %s"%EgammaSliceFlags.clusterCorrectionVersion() ) +mlog.info("MVA version version %s", EgammaSliceFlags.calibMVAVersion() ) +mlog.info("Cluster Correction version %s", EgammaSliceFlags.clusterCorrectionVersion() ) EgammaSliceFlags.calibMVAVersion.set_On() diff --git a/Trigger/TrigAlgorithms/TrigEgammaRec/python/TrigEgammaTrackTools.py b/Trigger/TrigAlgorithms/TrigEgammaRec/python/TrigEgammaTrackTools.py index f02eff20b1f1126cace5d93bca8f1196d6eda398..0db4f631bbd052aee6a559c184c7ce61a2b7234d 100644 --- a/Trigger/TrigAlgorithms/TrigEgammaRec/python/TrigEgammaTrackTools.py +++ b/Trigger/TrigAlgorithms/TrigEgammaRec/python/TrigEgammaTrackTools.py @@ -1,6 +1,6 @@ -# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration -from AthenaCommon.AppMgr import ServiceMgr as svcMgr, ToolSvc +from AthenaCommon.AppMgr import ToolSvc from SiClusterOnTrackTool.SiClusterOnTrackToolConf import InDet__PixelClusterOnTrackTool egTrigPixelClusterOnTrackTool = InDet__PixelClusterOnTrackTool("egTrigPixelClusterOnTrackTool", @@ -24,8 +24,6 @@ egTrigRotCreator = Trk__RIO_OnTrackCreator(name = 'egTrigRotCreator' ToolSvc += egTrigRotCreator -from TrkDetDescrSvc.AtlasTrackingGeometrySvc import AtlasTrackingGeometrySvc - from TrkExRungeKuttaPropagator.TrkExRungeKuttaPropagatorConf import Trk__RungeKuttaPropagator as Propagator egTrigTrkPropagator = Propagator(name = 'egTrigTrkPropagator') egTrigTrkPropagator.AccuracyParameter = 0.0001 diff --git a/Trigger/TrigAlgorithms/TrigEgammaRec/share/TriggerConfig_TrigEgammaRec.py b/Trigger/TrigAlgorithms/TrigEgammaRec/share/TriggerConfig_TrigEgammaRec.py deleted file mode 100755 index f2556613c51e91be9e6e36b32041f6607d53deb9..0000000000000000000000000000000000000000 --- a/Trigger/TrigAlgorithms/TrigEgammaRec/share/TriggerConfig_TrigEgammaRec.py +++ /dev/null @@ -1,40 +0,0 @@ -include.block("TrigEgammaRec/TriggerConfig_TrigEgammaRec.py") -# -# Configure a suitable TrigEgammaRec Algorithm instance -# -# Constructor arguments: -# level, type, threshold, isIsolated -# -# e.g. level=L2, type=muon, threshold=30, isIsolated=None -# level=EF, type=egamma, threshold=20, isIsolated=isolated -# -# Methods: -# instanceName() : returns name of algorithm instance -# classAndInstanceName() : returns a list of strings to be entered in the sequence file. This string -# defines the class and instance name -# - -class TriggerConfig_TrigEgammaRec: - def __init__(self, level, type = None, threshold = None, isIsolated = None): - - if type == "egamma": - self.__instname__ = "TrigEgammaRec_g15_" - self.__sequence__ = "TrigEgammaRec/TrigEgammaRec/g15" - self.__instname__ += level - include( "TrigEgammaRec/jobOfragment_TrigEgammaRec.py" ) - include.block( "TrigEgammaRec/jobOfragment_TrigEgammaRec.py" ) - - if type == "gamma": - self.__instname__ = "TrigEgammaRec_gamma_" - self.__sequence__ = "TrigEgammaRec/TrigEgammaRec/gamma" - self.__instname__ += level - include( "TrigEgammaRec/jobOfragment_TrigEgammaRec_gamma.py" ) - include.block( "TrigEgammaRec/jobOfragment_TrigEgammaRec_gamma.py" ) - - - def instanceName(self): - return self.__instname__ - - def classAndInstanceName(self): - return [ self.__sequence__ ] - diff --git a/Trigger/TrigAlgorithms/TrigEgammaRec/share/jobOfragment_TrigEgammaRec.py b/Trigger/TrigAlgorithms/TrigEgammaRec/share/jobOfragment_TrigEgammaRec.py deleted file mode 100755 index b0ed2092dfa35c9204ae7957776e4fcb7e8f5602..0000000000000000000000000000000000000000 --- a/Trigger/TrigAlgorithms/TrigEgammaRec/share/jobOfragment_TrigEgammaRec.py +++ /dev/null @@ -1,108 +0,0 @@ -import EventKernel.ParticleDataType - -theApp.DLLs += ["TrigEgammaRec"] -theApp.Dlls += ["egammaRec"] - -# switch for Bremfit -if not 'doTrigEgammaBremFit' in dir(): - doTrigEgammaBremFit = False - -TrigEgammaRec_g15_EF = Algorithm( "TrigEgammaRec_g15_EF" ) - -TrigEgammaRec_g15_EF.EgammaContainerAliasSuffix="egamma" - -#From ./ atlas/ Reconstruction/ egammaRec/ share/ egammaRec_jobOptions.py -# jobOption file for egamma -# dependent on LAr, iPatRec, xKalman, tile -# -####################################### -#TrigEgammaRec_g15_EF.ClusterContainerName="LArClusterEM" -#TrigEgammaRec_g15_EF.EgammasOutputName="egammaCollection" -# Tools to be run -TrigEgammaRec_g15_EF.ShowerBuilderName= "EMShowerBuilder/EFemshower" -TrigEgammaRec_g15_EF.TrackMatchBuilderName = "EMTrackMatchBuilder/EFemtrackmatch" -# conversion code has not been adapted to trigger yet -# "EMConversionBuilder/emconversion" -#TrigEgammaRec_g15_EF.ConversionBuilderName= "EMConversionBuilder/emconversion" -TrigEgammaRec_g15_EF.PID_BuilderName = "EMPIDBuilder/empid" -TrigEgammaRec_g15_EF.FourMomBuilderName= "EMFourMomBuilder/egfourmom" -if doTrigEgammaBremFit: - TrigEgammaRec_g15_EF.BremFitBuilderName= "EMBremsstrahlungBuilder/EFembremfit" - -ToolSvc = Service( "ToolSvc" ) - -# SUBCALO enum LAREM LARHEC LARFCAL TILE NSUBCALO NOT_VALID -from CaloIdentifier import SUBCALO - -# Calo Cell container -ToolSvc.EFemshower.CellsName="AllCalo" -# List of calo -#ToolSvc.EFemshower.CaloNums=[0,1,3] -ToolSvc.EFemshower.CaloNums=[SUBCALO.LAREM, SUBCALO.LARHEC, SUBCALO.TILE] - -theApp.Dlls += [ "egammaUtils" ] -# Instance of egammaShowerShape -ToolSvc.EFemshower.ShowerShapeTool="egammaShowerShape/egammashowershape" -# in case we want some extra print -ToolSvc.EFemshower.Print=FALSE - -ToolSvc.EFemshower.egammashowershape.TypeAnalysis ="ClusterSeed" -# calculate quantities base on information in the strips in a region -# around the cluster. -# Use 5 strips in phi and cover a region of +-1.1875 -# times 0.025 in eta (corresponds to 19 strips in em barrel) -# Use 7*7 cluster for middle sampling -# other samplings arew not used for the moment -ToolSvc.EFemshower.egammashowershape.Neta=[0.,2.5,7,0.] -ToolSvc.EFemshower.egammashowershape.Nphi=[0.,2.,7,0.] -# Samplings to execute -ToolSvc.EFemshower.egammashowershape.ExecPreSampler = TRUE -ToolSvc.EFemshower.egammashowershape.ExecEMFirst = TRUE -ToolSvc.EFemshower.egammashowershape.ExecEMSecond = TRUE -ToolSvc.EFemshower.egammashowershape.ExecEMThird = TRUE -ToolSvc.EFemshower.egammashowershape.ExecEMCombined = TRUE - -# -# pointing -# -ToolSvc.egammaqpoint.CalorimeterDepth="CaloDepthTool" -ToolSvc.egammaqpoint.CaloDepthTool.DepthChoice = "egparam" - -ToolSvc.EFemtrackmatch.TrackParticlesName = "TrackParticleCandidate" -ToolSvc.EFemtrackmatch.broadDeltaEta = 0.05 -ToolSvc.EFemtrackmatch.broadDeltaPhi = 0.10 -ToolSvc.EFemtrackmatch.narrowDeltaEta = 0.025 -ToolSvc.EFemtrackmatch.narrowDeltaPhi = 0.025 -ToolSvc.EFemtrackmatch.narrowDeltaPhiBrem = 0.050 -ToolSvc.EFemtrackmatch.useCandidateMatch = True - -#conversions: -#ToolSvc.emconversion.ConversionsName="Conversions" - -#bremfit -ToolSvc.EFembremfit.CalorimeterDepth="CaloDepthTool/embremfitcalodepth" -ToolSvc.EFembremfit.embremfitcalodepth.DepthChoice = "egparam" -ToolSvc.EFembremfit.BremFitContainerName = "TrigEMBremFitContainer" -#ToolSvc.EFembremfit.TrackMatchContainerName="TrigEMTrackMatchContainer" -#ToolSvc.EFembremfit.EMTrackMatchContainerName="egDetailContainer" -ToolSvc.EFembremfit.EMTrackMatchContainerName="TrigEMTrackMatchContainer" - -# JobOptions to extrapolate a track to Calorimeters -# configure private ExtrapolTrackToCaloTool tool -TTC_ExtrapolatorInstance = 'egammaTTCExtrapolator' -# spcify TrackToCalo instance name -ToolSvc.emtrackmatch.ExtrapolTrackToCaloToolName="extrapolEgammaTrackToCaloTool" -include( "TrackToCalo/ExtrapolToCaloTool_joboptions.py" ) -ToolSvc.EFemtrackmatch.extrapolEgammaTrackToCaloTool.ExtrapolatorName = TTC_Extrapolator.name() -ToolSvc.EFemtrackmatch.extrapolEgammaTrackToCaloTool.ExtrapolatorInstanceName = TTC_Extrapolator.instance() - -#specify here the extrapolation depth -ToolSvc.EFemtrackmatch.extrapolEgammaTrackToCaloTool.CaloDepthTool.DepthChoice = "egparam" - -# do the ParticleID -include ("egammaRec/egammaRec_ParticleID.py") - -#4-fourmomentum -#ToolSvc.egfourmom.EMShowerContainerName="egDetailContainer" -ToolSvc.egfourmom.EMShowerContainerName="TrigEMShowerContainer" - diff --git a/Trigger/TrigAlgorithms/TrigEgammaRec/share/jobOfragment_TrigEgammaRec_gamma.py b/Trigger/TrigAlgorithms/TrigEgammaRec/share/jobOfragment_TrigEgammaRec_gamma.py deleted file mode 100755 index 4996c296917c2fb3c025dd7860f36313f65521df..0000000000000000000000000000000000000000 --- a/Trigger/TrigAlgorithms/TrigEgammaRec/share/jobOfragment_TrigEgammaRec_gamma.py +++ /dev/null @@ -1,110 +0,0 @@ -import EventKernel.ParticleDataType - -theApp.DLLs += ["TrigEgammaRec"] -theApp.Dlls += ["egammaRec"] - -# switch for Bremfit -if not 'doTrigEgammaBremFit' in dir(): - doTrigEgammaBremFit = False - -TrigEgammaRec_gamma_EF = Algorithm( "TrigEgammaRec_gamma_EF" ) - -#TrigEgammaRec_gamma_EF.EgammaContainerAliasSuffix="egamma" -TrigEgammaRec_gamma_EF.EgammaContainerAliasSuffix="NoIDEF" -TrigEgammaRec_gamma_EF.EMShowerContainerName = "TrigEMShowerContainer" -TrigEgammaRec_gamma_EF.EMTrackMatchContainerName = "TrigEMTrackMatchContainer" - -#From ./ atlas/ Reconstruction/ egammaRec/ share/ egammaRec_jobOptions.py -# jobOption file for egamma -# dependent on LAr, iPatRec, xKalman, tile -# -####################################### -#TrigEgammaRec_gamma_EF.ClusterContainerName="LArClusterEM" -#TrigEgammaRec_gamma_EF.EgammasOutputName="egammaCollection" -# Tools to be run -TrigEgammaRec_gamma_EF.ShowerBuilderName= "EMShowerBuilder/EFemshower" -TrigEgammaRec_gamma_EF.TrackMatchBuilderName = "EMTrackMatchBuilder/EFemtrackmatch" -# conversion code has not been adapted to trigger yet -# "EMConversionBuilder/emconversion" -TrigEgammaRec_gamma_EF.PID_BuilderName = "EMPIDBuilder/empid" -TrigEgammaRec_gamma_EF.BuilderNames= ["EMFourMomBuilder/egfourmom"] -if doTrigEgammaBremFit: - TrigEgammaRec_gamma_EF.BuilderNames+= ["EMBremsstrahlungBuilder/EFembremfit"] - -ToolSvc = Service( "ToolSvc" ) - -# SUBCALO enum LAREM LARHEC LARFCAL TILE NSUBCALO NOT_VALID -from CaloIdentifier import SUBCALO - -# Calo Cell container -ToolSvc.EFemshower.CellsName="AllCalo" -# List of calo -#ToolSvc.EFemshower.CaloNums=[0,1,3] -ToolSvc.EFemshower.CaloNums=[SUBCALO.LAREM, SUBCALO.LARHEC, SUBCALO.TILE] - -theApp.Dlls += [ "egammaUtils" ] -# Instance of egammaShowerShape -ToolSvc.EFemshower.ShowerShapeTool="egammaShowerShape/egammashowershape" -# in case we want some extra print -ToolSvc.EFemshower.Print=FALSE - -ToolSvc.EFemshower.egammashowershape.TypeAnalysis ="ClusterSeed" -# calculate quantities base on information in the strips in a region -# around the cluster. -# Use 5 strips in phi and cover a region of +-1.1875 -# times 0.025 in eta (corresponds to 19 strips in em barrel) -# Use 7*7 cluster for middle sampling -# other samplings arew not used for the moment -ToolSvc.EFemshower.egammashowershape.Neta=[0.,2.5,7,0.] -ToolSvc.EFemshower.egammashowershape.Nphi=[0.,2.,7,0.] -# Samplings to execute -ToolSvc.EFemshower.egammashowershape.ExecPreSampler = TRUE -ToolSvc.EFemshower.egammashowershape.ExecEMFirst = TRUE -ToolSvc.EFemshower.egammashowershape.ExecEMSecond = TRUE -ToolSvc.EFemshower.egammashowershape.ExecEMThird = TRUE -ToolSvc.EFemshower.egammashowershape.ExecEMCombined = TRUE - -# -# pointing -# -ToolSvc.egammaqpoint.CalorimeterDepth="CaloDepthTool" -ToolSvc.egammaqpoint.CaloDepthTool.DepthChoice = "egparam" - -ToolSvc.EFemtrackmatch.TrackParticlesName = "TrackParticleCandidate" -ToolSvc.EFemtrackmatch.broadDeltaEta = 0.05 -ToolSvc.EFemtrackmatch.broadDeltaPhi = 0.10 -ToolSvc.EFemtrackmatch.narrowDeltaEta = 0.025 -ToolSvc.EFemtrackmatch.narrowDeltaPhi = 0.025 -ToolSvc.EFemtrackmatch.narrowDeltaPhiBrem = 0.050 -ToolSvc.EFemtrackmatch.useCandidateMatch = True - -#conversions: -#ToolSvc.emconversion.ConversionsName="Conversions" - -#bremfit -ToolSvc.EFembremfit.CalorimeterDepth="CaloDepthTool/embremfitcalodepth" -ToolSvc.EFembremfit.embremfitcalodepth.DepthChoice = "egparam" -ToolSvc.EFembremfit.BremFitContainerName = "TrigEMBremFitContainer" -#ToolSvc.EFembremfit.TrackMatchContainerName="TrigEMTrackMatchContainer" -#ToolSvc.EFembremfit.EMTrackMatchContainerName="egDetailContainer" -ToolSvc.EFembremfit.EMTrackMatchContainerName="TrigEMTrackMatchContainer" - -# JobOptions to extrapolate a track to Calorimeters -# configure private ExtrapolTrackToCaloTool tool -TTC_ExtrapolatorInstance = 'egammaTTCExtrapolator' -# spcify TrackToCalo instance name -ToolSvc.emtrackmatch.ExtrapolTrackToCaloToolName="extrapolEgammaTrackToCaloTool" -include( "TrackToCalo/ExtrapolToCaloTool_joboptions.py" ) -ToolSvc.EFemtrackmatch.extrapolEgammaTrackToCaloTool.ExtrapolatorName = TTC_Extrapolator.name() -ToolSvc.EFemtrackmatch.extrapolEgammaTrackToCaloTool.ExtrapolatorInstanceName = TTC_Extrapolator.instance() - -#specify here the extrapolation depth -ToolSvc.EFemtrackmatch.extrapolEgammaTrackToCaloTool.CaloDepthTool.DepthChoice = "egparam" - -# do the ParticleID -include ("egammaRec/egammaRec_ParticleID.py") - -#4-fourmomentum -#ToolSvc.egfourmom.EMShowerContainerName="egDetailContainer" -ToolSvc.egfourmom.EMShowerContainerName="TrigEMShowerContainer" - diff --git a/Trigger/TrigAlgorithms/TrigHLTJetRec/CMakeLists.txt b/Trigger/TrigAlgorithms/TrigHLTJetRec/CMakeLists.txt index 5470790b5d6c8db682f8be40c46a269d9386afe0..6787e1c68aa213f24dcf84989499f9fe7862d93c 100644 --- a/Trigger/TrigAlgorithms/TrigHLTJetRec/CMakeLists.txt +++ b/Trigger/TrigAlgorithms/TrigHLTJetRec/CMakeLists.txt @@ -1,36 +1,8 @@ -################################################################################ -# Package: TrigHLTJetRec -################################################################################ +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration # Declare the package name: atlas_subdir( TrigHLTJetRec ) -# Declare the package's dependencies: -atlas_depends_on_subdirs( PUBLIC - Control/AthenaBaseComps - Control/StoreGate - Event/xAOD/xAODBase - Event/xAOD/xAODCaloEvent - Event/xAOD/xAODJet - Event/xAOD/xAODTrigL1Calo - GaudiKernel - Reconstruction/Jet/JetEDM - Reconstruction/Jet/JetInterface - Reconstruction/Jet/JetRec - Reconstruction/Jet/JetRecTools - Trigger/TrigEvent/TrigCaloEvent - Trigger/TrigEvent/TrigNavStructure - Trigger/TrigEvent/TrigParticle - Trigger/TrigEvent/TrigSteeringEvent - Trigger/TrigSteer/TrigInterfaces - PRIVATE - Control/CxxUtils - Calorimeter/CaloEvent - Event/xAOD/xAODEventShape - Reconstruction/EventShapes/EventShapeTools - Reconstruction/Jet/JetRecTools - InnerDetector/InDetRecTools/TrackVertexAssociationTool ) - # External dependencies: find_package( FastJet ) find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread ) @@ -40,9 +12,7 @@ atlas_add_component( TrigHLTJetRec src/*.cxx src/components/*.cxx INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${FASTJET_INCLUDE_DIRS} - LINK_LIBRARIES ${ROOT_LIBRARIES} ${FASTJET_LIBRARIES} AthenaBaseComps StoreGateLib SGtests xAODBase xAODCaloEvent xAODJet xAODTrigL1Calo GaudiKernel JetEDM JetInterface JetRecLib TrigCaloEvent TrigNavStructure TrigParticle TrigSteeringEvent TrigInterfacesLib CaloEvent xAODEventShape EventShapeToolsLib JetRecToolsLib TrackVertexAssociationToolLib ) + LINK_LIBRARIES ${FASTJET_LIBRARIES} ${ROOT_LIBRARIES} AsgTools AthenaBaseComps CaloEvent CxxUtils EventShapeToolsLib GaudiKernel JetEDM JetInterface JetRecLib JetRecToolsLib TrigInterfacesLib TrigParticle TrigSteeringEvent xAODBase xAODCaloEvent xAODCore xAODEventShape xAODJet xAODPFlow xAODTracking xAODTrigL1Calo ) # Install files from the package: -atlas_install_headers( TrigHLTJetRec ) -atlas_install_python_modules( python/*.py ) - +atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} ) diff --git a/Trigger/TrigAlgorithms/TrigHLTJetRec/python/TrigHLTJetRecConfig.py b/Trigger/TrigAlgorithms/TrigHLTJetRec/python/TrigHLTJetRecConfig.py index 91fd431f7f5569ec52c1981bf116c3f6e515e515..4b823f9270c8619078e2ece7b35185054020400f 100644 --- a/Trigger/TrigAlgorithms/TrigHLTJetRec/python/TrigHLTJetRecConfig.py +++ b/Trigger/TrigAlgorithms/TrigHLTJetRec/python/TrigHLTJetRecConfig.py @@ -1,22 +1,16 @@ -# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration from __future__ import print_function from AthenaCommon.SystemOfUnits import GeV -# Import message level flags. -from GaudiKernel.Constants import (VERBOSE, - DEBUG, - INFO, - WARNING, - ERROR, - FATAL,) - from TrigHLTJetRec import TrigHLTJetRecConf from TrigHLTJetRec.TrigHLTJetRecConf import (IParticleNullRejectionTool, IParticlePtEtaRejectionTool, NonPositiveEnergyRejectionTool) +from GaudiKernel.Constants import INFO + # from JetRec.JetRecConf import JetRecTool # from JetRec.JetRecConf import (JetFromPseudojetMT,) # JetFinder, @@ -37,10 +31,6 @@ jetFlags.debug = 4 from JetRec.JetRecStandard import jtm -from JetRec.JetRecCalibrationFinder import jrcf -# Calibration Configurarion file (now defined in offline code) -#cfg_file = "JES_Full2012dataset_Preliminary_Trigger_NoPileup.config" -#jrcf.configDict["triggerNoPileup"] = cfg_file from EventShapeTools.EventShapeToolsConf import EventDensityTool @@ -111,8 +101,8 @@ def _getTrimmedJetCalibrationModifier(jet_calib,int_merge_param,cluster_calib,rc # Prepare an error message in case it is needed error = 'TrigHLTJetRecConfig._getTrimmedJetCalibrationModifier: '\ 'request calibration is not supported (%s), ' - error += ('merge_param %s, cluster_calib %s, jet_calib %s'\ - % (str(int_merge_param), str(cluster_calib), str(jet_calib))) + error += ('merge_param %s, cluster_calib %s, jet_calib %s' + % (str(int_merge_param), str(cluster_calib), str(jet_calib))) # Check the easy case of no calibration @@ -188,8 +178,8 @@ def addTrkMomsTool(toolname, TrackSelector = jtm.trackselloose) jtm += trkmomsTool - print ('TrigHLTJetRecConfig.addTrkMomsTool '\ - 'Added trkmoms tools "%s" to jtm' % toolname) + print ('TrigHLTJetRecConfig.addTrkMomsTool ' + 'Added trkmoms tools "%s" to jtm' % toolname) def _getIsData(): @@ -220,8 +210,8 @@ def addJVFTool(toolname, IsTrigger=True,) jtm += jvfTool - print ('TrigHLTJetRecConfig.addJVFTool '\ - 'Added jvf tool "%s" to jtm' % toolname) + print ('TrigHLTJetRecConfig.addJVFTool ' + 'Added jvf tool "%s" to jtm' % toolname) def addJVTTool(toolname, @@ -230,7 +220,7 @@ def addJVTTool(toolname, global jtm try: - jvfTool = getattr(jtm, toolname) + getattr(jtm, toolname) except AttributeError: from JetMomentTools.JetMomentToolsConf import JetVertexTaggerTool @@ -239,8 +229,8 @@ def addJVTTool(toolname, VertexContainer = vcSGkey) jtm += jvtTool - print ('TrigHLTJetRecConfig.addJVFTool '\ - 'Added jvt tool "%s" to jtm' % toolname) + print ('TrigHLTJetRecConfig.addJVFTool ' + 'Added jvt tool "%s" to jtm' % toolname) # *** FTK track moment tool helpers set up *** @@ -275,26 +265,11 @@ def _getTVassocTool(toolname, **options): # Add the TVA tool to the JetTool Manager, tvassocTool = configTVassocTool(toolname, **options) jtm += tvassocTool - print ('TrigHLTJetRecConfig._getTVassocTool '\ - 'Added tvassoc tools "%s" to jtm' % toolname) + print ('TrigHLTJetRecConfig._getTVassocTool ' + 'Added tvassoc tools "%s" to jtm' % toolname) return tvassocTool -def _getJetBuildToolDebug0(): - - getattr(ToolSvc,"jconretriever").unlock() - getattr(ToolSvc,"jconretriever").OutputLevel = 1 - getattr(ToolSvc,"jconretriever").lock() - print ("FS scan Builder looks like..") - print (getattr(ToolSvc,name+"Finder").JetBuilder) - getattr(ToolSvc,name+"Finder").unlock() - getattr(ToolSvc,name+"Finder").OutputLevel = 1 - getattr(ToolSvc,name+"Finder").JetBuilder.setOutputLevel = 1 - getattr(ToolSvc,name+"Finder").lock() - getattr(ToolSvc,"jbldTrigger").unlock() - getattr(ToolSvc,"jbldTrigger").OutputLevel = 1 - getattr(ToolSvc,"jbldTrigger").lock() - # def _getJetBuildTool_delete_me(merge_param, # ptmin, @@ -502,7 +477,7 @@ def _getJetBuildTool2(merge_param, iParticleRejectionTool, name='', secondary_label='', - trkopt = '', + trkopt = '', outputLabel='', OutputLevel=INFO, fromJet=False @@ -669,8 +644,7 @@ def _getJetBuildTool2(merge_param, # getattr(ToolSvc,name+"Finder").unlock() # getattr(ToolSvc,name+"Finder").JetBuilder = jtm.jbldTrigger # getattr(ToolSvc,name+"Finder").lock() - # # _getJetBuildToolDebug0() - + #except Exception, e: # print 'error adding new JetFromPseudoJet %s' % name # print 'exception', e @@ -1014,33 +988,6 @@ def _getPseudoJetSelectorAll(toolname, **options): return selector -def _getPseudoJetSelectorEtaPt(toolname, **kwds): - - # set up a tool to select all pseudo jets - # declare jtm as global as this function body may modify it - # with the += operator - global jtm - - # Build a new list of jet inputs. original: mygetters = [jtm.lcget] - try: - selector = getattr(jtm, toolname) - except AttributeError: - # Add the PseudoJetSelectorEtaPt to the JetTool Manager, - # which pushes it to the ToolSvc in __iadd__ - # This is done in the same as PseudoJetGetter is added in - # JetRecStandardTools.py. - # The 'Label' must be one of the values found in JetContainerInfo.h - selector = PseudoJetSelectorEtaPt(toolname, **kwds) - - jtm += selector - selector = getattr(jtm, toolname) - print ('TrigHLTJetRecConfig._getPseudoJetSelectorEtaPt '\ - 'Added selector "%s" to jtm' % toolname) - - return selector - - - def _getIParticleSelectorAll(toolname, **options): # set up a tool to select all pseudo jets @@ -1483,7 +1430,7 @@ class TrigHLTJetDebug(TrigHLTJetRecConf.TrigHLTJetDebug): TrigHLTJetRecConf.TrigHLTJetDebug.__init__(self, name) self.chainName = chain_name - pseudoJetGetter = _getTriggerPseudoJetGetter(cluster_calib) + self.pseudoJetGetter = _getTriggerPseudoJetGetter(cluster_calib) # allow the debug Alg to access the EventShape object # by a direct StoreGate retireve. TtigHLTEnergyDensity writes @@ -1559,7 +1506,6 @@ class TrigHLTEnergyDensity(TrigHLTJetRecConf.TrigHLTEnergyDensity): toolname='%s_%s' % (toolname_stub, cluster_calib) options.update(toolname=toolname) - OutputContainer = None if eventShapeSGKey is None: # jets: eventShapeSGKey is calculated here self.eventShapeSGKey = _getEventShapeSGKey( @@ -1691,15 +1637,3 @@ class TrigHLTJetDSSelector(TrigHLTJetRecConf.TrigHLTJetDSSelector): self.jetCollectionName = jetCollectionName self.jetPtThreshold = jetPtThreshold self.maxNJets = maxNJets - - -# class PseudoJetSelectorEtaPt(TrigHLTJetRecConf.PseudoJetSelectorEtaPt): -# def __init__(self, name, etaMax, ptMin): -# TrigHLTJetRecConf.PseudoJetSelectorEtaPt.__init__(self, name) -# self.etaMax = etaMax -# self.ptMin = ptMin - - -#class PseudoJetSelectorEtaPt(TrigHLTJetRecConf.PseudoJetSelectorEtaPt): -# def __init__(self, name, **kwds): -# TrigHLTJetRecConf.PseudoJetSelectorEtaPt.__init__(self, name, **kwds)