From 6a1f5ba8930739dd2fbd76de44db4641be4df104 Mon Sep 17 00:00:00 2001 From: Frank Winklmeier <frank.winklmeier@cern.ch> Date: Thu, 21 Mar 2024 09:03:47 +0100 Subject: [PATCH 1/5] xAODCnv: delete legacy job options referencing RecExConfig --- Event/xAOD/xAODForwardCnv/CMakeLists.txt | 4 +- .../share/xAODForwardCnv_jobOptions.py | 43 ------------- Event/xAOD/xAODMuonCnv/CMakeLists.txt | 6 +- .../share/xAODMuonCnv_jobOptions.py | 50 --------------- Event/xAOD/xAODTauCnv/CMakeLists.txt | 4 +- .../xAODTauCnv/share/xAODTauCnv_jobOptions.py | 46 -------------- .../share/xAODTauReader_jobOptions.py | 24 ------- Event/xAOD/xAODTrigCaloCnv/CMakeLists.txt | 4 +- .../share/xAODTrigCaloCnv_jobOptions.py | 55 ---------------- Event/xAOD/xAODTrigMinBiasCnv/CMakeLists.txt | 4 +- .../share/xAODTrigMinBiasCnv_jobOptions.py | 50 --------------- .../xAOD/xAODTrigMissingETCnv/CMakeLists.txt | 4 +- .../share/xAODTrigMissingETCnv_jobOptions.py | 42 ------------- Event/xAOD/xAODTriggerCnv/CMakeLists.txt | 3 +- .../TriggerMenuMetaDataTool_jobOptions.py | 42 ------------- .../share/decisionFix_preInclude.py | 16 ----- .../share/xAODTriggerCnv_jobOptions.py | 63 ------------------- 17 files changed, 7 insertions(+), 453 deletions(-) delete mode 100644 Event/xAOD/xAODForwardCnv/share/xAODForwardCnv_jobOptions.py delete mode 100755 Event/xAOD/xAODMuonCnv/share/xAODMuonCnv_jobOptions.py delete mode 100644 Event/xAOD/xAODTauCnv/share/xAODTauCnv_jobOptions.py delete mode 100644 Event/xAOD/xAODTauCnv/share/xAODTauReader_jobOptions.py delete mode 100644 Event/xAOD/xAODTrigCaloCnv/share/xAODTrigCaloCnv_jobOptions.py delete mode 100755 Event/xAOD/xAODTrigMinBiasCnv/share/xAODTrigMinBiasCnv_jobOptions.py delete mode 100644 Event/xAOD/xAODTrigMissingETCnv/share/xAODTrigMissingETCnv_jobOptions.py delete mode 100644 Event/xAOD/xAODTriggerCnv/share/TriggerMenuMetaDataTool_jobOptions.py delete mode 100644 Event/xAOD/xAODTriggerCnv/share/decisionFix_preInclude.py delete mode 100644 Event/xAOD/xAODTriggerCnv/share/xAODTriggerCnv_jobOptions.py diff --git a/Event/xAOD/xAODForwardCnv/CMakeLists.txt b/Event/xAOD/xAODForwardCnv/CMakeLists.txt index a62cf0e56961..73cfd283459e 100644 --- a/Event/xAOD/xAODForwardCnv/CMakeLists.txt +++ b/Event/xAOD/xAODForwardCnv/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration # Declare the package name: atlas_subdir( xAODForwardCnv ) @@ -17,5 +17,3 @@ atlas_add_component( xAODForwardCnv # Install files from the package: atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} ) -atlas_install_joboptions( share/*.py ) - diff --git a/Event/xAOD/xAODForwardCnv/share/xAODForwardCnv_jobOptions.py b/Event/xAOD/xAODForwardCnv/share/xAODForwardCnv_jobOptions.py deleted file mode 100644 index 07a22ffb9341..000000000000 --- a/Event/xAOD/xAODForwardCnv/share/xAODForwardCnv_jobOptions.py +++ /dev/null @@ -1,43 +0,0 @@ -# Enable xAOD making: -from RecExConfig.RecFlags import rec -rec.doWritexAOD = True -#FNAME="/afs/cern.ch/work/a/azemla/xAODDevelop/rel_2_test/test/MinBiasSliceAthenaTrigRDO/AOD.pool.root" -FNAME="AOD.pool.root" - -include( "AthenaPython/iread_file.py" ) - -# Access the algorithm sequence: -from AthenaCommon.AlgSequence import AlgSequence -theJob = AlgSequence() - -# Create a logger object: -from AthenaCommon.Logging import logging -logger = logging.getLogger( "xAODForwardCnv_jobOptions" ) - -# Create a POOL output file with the StoreGate contents: -from OutputStreamAthenaPool.MultipleStreamManager import MSMgr -xaodStream = MSMgr.NewPoolStream( "StreamAOD", "xAOD.pool.root" ) - -# Create some xAOD::TrigMinBias objects: -from xAODForwardCnv.xAODMBTSModuleCreator import xAODMBTSModuleCreator -xAODMBTSModuleCreator() - -from xAODForwardCnv.xAODForwardEventInfoCreator import xAODForwardEventInfoCreator -xAODForwardEventInfoCreator() - -# Check what happened to the stream: -xaodStream.Print() - -# Split all branches: -ServiceMgr.AthenaPoolCnvSvc.PoolAttributes += [ - "DEFAULT_SPLITLEVEL='1'" ] - -# Force POOL to just simply use the StoreGate keys as branch names: -ServiceMgr.AthenaPoolCnvSvc.SubLevelBranchName = "<key>" - -# Do some additional tweaking: -from AthenaCommon.AppMgr import theApp -theApp.EvtMax = 10 -ServiceMgr.MessageSvc.OutputLevel = VERBOSE -ServiceMgr.MessageSvc.defaultLimit = 1000 - diff --git a/Event/xAOD/xAODMuonCnv/CMakeLists.txt b/Event/xAOD/xAODMuonCnv/CMakeLists.txt index 9753a9a157ae..1063ca068eed 100644 --- a/Event/xAOD/xAODMuonCnv/CMakeLists.txt +++ b/Event/xAOD/xAODMuonCnv/CMakeLists.txt @@ -1,6 +1,4 @@ -################################################################################ -# Package: xAODMuonCnv -################################################################################ +# Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration # Declare the package name: atlas_subdir( xAODMuonCnv ) @@ -16,5 +14,3 @@ atlas_add_component( xAODMuonCnv src/*.cxx src/components/*.cxx LINK_LIBRARIES xAODMuonCnvLib AthenaBaseComps AthenaKernel xAODPrimitives muonEvent Particle xAODTruth) - - diff --git a/Event/xAOD/xAODMuonCnv/share/xAODMuonCnv_jobOptions.py b/Event/xAOD/xAODMuonCnv/share/xAODMuonCnv_jobOptions.py deleted file mode 100755 index 4310cf46bc5e..000000000000 --- a/Event/xAOD/xAODMuonCnv/share/xAODMuonCnv_jobOptions.py +++ /dev/null @@ -1,50 +0,0 @@ -# $Id: ClusterCreator_jobOptions.py 297184 2013-10-03 11:18:41Z krasznaa $ - -# Set up the reading of the input AOD: -FNAME = "root://eosatlas.cern.ch//eos/atlas/atlasdatadisk/rucio/valid1/36/d9/AOD.01447493._000116.pool.root.1" - -include( "AthenaPython/iread_file.py" ) -# from RecExConfig.RecFlags import rec -# from AthenaCommon.BeamFlags import jobproperties -# from AthenaCommon.AthenaCommonFlags import athenaCommonFlags -# from AthenaCommon.GlobalFlags import globalflags - -# Access the algorithm sequence: -from AthenaCommon.AlgSequence import AlgSequence -theJob = AlgSequence() - -# Create a POOL output file with the StoreGate contents: -from OutputStreamAthenaPool.MultipleStreamManager import MSMgr -xaodStream = MSMgr.NewPoolStream( "StreamAOD", "xAOD.pool.root" ) - -# Set up its contents: -# xaodStream.AddItem( "xAOD::CaloClusterContainer_v1#*" ) -# xaodStream.AddItem( "xAOD::CaloClusterAuxContainer_v1#*" ) - -xaodStream.AddItem( "xAOD::TruthParticleContainer#*") -xaodStream.AddItem( "xAOD::TruthParticleAuxContainer#*") -xaodStream.AddItem( "xAOD::TrackParticleContainer#*" ) -xaodStream.AddItem( "xAOD::TrackParticleAuxContainer#*" ) -xaodStream.AddItem( "xAOD::MuonContainer#*" ) -xaodStream.AddItem( "xAOD::MuonAuxContainer#*" ) -xaodStream.AddItem( "xAOD::MuonSegmentContainer#*") -xaodStream.AddItem( "xAOD::MuonSegmentAuxContainer#*") -xaodStream.AddItem( "xAOD::EventInfo#*" ) -xaodStream.AddItem( "xAOD::EventAuxInfo#*" ) -xaodStream.Print() - -# Split all branches: -ServiceMgr.AthenaPoolCnvSvc.PoolAttributes += [ - "DEFAULT_SPLITLEVEL='99'" ] - -# Force POOL to just simply use the StoreGate keys as branch names: -ServiceMgr.AthenaPoolCnvSvc.SubLevelBranchName = "<key>" - -# Do some additional tweaking: -from AthenaCommon.AppMgr import theApp -theApp.EvtMax = -1 -ServiceMgr.MessageSvc.OutputLevel = INFO -ServiceMgr.MessageSvc.defaultLimit = 1000000 - -#from VP1Algs.VP1AlgsConf import VP1Alg -#theJob += VP1Alg() diff --git a/Event/xAOD/xAODTauCnv/CMakeLists.txt b/Event/xAOD/xAODTauCnv/CMakeLists.txt index fa0f04ca4ef3..7aa2ba580aa0 100644 --- a/Event/xAOD/xAODTauCnv/CMakeLists.txt +++ b/Event/xAOD/xAODTauCnv/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration # Declare the package name: atlas_subdir( xAODTauCnv ) @@ -17,5 +17,3 @@ atlas_add_component( xAODTauCnv # Install files from the package: atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} ) -atlas_install_joboptions( share/*.py ) - diff --git a/Event/xAOD/xAODTauCnv/share/xAODTauCnv_jobOptions.py b/Event/xAOD/xAODTauCnv/share/xAODTauCnv_jobOptions.py deleted file mode 100644 index 6b8f5e8ced7f..000000000000 --- a/Event/xAOD/xAODTauCnv/share/xAODTauCnv_jobOptions.py +++ /dev/null @@ -1,46 +0,0 @@ - - -# $Id: xAODTauCnv_jobOptions.py 579532 2014-01-22 12:40:33Z janus $ - -# Turn off Tau reconstruction manually for now... -from RecExConfig.RecFlags import rec -#rec.doTau = False - -# Set up the reading of a file: -FNAME = "AOD.pool.root" -include( "AthenaPython/iread_file.py" ) - -# Access the algorithm sequence: -from AthenaCommon.AlgSequence import AlgSequence -theJob = AlgSequence() - -# Create a POOL output file with the StoreGate contents: -from OutputStreamAthenaPool.MultipleStreamManager import MSMgr -xaodStream = MSMgr.NewPoolStream( "StreamAOD", "xAOD.pool.root" ) - -# Create the xAOD taus: -from xAODTauCnv.xAODTauConverter import xAODTauConverter -xAODTauConverter() - - -# Check what happened to the stream: -xaodStream.Print() - -# Split all branches: -ServiceMgr.AthenaPoolCnvSvc.PoolAttributes += [ - "DEFAULT_SPLITLEVEL='1'" ] - -# Force POOL to just simply use the StoreGate keys as branch names: -ServiceMgr.AthenaPoolCnvSvc.SubLevelBranchName = "<key>" - -# Do some additional tweaking: -from AthenaCommon.AppMgr import theApp -theApp.EvtMax = 10 -ServiceMgr.MessageSvc.OutputLevel = INFO -ServiceMgr.MessageSvc.defaultLimit = 1000000 - - -#theJob.AntiKt4LCTopoJetsCnv.Enable = False -#theJob.AntiKt6LCTopoJetsCnv.Enable = False -#theJob.AntiKt4TopoEMJetsCnv.Enable = False -#theJob.AntiKt6TopoEMJetsCnv.Enable = False diff --git a/Event/xAOD/xAODTauCnv/share/xAODTauReader_jobOptions.py b/Event/xAOD/xAODTauCnv/share/xAODTauReader_jobOptions.py deleted file mode 100644 index a0cd5aba0996..000000000000 --- a/Event/xAOD/xAODTauCnv/share/xAODTauReader_jobOptions.py +++ /dev/null @@ -1,24 +0,0 @@ -# $Id: xAODTauReader_jobOptions.py 632174 2014-11-29 15:23:36Z krasznaa $ - -# Set up the reading of a file: -import AthenaPoolCnvSvc.ReadAthenaPool -ServiceMgr.EventSelector.InputCollections = [ - "AOD.pool.root" - ] - -# Access the algorithm sequence: -from AthenaCommon.AlgSequence import AlgSequence -theJob = AlgSequence() - -# Add the test algorithm: -theJob += CfgMgr.xAODMaker__TauJetReaderAlg( "TauJetReaderAlg", - OutputLevel = DEBUG ) - -# Write out a file with the "new" tau objects: -from OutputStreamAthenaPool.MultipleStreamManager import MSMgr -xaodStream = MSMgr.NewPoolRootStream( "StreamAOD", "newAOD.pool.root" ) -xaodStream.AddItem( [ "xAOD::TauJetContainer#*", - "xAOD::TauJetAuxContainer#*" ] ) - -# Some additional settings: -theApp.EvtMax = 10 diff --git a/Event/xAOD/xAODTrigCaloCnv/CMakeLists.txt b/Event/xAOD/xAODTrigCaloCnv/CMakeLists.txt index 7022ee135704..bf5095779100 100644 --- a/Event/xAOD/xAODTrigCaloCnv/CMakeLists.txt +++ b/Event/xAOD/xAODTrigCaloCnv/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration # Declare the package name: atlas_subdir( xAODTrigCaloCnv ) @@ -17,5 +17,3 @@ atlas_add_component( xAODTrigCaloCnv # Install files from the package: atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} ) -atlas_install_joboptions( share/*.py ) - diff --git a/Event/xAOD/xAODTrigCaloCnv/share/xAODTrigCaloCnv_jobOptions.py b/Event/xAOD/xAODTrigCaloCnv/share/xAODTrigCaloCnv_jobOptions.py deleted file mode 100644 index d4fc97fe4579..000000000000 --- a/Event/xAOD/xAODTrigCaloCnv/share/xAODTrigCaloCnv_jobOptions.py +++ /dev/null @@ -1,55 +0,0 @@ -# $Id: xAODTrigCaloCnv_jobOptions.py 592334 2014-04-10 11:01:56Z krasznaa $ - -# Enable xAOD making: -from RecExConfig.RecFlags import rec -rec.doWritexAOD = True - -# Set up the reading of a file: -FNAME = "AOD.pool.root" -include( "AthenaPython/iread_file.py" ) - -# Access the algorithm sequence: -from AthenaCommon.AlgSequence import AlgSequence -theJob = AlgSequence() - -# Create a logger object: -from AthenaCommon.Logging import logging -logger = logging.getLogger( "xAODTrigCaloCnv_jobOptions" ) - -# Create a POOL output file with the StoreGate contents: -from OutputStreamAthenaPool.MultipleStreamManager import MSMgr -xaodStream = MSMgr.NewPoolStream( "StreamAOD", "xAOD.pool.root" ) - -# Create the xAOD trigger calorimeter cluster: -from xAODTrigCaloCnv.xAODTrigCaloClusterCreator import xAODTrigCaloClusterCreator -xAODTrigCaloClusterCreator() -alg = getattr( theJob, "xAODMaker::TrigCaloClusterCnvAlg" ) -alg.OutputLevel = DEBUG - -# Create the xAOD trigger EM cluster: -from xAODTrigCaloCnv.xAODTrigEMClusterCreator import xAODTrigEMClusterCreator -xAODTrigEMClusterCreator() -alg = getattr( theJob, "xAODMaker::TrigEMClusterCnvAlg" ) -alg.OutputLevel = DEBUG - -# Additional type(s) created automatically by RecExCommon: -xaodStream.AddItem( "xAOD::TrigCaloClusterContainer_v1#*" ) -xaodStream.AddItem( "xAOD::TrigCaloClusterAuxContainer_v1#*" ) -xaodStream.AddItem( "xAOD::TrigEMClusterContainer_v1#*" ) -xaodStream.AddItem( "xAOD::TrigEMClusterAuxContainer_v1#*" ) - -# Check what happened to the stream: -xaodStream.Print() - -# Split all branches: -ServiceMgr.AthenaPoolCnvSvc.PoolAttributes += [ - "DEFAULT_SPLITLEVEL='1'" ] - -# Force POOL to just simply use the StoreGate keys as branch names: -ServiceMgr.AthenaPoolCnvSvc.SubLevelBranchName = "<key>" - -# Do some additional tweaking: -from AthenaCommon.AppMgr import theApp -theApp.EvtMax = 100 -ServiceMgr.MessageSvc.OutputLevel = INFO -ServiceMgr.MessageSvc.defaultLimit = 1000 diff --git a/Event/xAOD/xAODTrigMinBiasCnv/CMakeLists.txt b/Event/xAOD/xAODTrigMinBiasCnv/CMakeLists.txt index 27a92ddd793a..e6b898a1d419 100644 --- a/Event/xAOD/xAODTrigMinBiasCnv/CMakeLists.txt +++ b/Event/xAOD/xAODTrigMinBiasCnv/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration # Declare the package name: atlas_subdir( xAODTrigMinBiasCnv ) @@ -17,5 +17,3 @@ atlas_add_component( xAODTrigMinBiasCnv # Install files from the package: atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} ) -atlas_install_joboptions( share/*.py ) - diff --git a/Event/xAOD/xAODTrigMinBiasCnv/share/xAODTrigMinBiasCnv_jobOptions.py b/Event/xAOD/xAODTrigMinBiasCnv/share/xAODTrigMinBiasCnv_jobOptions.py deleted file mode 100755 index 3dd9a4911257..000000000000 --- a/Event/xAOD/xAODTrigMinBiasCnv/share/xAODTrigMinBiasCnv_jobOptions.py +++ /dev/null @@ -1,50 +0,0 @@ -# $Id: xAODTrigMinBiasCnv_jobOptions.py 592539 2014-04-11 10:17:29Z krasznaa $ - -# Enable xAOD making: -from RecExConfig.RecFlags import rec -rec.doWritexAOD = True -#FNAME="/afs/cern.ch/work/a/azemla/xAODDevelop/rel_2_test/test/MinBiasSliceAthenaTrigRDO/AOD.pool.root" -FNAME="/afs/cern.ch/user/a/azemla/workdir/xAODDevelop/DATA/mc11_7TeV.105200.T1_McAtNlo_Jimmy.merge.AOD.e835_s1272_s1274_r2730_r2780_tid541650_00/AOD.541650._000544.pool.root.1" - -include( "AthenaPython/iread_file.py" ) - -# Access the algorithm sequence: -from AthenaCommon.AlgSequence import AlgSequence -theJob = AlgSequence() - -# Create a logger object: -from AthenaCommon.Logging import logging -logger = logging.getLogger( "xAODTrigMinBiasCnv_jobOptions" ) - -# Create a POOL output file with the StoreGate contents: -from OutputStreamAthenaPool.MultipleStreamManager import MSMgr -xaodStream = MSMgr.NewPoolStream( "StreamAOD", "xAOD.pool.root" ) - -# Create some xAOD::TrigMinBias objects: -from xAODTrigMinBiasCnv.xAODTrigTrackCountsCreator import xAODTrigTrackCountsCreator -xAODTrigTrackCountsCreator() - -from xAODTrigMinBiasCnv.xAODTrigVertexCountsCreator import xAODTrigVertexCountsCreator -xAODTrigVertexCountsCreator() - -from xAODTrigMinBiasCnv.xAODTrigT2MbtsBitsCreator import xAODTrigT2MbtsBitsCreator -xAODTrigT2MbtsBitsCreator() - -from xAODTrigMinBiasCnv.xAODTrigSpacePointCountsCreator import xAODTrigSpacePointCountsCreator -xAODTrigSpacePointCountsCreator() - -# Check what happened to the stream: -xaodStream.Print() - -# Split all branches: -ServiceMgr.AthenaPoolCnvSvc.PoolAttributes += [ - "DEFAULT_SPLITLEVEL='1'" ] - -# Force POOL to just simply use the StoreGate keys as branch names: -ServiceMgr.AthenaPoolCnvSvc.SubLevelBranchName = "<key>" - -# Do some additional tweaking: -from AthenaCommon.AppMgr import theApp -theApp.EvtMax = 100 -ServiceMgr.MessageSvc.OutputLevel = VERBOSE -ServiceMgr.MessageSvc.defaultLimit = 1000 diff --git a/Event/xAOD/xAODTrigMissingETCnv/CMakeLists.txt b/Event/xAOD/xAODTrigMissingETCnv/CMakeLists.txt index d0ddf4145a5b..986db0138cff 100644 --- a/Event/xAOD/xAODTrigMissingETCnv/CMakeLists.txt +++ b/Event/xAOD/xAODTrigMissingETCnv/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration # Declare the package name: atlas_subdir( xAODTrigMissingETCnv ) @@ -17,5 +17,3 @@ atlas_add_component( xAODTrigMissingETCnv # Install files from the package: atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} ) -atlas_install_joboptions( share/*.py ) - diff --git a/Event/xAOD/xAODTrigMissingETCnv/share/xAODTrigMissingETCnv_jobOptions.py b/Event/xAOD/xAODTrigMissingETCnv/share/xAODTrigMissingETCnv_jobOptions.py deleted file mode 100644 index e4f342a42513..000000000000 --- a/Event/xAOD/xAODTrigMissingETCnv/share/xAODTrigMissingETCnv_jobOptions.py +++ /dev/null @@ -1,42 +0,0 @@ -# $Id: xAODTrigMissingETCnv_jobOptions.py 592539 2014-04-11 10:17:29Z krasznaa $ - -# Enable xAOD making: -from RecExConfig.RecFlags import rec -rec.doWritexAOD = True - -# Set up the reading of a file: -FNAME = "AOD.pool.root" -include( "AthenaPython/iread_file.py" ) - -# Access the algorithm sequence: -from AthenaCommon.AlgSequence import AlgSequence -theJob = AlgSequence() - -# Create a logger object: -from AthenaCommon.Logging import logging -logger = logging.getLogger( "xAODTrigMissingETCnv_jobOptions" ) - -# Create a POOL output file with the StoreGate contents: -from OutputStreamAthenaPool.MultipleStreamManager import MSMgr -xaodStream = MSMgr.NewPoolStream( "StreamAOD", "xAOD.pool.root" ) - -# Create some xAOD::TrigMissingET objects: -from xAODTrigMissingETCnv.xAODTrigMissingETCreator import \ - xAODTrigMissingETCreator -xAODTrigMissingETCreator() - -# Check what happened to the stream: -xaodStream.Print() - -# Split all branches: -ServiceMgr.AthenaPoolCnvSvc.PoolAttributes += [ - "DEFAULT_SPLITLEVEL='1'" ] - -# Force POOL to just simply use the StoreGate keys as branch names: -ServiceMgr.AthenaPoolCnvSvc.SubLevelBranchName = "<key>" - -# Do some additional tweaking: -from AthenaCommon.AppMgr import theApp -theApp.EvtMax = 100 -ServiceMgr.MessageSvc.OutputLevel = INFO -ServiceMgr.MessageSvc.defaultLimit = 1000 diff --git a/Event/xAOD/xAODTriggerCnv/CMakeLists.txt b/Event/xAOD/xAODTriggerCnv/CMakeLists.txt index 1e5777204bba..279e033e4d59 100644 --- a/Event/xAOD/xAODTriggerCnv/CMakeLists.txt +++ b/Event/xAOD/xAODTriggerCnv/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration # Declare the package name: atlas_subdir( xAODTriggerCnv ) @@ -67,4 +67,3 @@ endif() # Install files from the package: atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} ) -atlas_install_joboptions( share/*.py ) diff --git a/Event/xAOD/xAODTriggerCnv/share/TriggerMenuMetaDataTool_jobOptions.py b/Event/xAOD/xAODTriggerCnv/share/TriggerMenuMetaDataTool_jobOptions.py deleted file mode 100644 index c232c63fb291..000000000000 --- a/Event/xAOD/xAODTriggerCnv/share/TriggerMenuMetaDataTool_jobOptions.py +++ /dev/null @@ -1,42 +0,0 @@ -# $Id: TriggerMenuMetaDataTool_jobOptions.py 651874 2015-03-05 14:16:19Z krasznaa $ -# -# This is a simple test for xAODMaker::TriggerMenuMetaDataTool, testing if -# it does its job correctly during file processing. -# - -# Set up the reading of the input files using RecExCommon: -from AthenaCommon.AthenaCommonFlags import athenaCommonFlags -athenaCommonFlags.FilesInput = [ - "/afs/cern.ch/atlas/project/PAT/xAODs/r5787/" - "mc14_13TeV.110401.PowhegPythia_P2012_ttbar_nonallhad.merge.AOD." - "e2928_s1982_s2008_r5787_r5853_tid01597980_00/" - "AOD.01597980._000098.pool.root.1", - "/afs/cern.ch/atlas/project/PAT/xAODs/r5787/" - "mc14_13TeV.110401.PowhegPythia_P2012_ttbar_nonallhad.merge.AOD." - "e2928_s1982_s2008_r5787_r5853_tid01597980_00/" - "AOD.01597980._000420.pool.root.1" - ] -athenaCommonFlags.EvtMax = -1 - -# Include RecExCommon: -from RecExConfig.RecFlags import rec -rec.doCBNT.set_Value_and_Lock( False ) -rec.doWriteTAG.set_Value_and_Lock( False ) -rec.doAOD.set_Value_and_Lock( False ) -rec.doWriteAOD.set_Value_and_Lock( False ) -include( "RecExCommon/RecExCommon_topOptions.py" ) - -# Configure the metadata tool: -ToolSvc += CfgMgr.xAODMaker__TriggerMenuMetaDataTool( "TriggerMenuMetaDataTool", - OutputLevel = 1 ) -svcMgr.MetaDataSvc.MetaDataTools += [ ToolSvc.TriggerMenuMetaDataTool ] - -# Set up an output file: -from OutputStreamAthenaPool.MultipleStreamManager import MSMgr -output = MSMgr.NewPoolRootStream( "StreamAOD", "merged.pool.root" ) - -# Add some event and metadata items to the stream: -output.AddItem( [ "xAOD::EventInfo#EventInfo", - "xAOD::EventAuxInfo#EventInfoAux." ] ) -output.AddMetaDataItem( [ "xAOD::TriggerMenuContainer#TriggerMenu", - "xAOD::TriggerMenuAuxContainer#TriggerMenuAux." ] ) diff --git a/Event/xAOD/xAODTriggerCnv/share/decisionFix_preInclude.py b/Event/xAOD/xAODTriggerCnv/share/decisionFix_preInclude.py deleted file mode 100644 index 7b4bd990affa..000000000000 --- a/Event/xAOD/xAODTriggerCnv/share/decisionFix_preInclude.py +++ /dev/null @@ -1,16 +0,0 @@ - - -from AthenaCommon.AlgSequence import AlgSequence -topSequence=AlgSequence() - -#fix xAOD trigger object by scheduling cnv alg again - -include( "RecExCond/RecExCommon_flags.py" ) - -from xAODTriggerCnv.xAODTriggerCnvConf import xAODMaker__TrigDecisionCnvAlg -topSequence += xAODMaker__TrigDecisionCnvAlg("TrigDecisionCnvAlg") -topSequence.TrigDecisionCnvAlg.xAODKey = 'xTrigDecision' - -from TrigDecisionTool.TrigDecisionToolConf import Trig__TrigDecisionTool -ToolSvc += Trig__TrigDecisionTool( "TrigDecisionTool" ) - diff --git a/Event/xAOD/xAODTriggerCnv/share/xAODTriggerCnv_jobOptions.py b/Event/xAOD/xAODTriggerCnv/share/xAODTriggerCnv_jobOptions.py deleted file mode 100644 index fa025d4c6460..000000000000 --- a/Event/xAOD/xAODTriggerCnv/share/xAODTriggerCnv_jobOptions.py +++ /dev/null @@ -1,63 +0,0 @@ -# $Id: xAODTriggerCnv_jobOptions.py 583381 2014-02-14 15:58:20Z krasznaa $ - -# Enable xAOD making: -from RecExConfig.RecFlags import rec -rec.doWritexAOD = True - -# Set up the reading of a file: -FNAME = "AOD.pool.root" -include( "AthenaPython/iread_file.py" ) - -# Access the algorithm sequence: -from AthenaCommon.AlgSequence import AlgSequence -theJob = AlgSequence() - -# Create a logger object: -from AthenaCommon.Logging import logging -logger = logging.getLogger( "xAODTriggerCnv_jobOptions" ) - -# Create a POOL output file with the StoreGate contents: -from OutputStreamAthenaPool.MultipleStreamManager import MSMgr -xaodStream = MSMgr.NewPoolStream( "StreamAOD", "xAOD.pool.root" ) - -# Create the xAOD RoIs: -from xAODTriggerCnv.xAODRoICreator import xAODRoICreator -xAODRoICreator() - -# Create the xAOD trigger decision: -from xAODTriggerCnv.xAODTrigDecisionCreator import xAODTrigDecisionCreator -xAODTrigDecisionCreator() - -# Add bunch configuration metadata to the file: -from xAODTriggerCnv.xAODBunchConfCreator import xAODBunchConfCreator -xAODBunchConfCreator() - -# Additional type(s) created automatically by RecExCommon: -xaodStream.AddItem( "xAOD::EventInfo_v1#EventInfo" ) -xaodStream.AddItem( "xAOD::EventAuxInfo_v1#EventInfoAux." ) -xaodStream.AddItem( "xAOD::CaloClusterContainer_v1#*" ) -xaodStream.AddItem( "xAOD::CaloClusterAuxContainer_v1#*" ) -xaodStream.AddItem( "xAOD::MuonContainer_v1#*" ) -xaodStream.AddItem( "xAOD::MuonAuxContainer_v1#*" ) -xaodStream.AddItem( "xAOD::TrackParticleContainer_v1#*" ) -xaodStream.AddItem( "xAOD::TrackParticleAuxContainer_v1#*" ) -xaodStream.AddItem( "xAOD::VertexContainer_v1#*" ) -xaodStream.AddItem( "xAOD::VertexAuxContainer_v1#*" ) -xaodStream.AddItem( "xAOD::TauJetContainer_v1#*" ) -xaodStream.AddItem( "xAOD::TauJetAuxContainer_v1#*" ) - -# Check what happened to the stream: -xaodStream.Print() - -# Split all branches: -ServiceMgr.AthenaPoolCnvSvc.PoolAttributes += [ - "DEFAULT_SPLITLEVEL='1'" ] - -# Force POOL to just simply use the StoreGate keys as branch names: -ServiceMgr.AthenaPoolCnvSvc.SubLevelBranchName = "<key>" - -# Do some additional tweaking: -from AthenaCommon.AppMgr import theApp -theApp.EvtMax = 100 -ServiceMgr.MessageSvc.OutputLevel = INFO -ServiceMgr.MessageSvc.defaultLimit = 1000 -- GitLab From f43507619d334d0353db059367f03477779b59e5 Mon Sep 17 00:00:00 2001 From: Frank Winklmeier <frank.winklmeier@cern.ch> Date: Thu, 21 Mar 2024 15:03:33 +0100 Subject: [PATCH 2/5] Update to Gaudi v38r0.001 Changes compared to v38r0: - New `maxParallelismExtra` property in `AvalancheSchedulerSvc` to adjust the maximum TBB parallelism (gaudi/Gaudi!1567) This is required for the new async I/O HltEventLoopMgr (ATR-26285). The default behavior is unchanged. --- Projects/AthAnalysis/build_externals.sh | 2 +- Projects/AthGeneration/build_externals.sh | 2 +- Projects/AthSimulation/build_externals.sh | 2 +- Projects/Athena/build_externals.sh | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Projects/AthAnalysis/build_externals.sh b/Projects/AthAnalysis/build_externals.sh index 201d36cb7bbb..62832300e3d6 100755 --- a/Projects/AthAnalysis/build_externals.sh +++ b/Projects/AthAnalysis/build_externals.sh @@ -12,7 +12,7 @@ ATLAS_BUILDTYPE="RelWithDebInfo" ATLAS_EXTRA_CMAKE_ARGS=(-DLCG_VERSION_NUMBER=104 -DLCG_VERSION_POSTFIX="d_ATLAS_7" -DATLAS_ONNXRUNTIME_USE_CUDA=FALSE - -DATLAS_GAUDI_SOURCE="URL;https://gitlab.cern.ch/atlas/Gaudi/-/archive/v38r0.000/Gaudi-v38r0.000.tar.gz;URL_MD5;af374562de2c29151881f49b4d8b49cf") + -DATLAS_GAUDI_SOURCE="URL;https://gitlab.cern.ch/atlas/Gaudi/-/archive/v38r0.001/Gaudi-v38r0.001.tar.gz;URL_MD5;36f071bb81c0a85331c047107f829537") ATLAS_EXTRA_MAKE_ARGS=() # Let "the common script" do all the heavy lifting. diff --git a/Projects/AthGeneration/build_externals.sh b/Projects/AthGeneration/build_externals.sh index da7acc7f910a..80556932765a 100755 --- a/Projects/AthGeneration/build_externals.sh +++ b/Projects/AthGeneration/build_externals.sh @@ -11,7 +11,7 @@ ATLAS_EXT_PROJECT_NAME="AthGenerationExternals" ATLAS_BUILDTYPE="RelWithDebInfo" ATLAS_EXTRA_CMAKE_ARGS=(-DLCG_VERSION_NUMBER=104 -DLCG_VERSION_POSTFIX="d_ATLAS_7" - -DATLAS_GAUDI_SOURCE="URL;https://gitlab.cern.ch/atlas/Gaudi/-/archive/v38r0.000/Gaudi-v38r0.000.tar.gz;URL_MD5;af374562de2c29151881f49b4d8b49cf" + -DATLAS_GAUDI_SOURCE="URL;https://gitlab.cern.ch/atlas/Gaudi/-/archive/v38r0.001/Gaudi-v38r0.001.tar.gz;URL_MD5;36f071bb81c0a85331c047107f829537" -DATLAS_GEOMODEL_SOURCE="URL;https://gitlab.cern.ch/GeoModelDev/GeoModel/-/archive/5.0.3/GeoModel-5.0.3.tar.bz2;URL_MD5;8f00da4b18a60c574e6f3e4badcde7d2" -DATLAS_GEOMODEL_PATCH="" -DATLAS_GEOMODEL_FORCEDOWNLOAD_MESSAGE="Forcing_the_re-download_of_GeoModel_(2024.01.27.)") diff --git a/Projects/AthSimulation/build_externals.sh b/Projects/AthSimulation/build_externals.sh index c4dd12e76d83..a2a184856d6b 100755 --- a/Projects/AthSimulation/build_externals.sh +++ b/Projects/AthSimulation/build_externals.sh @@ -11,7 +11,7 @@ ATLAS_EXT_PROJECT_NAME="AthSimulationExternals" ATLAS_BUILDTYPE="RelWithDebInfo" ATLAS_EXTRA_CMAKE_ARGS=(-DLCG_VERSION_NUMBER=104 -DLCG_VERSION_POSTFIX="d_ATLAS_7" - -DATLAS_GAUDI_SOURCE="URL;https://gitlab.cern.ch/atlas/Gaudi/-/archive/v38r0.000/Gaudi-v38r0.000.tar.gz;URL_MD5;af374562de2c29151881f49b4d8b49cf" + -DATLAS_GAUDI_SOURCE="URL;https://gitlab.cern.ch/atlas/Gaudi/-/archive/v38r0.001/Gaudi-v38r0.001.tar.gz;URL_MD5;36f071bb81c0a85331c047107f829537" -DATLAS_GEOMODEL_SOURCE="URL;https://gitlab.cern.ch/GeoModelDev/GeoModel/-/archive/5.0.3/GeoModel-5.0.3.tar.bz2;URL_MD5;8f00da4b18a60c574e6f3e4badcde7d2" -DATLAS_GEOMODEL_PATCH="" -DATLAS_GEOMODEL_FORCEDOWNLOAD_MESSAGE="Forcing_the_re-download_of_GeoModel_(2024.01.27.)") diff --git a/Projects/Athena/build_externals.sh b/Projects/Athena/build_externals.sh index 4987e4cd1881..f5261a997a12 100755 --- a/Projects/Athena/build_externals.sh +++ b/Projects/Athena/build_externals.sh @@ -12,7 +12,7 @@ ATLAS_BUILDTYPE="RelWithDebInfo" ATLAS_EXTRA_CMAKE_ARGS=(-DLCG_VERSION_NUMBER=104 -DLCG_VERSION_POSTFIX="d_ATLAS_7" -DATLAS_ONNXRUNTIME_USE_CUDA=FALSE - -DATLAS_GAUDI_SOURCE="URL;https://gitlab.cern.ch/atlas/Gaudi/-/archive/v38r0.000/Gaudi-v38r0.000.tar.gz;URL_MD5;af374562de2c29151881f49b4d8b49cf" + -DATLAS_GAUDI_SOURCE="URL;https://gitlab.cern.ch/atlas/Gaudi/-/archive/v38r0.001/Gaudi-v38r0.001.tar.gz;URL_MD5;36f071bb81c0a85331c047107f829537" -DATLAS_ACTS_SOURCE="URL;https://github.com/acts-project/acts/archive/refs/tags/v32.0.2.tar.gz;URL_HASH;SHA256=a817a9b6434ae206c36b1c25df6139ffcde95234944d09e718125e14da7996b8" -DATLAS_GEOMODEL_SOURCE="URL;https://gitlab.cern.ch/GeoModelDev/GeoModel/-/archive/5.0.3/GeoModel-5.0.3.tar.bz2;URL_MD5;8f00da4b18a60c574e6f3e4badcde7d2" -DATLAS_GEOMODEL_PATCH="" -- GitLab From 5577938d69f5a1b05b671fdfc4a86541394b77de Mon Sep 17 00:00:00 2001 From: Francesca Pastore <francesca.pastore@cern.ch> Date: Fri, 22 Mar 2024 09:22:36 +0100 Subject: [PATCH 3/5] Reduce INFO to DEBUG in RorSeqFilter (ATR-28971) Reduce INFO to DEBUG in RorSeqFilter (ATR-28971) --- Trigger/TrigSteer/DecisionHandling/src/RoRSeqFilter.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Trigger/TrigSteer/DecisionHandling/src/RoRSeqFilter.cxx b/Trigger/TrigSteer/DecisionHandling/src/RoRSeqFilter.cxx index 83f1dcbd3bbf..948b18c62245 100644 --- a/Trigger/TrigSteer/DecisionHandling/src/RoRSeqFilter.cxx +++ b/Trigger/TrigSteer/DecisionHandling/src/RoRSeqFilter.cxx @@ -50,9 +50,9 @@ StatusCode RoRSeqFilter::initialize() for ( size_t i = 0; i < m_ioMapping.size(); ++i ) { for ( unsigned inIndex: m_ioMapping[i] ) { - ATH_MSG_INFO("Input collection: " << m_inputKeys[inIndex] ); + ATH_MSG_DEBUG("Input collection: " << m_inputKeys[inIndex] ); } - ATH_MSG_INFO(" Routed to output collection " << m_outputKeys[i] ); + ATH_MSG_DEBUG(" Routed to output collection " << m_outputKeys[i] ); } // crosscheck mapping (also the default one) -- GitLab From 76321a1a5e7639242fd2cec7accf65e73f53eb27 Mon Sep 17 00:00:00 2001 From: Johannes Junggeburth <johannes.josef.junggeburth@cern.ch> Date: Fri, 22 Mar 2024 09:25:08 +0100 Subject: [PATCH 4/5] Cherry pick - 69552 Merge branch 'main' into 'main' bug fix with off by one pointer check See merge request atlas/athena!69552 (cherry picked from commit 3de6ba47a4dde15da2d68d4208b96387df5f1eb8) eb67be97 bug fix with off by one pointer check --- .../MuonCnv/MuonNSWCommonDecode/src/NSWTriggerSTGL1AElink.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MuonSpectrometer/MuonCnv/MuonNSWCommonDecode/src/NSWTriggerSTGL1AElink.cxx b/MuonSpectrometer/MuonCnv/MuonNSWCommonDecode/src/NSWTriggerSTGL1AElink.cxx index 91e6c78f1afa..7096c5e7e147 100644 --- a/MuonSpectrometer/MuonCnv/MuonNSWCommonDecode/src/NSWTriggerSTGL1AElink.cxx +++ b/MuonSpectrometer/MuonCnv/MuonNSWCommonDecode/src/NSWTriggerSTGL1AElink.cxx @@ -107,7 +107,7 @@ void Muon::nsw::NSWTriggerSTGL1AElink::decode_data(std::size_t& readPointer) { while (readPointer < endOfData) { static constexpr auto SIZE_DATA_HEADER = STGTPL1A::size_stream_head_nbits + STGTPL1A::size_stream_head_nwords + STGTPL1A::size_stream_head_fifo_size + STGTPL1A::size_stream_head_streamID; - if (readPointer + SIZE_DATA_HEADER >= endOfData) { + if (readPointer + SIZE_DATA_HEADER > endOfData) { throw std::length_error( Muon::nsw::format("Read pointer ({}) would excede memory dedicated to data chunks ({}) while parsing the header (size: {})", readPointer, endOfData, SIZE_DATA_HEADER)); -- GitLab From bca43e18f6c725af66a9b0417dd1298827a27142 Mon Sep 17 00:00:00 2001 From: Jean Yves Beaucamp <jean.yves.beaucamp@cern.ch> Date: Fri, 22 Mar 2024 10:16:10 +0100 Subject: [PATCH 5/5] cTAU algorithm upgrade - added eTAU rCore/BDT and rHad score cuts Renamed eTAU_BDT_WP to eTAU_rCoreMin_WP; Added eTAU_rHad_WP; Change handling of cTAU/jTAU parameters to use only threshold objects --- .../TrigConfData/L1ThrExtraInfo.h | 18 +++- .../TrigConfData/TrigConfData/L1Threshold.h | 4 + .../TrigConfData/src/L1ThrExtraInfo.cxx | 9 +- .../TrigConfData/src/L1Threshold.cxx | 12 +++ .../TrigConfIO/src/JsonFileWriterL1.cxx | 8 ++ .../HLTSeeding/src/cTauRoIThresholdsTool.cxx | 31 +++--- .../src/GlobalL1TopoSimulation.cxx | 100 ------------------ .../L1TopoAlgorithms/cTauMultiplicity.h | 18 ++-- .../L1TopoAlgorithms/jTauMultiplicity.h | 11 +- .../L1TopoAlgorithms/jTauNoSort.h | 5 +- .../Root/cTauMultiplicity.cxx | 71 ++++++++----- .../Root/jTauMultiplicity.cxx | 33 ++---- .../L1TopoAlgorithms/Root/jTauNoSort.cxx | 25 ++--- .../L1TopoCoreSim/TopoSteering.h | 8 -- .../L1TopoCoreSim/TopoSteeringStructure.h | 19 ---- .../L1TopoCoreSim/Root/TopoSteering.cxx | 3 +- .../Root/TopoSteeringStructure.cxx | 47 -------- .../L1TopoInterfaces/ConfigurableAlg.h | 19 +--- .../L1TopoInterfaces/Root/ConfigurableAlg.cxx | 4 +- .../L1/Config/TypeWideThresholdConfig.py | 54 ++++++++-- 20 files changed, 191 insertions(+), 308 deletions(-) diff --git a/Trigger/TrigConfiguration/TrigConfData/TrigConfData/L1ThrExtraInfo.h b/Trigger/TrigConfiguration/TrigConfData/TrigConfData/L1ThrExtraInfo.h index 2edfbc62350e..1a67a211a7e9 100644 --- a/Trigger/TrigConfiguration/TrigConfData/TrigConfData/L1ThrExtraInfo.h +++ b/Trigger/TrigConfiguration/TrigConfData/TrigConfData/L1ThrExtraInfo.h @@ -352,16 +352,26 @@ namespace TrigConf { public: WorkingPoints_cTAU( const boost::property_tree::ptree & ); bool isDefined() const { return m_isDefined; } - int isolation_fw() const { return m_isolation_fw; } + unsigned int isolation_fw() const { return m_isolation_fw; } float isolation_d() const { return m_isolation_d; } - int isolation_jTAUCoreScale_fw() const { return m_isolation_jTAUCoreScale_fw; } + unsigned int isolation_jTAUCoreScale_fw() const { return m_isolation_jTAUCoreScale_fw; } float isolation_jTAUCoreScale_d() const { return m_isolation_jTAUCoreScale_d; } + float eTAU_rCoreMin_WP_d() const { return m_eTAU_rCoreMin_WP_d; } + unsigned int eTAU_rCoreMin_WP_fw() const { return m_eTAU_rCoreMin_WP_fw; } + Selection::WP eTAU_rCoreMin_WP() const { return static_cast<Selection::WP>(m_eTAU_rCoreMin_WP_fw); } + float eTAU_rHadMin_WP_d() const { return m_eTAU_rHadMin_WP_d; } + unsigned int eTAU_rHadMin_WP_fw() const { return m_eTAU_rHadMin_WP_fw; } + Selection::WP eTAU_rHadMin_WP() const { return static_cast<Selection::WP>(m_eTAU_rHadMin_WP_fw); } private: bool m_isDefined {false}; - int m_isolation_fw {0}; + unsigned int m_isolation_fw {0}; float m_isolation_d {0}; - int m_isolation_jTAUCoreScale_fw {0}; + unsigned int m_isolation_jTAUCoreScale_fw {0}; float m_isolation_jTAUCoreScale_d {0}; + float m_eTAU_rCoreMin_WP_d {0}; + unsigned int m_eTAU_rCoreMin_WP_fw {0}; + float m_eTAU_rHadMin_WP_d {0}; + unsigned int m_eTAU_rHadMin_WP_fw {0}; }; L1ThrExtraInfo_cTAU(const std::string & thrTypeName, const ptree & data) : L1ThrExtraInfoBase(thrTypeName, data) { load(); } diff --git a/Trigger/TrigConfiguration/TrigConfData/TrigConfData/L1Threshold.h b/Trigger/TrigConfiguration/TrigConfData/TrigConfData/L1Threshold.h index f2521425f6b4..8a85393d6c8c 100644 --- a/Trigger/TrigConfiguration/TrigConfData/TrigConfData/L1Threshold.h +++ b/Trigger/TrigConfiguration/TrigConfData/TrigConfData/L1Threshold.h @@ -230,6 +230,7 @@ namespace TrigConf { Selection::WP m_rHad { Selection::WP::NONE }; }; + class L1ThrExtraInfo_jTAU; class L1Threshold_jTAU final : public L1Threshold_Calo { public: L1Threshold_jTAU( const std::string & name, const std::string & type, std::weak_ptr<L1ThrExtraInfoBase> extraInfo, const ptree & data) : @@ -238,6 +239,7 @@ namespace TrigConf { virtual std::string className() const override { return "L1Threshold_jTAU"; } // access functions Selection::WP isolation() const { return m_isolation; } + const std::shared_ptr<L1ThrExtraInfo_jTAU> getExtraInfo() const; protected: virtual void update() override { L1Threshold_Calo::update(); @@ -249,6 +251,7 @@ namespace TrigConf { Selection::WP m_isolation { Selection::WP::NONE }; }; + class L1ThrExtraInfo_cTAU; class L1Threshold_cTAU final : public L1Threshold_Calo { public: L1Threshold_cTAU( const std::string & name, const std::string & type, std::weak_ptr<L1ThrExtraInfoBase> extraInfo, const ptree & data) : @@ -257,6 +260,7 @@ namespace TrigConf { virtual std::string className() const override { return "L1Threshold_cTAU"; } // access functions Selection::WP isolation() const { return m_isolation; } + const std::shared_ptr<L1ThrExtraInfo_cTAU> getExtraInfo() const; protected: virtual void update() override { L1Threshold_Calo::update(); diff --git a/Trigger/TrigConfiguration/TrigConfData/src/L1ThrExtraInfo.cxx b/Trigger/TrigConfiguration/TrigConfData/src/L1ThrExtraInfo.cxx index 8242744ddf34..ee78637676dd 100644 --- a/Trigger/TrigConfiguration/TrigConfData/src/L1ThrExtraInfo.cxx +++ b/Trigger/TrigConfiguration/TrigConfData/src/L1ThrExtraInfo.cxx @@ -469,14 +469,19 @@ TrigConf::L1ThrExtraInfo_jTAU::load() TrigConf::L1ThrExtraInfo_cTAU::WorkingPoints_cTAU::WorkingPoints_cTAU( const boost::property_tree::ptree & pt ) { m_isDefined = true; m_isolation_d = pt.get_optional<float>("isolation").get_value_or(0); - m_isolation_fw = pt.get_optional<float>("isolation_fw").get_value_or(0); + m_isolation_fw = pt.get_optional<unsigned int>("isolation_fw").get_value_or(0); m_isolation_jTAUCoreScale_d = pt.get_optional<float>("isolation_jTAUCoreScale").get_value_or(0); - m_isolation_jTAUCoreScale_fw = pt.get_optional<float>("isolation_jTAUCoreScale_fw").get_value_or(0); + m_isolation_jTAUCoreScale_fw = pt.get_optional<unsigned int>("isolation_jTAUCoreScale_fw").get_value_or(0); + m_eTAU_rCoreMin_WP_d = pt.get_optional<float>("eTAU_rCoreMin").get_value_or(0); + m_eTAU_rCoreMin_WP_fw = pt.get_optional<unsigned int>("eTAU_rCoreMin_WP_fw").get_value_or(0); + m_eTAU_rHadMin_WP_d = pt.get_optional<float>("eTAU_rHadMin").get_value_or(0); + m_eTAU_rHadMin_WP_fw = pt.get_optional<unsigned int>("eTAU_rHadMin_WP_fw").get_value_or(0); } std::ostream & TrigConf::operator<<(std::ostream & os, const TrigConf::L1ThrExtraInfo_cTAU::WorkingPoints_cTAU & iso) { os << "isolation_fw=" << iso.isolation_fw() << ", isolation_jTAUCoreScale_fw=" << iso.isolation_jTAUCoreScale_fw(); + os << ", eTAU_rCoreMin_WP_fw=" << iso.eTAU_rCoreMin_WP_fw() << ", eTAU_rHadMin_WP_fw=" << iso.eTAU_rHadMin_WP_fw(); return os; } diff --git a/Trigger/TrigConfiguration/TrigConfData/src/L1Threshold.cxx b/Trigger/TrigConfiguration/TrigConfData/src/L1Threshold.cxx index 41d8618c57aa..c7a864748c17 100644 --- a/Trigger/TrigConfiguration/TrigConfData/src/L1Threshold.cxx +++ b/Trigger/TrigConfiguration/TrigConfData/src/L1Threshold.cxx @@ -168,6 +168,12 @@ TrigConf::L1Threshold_eTAU::load() m_etaDepThrValue.setOutsideRangeValue(getAttribute("maxValue", true, 14000000)); } +const std::shared_ptr<TrigConf::L1ThrExtraInfo_jTAU> +TrigConf::L1Threshold_jTAU::getExtraInfo() const +{ + return dynamic_pointer_cast<TrigConf::L1ThrExtraInfo_jTAU>(m_extraInfo.lock()); +} + void TrigConf::L1Threshold_jTAU::load() { @@ -178,6 +184,12 @@ TrigConf::L1Threshold_jTAU::load() m_etaDepThrValue.setOutsideRangeValue(getAttribute("maxValue", true, 14000000)); } +const std::shared_ptr<TrigConf::L1ThrExtraInfo_cTAU> +TrigConf::L1Threshold_cTAU::getExtraInfo() const +{ + return dynamic_pointer_cast<TrigConf::L1ThrExtraInfo_cTAU>(m_extraInfo.lock()); +} + void TrigConf::L1Threshold_cTAU::load() { diff --git a/Trigger/TrigConfiguration/TrigConfIO/src/JsonFileWriterL1.cxx b/Trigger/TrigConfiguration/TrigConfIO/src/JsonFileWriterL1.cxx index 61099912406b..c7ee5fc0d4ef 100644 --- a/Trigger/TrigConfiguration/TrigConfIO/src/JsonFileWriterL1.cxx +++ b/Trigger/TrigConfiguration/TrigConfIO/src/JsonFileWriterL1.cxx @@ -561,6 +561,14 @@ TrigConf::JsonFileWriterL1::writeJsonFile(const std::string & filename, const L1 stream << std::fixed << std::setprecision(3) << iso.value().isolation_jTAUCoreScale_d(); jWPIso["isolation_jTAUCoreScale"] = std::stod(stream.str()); jWPIso["isolation_jTAUCoreScale_fw"] = iso.value().isolation_jTAUCoreScale_fw(); + stream.str(""); + stream << std::fixed << std::setprecision(3) << iso.value().eTAU_rCoreMin_WP_d(); + jWPIso["eTAU_rCoreMin"] = std::stod(stream.str()); + jWPIso["eTAU_rCoreMin_WP_fw"] = iso.value().eTAU_rCoreMin_WP_fw(); + stream.str(""); + stream << std::fixed << std::setprecision(3) << iso.value().eTAU_rHadMin_WP_d(); + jWPIso["eTAU_rHadMin"] = std::stod(stream.str()); + jWPIso["eTAU_rHadMin_WP_fw"] = iso.value().eTAU_rHadMin_WP_fw(); jThrType["workingPoints"][wpstr] += jWPIso; } } diff --git a/Trigger/TrigSteer/HLTSeeding/src/cTauRoIThresholdsTool.cxx b/Trigger/TrigSteer/HLTSeeding/src/cTauRoIThresholdsTool.cxx index 0d683b2cab4c..b6f8bf3391a8 100644 --- a/Trigger/TrigSteer/HLTSeeding/src/cTauRoIThresholdsTool.cxx +++ b/Trigger/TrigSteer/HLTSeeding/src/cTauRoIThresholdsTool.cxx @@ -6,7 +6,6 @@ #include "StoreGate/exceptions.h" #include "GaudiKernel/ThreadLocalContext.h" #include "L1TopoAlgorithms/cTauMultiplicity.h" -#include "L1TopoCoreSim/TopoSteeringStructure.h" StatusCode cTauRoIThresholdsTool::initialize() { @@ -17,15 +16,7 @@ StatusCode cTauRoIThresholdsTool::initialize() { uint64_t cTauRoIThresholdsTool::getPattern(const xAOD::eFexTauRoI& eTau, const RoIThresholdsTool::ThrVec& menuThresholds, - const TrigConf::L1ThrExtraInfoBase& menuExtraInfo) const { - - std::map<std::string, int> isoFW_CTAU, isoFW_CTAU_jTAUCoreScale; - TCS::TopoSteeringStructure::setIsolationFW_CTAU(isoFW_CTAU, isoFW_CTAU_jTAUCoreScale, menuExtraInfo); - - unsigned int eFexEt{eTau.etTOB()}; // eTAU Et in units of 100 MeV - int eFexEta{eTau.iEta()}; - - unsigned int jFexCoreEt = 0, jFexIsoEt = 0; // jTAU core and isolation Et in units of 200 MeV + const TrigConf::L1ThrExtraInfoBase& /*menuExtraInfo*/) const { // Get the jTau matched to the eTau using jTauLink_t = ElementLink<xAOD::jFexTauRoIContainer>; @@ -40,15 +31,14 @@ uint64_t cTauRoIThresholdsTool::getPattern(const xAOD::eFexTauRoI& eTau, if (matched) { const xAOD::jFexTauRoI* jTau = *jTauLink; - jFexIsoEt = jTau->tobIso(); - jFexCoreEt = jTau->tobEt(); - ATH_MSG_DEBUG("eFex tau eta,phi = " << eTau.iEta() << ", " << eTau.iPhi() << ", jFex tau eta,phi = " << jTau->globalEta() << ", " << jTau->globalPhi() - << ", eFex et (100 MeV/counts) = " << eFexEt << ", jFex et (200 MeV/counts) = " << jTau->tobEt() << ", jFex iso (200 MeV/counts) = " << jTau->tobIso()); + << ", eFex et (100 MeV/counts) = " << eTau.etTOB() << ", jFex et (200 MeV/counts) = " << jTau->tobEt() << ", jFex iso (200 MeV/counts) = " << jTau->tobIso() + << ", eFex rCore/BDT = " << eTau.tauOneThresholds() << ", eFex rHad = " << eTau.tauTwoThresholds()); } else { ATH_MSG_DEBUG("eFex tau eta,phi = " << eTau.iEta() << ", " << eTau.iPhi() - << ", eFex et (100 MeV/counts) = " << eFexEt << ", no matching jTau found"); + << ", eFex et (100 MeV/counts) = " << eTau.etTOB() << ", no matching jTau found" + << ", eFex rCore/BDT = " << eTau.tauOneThresholds() << ", eFex rHad = " << eTau.tauTwoThresholds()); } @@ -60,13 +50,16 @@ uint64_t cTauRoIThresholdsTool::getPattern(const xAOD::eFexTauRoI& eTau, // Check isolation threshold - unmatched eTau treated as perfectly isolated, ATR-25927 // The core and isolation E_T values are multiplied by 2 to normalise to 100 MeV/counts units - bool passIso = matched ? TCS::cTauMultiplicity::checkIsolationWP(isoFW_CTAU, isoFW_CTAU_jTAUCoreScale, 2*static_cast<float>(jFexCoreEt), 2*static_cast<float>(jFexIsoEt), static_cast<float>(eFexEt), TrigConf::Selection::wpToString(thr->isolation())) : true; + bool passIso = matched ? TCS::cTauMultiplicity::checkIsolationWP(eTau, **jTauLink, *thr) : true; + + // Check eTAU rCore/BDT and rHad thresholds + bool passeTAUWP = TCS::cTauMultiplicity::checkeTAUWP(eTau, *thr); - // Check pt threshold - using iEta coordinate for the eFEX ensures a 0.1 granularity of the eta coordinate, + // Check et threshold - using iEta coordinate for the eFEX ensures a 0.1 granularity of the eta coordinate, // as expected from the menu method thrValue100MeV - bool passPt = eFexEt > thr->thrValue100MeV(eFexEta); + bool passEt = eTau.etTOB() > thr->thrValue100MeV(eTau.iEta()); - if ( passIso && passPt ) { + if (passIso && passeTAUWP && passEt) { thresholdMask |= (1<<thr->mapping()); } diff --git a/Trigger/TrigT1/Global/GlobalSimulation/src/GlobalL1TopoSimulation.cxx b/Trigger/TrigT1/Global/GlobalSimulation/src/GlobalL1TopoSimulation.cxx index 5960098f32c4..03b911b28fe7 100644 --- a/Trigger/TrigT1/Global/GlobalSimulation/src/GlobalL1TopoSimulation.cxx +++ b/Trigger/TrigT1/Global/GlobalSimulation/src/GlobalL1TopoSimulation.cxx @@ -88,10 +88,6 @@ namespace GlobalSim { const TrigConf::L1Menu*); uint32_t interpretGenericParam(const std::string&); - - std::map<std::string, int> isolationFW_CTAU(const TrigConf::L1Menu* l1menu); - std::map<std::string, int> isolationFW_CTAU_jTAUCoreScale(const TrigConf::L1Menu* l1menu); - std::map<std::string, int> isolationFW_JTAU(const TrigConf::L1Menu* l1menu); } namespace GlobalSim { @@ -605,10 +601,6 @@ namespace GlobalSim { throw std::runtime_error("Error down casting to CountingAlg"); } - pca->setIsolationFW_CTAU(isolationFW_CTAU(l1menu), isolationFW_CTAU_jTAUCoreScale(l1menu)); - pca->setIsolationFW_JTAU(isolationFW_JTAU(l1menu)); - - pca->setThreshold(l1thr); alg->setL1TopoHistSvc(histSvc); pca->initialize(); @@ -699,97 +691,5 @@ namespace GlobalSim { } } - std::map<std::string, int> isolationFW_CTAU(const TrigConf::L1Menu* l1menu){ - const TrigConf::L1ThrExtraInfo_cTAU& ctauExtraInfo = - l1menu->thrExtraInfo().cTAU(); - - int CTAU_iso_fw_loose = - static_cast<int>(ctauExtraInfo.isolation(TrigConf::Selection::WP::LOOSE, - 0).isolation_fw()); - - int CTAU_iso_fw_medium = - static_cast<int>(ctauExtraInfo.isolation(TrigConf::Selection::WP::MEDIUM, - 0).isolation_fw()); - - int CTAU_iso_fw_tight = - static_cast<int>(ctauExtraInfo.isolation(TrigConf::Selection::WP::TIGHT, - 0).isolation_fw()); - - auto isolationFW = std::map<std::string, int>(); - - isolationFW[TrigConf::Selection::wpToString(TrigConf::Selection::WP::LOOSE)] - = CTAU_iso_fw_loose; - - isolationFW[TrigConf::Selection::wpToString(TrigConf::Selection::WP::MEDIUM)] - = CTAU_iso_fw_medium; - - isolationFW[TrigConf::Selection::wpToString(TrigConf::Selection::WP::TIGHT)] - = CTAU_iso_fw_tight; - - return isolationFW; - } - - std::map<std::string, int> isolationFW_CTAU_jTAUCoreScale(const TrigConf::L1Menu* l1menu){ - const TrigConf::L1ThrExtraInfo_cTAU& ctauExtraInfo = - l1menu->thrExtraInfo().cTAU(); - - int CTAU_iso_fw_jTAUCoreScale_loose = - static_cast<int>(ctauExtraInfo.isolation(TrigConf::Selection::WP::LOOSE, - 0).isolation_jTAUCoreScale_fw()); - - int CTAU_iso_fw_jTAUCoreScale_medium = - static_cast<int>(ctauExtraInfo.isolation(TrigConf::Selection::WP::MEDIUM, - 0).isolation_jTAUCoreScale_fw()); - - int CTAU_iso_fw_jTAUCoreScale_tight = - static_cast<int>(ctauExtraInfo.isolation(TrigConf::Selection::WP::TIGHT, - 0).isolation_jTAUCoreScale_fw()); - - auto isolationFW_jTAUCoreScale = std::map<std::string, int>(); - - isolationFW_jTAUCoreScale[TrigConf::Selection::wpToString(TrigConf::Selection::WP::LOOSE)] - = CTAU_iso_fw_jTAUCoreScale_loose; - - isolationFW_jTAUCoreScale[TrigConf::Selection::wpToString(TrigConf::Selection::WP::MEDIUM)] - = CTAU_iso_fw_jTAUCoreScale_medium; - - isolationFW_jTAUCoreScale[TrigConf::Selection::wpToString(TrigConf::Selection::WP::TIGHT)] - = CTAU_iso_fw_jTAUCoreScale_tight; - - return isolationFW_jTAUCoreScale; - } - - std::map<std::string, int> isolationFW_JTAU(const TrigConf::L1Menu* l1menu){ - const TrigConf::L1ThrExtraInfo_jTAU& jtauExtraInfo = - l1menu->thrExtraInfo().jTAU(); - - int JTAU_iso_fw_loose = - static_cast<int>(jtauExtraInfo.isolation(TrigConf::Selection::WP::LOOSE, - 0).isolation_fw()); - - int JTAU_iso_fw_medium = - static_cast<int>(jtauExtraInfo.isolation(TrigConf::Selection::WP::MEDIUM, - 0).isolation_fw()); - - int JTAU_iso_fw_tight = - static_cast<int>(jtauExtraInfo.isolation(TrigConf::Selection::WP::TIGHT, - 0).isolation_fw()); - - auto isolationFW = std::map<std::string, int>(); - - isolationFW[TrigConf::Selection::wpToString(TrigConf::Selection::WP::LOOSE)] - = JTAU_iso_fw_loose; - - isolationFW[TrigConf::Selection::wpToString(TrigConf::Selection::WP::MEDIUM)] - = JTAU_iso_fw_medium; - - isolationFW[TrigConf::Selection::wpToString(TrigConf::Selection::WP::TIGHT)] - = JTAU_iso_fw_tight; - - return isolationFW; - } - - - } diff --git a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/L1TopoAlgorithms/cTauMultiplicity.h b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/L1TopoAlgorithms/cTauMultiplicity.h index 6c1f59721a1d..d34a030398f3 100644 --- a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/L1TopoAlgorithms/cTauMultiplicity.h +++ b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/L1TopoAlgorithms/cTauMultiplicity.h @@ -25,7 +25,6 @@ namespace TCS { class cTauMultiplicity : public CountingAlg { public: - cTauMultiplicity(const std::string & name); virtual ~cTauMultiplicity(); @@ -41,19 +40,18 @@ namespace TCS { static size_t cTauMatching(const xAOD::eFexTauRoI& eTau, const xAOD::jFexTauRoIContainer& jTauRoIs); // Returns true when a matching is found static bool cTauMatching(const xAOD::eFexTauRoI& eTau, const xAOD::jFexTauRoI& jTau); - // Converts the isolation score to bit to be used for the working point assignement - static bool checkIsolationWP(const std::map<std::string, int>& isoFW_CTAU, const std::map<std::string, int>& isoFW_CTAU_jTAUCoreScale, const float jTauCoreEt, const float jTauIsoEt, const float eTauEt, const std::string& isolation_wp); + // Check cTAU isolation + static bool checkIsolationWP(const xAOD::eFexTauRoI& eTau, const xAOD::jFexTauRoI& jTau, const TrigConf::L1Threshold_cTAU& thr); + // Check eTAU rCore/BDT and rHad WPs + static bool checkeTAUWP(const xAOD::eFexTauRoI& eTau, const TrigConf::L1Threshold_cTAU& thr); #endif private: - const TrigConf::L1Threshold_cTAU* m_threshold{nullptr}; - std::map<std::string, int> m_isoFW_CTAU; - std::map<std::string, int> m_isoFW_CTAU_jTAUCoreScale; + std::shared_ptr<TrigConf::L1ThrExtraInfo_cTAU> m_extraInfo; - // This function is used to map the ctau isolation working points into a common format with eFEX EM and taus. - // This allows us to use same functionalities from ConfigurableAlg (L1TopoInterfaces) to apply isolation cuts in multiplicity algorithms for all flavour of TOBS - bool checkIsolationWP(const TCS::cTauTOB* etauCand, const TCS::cTauTOB* jtauCand, const std::string& isolation_wp) const; + bool checkIsolationWP(const TCS::cTauTOB* etauCand, const TCS::cTauTOB* jtauCand) const; + bool checkeTAUWP(const TCS::cTauTOB* etauCand) const; // Matching function for L1Topo bool cTauMatching(const TCS::cTauTOB* etauCand, const TCS::cTauTOB* jtauCand) const; @@ -71,6 +69,8 @@ namespace TCS { std::vector<std::string> m_histcTauPartialIsoTight; std::vector<std::string> m_histcTauIsoMatchedPass; + using WP = TrigConf::Selection::WP; + }; } diff --git a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/L1TopoAlgorithms/jTauMultiplicity.h b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/L1TopoAlgorithms/jTauMultiplicity.h index 8befe1f07b87..ac87c88e9db0 100644 --- a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/L1TopoAlgorithms/jTauMultiplicity.h +++ b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/L1TopoAlgorithms/jTauMultiplicity.h @@ -31,14 +31,13 @@ namespace TCS { virtual StatusCode process( const TCS::InputTOBArray & input, Count & count ) override final ; - - private: - - TrigConf::L1Threshold const * m_threshold{nullptr}; - std::map<std::string, int> m_isoFW_JTAU; + TrigConf::L1Threshold_jTAU const * m_threshold{nullptr}; + std::shared_ptr<TrigConf::L1ThrExtraInfo_jTAU> m_extraInfo; + + bool checkIsolation( const TCS::jTauTOB* jtau ) const; - unsigned int convertIsoToBit( const TCS::jTauTOB * jtau ) const; + using WP = TrigConf::Selection::WP; }; } diff --git a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/L1TopoAlgorithms/jTauNoSort.h b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/L1TopoAlgorithms/jTauNoSort.h index f9c8ce1d9d5d..e272c8383318 100644 --- a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/L1TopoAlgorithms/jTauNoSort.h +++ b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/L1TopoAlgorithms/jTauNoSort.h @@ -30,10 +30,9 @@ namespace TCS { parType_t m_numberOfjTaus = { 0 }; parType_t m_iso = { 0 }; + parType_t m_passIsolation = { 0 }; - std::map<std::string, int> m_isoFW_JTAU; - - unsigned int convertIsoToBit( const TCS::jTauTOB * jtau ) const; + bool checkIsolation(const TCS::jTauTOB* jtau) const; }; diff --git a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/cTauMultiplicity.cxx b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/cTauMultiplicity.cxx index 66044574e8f2..bb3c6c0a6071 100644 --- a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/cTauMultiplicity.cxx +++ b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/cTauMultiplicity.cxx @@ -14,6 +14,8 @@ #include "L1TopoEvent/TOBArray.h" #include "L1TopoEvent/cTauTOBArray.h" +#include "TrigConfData/L1ThrExtraInfo.h" + REGISTER_ALG_TCS(cTauMultiplicity) TCS::cTauMultiplicity::cTauMultiplicity(const std::string & name) : CountingAlg(name) { @@ -26,15 +28,7 @@ TCS::cTauMultiplicity::~cTauMultiplicity() {} TCS::StatusCode TCS::cTauMultiplicity::initialize() { m_threshold = dynamic_cast<const TrigConf::L1Threshold_cTAU*>(getThreshold()); - - m_isoFW_CTAU = isolationFW_CTAU(); - m_isoFW_CTAU_jTAUCoreScale = isolationFW_CTAU_jTAUCoreScale(); - - TRG_MSG_DEBUG("Initializing cTauMultiplicity L1Topo Algorithm"); - for(const auto& [wp, iso] : m_isoFW_CTAU) { - TRG_MSG_DEBUG("WP \"" << wp << "\": R=" << iso << ", jTAUCoreScale=" << m_isoFW_CTAU_jTAUCoreScale[wp]); - } - + m_extraInfo = m_threshold->getExtraInfo(); // book histograms std::string hname_accept = "cTauMultiplicity_accept_EtaPt_"+m_threshold->name(); @@ -94,22 +88,27 @@ TCS::StatusCode TCS::cTauMultiplicity::process( const TCS::InputTOBArray & input if((*jtauCand)->tobType() != TCS::JTAU) continue; - isMatched = cTauMatching( *etauCand, *jtauCand ); + isMatched = cTauMatching(*etauCand, *jtauCand); if(isMatched) { + float etauCand_et = static_cast<float>((*etauCand)->Et()); + float etauCand_eta = static_cast<float>((*etauCand)->etaDouble()); + float jtauCand_et = static_cast<float>((*jtauCand)->Et()); + float jtauCand_etIso = static_cast<float>((*jtauCand)->EtIso()); // Updated isolation condition, WP-dependent (ATR-28641) // "Partial" isolation formula: I = (E_T^{jTAU Iso} + jTAUCoreScale * E_T^{jTAU Core}) / E_T^{eTAU} // This formula is missing the eTAU Core substraction from the numerator, grouped with the isolation cut value - isolation_partial_loose = (static_cast<float>((*jtauCand)->EtIso()) + m_isoFW_CTAU_jTAUCoreScale.at("Loose")/1024.0 * static_cast<float>((*jtauCand)->Et())) / static_cast<float>((*etauCand)->Et()); // Internal variable for monitoring - isolation_partial_loose = (static_cast<float>((*jtauCand)->EtIso()) + m_isoFW_CTAU_jTAUCoreScale.at("Medium")/1024.0 * static_cast<float>((*jtauCand)->Et())) / static_cast<float>((*etauCand)->Et()); // Internal variable for monitoring - isolation_partial_medium12 = (static_cast<float>((*jtauCand)->EtIso()) + m_isoFW_CTAU_jTAUCoreScale.at("Medium12")/1024.0 * static_cast<float>((*jtauCand)->Et())) / static_cast<float>((*etauCand)->Et()); // Internal variable for monitoring - isolation_partial_medium20 = (static_cast<float>((*jtauCand)->EtIso()) + m_isoFW_CTAU_jTAUCoreScale.at("Medium20")/1024.0 * static_cast<float>((*jtauCand)->Et())) / static_cast<float>((*etauCand)->Et()); // Internal variable for monitoring - isolation_partial_medium30 = (static_cast<float>((*jtauCand)->EtIso()) + m_isoFW_CTAU_jTAUCoreScale.at("Medium30")/1024.0 * static_cast<float>((*jtauCand)->Et())) / static_cast<float>((*etauCand)->Et()); // Internal variable for monitoring - isolation_partial_medium35 = (static_cast<float>((*jtauCand)->EtIso()) + m_isoFW_CTAU_jTAUCoreScale.at("Medium35")/1024.0 * static_cast<float>((*jtauCand)->Et())) / static_cast<float>((*etauCand)->Et()); // Internal variable for monitoring - isolation_partial_tight = (static_cast<float>((*jtauCand)->EtIso()) + m_isoFW_CTAU_jTAUCoreScale.at("Tight")/1024.0 * static_cast<float>((*jtauCand)->Et())) / static_cast<float>((*etauCand)->Et()); // Internal variable for monitoring + isolation_partial_loose = (jtauCand_etIso + m_extraInfo->isolation(WP::LOOSE, etauCand_eta).isolation_jTAUCoreScale_fw()/1024.0 * jtauCand_et) / etauCand_et; // Internal variable for monitoring + isolation_partial_loose = (jtauCand_etIso + m_extraInfo->isolation(WP::MEDIUM, etauCand_eta).isolation_jTAUCoreScale_fw()/1024.0 * jtauCand_et) / etauCand_et; // Internal variable for monitoring + isolation_partial_medium12 = (jtauCand_etIso + m_extraInfo->isolation(WP::MEDIUM12, etauCand_eta).isolation_jTAUCoreScale_fw()/1024.0 * jtauCand_et) / etauCand_et; // Internal variable for monitoring + isolation_partial_medium20 = (jtauCand_etIso + m_extraInfo->isolation(WP::MEDIUM20, etauCand_eta).isolation_jTAUCoreScale_fw()/1024.0 * jtauCand_et) / etauCand_et; // Internal variable for monitoring + isolation_partial_medium30 = (jtauCand_etIso + m_extraInfo->isolation(WP::MEDIUM30, etauCand_eta).isolation_jTAUCoreScale_fw()/1024.0 * jtauCand_et) / etauCand_et; // Internal variable for monitoring + isolation_partial_medium35 = (jtauCand_etIso + m_extraInfo->isolation(WP::MEDIUM35, etauCand_eta).isolation_jTAUCoreScale_fw()/1024.0 * jtauCand_et) / etauCand_et; // Internal variable for monitoring + isolation_partial_tight = (jtauCand_etIso + m_extraInfo->isolation(WP::TIGHT, etauCand_eta).isolation_jTAUCoreScale_fw()/1024.0 * jtauCand_et) / etauCand_et; // Internal variable for monitoring // Old isolation condition coded as in firmware: https://indico.cern.ch/event/1079697/contributions/4541419/attachments/2315137/3940824/cTAU_FirmwareAlgoProposal.pdf page 8 - isIsolated = checkIsolationWP(*etauCand, *jtauCand, TrigConf::Selection::wpToString(m_threshold->isolation())); + isIsolated = checkIsolationWP(*etauCand, *jtauCand); + break; // Break loop when a match is found } @@ -133,6 +132,8 @@ TCS::StatusCode TCS::cTauMultiplicity::process( const TCS::InputTOBArray & input if(isMatched && isIsolated) accept = true; // This is a good matched cTau if(!isMatched) accept = true; // This is a non-matched eTau + if(!checkeTAUWP(*etauCand)) accept = false; // Check eTAU rCore/BDT and rHad WP + // Menu threshold uses 0.1 eta granularity but eFex objects have 0.025 eta granularity // eFex eta is calculated as 4*eta_tower (0.1 gran.) + seed (0.025 gran.), eta from -25 to 24 int eta_thr; @@ -140,6 +141,7 @@ TCS::StatusCode TCS::cTauMultiplicity::process( const TCS::InputTOBArray & input else eta_thr = (*etauCand)->eta() - (*etauCand)->eta()%4 - 4; accept = accept && (*etauCand)->Et() > m_threshold->thrValue100MeV(eta_thr/4); // Convert eta_thr to units of 0.1 to pass as an argument + if(accept) { counting++; fillHist2D(m_histAccept[0], (*etauCand)->eta(), (*etauCand)->EtDouble()); @@ -158,10 +160,17 @@ TCS::StatusCode TCS::cTauMultiplicity::process( const TCS::InputTOBArray & input } -bool TCS::cTauMultiplicity::checkIsolationWP(const TCS::cTauTOB* etauCand, const TCS::cTauTOB* jtauCand, const std::string& isolation_wp) const { - if(isolation_wp == "None") return true; - if(jtauCand->EtIso()*1024 + jtauCand->Et()*m_isoFW_CTAU_jTAUCoreScale.at(isolation_wp) < etauCand->Et()*m_isoFW_CTAU.at(isolation_wp)) return true; - return false; +bool TCS::cTauMultiplicity::checkIsolationWP(const TCS::cTauTOB* etauCand, const TCS::cTauTOB* jtauCand) const { + if(m_threshold->isolation() == WP::NONE) return true; + auto iso_wp = m_extraInfo->isolation(m_threshold->isolation(), etauCand->etaDouble()); + return jtauCand->EtIso()*1024 + jtauCand->Et()*iso_wp.isolation_jTAUCoreScale_fw() < etauCand->Et()*iso_wp.isolation_fw(); +} + + +bool TCS::cTauMultiplicity::checkeTAUWP(const TCS::cTauTOB* etauCand) const { + if(m_threshold->isolation() == WP::NONE) return true; + auto iso_wp = m_extraInfo->isolation(m_threshold->isolation(), etauCand->etaDouble()); + return etauCand->RCore() >= iso_wp.eTAU_rCoreMin_WP_fw() && etauCand->RHad() >= iso_wp.eTAU_rHadMin_WP_fw(); } @@ -228,6 +237,7 @@ size_t TCS::cTauMultiplicity::cTauMatching(const xAOD::eFexTauRoI& eTau, const x } + bool TCS::cTauMultiplicity::cTauMatching(const xAOD::eFexTauRoI& eTau, const xAOD::jFexTauRoI& jTau) { // eFEX: etaTower = iEta, phiTower = iPhi @@ -250,11 +260,18 @@ bool TCS::cTauMultiplicity::cTauMatching(const xAOD::eFexTauRoI& eTau, const xAO } -bool -TCS::cTauMultiplicity::checkIsolationWP(const std::map<std::string, int>& isoFW_CTAU, const std::map<std::string, int>& isoFW_CTAU_jTAUCoreScale, const float jTauCoreEt, const float jTauIsoEt, const float eTauEt, const std::string& isolation_wp) { - if(isolation_wp == "None") return true; - if(jTauIsoEt*1024 + jTauCoreEt*isoFW_CTAU_jTAUCoreScale.at(isolation_wp) < eTauEt*isoFW_CTAU.at(isolation_wp)) return true; - return false; + +bool TCS::cTauMultiplicity::checkIsolationWP(const xAOD::eFexTauRoI& eTau, const xAOD::jFexTauRoI& jTau, const TrigConf::L1Threshold_cTAU& thr) { + if(thr.isolation() == WP::NONE) return true; + auto iso_wp = thr.getExtraInfo()->isolation(thr.isolation(), eTau.eta()); + return jTau.tobIso()*2*1024 + jTau.tobEt()*2*iso_wp.isolation_jTAUCoreScale_fw() < eTau.etTOB()*iso_wp.isolation_fw(); +} + + +bool TCS::cTauMultiplicity::checkeTAUWP(const xAOD::eFexTauRoI& eTau, const TrigConf::L1Threshold_cTAU& thr) { + if(thr.isolation() == WP::NONE) return true; + auto iso_wp = thr.getExtraInfo()->isolation(thr.isolation(), eTau.eta()); + return eTau.tauOneThresholds() >= iso_wp.eTAU_rCoreMin_WP_fw() && eTau.tauTwoThresholds() >= iso_wp.eTAU_rHadMin_WP_fw(); } #endif diff --git a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/jTauMultiplicity.cxx b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/jTauMultiplicity.cxx index c361972594f6..5631f2306f66 100644 --- a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/jTauMultiplicity.cxx +++ b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/jTauMultiplicity.cxx @@ -21,6 +21,8 @@ #include "L1TopoEvent/TOBArray.h" #include "L1TopoEvent/jTauTOBArray.h" +#include "TrigConfData/L1ThrExtraInfo.h" + REGISTER_ALG_TCS(jTauMultiplicity) using namespace std; @@ -28,10 +30,7 @@ using namespace std; TCS::jTauMultiplicity::jTauMultiplicity(const std::string & name) : CountingAlg(name) { - - setNumberOutputBits(12); //To-Do: Make this flexible to addapt to the menu. Each counting requires more than one bit - } TCS::jTauMultiplicity::~jTauMultiplicity(){} @@ -39,9 +38,8 @@ TCS::jTauMultiplicity::~jTauMultiplicity(){} TCS::StatusCode TCS::jTauMultiplicity::initialize() { - - m_threshold = getThreshold(); - m_isoFW_JTAU = isolationFW_JTAU(); + m_threshold = dynamic_cast<const TrigConf::L1Threshold_jTAU*>(getThreshold()); + m_extraInfo = m_threshold->getExtraInfo(); // book histograms std::string hname_accept = "jTauMultiplicity_accept_EtaPt_"+m_threshold->name(); @@ -67,10 +65,6 @@ TCS::StatusCode TCS::jTauMultiplicity::process( const TCS::InputTOBArray & input, Count & count ) { - - // Grab the threshold and cast it into the right type - const auto& jTAUThr = dynamic_cast<const TrigConf::L1Threshold_jTAU &>(*m_threshold); - // Grab inputs const jTauTOBArray & jtaus = dynamic_cast<const jTauTOBArray&>(input); @@ -82,9 +76,9 @@ TCS::jTauMultiplicity::process( const TCS::InputTOBArray & input, ++jtau ) { // Dividing by 4 standing for converting eta from 0.025 to 0.1 granularity as it is defined in the menu as 0.1 gran. - bool passed = (*jtau)->Et() > jTAUThr.thrValue100MeV((*jtau)->eta()/4); + bool passed = (*jtau)->Et() > m_threshold->thrValue100MeV((*jtau)->eta()/4); - if ( !isocut(TrigConf::Selection::wpToString(jTAUThr.isolation()), convertIsoToBit(*jtau)) ) {continue;} + if (!checkIsolation(*jtau)) continue; if (passed) { counting++; @@ -102,15 +96,10 @@ TCS::jTauMultiplicity::process( const TCS::InputTOBArray & input, } -unsigned int -TCS::jTauMultiplicity::convertIsoToBit(const TCS::jTauTOB * jtau) const { - unsigned int bit = 0; - - // Assign the tightest accept WP as default bit - if( jtau->EtIso()*1024 < jtau->Et()*m_isoFW_JTAU.at("Loose") ) bit = 1; - if( jtau->EtIso()*1024 < jtau->Et()*m_isoFW_JTAU.at("Medium") ) bit = 2; - if( jtau->EtIso()*1024 < jtau->Et()*m_isoFW_JTAU.at("Tight") ) bit = 3; - - return bit; +bool +TCS::jTauMultiplicity::checkIsolation(const TCS::jTauTOB* jtau) const { + if(m_threshold->isolation() == WP::NONE) return true; + auto iso_wp = m_extraInfo->isolation(m_threshold->isolation(), jtau->etaDouble()); + return jtau->EtIso()*1024 < jtau->Et()*iso_wp.isolation_fw(); } diff --git a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/jTauNoSort.cxx b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/jTauNoSort.cxx index c71c0a59b566..b2d84bde9c98 100644 --- a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/jTauNoSort.cxx +++ b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/jTauNoSort.cxx @@ -15,8 +15,10 @@ REGISTER_ALG_TCS(jTauNoSort) // constructor TCS::jTauNoSort::jTauNoSort(const std::string & name) : SortingAlg(name) { - defineParameter( "InputWidth", 120 ); // for fw - defineParameter( "OutputWidth", 120 ); + defineParameter("InputWidth", 120); // for fw + defineParameter("OutputWidth", 120); + defineParameter("Isolation", 1024); + defineParameter("passIsolation", false); } @@ -27,8 +29,7 @@ TCS::StatusCode TCS::jTauNoSort::initialize() { m_numberOfjTaus = parameter("OutputWidth").value(); m_iso = parameter("Isolation").value(); - - m_isoFW_JTAU = isolationFW_JTAU(); + m_passIsolation = parameter("passIsolation").value(); return TCS::StatusCode::SUCCESS; } @@ -42,7 +43,7 @@ TCS::jTauNoSort::sort(const InputTOBArray & input, TOBArray & output) { for(jTauTOBArray::const_iterator jtau = clusters.begin(); jtau!= clusters.end(); ++jtau ) { // Isolation cut - if ( !isocut(m_iso, convertIsoToBit(*jtau)) ) {continue;} + if(!checkIsolation(*jtau)) continue; const GenericTOB gtob(**jtau); output.push_back( gtob ); @@ -61,15 +62,9 @@ TCS::jTauNoSort::sort(const InputTOBArray & input, TOBArray & output) { } -unsigned int -TCS::jTauNoSort::convertIsoToBit(const TCS::jTauTOB * jtau) const { - unsigned int bit = 0; - - // Assign the tightest accept WP as default bit - if( jtau->EtIso()*1024 < jtau->Et()*m_isoFW_JTAU.at("Loose") ) bit = 1; - if( jtau->EtIso()*1024 < jtau->Et()*m_isoFW_JTAU.at("Medium") ) bit = 2; - if( jtau->EtIso()*1024 < jtau->Et()*m_isoFW_JTAU.at("Tight") ) bit = 3; - - return bit; +bool +TCS::jTauNoSort::checkIsolation(const TCS::jTauTOB* jtau) const { + if(m_passIsolation) return true; + return jtau->EtIso()*1024 < jtau->Et()*m_iso; } diff --git a/Trigger/TrigT1/L1Topo/L1TopoCoreSim/L1TopoCoreSim/TopoSteering.h b/Trigger/TrigT1/L1Topo/L1TopoCoreSim/L1TopoCoreSim/TopoSteering.h index 0bf19735fbdb..e263cdd4e5d6 100644 --- a/Trigger/TrigT1/L1Topo/L1TopoCoreSim/L1TopoCoreSim/TopoSteering.h +++ b/Trigger/TrigT1/L1Topo/L1TopoCoreSim/L1TopoCoreSim/TopoSteering.h @@ -90,10 +90,6 @@ namespace TCS { void setLegacyMode(bool isLegacyTopo) {m_isLegacyTopo=isLegacyTopo;} - // l1menu isolation info - void setIsolationFW_CTAU( const std::map<std::string, int> & isolationFW_CTAU, const std::map<std::string, int> & isolationFW_CTAU_jTAUCoreScale ) { m_isolationFW_CTAU = isolationFW_CTAU; m_isolationFW_CTAU_jTAUCoreScale = isolationFW_CTAU_jTAUCoreScale; } - void setIsolationFW_JTAU( const std::map<std::string, int> & isolationFW_JTAU ) { m_isolationFW_JTAU = isolationFW_JTAU; } - /** * @brief enables the histogramming service */ @@ -155,10 +151,6 @@ namespace TCS { bool m_useBitwise{false}; // Using bitwise algorithms? Disabled by default. Needs a menu global flag. bool m_isLegacyTopo{false}; - - std::map<std::string, int> m_isolationFW_CTAU; // FW isolation WPs for cTau - std::map<std::string, int> m_isolationFW_CTAU_jTAUCoreScale; // FW isolation WPs for cTau (jTAUCore factor) - std::map<std::string, int> m_isolationFW_JTAU; // FW isolation WPs for jTau TopoInputEvent m_inputEvent; // the input event diff --git a/Trigger/TrigT1/L1Topo/L1TopoCoreSim/L1TopoCoreSim/TopoSteeringStructure.h b/Trigger/TrigT1/L1Topo/L1TopoCoreSim/L1TopoCoreSim/TopoSteeringStructure.h index b22950a50ae3..d6bbbdeacf02 100644 --- a/Trigger/TrigT1/L1Topo/L1TopoCoreSim/L1TopoCoreSim/TopoSteeringStructure.h +++ b/Trigger/TrigT1/L1Topo/L1TopoCoreSim/L1TopoCoreSim/TopoSteeringStructure.h @@ -55,21 +55,6 @@ namespace TCS { // resets the connectors (status, intermediate TOBs, and decision of algs) StatusCode reset(); - // l1menu isolation info - const std::map<std::string, int> & isolationFW_CTAU() const { return m_isolationFW_CTAU; } - const std::map<std::string, int> & isolationFW_CTAU_jTAUCoreScale() const { return m_isolationFW_CTAU_jTAUCoreScale; } - const std::map<std::string, int> & isolationFW_JTAU() const { return m_isolationFW_JTAU; } - - void setIsolationFW_CTAU(const TrigConf::L1Menu& l1menu); - void setIsolationFW_JTAU(const TrigConf::L1Menu& l1menu); - - // Functions used by HLT seeding - #ifndef TRIGCONF_STANDALONE - - static void setIsolationFW_CTAU( std::map<std::string, int>& isoFW_CTAU, std::map<std::string, int>& isoFW_CTAU_jTAUCoreScale, const TrigConf::L1ThrExtraInfoBase& menuExtraInfo ); - - #endif - // print void print(std::ostream & o) const; @@ -103,10 +88,6 @@ namespace TCS { std::map<std::string, TCS::InputConnector*> m_inputLookup; // input connectors (subset of m_connectors) by connector name - std::map<std::string, int> m_isolationFW_CTAU; // FW isolation WPs for cTau - std::map<std::string, int> m_isolationFW_CTAU_jTAUCoreScale; // FW isolation WPs for cTau (jTAUCore factor) - std::map<std::string, int> m_isolationFW_JTAU; // FW isolation WPs for jTau - std::vector<TCS::ParameterSpace*> m_parameters; }; diff --git a/Trigger/TrigT1/L1Topo/L1TopoCoreSim/Root/TopoSteering.cxx b/Trigger/TrigT1/L1Topo/L1TopoCoreSim/Root/TopoSteering.cxx index bf1524f635ea..762dccd46c24 100644 --- a/Trigger/TrigT1/L1Topo/L1TopoCoreSim/Root/TopoSteering.cxx +++ b/Trigger/TrigT1/L1Topo/L1TopoCoreSim/Root/TopoSteering.cxx @@ -100,8 +100,6 @@ TopoSteering::initializeAlgorithms() { alg->setL1TopoHistSvc(m_histSvc); } alg->setLegacyMode(m_isLegacyTopo); - alg->setIsolationFW_CTAU(structure().isolationFW_CTAU(), structure().isolationFW_CTAU_jTAUCoreScale()); - alg->setIsolationFW_JTAU(structure().isolationFW_JTAU()); alg->initialize(); } @@ -488,6 +486,7 @@ TopoSteering::setAlgMsgLevel( TrigConf::MSGTC::Level lvl ) { alg->msg().setLevel(lvl); } } + //---------------------------------------------------------- void TopoSteering::setHardwareBits(const std::bitset<numberOfL1TopoBits> &triggerBits, const std::bitset<numberOfL1TopoBits> &ovrflowBits) diff --git a/Trigger/TrigT1/L1Topo/L1TopoCoreSim/Root/TopoSteeringStructure.cxx b/Trigger/TrigT1/L1Topo/L1TopoCoreSim/Root/TopoSteeringStructure.cxx index f15675b3d3a0..57b5858ec634 100644 --- a/Trigger/TrigT1/L1Topo/L1TopoCoreSim/Root/TopoSteeringStructure.cxx +++ b/Trigger/TrigT1/L1Topo/L1TopoCoreSim/Root/TopoSteeringStructure.cxx @@ -128,10 +128,6 @@ TCS::TopoSteeringStructure::setupFromMenu ATLAS_NOT_THREAD_SAFE (const TrigConf: << " L1Topo steering structure: configuring from L1 Topo Menu " << endl << "/***************************************************************************/" << endl; - // Fill cTau and jTau isolation information (to be used in multiplicity algorithms) - setIsolationFW_CTAU(l1menu); - setIsolationFW_JTAU(l1menu); - // set<TCS::inputTOBType_t> neededInputs; // Stores inputs for DecisionConnectors vector<string> storedConn; // Stores decision connectors in order to avoid double counting vector<vector<string>> confAlgorithms; // Stores algorithm name/category that have been configured in L1Menu to be used for setting the parameters @@ -517,46 +513,3 @@ TCS::TopoSteeringStructure::countingConnector(const std::string & output) { return 0; } - -void -TCS::TopoSteeringStructure::setIsolationFW_CTAU(const TrigConf::L1Menu& l1menu) { - const TrigConf::L1ThrExtraInfo_cTAU &cTauExtraInfo = l1menu.thrExtraInfo().cTAU(); - - using WP = TrigConf::Selection::WP; - for(const WP wp : {WP::LOOSE, WP::MEDIUM, WP::TIGHT, WP::LOOSE12, WP::LOOSE20, WP::LOOSE30, WP::LOOSE35, WP::MEDIUM12, WP::MEDIUM20, WP::MEDIUM30, WP::MEDIUM35, WP::TIGHT12, WP::TIGHT20, WP::TIGHT30, WP::TIGHT35}) { - const TrigConf::L1ThrExtraInfo_cTAU::WorkingPoints_cTAU& isol = cTauExtraInfo.isolation(wp, 0); - - m_isolationFW_CTAU[TrigConf::Selection::wpToString(wp)] = static_cast<int>(isol.isolation_fw()); - m_isolationFW_CTAU_jTAUCoreScale[TrigConf::Selection::wpToString(wp)] = static_cast<int>(isol.isolation_jTAUCoreScale_fw()); - } -} - - -void -TCS::TopoSteeringStructure::setIsolationFW_JTAU(const TrigConf::L1Menu& l1menu) { - const TrigConf::L1ThrExtraInfo_jTAU &jTauExtraInfo = l1menu.thrExtraInfo().jTAU(); - - using WP = TrigConf::Selection::WP; - for(const WP wp : {WP::LOOSE, WP::MEDIUM, WP::TIGHT}) { - m_isolationFW_JTAU[TrigConf::Selection::wpToString(wp)] = static_cast<int>(jTauExtraInfo.isolation(wp, 0).isolation_fw()); - } -} - - -// Functions used by HLT seeding -#ifndef TRIGCONF_STANDALONE - -void -TCS::TopoSteeringStructure::setIsolationFW_CTAU(std::map<std::string, int>& isoFW_CTAU, std::map<std::string, int>& isoFW_CTAU_jTAUCoreScale, const TrigConf::L1ThrExtraInfoBase& menuExtraInfo) { - const TrigConf::L1ThrExtraInfo_cTAU& cTauExtraInfo = dynamic_cast<const TrigConf::L1ThrExtraInfo_cTAU&>(menuExtraInfo); - - using WP = TrigConf::Selection::WP; - for(const WP wp : {WP::LOOSE, WP::MEDIUM, WP::TIGHT, WP::LOOSE12, WP::LOOSE20, WP::LOOSE30, WP::LOOSE35, WP::MEDIUM12, WP::MEDIUM20, WP::MEDIUM30, WP::MEDIUM35, WP::TIGHT12, WP::TIGHT20, WP::TIGHT30, WP::TIGHT35}) { - const TrigConf::L1ThrExtraInfo_cTAU::WorkingPoints_cTAU& isol = cTauExtraInfo.isolation(wp, 0); - - isoFW_CTAU[TrigConf::Selection::wpToString(wp)] = static_cast<int>(isol.isolation_fw()); - isoFW_CTAU_jTAUCoreScale[TrigConf::Selection::wpToString(wp)] = static_cast<int>(isol.isolation_jTAUCoreScale_fw()); - } -} - -#endif diff --git a/Trigger/TrigT1/L1Topo/L1TopoInterfaces/L1TopoInterfaces/ConfigurableAlg.h b/Trigger/TrigT1/L1Topo/L1TopoInterfaces/L1TopoInterfaces/ConfigurableAlg.h index c1eb14d9eb56..eb659dab21a3 100644 --- a/Trigger/TrigT1/L1Topo/L1TopoInterfaces/L1TopoInterfaces/ConfigurableAlg.h +++ b/Trigger/TrigT1/L1Topo/L1TopoInterfaces/L1TopoInterfaces/ConfigurableAlg.h @@ -15,6 +15,7 @@ #include "L1TopoInterfaces/AlgFactory.h" #include "L1TopoCommon/StatusCode.h" #include "L1TopoEvent/GenericTOB.h" +#include "TrigConfData/L1Threshold.h" #include <vector> #include <string> @@ -43,10 +44,6 @@ namespace TCS { void setLegacyMode(bool isLegacyTopo) {m_isLegacyTopo=isLegacyTopo;} - // l1menu isolation info - void setIsolationFW_CTAU( const std::map<std::string, int>& isolationFW_CTAU, const std::map<std::string, int>& isolationFW_CTAU_jTAUCoreScale ) { m_isolationFW_CTAU = isolationFW_CTAU; m_isolationFW_CTAU_jTAUCoreScale = isolationFW_CTAU_jTAUCoreScale; } - void setIsolationFW_JTAU( const std::map<std::string, int>& isolationFW_JTAU ) { m_isolationFW_JTAU = isolationFW_JTAU; } - // accessors const std::string & name() const { return m_name; } const std::string & className() const { return m_className; } @@ -68,11 +65,6 @@ namespace TCS { bool isLegacyTopo() const { return m_isLegacyTopo; } - // l1menu isolation info - const std::map<std::string, int>& isolationFW_CTAU() const { return m_isolationFW_CTAU; } - const std::map<std::string, int>& isolationFW_CTAU_jTAUCoreScale() const { return m_isolationFW_CTAU_jTAUCoreScale; } - const std::map<std::string, int>& isolationFW_JTAU() const { return m_isolationFW_JTAU; } - // Kinematic calculation unsigned int calcDeltaPhiBW(const TCS::GenericTOB* tob1, const TCS::GenericTOB* tob2); unsigned int calcDeltaEtaBW(const TCS::GenericTOB* tob1, const TCS::GenericTOB* tob2); @@ -128,9 +120,9 @@ namespace TCS { void fillHist2D(const std::string & histName, double x, double y); - bool isocut(const std::string& threshold, const unsigned int bit); + bool isocut(const std::string& threshold, const unsigned int bit) const; - bool isocut(const unsigned int threshold, const unsigned int bit); + bool isocut(const unsigned int threshold, const unsigned int bit) const; private: class ConfigurableAlgImpl; @@ -150,11 +142,6 @@ namespace TCS { AlgType m_algType; // stores type of alg (Sorting or Decision) bool m_isLegacyTopo; - - std::map<std::string, int> m_isolationFW_CTAU; // FW isolation WPs for cTau - std::map<std::string, int> m_isolationFW_CTAU_jTAUCoreScale; // FW isolation WPs for cTau (jTAUCore factor) - std::map<std::string, int> m_isolationFW_JTAU; // FW isolation WPs for jTau - }; std::ostream & operator<<(std::ostream &, const TCS::ConfigurableAlg &); diff --git a/Trigger/TrigT1/L1Topo/L1TopoInterfaces/Root/ConfigurableAlg.cxx b/Trigger/TrigT1/L1Topo/L1TopoInterfaces/Root/ConfigurableAlg.cxx index 7eeffb833c99..1952cbb1819e 100644 --- a/Trigger/TrigT1/L1Topo/L1TopoInterfaces/Root/ConfigurableAlg.cxx +++ b/Trigger/TrigT1/L1Topo/L1TopoInterfaces/Root/ConfigurableAlg.cxx @@ -481,7 +481,7 @@ std::string ConfigurableAlg::ToString(const int val) } bool -ConfigurableAlg::isocut(const std::string& threshold, const unsigned int bit) { +ConfigurableAlg::isocut(const std::string& threshold, const unsigned int bit) const { unsigned int value = 0; if (threshold == "None") {value = 0;} else if (threshold == "Loose") {value = 1;} @@ -497,7 +497,7 @@ ConfigurableAlg::isocut(const std::string& threshold, const unsigned int bit) { } bool -ConfigurableAlg::isocut(const unsigned int threshold, const unsigned int bit) { +ConfigurableAlg::isocut(const unsigned int threshold, const unsigned int bit) const { if (bit >= threshold) {return true;} else {return false;} } diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/L1/Config/TypeWideThresholdConfig.py b/Trigger/TriggerCommon/TriggerMenuMT/python/L1/Config/TypeWideThresholdConfig.py index adf99785d27e..5547a05add88 100644 --- a/Trigger/TriggerCommon/TriggerMenuMT/python/L1/Config/TypeWideThresholdConfig.py +++ b/Trigger/TriggerCommon/TriggerMenuMT/python/L1/Config/TypeWideThresholdConfig.py @@ -2,6 +2,7 @@ from collections import OrderedDict as odict from dataclasses import dataclass +from enum import Enum from AthenaCommon.Logging import logging log = logging.getLogger(__name__) @@ -81,6 +82,10 @@ def eFEXfwToFloatConversion_wstot(fw,bitshift): decimal = pow(2,bitshift)/fw return float("{:.3f}".format(decimal)) +def eTAUfwToFloatConversion_bdt(fw): + decimal = fw/4096 + return float("{:.2f}".format(decimal)) + def eFEXfwToFloatConversion_minIsoEt(fw): decimal = fw * 100.0 # To MeV units return float("{:.3f}".format(decimal)) @@ -107,7 +112,7 @@ def getTypeWideThresholdConfig(ttype, do_HI_tob_thresholds=False, do_eFex_BDT_Ta if ttype == ThrType.eTAU: return getConfig_eTAU(do_eFex_BDT_Tau) if ttype == ThrType.cTAU: - return getConfig_cTAU() + return getConfig_cTAU(do_eFex_BDT_Tau) if ttype == ThrType.jTAU: return getConfig_jTAU() if ttype == ThrType.jJ: @@ -384,17 +389,17 @@ class L1Config_eTAU: confObj = odict() confObj["workingPoints"] = odict() confObj["workingPoints"]["Loose"] = [ - odict([("rCore", eFEXfwToFloatConversion(rCore_fw_loose, self.bitshift_rCore)), ("rCore_fw", rCore_fw_loose), + odict([("rCore", eTAUfwToFloatConversion_bdt(rCore_fw_loose) if do_eFex_BDT_Tau else eFEXfwToFloatConversion(rCore_fw_loose, self.bitshift_rCore)), ("rCore_fw", rCore_fw_loose), ("rHad", eFEXfwToFloatConversion(self.rHad_fw_loose, self.bitshift_rHad)), ("rHad_fw", self.rHad_fw_loose), ]), ] confObj["workingPoints"]["Medium"] = [ - odict([("rCore", eFEXfwToFloatConversion(rCore_fw_medium, self.bitshift_rCore)), ("rCore_fw", rCore_fw_medium), + odict([("rCore", eTAUfwToFloatConversion_bdt(rCore_fw_medium) if do_eFex_BDT_Tau else eFEXfwToFloatConversion(rCore_fw_medium, self.bitshift_rCore)), ("rCore_fw", rCore_fw_medium), ("rHad", eFEXfwToFloatConversion(self.rHad_fw_medium, self.bitshift_rHad)), ("rHad_fw", self.rHad_fw_medium), ]), ] confObj["workingPoints"]["Tight"] = [ - odict([("rCore", eFEXfwToFloatConversion(rCore_fw_tight, self.bitshift_rCore)), ("rCore_fw", rCore_fw_tight), + odict([("rCore", eTAUfwToFloatConversion_bdt(rCore_fw_tight) if do_eFex_BDT_Tau else eFEXfwToFloatConversion(rCore_fw_tight, self.bitshift_rCore)), ("rCore_fw", rCore_fw_tight), ("rHad", eFEXfwToFloatConversion(self.rHad_fw_tight, self.bitshift_rHad)), ("rHad_fw", self.rHad_fw_tight), ]), ] @@ -423,7 +428,6 @@ class L1Config_eTAU: getConfig_eTAU = L1Config_eTAU() - @dataclass class L1Config_cTAU: # cTAU isolation parameters (ATR-28621): @@ -431,32 +435,64 @@ class L1Config_cTAU: # jTAUCoreScale: 11 bits (0 - 2047) # (jTAU.EtIso + isolation_jTAUCoreScale_fw/1024 * jTAU.Et) / eTAU.Et < isolation_fw/1024 -> pass + # eTAU rCore/BDT WP: 2 bits (0 - 3) + # We can only specify the WP of the rCore/BDT selection, as defined in L1Config_eTAU above + + # eTAU rHad WP: 2 bits (0 - 3) + # We can only specify the WP of the rHad selection, as defined in L1Config_eTAU above + + class eTAUWP(Enum): + NoSelection = 0 + Loose = 1 + Medium = 2 + Tight = 3 + # Same values as in the TrigConf::Selection::WP enum + + def rCoreMinCut(self, do_eFex_BDT_Tau=True) -> float: + return 0.0 if self is self.NoSelection else getConfig_eTAU(do_eFex_BDT_Tau)['workingPoints'][self.name][0]['rCore'] + def rHadMinCut(self, do_eFex_BDT_Tau=True) -> float: + return 0.0 if self is self.NoSelection else getConfig_eTAU(do_eFex_BDT_Tau)['workingPoints'][self.name][0]['rHad'] + # Generic L, M and T WPs, for the cTAUSpare1/2 isolation_fw_loose: int = 410 isolation_jTAUCoreScale_fw_loose: int = 0 + eTAU_rCoreMin_WP_fw_loose: eTAUWP = eTAUWP.NoSelection + eTAU_rHadMin_WP_fw_loose: eTAUWP = eTAUWP.NoSelection isolation_fw_medium: int = 410 isolation_jTAUCoreScale_fw_medium: int = 0 + eTAU_rCoreMin_WP_fw_medium: eTAUWP = eTAUWP.NoSelection + eTAU_rHadMin_WP_fw_medium: eTAUWP = eTAUWP.NoSelection isolation_fw_tight: int = 307 isolation_jTAUCoreScale_fw_tight: int = 0 + eTAU_rCoreMin_WP_fw_tight: eTAUWP = eTAUWP.NoSelection + eTAU_rHadMin_WP_fw_tight: eTAUWP = eTAUWP.NoSelection # Dedicated M thresholds for the primary items: #cTAU12M (Medium12) isolation_fw_medium12: int = 358 isolation_jTAUCoreScale_fw_medium12: int = 0 + eTAU_rCoreMin_WP_fw_medium12: eTAUWP = eTAUWP.NoSelection + eTAU_rHadMin_WP_fw_medium12: eTAUWP = eTAUWP.NoSelection #cTAU20M (Medium20) isolation_fw_medium20: int = 358 isolation_jTAUCoreScale_fw_medium20: int = 0 + eTAU_rCoreMin_WP_fw_medium20: eTAUWP = eTAUWP.NoSelection + eTAU_rHadMin_WP_fw_medium20: eTAUWP = eTAUWP.NoSelection #cTAU30M (Medium30) isolation_fw_medium30: int = 358 isolation_jTAUCoreScale_fw_medium30: int = 0 + eTAU_rCoreMin_WP_fw_medium30: eTAUWP = eTAUWP.NoSelection + eTAU_rHadMin_WP_fw_medium30: eTAUWP = eTAUWP.NoSelection #cTAU35M (Medium35) isolation_fw_medium35: int = 358 isolation_jTAUCoreScale_fw_medium35: int = 0 + eTAU_rCoreMin_WP_fw_medium35: eTAUWP = eTAUWP.NoSelection + eTAU_rHadMin_WP_fw_medium35: eTAUWP = eTAUWP.NoSelection def __post_init__(self): # By default, duplicate the configs of isolation_fw_loose and isolation_fw_tight: @@ -464,15 +500,19 @@ class L1Config_cTAU: for wp in wp_list: setattr(self, f'isolation_fw_{wp.lower()}', getattr(self, f'isolation_fw_{default_wp.lower()}')) setattr(self, f'isolation_jTAUCoreScale_fw_{wp.lower()}', getattr(self, f'isolation_jTAUCoreScale_fw_{default_wp.lower()}')) + setattr(self, f'eTAU_rCoreMin_WP_fw_{wp.lower()}', getattr(self, f'eTAU_rCoreMin_WP_fw_{default_wp.lower()}')) + setattr(self, f'eTAU_rHadMin_WP_fw_{wp.lower()}', getattr(self, f'eTAU_rHadMin_WP_fw_{default_wp.lower()}')) - def __call__(self) -> odict: + def __call__(self, do_eFex_BDT_Tau=True) -> odict: confObj = odict() confObj['workingPoints'] = odict() for wp in ['Loose', 'Medium', 'Tight', 'Loose12', 'Loose20', 'Loose30', 'Loose35', 'Medium12', 'Medium20', 'Medium30', 'Medium35', 'Tight12', 'Tight20', 'Tight30', 'Tight35']: confObj['workingPoints'][wp] = [ odict([('isolation', cTAUfwToFlowConversion(getattr(self, f'isolation_fw_{wp.lower()}'))), ('isolation_fw', getattr(self, f'isolation_fw_{wp.lower()}')), - ('isolation_jTAUCoreScale', cTAUfwToFlowConversion(getattr(self, f'isolation_jTAUCoreScale_fw_{wp.lower()}'))), ('isolation_jTAUCoreScale_fw', getattr(self, f'isolation_jTAUCoreScale_fw_{wp.lower()}'))]), + ('isolation_jTAUCoreScale', cTAUfwToFlowConversion(getattr(self, f'isolation_jTAUCoreScale_fw_{wp.lower()}'))), ('isolation_jTAUCoreScale_fw', getattr(self, f'isolation_jTAUCoreScale_fw_{wp.lower()}')), + ('eTAU_rCoreMin', getattr(self, f'eTAU_rCoreMin_WP_fw_{wp.lower()}').rCoreMinCut(do_eFex_BDT_Tau)), ('eTAU_rCoreMin_WP_fw', getattr(self, f'eTAU_rCoreMin_WP_fw_{wp.lower()}').value), + ('eTAU_rHadMin', getattr(self, f'eTAU_rHadMin_WP_fw_{wp.lower()}').rHadMinCut(do_eFex_BDT_Tau)), ('eTAU_rHadMin_WP_fw', getattr(self, f'eTAU_rHadMin_WP_fw_{wp.lower()}').value)]), ] confObj['resolutionMeV'] = 100 -- GitLab