Skip to content
Snippets Groups Projects
Commit f87ceed5 authored by Adam Edward Barton's avatar Adam Edward Barton
Browse files

Merge branch 'TrigEgammaAna_cleanup' into 'master'

CMake cleanup of TrigEgamma analysis packages

See merge request atlas/athena!33848
parents 53316a26 db47488a
6 merge requests!58791DataQualityConfigurations: Modify L1Calo config for web display,!46784MuonCondInterface: Enable thread-safety checking.,!46776Updated LArMonitoring config file for WD to match new files produced using MT,!45405updated ART test cron job,!42417Draft: DIRE and VINCIA Base Fragments for Pythia 8.3,!33848CMake cleanup of TrigEgamma analysis packages
################################################################################
# Package: TrigEgammaAnalysisTools
################################################################################
# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
# Declare the package name:
atlas_subdir( TrigEgammaAnalysisTools )
# Declare the package's dependencies:
atlas_depends_on_subdirs( PUBLIC
Control/AthToolSupport/AsgTools
Event/xAOD/xAODCaloEvent
Event/xAOD/xAODEgamma
Event/xAOD/xAODEventInfo
Event/xAOD/xAODJet
Event/xAOD/xAODPrimitives
Event/xAOD/xAODTracking
Event/xAOD/xAODTrigCalo
Event/xAOD/xAODTrigEgamma
Event/xAOD/xAODTrigRinger
Event/xAOD/xAODTrigger
Event/xAOD/xAODTruth
Event/xAOD/xAODMissingET
Event/xAOD/xAODCaloRings
LumiBlock/LumiBlockComps
PhysicsAnalysis/ElectronPhotonID/ElectronPhotonSelectorTools
Reconstruction/RecoTools/RecoToolInterfaces
Reconstruction/egamma/egammaMVACalib
Trigger/TrigAnalysis/TrigDecisionTool
Trigger/TrigAnalysis/TrigEgammaMatchingTool
Trigger/TrigAnalysis/TrigEgammaEmulationTool
Trigger/TrigConfiguration/TrigConfHLTData
Trigger/TrigEvent/TrigSteeringEvent
Trigger/TrigMonitoring/TrigHLTMonitoring
PhysicsAnalysis/AnalysisCommon/PATCore
PRIVATE
Control/AthenaBaseComps
Control/AthenaMonitoring
Control/StoreGate
GaudiKernel
Trigger/TrigConfiguration/TrigConfxAOD )
# External dependencies:
find_package( Boost )
find_package( ROOT COMPONENTS Core Hist Tree )
......@@ -48,25 +13,18 @@ atlas_add_library( TrigEgammaAnalysisToolsLib
PUBLIC_HEADERS TrigEgammaAnalysisTools
INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
PRIVATE_INCLUDE_DIRS ${Boost_INCLUDE_DIRS}
LINK_LIBRARIES ${ROOT_LIBRARIES} AsgTools xAODCaloEvent xAODEgamma
xAODEventInfo xAODJet xAODTracking xAODTrigCalo xAODTrigEgamma xAODTrigRinger xAODMissingET
xAODTrigger xAODCaloRings xAODTruth LumiBlockCompsLib EgammaAnalysisInterfacesLib
RecoToolInterfaces egammaMVACalibAnalysisLib
TrigEgammaMatchingToolLib TrigEgammaEmulationToolLib TrigConfHLTData
TrigSteeringEvent TrigHLTMonitoringLib PATCoreLib
PRIVATE_LINK_LIBRARIES ${Boost_LIBRARIES} TrigConfxAODLib )
LINK_LIBRARIES ${ROOT_LIBRARIES} AsgTools EgammaAnalysisInterfacesLib GaudiKernel LumiBlockCompsLib LumiBlockData PATCoreLib StoreGateLib TrigConfHLTData TrigDecisionToolLib TrigEgammaEmulationToolLib TrigEgammaMatchingToolLib TrigHLTMonitoringLib TrigNavigationLib xAODCaloEvent xAODCaloRings xAODEgamma xAODEventInfo xAODJet xAODMissingET xAODTracking xAODTrigCalo xAODTrigEgamma xAODTrigRinger xAODTrigger xAODTruth
PRIVATE_LINK_LIBRARIES ${Boost_LIBRARIES} AthenaMonitoringLib TrigConfxAODLib TrigSteeringEvent )
atlas_add_component( TrigEgammaAnalysisTools
src/*.h
src/*.cxx
src/components/*.cxx
INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS}
LINK_LIBRARIES ${ROOT_LIBRARIES} ${Boost_LIBRARIES} ElectronPhotonSelectorToolsLib egammaMVACalibLib TrigDecisionToolLib AthenaBaseComps AthenaMonitoringLib StoreGateLib SGtests GaudiKernel TrigEgammaAnalysisToolsLib )
src/*.h
src/*.cxx
src/components/*.cxx
LINK_LIBRARIES AthenaBaseComps AthenaMonitoringLib TrigEgammaAnalysisToolsLib )
# Install files from the package:
atlas_install_python_modules( python/TrigEgamma*.py )
atlas_install_joboptions( share/test*.py )
atlas_install_generic( share/trigEgammaDQ.py share/get_trigEgammaDQ.sh
DESTINATION share
EXECUTABLE )
DESTINATION share
EXECUTABLE )
################################################################################
# Package: TrigEgammaEmulationTool
################################################################################
# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
# Declare the package name:
atlas_subdir( TrigEgammaEmulationTool )
# Declare the package's dependencies:
atlas_depends_on_subdirs(
PUBLIC
Control/AthContainers
Control/AthToolSupport/AsgTools
Event/xAOD/xAODBase
Event/xAOD/xAODCaloEvent
Event/xAOD/xAODEgamma
Event/xAOD/xAODPrimitives
Event/xAOD/xAODTracking
Event/xAOD/xAODTrigCalo
Event/xAOD/xAODTrigEgamma
Event/xAOD/xAODTrigRinger
Event/xAOD/xAODTrigger
PhysicsAnalysis/AnalysisCommon/PATCore
PhysicsAnalysis/Interfaces/EgammaAnalysisInterfaces
LumiBlock/LumiBlockComps
InnerDetector/InDetRecTools/InDetTrackSelectionTool
Reconstruction/RecoTools/RecoToolInterfaces
Tools/PathResolver
Trigger/TrigAnalysis/TrigDecisionTool
Trigger/TrigConfiguration/TrigConfHLTData
Trigger/TrigEvent/TrigSteeringEvent
Trigger/TrigHypothesis/TrigMultiVarHypo
Trigger/TrigAnalysis/TrigEgammaMatchingTool
PRIVATE
Control/AthenaBaseComps
Control/StoreGate
GaudiKernel )
# External dependencies:
find_package( Boost )
find_package( CLHEP )
......@@ -46,25 +13,13 @@ atlas_add_library( TrigEgammaEmulationToolLib
PUBLIC_HEADERS TrigEgammaEmulationTool
INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS}
PRIVATE_INCLUDE_DIRS ${Boost_INCLUDE_DIRS}
LINK_LIBRARIES ${CLHEP_LIBRARIES} AthContainers AsgTools xAODBase
xAODCaloEvent xAODEgamma xAODTracking xAODTrigCalo xAODTrigEgamma
xAODTrigRinger xAODTrigger PATCoreLib EgammaAnalysisInterfacesLib
LumiBlockCompsLib InDetTrackSelectionToolLib RecoToolInterfaces
TrigDecisionToolLib TrigConfHLTData TrigSteeringEvent TrigMultiVarHypoLib
TrigEgammaMatchingToolLib
PRIVATE_LINK_LIBRARIES ${Boost_LIBRARIES} )
LINK_LIBRARIES ${Boost_LIBRARIES} AsgTools AthContainers EgammaAnalysisInterfacesLib InDetTrackSelectionToolLib LumiBlockCompsLib PATCoreLib RecoToolInterfaces TrigConfHLTData TrigDecisionToolLib TrigEgammaMatchingToolLib TrigMultiVarHypoLib xAODBase xAODCaloEvent xAODCaloRings xAODEgamma xAODPrimitives xAODTracking xAODTrigCalo xAODTrigEgamma xAODTrigRinger xAODTrigger
PRIVATE_LINK_LIBRARIES StoreGateLib TrigSteeringEvent )
atlas_add_component( TrigEgammaEmulationTool
src/*.h src/*.cxx src/components/*.cxx
LINK_LIBRARIES ${Boost_LIBRARIES} ${CLHEP_LIBRARIES}
AthContainers AsgTools xAODBase xAODCaloEvent xAODEgamma xAODTracking
xAODTrigCalo xAODTrigEgamma xAODTrigRinger xAODTrigger PATCoreLib
ElectronPhotonSelectorToolsLib TrigDecisionToolLib TrigConfHLTData
TrigSteeringEvent TrigMultiVarHypoLib AthenaBaseComps StoreGateLib SGtests
GaudiKernel TrigEgammaMatchingToolLib LumiBlockCompsLib IsolationToolLib
TrigEgammaEmulationToolLib)
src/*.cxx src/components/*.cxx
LINK_LIBRARIES AthenaBaseComps GaudiKernel TrigEgammaEmulationToolLib )
# Install files from the package:
atlas_install_python_modules( python/TrigEgamma*.py )
atlas_install_python_modules( python/TrigEgamma*.py POST_BUILD_CMD ${ATLAS_FLAKE8} )
atlas_install_joboptions( share/test*.py )
# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
from AthenaCommon import CfgMgr
from AthenaCommon.AppMgr import ToolSvc
from egammaRec.Factories import ToolFactory
#from TrigEgammaHypo.TrigEgammaPidTools import ElectronToolName
#from ElectronPhotonSelectorTools.ElectronPhotonSelectorToolsConf import AsgElectronIsEMSelector
#from ElectronPhotonSelectorTools.ElectronIsEMSelectorMapping import ElectronIsEMMap,electronPIDmenu
from TrigEgammaEmulationTool.TrigEgammaEmulationToolConfig import OutputLevel
#***********************************************************************
......
# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
def createIsoToolElectronSelector():
from AthenaCommon.AppMgr import ToolSvc
from AthenaCommon import CfgMgr
from egammaRec.Factories import ToolFactory
from TrigEgammaEmulationTool.TrigEgammaEmulationToolConf import Trig__TrigEgammaIsolationSelectorTool
from TrigEgammaEmulationTool.TrigEgammaEmulationToolConfig import OutputLevel
from TrigEgammaHypo.TrigEFElectronHypoConfig import isolation_dict, caloisolation_dict
from TrigEgammaHypo.TrigEFPhotonHypoConfig import TrigEFPhotonIsoCutDefs
# Track isolation -- remember to add TrackIsolation as a property of the class
from IsolationTool.IsolationToolConf import xAOD__TrackIsolationTool
......@@ -37,7 +34,7 @@ def createIsoToolElectronSelector():
for wp in isolations:
caloiso = True if 'icalo' in wp else False
trkiso = True if not 'icalo' in wp else False
trkiso = True if 'icalo' not in wp else False
tool = Trig__TrigEgammaIsolationSelectorTool( 'IsolationTool_'+wp,
RelEtConeCut = caloisolation_dict[wp] if caloiso else [-1,-1,-1,-1,-1,-1],
......@@ -52,10 +49,4 @@ def createIsoToolElectronSelector():
ToolSvc += tool
IsoToolSelectors.append( tool )
#Just to see WTF!
_toolname='IsolationTool_'+wp
RelEtConeCut = caloisolation_dict[wp] if caloiso else [-1,-1,-1,-1,-1,-1],
RelPtConeCut = isolation_dict[wp] if trkiso else [-1,-1,-1,-1,-1,-1],
return IsoToolSelectors
# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
from egammaRec.Factories import ToolFactory,FcnWrapper,AlgFactory, getPropertyValue
from egammaRec.Factories import ToolFactory
from TrigEgammaEmulationTool.TrigEgammaEmulationToolConf import Trig__TrigEgammaL2CaloSelectorTool
from TrigEgammaEmulationTool.TrigEgammaEmulationToolConf import Trig__TrigEgammaL2ElectronSelectorTool
from AthenaCommon.SystemOfUnits import GeV
......
# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
#
# TrigEgammaPidTools
# Add all pid selectors to ToolSvc
......@@ -11,18 +11,13 @@
###############################################################
from AthenaCommon import CfgMgr
from AthenaCommon.AppMgr import ToolSvc
import PyUtils.RootUtils as ru
ROOT = ru.import_root()
import cppyy
cppyy.loadDictionary('ElectronPhotonSelectorToolsDict')
from ROOT import LikeEnum
from ROOT import egammaPID
from ElectronPhotonSelectorTools.TrigEGammaPIDdefs import SelectionDefElectron
from ElectronPhotonSelectorTools.ElectronPhotonSelectorToolsConf import AsgElectronIsEMSelector
from ElectronPhotonSelectorTools.ElectronIsEMSelectorMapping import ElectronIsEMMap,electronPIDmenu
###################################################################################################
......@@ -44,7 +39,11 @@ def getEgammaIsEMSelectorCaloOnly( calibPath ):
for idx, config in enumerate(configList):
name = config.split('/')[-1].replace('.conf','_EFCalo_'+calibname)
asg = CfgMgr.AsgElectronIsEMSelector(name)
asg.caloOnly=True; asg.isEMMask=mask[idx]; asg.ConfigFile=config; ToolSvc+=asg; asgTools.append(asg)
asg.caloOnly=True
asg.isEMMask=mask[idx]
asg.ConfigFile=config
ToolSvc+=asg
asgTools.append(asg)
return asgTools
......@@ -66,14 +65,17 @@ def getElectronIsEMSelector( calibPath ):
for idx, config in enumerate(configList):
name = config.split('/')[-1].replace('.conf','_HLT_'+calibname)
asg = CfgMgr.AsgElectronIsEMSelector(name)
asg.isEMMask=mask[idx]; asg.ConfigFile=config; ToolSvc+=asg; asgTools.append(asg)
asg.isEMMask=mask[idx]
asg.ConfigFile=config
ToolSvc+=asg
asgTools.append(asg)
return asgTools
# http://atlas.web.cern.ch/Atlas/GROUPS/DATABASE/GroupData/ElectronPhotonSelectorTools/trigger/rel21_20170214/
# http://atlas.web.cern.ch/Atlas/GROUPS/DATABASE/GroupData/ElectronPhotonSelectorTools/trigger/rel21_20170217/
# http://atlas.web.cern.ch/Atlas/GROUPS/DATABASE/GroupData/ElectronPhotonSelectorTools/trigger/rel21_20170217_mc16a/
def getEgammaLikelihoodSelectorCaloOnly( calibPath ):
from AthenaCommon.AppMgr import ToolSvc
calibname = calibPath.split('/')[-1]
configList = [
......@@ -86,14 +88,18 @@ def getEgammaLikelihoodSelectorCaloOnly( calibPath ):
for idx, config in enumerate(configList):
name = config.split('/')[-1].replace('.conf','_EFCalo_'+calibname)
asg = CfgMgr.AsgElectronLikelihoodTool(name)
asg.usePVContainer = False; asg.ConfigFile=config; asg.caloOnly = True; ToolSvc+=asg; asgTools.append(asg)
asg.usePVContainer = False
asg.ConfigFile=config
asg.caloOnly = True
ToolSvc+=asg
asgTools.append(asg)
return asgTools
# http://atlas.web.cern.ch/Atlas/GROUPS/DATABASE/GroupData/ElectronPhotonSelectorTools/trigger/rel21_20170214/
# http://atlas.web.cern.ch/Atlas/GROUPS/DATABASE/GroupData/ElectronPhotonSelectorTools/trigger/rel21_20170217/
# http://atlas.web.cern.ch/Atlas/GROUPS/DATABASE/GroupData/ElectronPhotonSelectorTools/trigger/rel21_20170217_mc16a/
def getElectronLikelihoodSelector2015( calibPath ):
from AthenaCommon.AppMgr import ToolSvc
calibname = calibPath.split('/')[-1]
configList = [
......@@ -106,14 +112,18 @@ def getElectronLikelihoodSelector2015( calibPath ):
for idx, config in enumerate(configList):
name = config.split('/')[-1].replace('.conf','_HLT_'+calibname)
asg = CfgMgr.AsgElectronLikelihoodTool(name)
asg.usePVContainer = False; asg.ConfigFile=config; asg.caloOnly = True; ToolSvc+=asg; asgTools.append(asg)
asg.usePVContainer = False
asg.ConfigFile=config
asg.caloOnly = True
ToolSvc+=asg
asgTools.append(asg)
return asgTools
# http://atlas.web.cern.ch/Atlas/GROUPS/DATABASE/GroupData/ElectronPhotonSelectorTools/trigger/rel21_20170214/
# http://atlas.web.cern.ch/Atlas/GROUPS/DATABASE/GroupData/ElectronPhotonSelectorTools/trigger/rel21_20170217/
# http://atlas.web.cern.ch/Atlas/GROUPS/DATABASE/GroupData/ElectronPhotonSelectorTools/trigger/rel21_20170217_mc16a/
def getElectronLikelihoodSelectorNoD0( calibPath ):
from AthenaCommon.AppMgr import ToolSvc
calibname = calibPath.split('/')[-1]
configList = [
......@@ -126,7 +136,11 @@ def getElectronLikelihoodSelectorNoD0( calibPath ):
for idx, config in enumerate(configList):
name = config.split('/')[-1].replace('.conf','_HLT_'+calibname)
asg = CfgMgr.AsgElectronLikelihoodTool(name)
asg.usePVContainer = False; asg.ConfigFile=config; asg.caloOnly = True; ToolSvc+=asg; asgTools.append(asg)
asg.usePVContainer = False
asg.ConfigFile=config
asg.caloOnly = True
ToolSvc+=asg
asgTools.append(asg)
return asgTools
#####################################################################################################
......
# 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,16 +14,11 @@ OutputLevel = 0
from AthenaCommon.Logging import logging
logger = logging.getLogger("TrigEgammaEmulationToolConfig")
from AthenaCommon import CfgMgr
from AthenaCommon.AppMgr import ToolSvc
from egammaRec.Factories import ToolFactory,FcnWrapper,AlgFactory, getPropertyValue
from egammaRec.Factories import ToolFactory
import PyUtils.RootUtils as ru
ROOT = ru.import_root()
import cppyy
# Following loads the online selectors
from ElectronPhotonSelectorTools.ElectronPhotonSelectorToolsConf import AsgElectronIsEMSelector
from ElectronPhotonSelectorTools.ElectronIsEMSelectorMapping import ElectronIsEMMap,electronPIDmenu
import cppyy # noqa: F401
#*****************************************************************************
#from TrigEgammaMatchingTool.TrigEgammaMatchingToolConf import Trig__TrigEgammaMatchingTool
......
################################################################################
# Package: TrigEgammaMatchingTool
################################################################################
# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
# Declare the package name:
atlas_subdir( TrigEgammaMatchingTool )
# Declare the package's dependencies:
atlas_depends_on_subdirs( PUBLIC
Event/xAOD/xAODCaloEvent
Event/xAOD/xAODEgamma
Event/xAOD/xAODTracking
Event/xAOD/xAODTrigCalo
Event/xAOD/xAODTrigEgamma
Event/xAOD/xAODMuon
Event/xAOD/xAODTau
Event/xAOD/xAODTrigger
Trigger/TrigAnalysis/TrigDecisionTool
Trigger/TrigConfiguration/TrigConfHLTData
Trigger/TrigEvent/TrigSteeringEvent
Trigger/TrigSteer/DecisionHandling
PRIVATE
Control/AthToolSupport/AsgTools
Control/AthenaMonitoring
Control/StoreGate
Control/AthenaBaseComps
GaudiKernel )
# External dependencies:
find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread )
find_package( Boost )
# Component(s) in the package:
atlas_add_library( TrigEgammaMatchingToolLib
Root/*.cxx
PUBLIC_HEADERS TrigEgammaMatchingTool
PRIVATE_INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
LINK_LIBRARIES AsgTools xAODCaloEvent xAODEgamma xAODTracking xAODTrigCalo xAODTrigEgamma TrigConfHLTData
TrigSteeringEvent TrigDecisionToolLib DecisionHandlingLib AthenaMonitoringLib
PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} xAODMuon xAODTau xAODTrigger )
PRIVATE_INCLUDE_DIRS ${Boost_INCLUDE_DIRS}
PRIVATE_LINK_LIBRARIES ${Boost_LIBRARIES} TrigSteeringEvent xAODRootAccess
LINK_LIBRARIES AsgTools DecisionHandlingLib GaudiKernel TrigConfHLTData TrigDecisionToolLib xAODCaloEvent xAODEgamma xAODTracking xAODTrigCalo xAODTrigEgamma xAODTrigger )
atlas_add_component( TrigEgammaMatchingTool
src/*.h src/*.cxx src/components/*.cxx
INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
LINK_LIBRARIES ${ROOT_LIBRARIES} AsgTools xAODCaloEvent xAODEgamma xAODTracking xAODTrigCalo xAODTrigEgamma
TrigDecisionToolLib TrigConfHLTData TrigSteeringEvent AthenaBaseComps xAODMuon xAODTau xAODTrigger GaudiKernel
TrigEgammaMatchingToolLib AthenaMonitoringLib StoreGateLib)
LINK_LIBRARIES AthenaBaseComps AthenaMonitoringLib GaudiKernel StoreGateLib TrigEgammaMatchingToolLib TriggerMatchingToolLib xAODMuon xAODTau )
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment