diff --git a/DetectorDescription/RegionSelector/CMakeLists.txt b/DetectorDescription/RegionSelector/CMakeLists.txt index 091941760b796640fa68bdd809d8e517368e6017..ad08bce7bd84c019baf5f8efaa051074e2264153 100644 --- a/DetectorDescription/RegionSelector/CMakeLists.txt +++ b/DetectorDescription/RegionSelector/CMakeLists.txt @@ -15,10 +15,4 @@ atlas_add_component( RegionSelector LINK_LIBRARIES RegionSelectorLib ) # Install files from the package: -atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} ) - -# Tests in the package: -atlas_add_test( RegSelConfigTest - SCRIPT python -m RegionSelector.RegSelConfig - PROPERTIES TIMEOUT 300 - POST_EXEC_SCRIPT nopost.sh ) +atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} ) \ No newline at end of file diff --git a/DetectorDescription/RegionSelector/python/RegSelConfig.py b/DetectorDescription/RegionSelector/python/RegSelConfig.py deleted file mode 100644 index 20dd2bda10bd55187c774dd154963afbe28aabaf..0000000000000000000000000000000000000000 --- a/DetectorDescription/RegionSelector/python/RegSelConfig.py +++ /dev/null @@ -1,134 +0,0 @@ -# -# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration -# - -from AthenaConfiguration.ComponentFactory import CompFactory - -def regSelCfg( flags ): - """ Configures Region Selector Svc according to the detector flags """ - from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator - RegSelSvc=CompFactory.RegSelSvc - from AthenaCommon.SystemOfUnits import mm - acc = ComponentAccumulator() - - regSel = RegSelSvc() - regSel.DeltaZ = 225 * mm - - if flags.Detector.GeometryLAr: - regSel.enableCalo = True - - from LArGeoAlgsNV.LArGMConfig import LArGMCfg - acc.merge( LArGMCfg( flags ) ) - - LArRegionSelectorTable=CompFactory.LArRegionSelectorTable - regSel.LArRegionSelectorTable = LArRegionSelectorTable(name="LArRegionSelectorTable") - - from IOVDbSvc.IOVDbSvcConfig import addFolders - acc.merge( addFolders(flags, ['/LAR/Identifier/FebRodMap'], 'LAR' )) - - if flags.Detector.GeometryTile: - regSel.enableCalo = True - - from TileGeoModel.TileGMConfig import TileGMCfg - acc.merge( TileGMCfg( flags ) ) - acc.getService('GeoModelSvc').DetectorTools['TileDetectorTool'].GeometryConfig = 'RECO' - - TileRegionSelectorTable=CompFactory.TileRegionSelectorTable - regSel.TileRegionSelectorTable = TileRegionSelectorTable(name="TileRegionSelectorTable") - - # by default, all 'enableX' flags of RegSelSvc are set to True, so turn them off if not needed - if not flags.Detector.GeometryRPC: - regSel.enableRPC = False - else: - regSel.enableMuon = True - RPC_RegionSelectorTable=CompFactory.RPC_RegionSelectorTable - regSel.RPCRegionSelectorTable = RPC_RegionSelectorTable(name = "RPC_RegionSelectorTable") - - if not flags.Detector.GeometryMDT: - regSel.enableMDT = False - else: - regSel.enableMuon = True - MDT_RegionSelectorTable=CompFactory.MDT_RegionSelectorTable - regSel.MDTRegionSelectorTable = MDT_RegionSelectorTable(name = "MDT_RegionSelectorTable") - - if not flags.Detector.GeometryTGC: - regSel.enableTGC = False - else: - regSel.enableMuon = True - TGC_RegionSelectorTable=CompFactory.TGC_RegionSelectorTable - regSel.TGCRegionSelectorTable = TGC_RegionSelectorTable(name = "TGC_RegionSelectorTable") - - if not flags.Detector.GeometryCSC: - regSel.enableCSC = False - else: - regSel.enableMuon = True - CSC_RegionSelectorTable=CompFactory.CSC_RegionSelectorTable - regSel.CSCRegionSelectorTable = CSC_RegionSelectorTable(name = "CSC_RegionSelectorTable") - - if not flags.Detector.GeometryMM: - regSel.enableMM = False - - if not flags.Detector.GeometrysTGC: - regSel.enablesTGC = False - - acc.addService( regSel ) - - return acc - -if __name__ == "__main__": - - - from AthenaConfiguration.AllConfigFlags import ConfigFlags - from AthenaConfiguration.TestDefaults import defaultTestFiles - from AthenaCommon.Constants import DEBUG - - ConfigFlags.Detector.GeometryPixel = True - ConfigFlags.Detector.GeometrySCT = True - ConfigFlags.Detector.GeometryTRT = True - ConfigFlags.Detector.GeometryLAr = True - ConfigFlags.Detector.GeometryTile = True - ConfigFlags.Detector.GeometryMDT = True - ConfigFlags.Detector.GeometryTGC = True - ConfigFlags.Detector.GeometryRPC = True - - ConfigFlags.Input.Files = defaultTestFiles.RAW - ConfigFlags.Input.isMC = False - ConfigFlags.dump() - ConfigFlags.lock() - - from AthenaConfiguration.MainServicesConfig import MainServicesCfg - cfg=MainServicesCfg(ConfigFlags) - - ## move up - - # when trying AOD - # from AthenaPoolCnvSvc.PoolReadConfig import PoolReadCfg - # cfg.merge( PoolReadCfg( ConfigFlags ) ) - - - from ByteStreamCnvSvc.ByteStreamConfig import ByteStreamReadCfg - cfg.merge(ByteStreamReadCfg( ConfigFlags )) - - - acc = regSelCfg( ConfigFlags ) - cfg.merge( acc ) - - - RegSelTestAlg=CompFactory.RegSelTestAlg - testerAlg = RegSelTestAlg() - testerAlg.Mt=True - testerAlg.OutputLevel=DEBUG - cfg.addEventAlgo( testerAlg ) - AthenaPoolCnvSvc=CompFactory.AthenaPoolCnvSvc - apcs=AthenaPoolCnvSvc() - cfg.addService(apcs) - EvtPersistencySvc=CompFactory.EvtPersistencySvc - cfg.addService(EvtPersistencySvc("EventPersistencySvc",CnvServices=[apcs.getFullJobOptName(),])) - - cfg.getService("IOVDbSvc").OutputLevel=DEBUG - - cfg.store( open( "test.pkl", "wb" ) ) - print("used flags") - ConfigFlags.dump() - cfg.run(0) - print("All OK") diff --git a/DetectorDescription/RegionSelector/python/RegSelToolConfig.py b/DetectorDescription/RegionSelector/python/RegSelToolConfig.py index c07406d4afc28e305a65645ccc45e4d2b6224ef4..9fbd165af4a3236b04456fdad6872b020eb27f42 100644 --- a/DetectorDescription/RegionSelector/python/RegSelToolConfig.py +++ b/DetectorDescription/RegionSelector/python/RegSelToolConfig.py @@ -225,3 +225,19 @@ def regSelTool_STGC_Cfg(flags): def regSelTool_MM_Cfg(flags): return regSelToolCfg(flags, "MM", CompFactory.MM_RegSelCondAlg) + +#calo +def regSelTool_TTEM_Cfg(flags): + return regSelToolCfg(flags, "TTEM", CompFactory.RegSelCondAlg_LAr) + +def regSelTool_TTHEC_Cfg(flags): + return regSelToolCfg(flags, "TTHEC", CompFactory.RegSelCondAlg_LAr) + +def regSelTool_FCALEM_Cfg(flags): + return regSelToolCfg(flags, "FCALEM", CompFactory.RegSelCondAlg_LAr) + +def regSelTool_FCALHAD_Cfg(flags): + return regSelToolCfg(flags, "FCALHAD", CompFactory.RegSelCondAlg_LAr) + +def regSelTool_TILE_Cfg(flags): + return regSelToolCfg(flags, "TILE", CompFactory.RegSelCondAlg_Tile) diff --git a/Trigger/TrigAlgorithms/TrigT2CaloCommon/python/TrigCaloDataAccessConfig.py b/Trigger/TrigAlgorithms/TrigT2CaloCommon/python/TrigCaloDataAccessConfig.py index d0adaf914a41f03ea473ad2f5be75c6a3087aeb2..b2d58e722b59cf1f5d8e71e9078621119b316183 100644 --- a/Trigger/TrigAlgorithms/TrigT2CaloCommon/python/TrigCaloDataAccessConfig.py +++ b/Trigger/TrigAlgorithms/TrigT2CaloCommon/python/TrigCaloDataAccessConfig.py @@ -2,7 +2,7 @@ from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator from AthenaConfiguration.ComponentFactory import CompFactory -def createLArRoI_Map( flags ): +def LArRoIMapCfg( flags ): acc = ComponentAccumulator() LArRoI_Map=CompFactory.LArRoI_Map @@ -31,6 +31,13 @@ def createLArRoI_Map( flags ): return acc +CaloDataAccessSvcDependencies = [('IRegSelLUTCondData', 'ConditionStore+RegSelLUTCondData_TTEM'), + ('IRegSelLUTCondData', 'ConditionStore+RegSelLUTCondData_TTHEC'), + ('IRegSelLUTCondData', 'ConditionStore+RegSelLUTCondData_TILE'), + ('IRegSelLUTCondData', 'ConditionStore+RegSelLUTCondData_FCALEM'), + ('IRegSelLUTCondData', 'ConditionStore+RegSelLUTCondData_FCALHAD')] + + def trigCaloDataAccessSvcCfg( flags ): acc = ComponentAccumulator() @@ -42,11 +49,19 @@ def trigCaloDataAccessSvcCfg( flags ): from TileGeoModel.TileGMConfig import TileGMCfg acc.merge( TileGMCfg( flags ) ) - - from RegionSelector.RegSelConfig import regSelCfg - acc.merge( regSelCfg( flags ) ) - acc.merge( createLArRoI_Map( flags ) ) + acc.merge( LArRoIMapCfg( flags ) ) + + #setup region selector + from RegionSelector.RegSelToolConfig import (regSelTool_TTEM_Cfg,regSelTool_TTHEC_Cfg, + regSelTool_FCALEM_Cfg,regSelTool_FCALHAD_Cfg,regSelTool_TILE_Cfg) + + svc.RegSelToolEM = acc.popToolsAndMerge(regSelTool_TTEM_Cfg(flags)) + svc.RegSelToolHEC = acc.popToolsAndMerge(regSelTool_TTHEC_Cfg(flags)) + svc.RegSelToolFCALEM = acc.popToolsAndMerge(regSelTool_FCALEM_Cfg(flags)) + svc.RegSelToolFCALHAD = acc.popToolsAndMerge(regSelTool_FCALHAD_Cfg(flags)) + svc.RegSelToolTILE = acc.popToolsAndMerge(regSelTool_TILE_Cfg(flags)) + # Needed by bad channel maskers, refrerenced from LArCellCont. from LArBadChannelTool.LArBadChannelConfig import LArBadChannelCfg, LArBadFebCfg @@ -103,19 +118,6 @@ if __name__ == "__main__": testAlg = TestCaloDataAccess() acc.addEventAlgo(testAlg) - # disable RegSel fro ID and muons, will change this to use flags once MR for it is integrated - regSel = acc.getService("RegSelSvc") - - regSel.enableID = False - regSel.enablePixel = False - regSel.enableSCT = False - regSel.enableTRT = False - regSel.enableMuon = False - regSel.enableRPC = False - regSel.enableMDT = False - regSel.enableTGC = False - regSel.enableCSC = False - acc.printConfig(True) print(acc.getPublicTool("LArRoI_Map")) diff --git a/Trigger/TrigAlgorithms/TrigT2CaloEgamma/python/TrigT2CaloEgammaMTConfig.py b/Trigger/TrigAlgorithms/TrigT2CaloEgamma/python/TrigT2CaloEgammaMTConfig.py index fac7fb84f6b7c96da4e7d105e1f9ab868e5ccdca..8694c553e04c9e52bfcd48efd8924d9ac1f385c9 100644 --- a/Trigger/TrigAlgorithms/TrigT2CaloEgamma/python/TrigT2CaloEgammaMTConfig.py +++ b/Trigger/TrigAlgorithms/TrigT2CaloEgamma/python/TrigT2CaloEgammaMTConfig.py @@ -9,7 +9,7 @@ def fastL2EgammaClusteringAlg( flags, roisKey="EMCaloRoIs", doRinger=False): acc = ComponentAccumulator() # configure calo data access - from TrigT2CaloCommon.TrigCaloDataAccessConfig import trigCaloDataAccessSvcCfg + from TrigT2CaloCommon.TrigCaloDataAccessConfig import trigCaloDataAccessSvcCfg, CaloDataAccessSvcDependencies cdaSvcAcc = trigCaloDataAccessSvcCfg( flags ) cdaSvc = cdaSvcAcc.getService("TrigCaloDataAccessSvc") acc.merge( cdaSvcAcc ) @@ -37,12 +37,14 @@ def fastL2EgammaClusteringAlg( flags, roisKey="EMCaloRoIs", doRinger=False): samph.ExtraInputs=[('TileEMScale','ConditionStore+TileEMScale'),('TileBadChannels','ConditionStore+TileBadChannels')] acc.addPublicTool( samph ) - alg = CompFactory.T2CaloEgammaReFastAlgo("FastEMCaloAlgo") + alg = CompFactory.T2CaloEgammaReFastAlgo("FastCaloL2EgammaAlg") from TrigEDMConfig.TriggerEDMRun3 import recordable alg.ClustersName = recordable('HLT_FastCaloEMClusters') alg.RoIs = roisKey alg.EtaWidth = 0.2 alg.PhiWidth = 0.2 + alg.ExtraInputs = CaloDataAccessSvcDependencies + alg.BCIDAvgKey = "StoreGateSvc+CaloBCIDAverage" __fex_tools = [ samp2, samp1, sampe, samph] #, ring ] diff --git a/Trigger/TrigHypothesis/TrigEgammaHypo/python/TrigEgammaFastElectronFexMTConfig.py b/Trigger/TrigHypothesis/TrigEgammaHypo/python/TrigEgammaFastElectronFexMTConfig.py index 2ee0a2d5939cf837baeae87121555e1936df4e7f..53362319ec69f044b11a31679616c2f73bbe9ef6 100644 --- a/Trigger/TrigHypothesis/TrigEgammaHypo/python/TrigEgammaFastElectronFexMTConfig.py +++ b/Trigger/TrigHypothesis/TrigEgammaHypo/python/TrigEgammaFastElectronFexMTConfig.py @@ -98,15 +98,15 @@ def fastElectronFexAlgCfg(flags, name="EgammaFastElectronFex_1", rois="EMRoIs"): extAcc = ParticleCaloExtensionToolCfg(flags) extTool = acc.popToolsAndMerge(extAcc) - efex = CompFactory.TrigEgammaFastElectronFexMT("EgammaFastElectronFex_1", - AcceptAll=True, + efex = CompFactory.TrigEgammaFastElectronFexMT("EgammaFastElectronFex_Clean", + AcceptAll=False, TrackPt=1.0 * GeV, TrackPtHighEt=2.0 * GeV, ClusEt=20.0 * GeV, CaloTrackdEtaNoExtrap=0.5, CaloTrackdEtaNoExtrapHighEt=0.1, - CaloTrackdETA=0.5, - CaloTrackdPHI=0.5, + CaloTrackdETA=0.2, + CaloTrackdPHI=0.3, CaloTrackdEoverPLow=0.0, CaloTrackdEoverPHigh=999.0, RCalBarrelFace=1470.0*mm, diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Electron/generateElectron.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Electron/generateElectron.py index 031a5b0a752d3ea0106e0f86787ae4bbff66575b..5c7187f03fa625ba8951ce131c7aec667f588a00 100644 --- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Electron/generateElectron.py +++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Electron/generateElectron.py @@ -44,7 +44,7 @@ def generateChains(flags, chainDict): RoITool = CompFactory.ViewCreatorInitialROITool(), InViewRoIs = name+'RoIs', Views = name+'Views', - ViewNodeName = name+"InView", + ViewNodeName = 'FastElectronInView', RequireParentView = True) del name diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Jet/generateJet.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Jet/generateJet.py index 9f74d1abac38dbe6c54f50f6fb163e6ea97ef8dd..97e5bc114e6f16f0762fd7fefdf8604483435f2b 100644 --- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Jet/generateJet.py +++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Jet/generateJet.py @@ -8,17 +8,21 @@ from AthenaCommon.Logging import logging from ..CommonSequences.FullScanDefs import caloFSRoI log = logging.getLogger( 'TriggerMenuMT.HLTMenuConfig.Jet.generateJet' ) -def HLTCaloCellMakerCfg( cellsname, cdaSvc ): +def HLTCaloCellMakerCfg( flags, cellsname, cdaSvc ): result = ComponentAccumulator() + from TrigT2CaloCommon.TrigCaloDataAccessConfig import trigCaloDataAccessSvcCfg, CaloDataAccessSvcDependencies + + result.merge(trigCaloDataAccessSvcCfg(flags)) verifier = CompFactory.AthViews.ViewDataVerifier( name = 'VDVFSCaloJet', DataObjects = [('TrigRoiDescriptorCollection', f"StoreGateSvc+{caloFSRoI}"), ('CaloBCIDAverage', 'StoreGateSvc+CaloBCIDAverage') ]) result.addEventAlgo( verifier ) cellmaker = CompFactory.HLTCaloCellMaker("HLTCaloCellMaker_FS") + cellmaker.RoIs = caloFSRoI cellmaker.TrigDataAccessMT = cdaSvc cellmaker.CellsName = cellsname - + cellmaker.ExtraInputs = CaloDataAccessSvcDependencies result.addEventAlgo(cellmaker) return result @@ -44,7 +48,7 @@ def generateChains( flags, chainDict ): cellsname = "CaloCellsFS" clustersname = "HLT_CaloTopoClustersFS" - cellmakerCfg = HLTCaloCellMakerCfg(cellsname, cdaSvc) + cellmakerCfg = HLTCaloCellMakerCfg(flags, cellsname, cdaSvc) inEventReco.mergeReco( cellmakerCfg )