diff --git a/Control/AthenaConfiguration/python/TestDefaults.py b/Control/AthenaConfiguration/python/TestDefaults.py index 0e484cf617a8093ef1db46f649cb16242d375627..5a88ad5f037416c623ad7a039a182feeded00d56 100644 --- a/Control/AthenaConfiguration/python/TestDefaults.py +++ b/Control/AthenaConfiguration/python/TestDefaults.py @@ -46,3 +46,18 @@ class defaultGeometryTags: RUN2_BEST_KNOWLEDGE = "ATLAS-R2-2016-01-02-01" RUN3 = "ATLAS-R3S-2021-03-02-00" RUN4 = "ATLAS-P2-RUN4-03-00-00" + + @staticmethod + def autoconfigure(flags): + if flags.GeoModel.AtlasVersion: + return flags.GeoModel.AtlasVersion + + from AthenaConfiguration.Enums import LHCPeriod + if flags.GeoModel.Run is LHCPeriod.Run1: + return defaultGeometryTags.RUN1_2012 + if flags.GeoModel.Run is LHCPeriod.Run2: + return defaultGeometryTags.RUN2 + if flags.GeoModel.Run is LHCPeriod.Run3: + return defaultGeometryTags.RUN3 + if flags.GeoModel.Run is LHCPeriod.Run4: + return defaultGeometryTags.RUN4 diff --git a/PhysicsAnalysis/AnalysisTrigger/AnalysisTriggerAlgs/python/AnalysisTriggerAlgsCAConfig.py b/PhysicsAnalysis/AnalysisTrigger/AnalysisTriggerAlgs/python/AnalysisTriggerAlgsCAConfig.py index 4b0a6bc37ec8ee9200ea789f03103e889b0a1917..f7a18fbcc8e0656350eeafe297bb8156e737ba33 100644 --- a/PhysicsAnalysis/AnalysisTrigger/AnalysisTriggerAlgs/python/AnalysisTriggerAlgsCAConfig.py +++ b/PhysicsAnalysis/AnalysisTrigger/AnalysisTriggerAlgs/python/AnalysisTriggerAlgsCAConfig.py @@ -1,4 +1,4 @@ -# Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator from AthenaConfiguration.ComponentFactory import CompFactory @@ -67,9 +67,10 @@ def RoIBResultToxAODCfg(flags): if __name__ == "__main__": from AthenaConfiguration.MainServicesConfig import MainServicesCfg from AthenaConfiguration.AllConfigFlags import initConfigFlags - from AthenaConfiguration.TestDefaults import defaultTestFiles + from AthenaConfiguration.TestDefaults import defaultTestFiles, defaultGeometryTags flags = initConfigFlags() flags.Input.Files = defaultTestFiles.RAW_RUN2 + flags.GeoModel.AtlasVersion = defaultGeometryTags.RUN2 flags.Exec.MaxEvents = 20 flags.fillFromArgs() flags.lock() diff --git a/Trigger/EFTracking/FPGATrackSim/FPGATrackSimConfTools/python/FPGATrackSimAnalysisConfig.py b/Trigger/EFTracking/FPGATrackSim/FPGATrackSimConfTools/python/FPGATrackSimAnalysisConfig.py index 4997e6a481e05cbf74ebd9cb9f494d10571a2a5d..8222be5947998dd3a4ccb07e85405677817e1534 100644 --- a/Trigger/EFTracking/FPGATrackSim/FPGATrackSimConfTools/python/FPGATrackSimAnalysisConfig.py +++ b/Trigger/EFTracking/FPGATrackSim/FPGATrackSimConfTools/python/FPGATrackSimAnalysisConfig.py @@ -1,4 +1,4 @@ -# Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator from AthenaConfiguration.ComponentFactory import CompFactory @@ -394,7 +394,8 @@ if __name__ == "__main__": flags = initConfigFlags() flags.fillFromArgs() - flags.GeoModel.AtlasVersion = "ATLAS-P2-RUN4-03-00-00" + from AthenaConfiguration.TestDefaults import defaultGeometryTags + flags.GeoModel.AtlasVersion = defaultGeometryTags.RUN4 if isinstance(flags.Trigger.FPGATrackSim.wrapperFileName, str): log.info("wrapperFile is string, converting to list") flags.Trigger.FPGATrackSim.wrapperFileName = [flags.Trigger.FPGATrackSim.wrapperFileName] diff --git a/Trigger/TrigAlgorithms/TrigCaloRec/python/TrigCaloRecConfig.py b/Trigger/TrigAlgorithms/TrigCaloRec/python/TrigCaloRecConfig.py index ba57243536017981c6aa26bab08cda18125246d2..766056d2fa6900df678382838d3804943e48b0e0 100755 --- a/Trigger/TrigAlgorithms/TrigCaloRec/python/TrigCaloRecConfig.py +++ b/Trigger/TrigAlgorithms/TrigCaloRec/python/TrigCaloRecConfig.py @@ -1,4 +1,4 @@ -# Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration from AthenaCommon.SystemOfUnits import MeV, deg from AthenaCommon.Logging import logging @@ -472,14 +472,12 @@ def HICaloTowerCfg(flags): if __name__ == "__main__": - from AthenaConfiguration.TestDefaults import defaultTestFiles + from AthenaConfiguration.TestDefaults import defaultTestFiles, defaultGeometryTags from AthenaConfiguration.AllConfigFlags import initConfigFlags - from AthenaConfiguration.Enums import LHCPeriod flags = initConfigFlags() flags.Input.Files = defaultTestFiles.RAW_RUN3 - #flags.Input.isMC=False - flags.GeoModel.Run=LHCPeriod.Run3 + flags.GeoModel.AtlasVersion = defaultGeometryTags.RUN3 flags.IOVDb.GlobalTag = "CONDBR2-ES1PA-2022-07" flags.Common.isOnline = True outputContainers = ["CaloCellContainer#SeedLessFS", diff --git a/Trigger/TrigAlgorithms/TrigL2MuonSA/python/MdtDataPreparator_test.py b/Trigger/TrigAlgorithms/TrigL2MuonSA/python/MdtDataPreparator_test.py index 06401726fb518c4f22acbcc6cea50827f8576af9..b14e4748126f23a2da165378192a6540938f5ec7 100644 --- a/Trigger/TrigAlgorithms/TrigL2MuonSA/python/MdtDataPreparator_test.py +++ b/Trigger/TrigAlgorithms/TrigL2MuonSA/python/MdtDataPreparator_test.py @@ -1,5 +1,5 @@ # -# Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration. +# Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration. # # File: TrigL2MuonSA/share/MdtDataPreparator_test.py # Author: scott snyder @@ -51,10 +51,11 @@ def testCfg (configFlags): from AthenaConfiguration.AllConfigFlags import initConfigFlags -from AthenaConfiguration.TestDefaults import defaultTestFiles +from AthenaConfiguration.TestDefaults import defaultTestFiles, defaultGeometryTags flags = initConfigFlags() flags.Input.Files = defaultTestFiles.RAW_RUN2 +flags.GeoModel.AtlasVersion = defaultGeometryTags.RUN2 flags.lock() from AthenaConfiguration.MainServicesConfig import MainServicesCfg acc=MainServicesCfg(flags) diff --git a/Trigger/TrigAlgorithms/TrigL2MuonSA/python/TrigL2MuonSAConfig.py b/Trigger/TrigAlgorithms/TrigL2MuonSA/python/TrigL2MuonSAConfig.py index 6c63b4a935dd8e57bf9e7713ed2eac0b26f2060c..52350e973e9980f1f891a1a088bf9c7eafd957ef 100644 --- a/Trigger/TrigAlgorithms/TrigL2MuonSA/python/TrigL2MuonSAConfig.py +++ b/Trigger/TrigAlgorithms/TrigL2MuonSA/python/TrigL2MuonSAConfig.py @@ -1,5 +1,5 @@ # -# Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration # # This file configs the L2MuonSA reco alg in the newJO way, # but now is located here temporarily until newJO migrations are done in all trigger signatures. @@ -368,10 +368,11 @@ def l2MuFastAlgCfg( flags, roisKey, setup="", **kwargs ): if __name__ == "__main__": - from AthenaConfiguration.TestDefaults import defaultTestFiles + from AthenaConfiguration.TestDefaults import defaultTestFiles, defaultGeometryTags from AthenaConfiguration.AllConfigFlags import initConfigFlags flags = initConfigFlags() flags.Input.Files = defaultTestFiles.RAW_RUN2 + flags.GeoModel.AtlasVersion = defaultGeometryTags.RUN2 flags.lock() cfg = l2MuFastAlgCfg(flags, roisKey="MURoIs") diff --git a/Trigger/TrigAlgorithms/TrigMinBias/python/MbtsConfig.py b/Trigger/TrigAlgorithms/TrigMinBias/python/MbtsConfig.py index b5e8bb0fe3583909156b56ab4dba95f48dad364a..dc2a111df615aaa1c1370253d3887d02005f7395 100644 --- a/Trigger/TrigAlgorithms/TrigMinBias/python/MbtsConfig.py +++ b/Trigger/TrigAlgorithms/TrigMinBias/python/MbtsConfig.py @@ -1,4 +1,4 @@ -# Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration from TrigMinBias.TrigMinBiasMonitoring import MbtsFexMonitoring from AthenaConfiguration.ComponentFactory import CompFactory from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator @@ -26,10 +26,11 @@ def MbtsSGInputCfg(flags): if __name__ == '__main__': from AthenaConfiguration.AllConfigFlags import initConfigFlags - from AthenaConfiguration.TestDefaults import defaultTestFiles + from AthenaConfiguration.TestDefaults import defaultTestFiles, defaultGeometryTags flags = initConfigFlags() flags.Input.Files=defaultTestFiles.RAW_RUN2 # or ESD or AOD or ... + flags.GeoModel.AtlasVersion = defaultGeometryTags.RUN2 flags.lock() acc=ComponentAccumulator() diff --git a/Trigger/TrigAlgorithms/TrigPartialEventBuilding/python/TrigPartialEventBuildingConfig.py b/Trigger/TrigAlgorithms/TrigPartialEventBuilding/python/TrigPartialEventBuildingConfig.py index 2c7efe168f522b03ba3cf8119a2ec6ff8ab73516..c70cd7d8ede10cff819674504db76b9a6a8c3fef 100644 --- a/Trigger/TrigAlgorithms/TrigPartialEventBuilding/python/TrigPartialEventBuildingConfig.py +++ b/Trigger/TrigAlgorithms/TrigPartialEventBuilding/python/TrigPartialEventBuildingConfig.py @@ -1,5 +1,5 @@ # -# Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration # from AthenaCommon.Configurable import ConfigurableCABehavior @@ -101,10 +101,11 @@ def StaticPEBInfoWriterToolCfg(flags, name='StaticPEBInfoWriterTool', if __name__ == '__main__': - from AthenaConfiguration.TestDefaults import defaultTestFiles + from AthenaConfiguration.TestDefaults import defaultTestFiles, defaultGeometryTags from AthenaConfiguration.AllConfigFlags import initConfigFlags flags = initConfigFlags() flags.Input.Files = defaultTestFiles.RAW_RUN3 + flags.GeoModel.AtlasVersion = defaultGeometryTags.RUN3 flags.lock() cfg = ComponentAccumulator() diff --git a/Trigger/TrigAlgorithms/TrigT2CaloCommon/python/TrigCaloDataAccessConfig.py b/Trigger/TrigAlgorithms/TrigT2CaloCommon/python/TrigCaloDataAccessConfig.py index a07304375e7514c1b6e97077b2eb045c4d5ec11c..26fbed9bde3502cee1dbb2b6aa59834e7d795004 100644 --- a/Trigger/TrigAlgorithms/TrigT2CaloCommon/python/TrigCaloDataAccessConfig.py +++ b/Trigger/TrigAlgorithms/TrigT2CaloCommon/python/TrigCaloDataAccessConfig.py @@ -1,4 +1,4 @@ -# Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator from AthenaConfiguration.ComponentFactory import CompFactory from AthenaConfiguration.AccumulatorCache import AccumulatorCache @@ -101,12 +101,13 @@ def trigCaloDataAccessSvcCfg( flags ): if __name__ == "__main__": - from AthenaConfiguration.TestDefaults import defaultTestFiles + from AthenaConfiguration.TestDefaults import defaultTestFiles, defaultGeometryTags from AthenaConfiguration.AllConfigFlags import initConfigFlags import sys flags = initConfigFlags() flags.Input.Files = defaultTestFiles.RAW_RUN2 + flags.GeoModel.AtlasVersion = defaultGeometryTags.RUN2 flags.Input.isMC=False flags.lock() diff --git a/Trigger/TrigSteer/HLTSeeding/python/HLTSeedingConfig.py b/Trigger/TrigSteer/HLTSeeding/python/HLTSeedingConfig.py index 81bec4f9a43149c549f6c053e7187e455d6f33d7..c5b664764edcfd09bd260c0f914329abcd9b9755 100644 --- a/Trigger/TrigSteer/HLTSeeding/python/HLTSeedingConfig.py +++ b/Trigger/TrigSteer/HLTSeeding/python/HLTSeedingConfig.py @@ -1,5 +1,5 @@ # -# Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration # from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator @@ -399,6 +399,8 @@ if __name__ == "__main__": flags = initConfigFlags() flags.Trigger.forceEnableAllChains= True flags.Input.Files= ["/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/TrigP1Test/data17_13TeV.00327265.physics_EnhancedBias.merge.RAW._lb0100._SFO-1._0001.1",] + from AthenaConfiguration.TestDefaults import defaultGeometryTags + flags.GeoModel.AtlasVersion = defaultGeometryTags.RUN2 flags.lock() acc = HLTSeedingCfg( flags ) acc.wasMerged() diff --git a/Trigger/TrigT1/L1CaloFEX/L1CaloFEXAlgos/python/FexEmulatedTowersConfig.py b/Trigger/TrigT1/L1CaloFEX/L1CaloFEXAlgos/python/FexEmulatedTowersConfig.py index 4c38316337479570c80e6bc2c614dc26543a26e4..3999dbb319d0ade96d0aff7d7e785dc8667d02c9 100644 --- a/Trigger/TrigT1/L1CaloFEX/L1CaloFEXAlgos/python/FexEmulatedTowersConfig.py +++ b/Trigger/TrigT1/L1CaloFEX/L1CaloFEXAlgos/python/FexEmulatedTowersConfig.py @@ -1,5 +1,5 @@ # -# Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration # from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator @@ -65,7 +65,11 @@ if __name__ == '__main__': flags.Input.Files = [file for x in args.filesInput for file in glob.glob(x)] flags.Concurrency.NumThreads = 1 flags.Concurrency.NumConcurrentEvents = 1 - + + if not flags.Input.isMC: + from AthenaConfiguration.TestDefaults import defaultGeometryTags + flags.GeoModel.AtlasVersion = defaultGeometryTags.autoconfigure(flags) + if any(["data" in f for f in args.filesInput]): s=args.filesInput[0].replace('*','').replace('.data','') flags.Output.AODFileName = "AOD."+(s.split("/")[-1]).split('_SFO')[0]+"pool.root" @@ -76,10 +80,6 @@ if __name__ == '__main__': flags.Trigger.doLVL1 = True flags.Trigger.enableL1CaloPhase1 = True - from AthenaConfiguration.Enums import LHCPeriod - if not flags.Input.isMC and flags.GeoModel.Run is LHCPeriod.Run2: - flags.GeoModel.AtlasVersion = 'ATLAS-R2-2016-01-00-01' - # Enable only calo for this test from AthenaConfiguration.DetectorConfigFlags import setupDetectorsFromList setupDetectorsFromList(flags,['LAr','Tile','MBTS'],True) diff --git a/Trigger/TrigT1/L1CaloFEX/L1CaloFEXAlgos/python/L1CaloFEXAlgosConfig.py b/Trigger/TrigT1/L1CaloFEX/L1CaloFEXAlgos/python/L1CaloFEXAlgosConfig.py index cd9ecbdc56281428a6845e6ec0fd46d0e0e2ca21..9e997c3648b9d1ef4f6f30a677b7629af6aeba0e 100644 --- a/Trigger/TrigT1/L1CaloFEX/L1CaloFEXAlgos/python/L1CaloFEXAlgosConfig.py +++ b/Trigger/TrigT1/L1CaloFEX/L1CaloFEXAlgos/python/L1CaloFEXAlgosConfig.py @@ -1,5 +1,5 @@ # -# Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration # from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator @@ -96,7 +96,11 @@ if __name__ == '__main__': flags.Input.Files = [file for x in args.filesInput for file in glob.glob(x)] flags.Concurrency.NumThreads = 1 flags.Concurrency.NumConcurrentEvents = 1 - + + if not flags.Input.isMC: + from AthenaConfiguration.TestDefaults import defaultGeometryTags + flags.GeoModel.AtlasVersion = defaultGeometryTags.autoconfigure(flags) + if any(["data" in f for f in args.filesInput]): s=args.filesInput[0].replace('*','').replace('.data','') flags.Output.AODFileName = "AOD."+(s.split("/")[-1]).split('_SFO')[0]+"pool.root" @@ -107,10 +111,6 @@ if __name__ == '__main__': flags.Trigger.doLVL1 = True flags.Trigger.enableL1CaloPhase1 = True - from AthenaConfiguration.Enums import LHCPeriod - if not flags.Input.isMC and flags.GeoModel.Run is LHCPeriod.Run2: - flags.GeoModel.AtlasVersion = 'ATLAS-R2-2016-01-00-01' - # Enable only calo for this test from AthenaConfiguration.DetectorConfigFlags import setupDetectorsFromList setupDetectorsFromList(flags,['LAr','Tile','MBTS'],True) diff --git a/Trigger/TrigT1/L1CaloFEX/L1CaloFEXSim/python/FEXReprocessingRun3.py b/Trigger/TrigT1/L1CaloFEX/L1CaloFEXSim/python/FEXReprocessingRun3.py index a8e22e77a588cca13940ea03e11b6af8ccdacd23..3656b5011e342fba63039ff39a1dda8d0d43270c 100644 --- a/Trigger/TrigT1/L1CaloFEX/L1CaloFEXSim/python/FEXReprocessingRun3.py +++ b/Trigger/TrigT1/L1CaloFEX/L1CaloFEXSim/python/FEXReprocessingRun3.py @@ -1,5 +1,5 @@ # -# Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration # from AthenaConfiguration.ComponentFactory import CompFactory @@ -42,6 +42,10 @@ if __name__ == '__main__': flags.Input.Files = [file for x in args.filesInput for file in glob.glob(x)] flags.Concurrency.NumThreads = 1 flags.Concurrency.NumConcurrentEvents = 1 + + if not flags.Input.isMC: + from AthenaConfiguration.TestDefaults import defaultGeometryTags + flags.GeoModel.AtlasVersion = defaultGeometryTags.autoconfigure(flags) if any(["data" in f for f in args.filesInput]): s=args.filesInput[0].replace('*','').replace('.data','') @@ -53,10 +57,6 @@ if __name__ == '__main__': flags.Trigger.doLVL1 = True flags.Trigger.enableL1CaloPhase1 = True - from AthenaConfiguration.Enums import LHCPeriod - if not flags.Input.isMC and flags.GeoModel.Run is LHCPeriod.Run2: - flags.GeoModel.AtlasVersion = 'ATLAS-R2-2016-01-00-01' - # Enable only calo for this test from AthenaConfiguration.DetectorConfigFlags import setupDetectorsFromList setupDetectorsFromList(flags,['LAr','Tile','MBTS'],True) diff --git a/Trigger/TrigT1/L1CaloFEX/L1CaloFEXSim/python/L1CaloFEXSimCfg.py b/Trigger/TrigT1/L1CaloFEX/L1CaloFEXSim/python/L1CaloFEXSimCfg.py index b58b03b2ddb3b7fb34980f7bc3f4f063ec358d77..4f96d301cb7a803785499cf1dacaac61fbf27435 100644 --- a/Trigger/TrigT1/L1CaloFEX/L1CaloFEXSim/python/L1CaloFEXSimCfg.py +++ b/Trigger/TrigT1/L1CaloFEX/L1CaloFEXSim/python/L1CaloFEXSimCfg.py @@ -1,5 +1,5 @@ # -# Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration # from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator from AthenaConfiguration.ComponentFactory import CompFactory @@ -321,7 +321,13 @@ if __name__ == '__main__': import os flags = initConfigFlags() + flags.Common.isOnline = True flags.Input.Files = [args.input] if os.path.isfile(args.input) else Input.get_input(args.input).paths + if not flags.Input.isMC: + from AthenaConfiguration.TestDefaults import defaultGeometryTags + flags.GeoModel.AtlasVersion = defaultGeometryTags.autoconfigure(flags) + from AthenaConfiguration.Enums import LHCPeriod + flags.IOVDb.GlobalTag = 'CONDBR2-HLTP-2023-01' if flags.GeoModel.Run is LHCPeriod.Run3 else 'CONDBR2-HLTP-2018-04' flags.Output.AODFileName = 'AOD.pool.root' flags.Exec.MaxEvents = args.nevents flags.Concurrency.NumThreads = 1 @@ -334,10 +340,6 @@ if __name__ == '__main__': flags.Trigger.enableL1CaloPhase1 = True flags.Trigger.triggerConfig = 'FILE' - from AthenaConfiguration.Enums import LHCPeriod - if not flags.Input.isMC and flags.GeoModel.Run is LHCPeriod.Run2: - flags.GeoModel.AtlasVersion = 'ATLAS-R2-2016-01-00-01' - # Enable only calo for this test from AthenaConfiguration.DetectorConfigFlags import setupDetectorFlags setupDetectorFlags(flags, ['LAr','Tile','MBTS'], toggle_geometry=True) diff --git a/Trigger/TrigT1/TrigGepPerf/share/run_gep.py b/Trigger/TrigT1/TrigGepPerf/share/run_gep.py index edbadebb10e34cb7bc074c8fbc7a422b9c40b63e..507e8a359666fff051c25fbc8780d0d71ede3088 100644 --- a/Trigger/TrigT1/TrigGepPerf/share/run_gep.py +++ b/Trigger/TrigT1/TrigGepPerf/share/run_gep.py @@ -1,5 +1,5 @@ # -# Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration # if __name__ == '__main__': @@ -77,6 +77,10 @@ if __name__ == '__main__': else: flags.Input.Files = Input.get_input(args.input).paths + if not flags.Input.isMC: + from AthenaConfiguration.TestDefaults import defaultGeometryTags + flags.GeoModel.AtlasVersion = defaultGeometryTags.autoconfigure(flags) + info('Command line args: ' + str(args)) flags.Output.AODFileName = 'AOD.pool.root' @@ -91,10 +95,6 @@ if __name__ == '__main__': flags.Trigger.doLVL1 = True flags.Trigger.enableL1CaloPhase1 = True - from AthenaConfiguration.Enums import LHCPeriod - if not flags.Input.isMC and flags.GeoModel.Run is LHCPeriod.Run2: - flags.GeoModel.AtlasVersion = 'ATLAS-R2-2016-01-00-01' - # Enable only calo for this test from AthenaConfiguration.DetectorConfigFlags import setupDetectorFlags setupDetectorFlags(flags, ['LAr','Tile','MBTS'], toggle_geometry=True) @@ -223,7 +223,7 @@ if __name__ == '__main__': acc.merge(calo_acc422) - from AthenaCommon.Constants import DEBUG,INFO + from AthenaCommon.Constants import DEBUG gepAlgs_output_level = DEBUG from TrigGepPerf.GepClusterTimingAlgConfig import GepClusterTimingAlgCfg @@ -336,5 +336,3 @@ if __name__ == '__main__': sc = acc.run() if sc.isFailure(): exit(1) - - diff --git a/Trigger/TrigT1/TrigT1CaloCalibUtils/share/L1CaloRampMaker.py b/Trigger/TrigT1/TrigT1CaloCalibUtils/share/L1CaloRampMaker.py index f8d5600a5307f4afdbcdf1c955a8bb069e77d64a..6fdba3fdd3263795917aec08270db6dddc7e7b15 100644 --- a/Trigger/TrigT1/TrigT1CaloCalibUtils/share/L1CaloRampMaker.py +++ b/Trigger/TrigT1/TrigT1CaloCalibUtils/share/L1CaloRampMaker.py @@ -1,4 +1,4 @@ -# Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration import glob, sys from AthenaConfiguration.AllConfigFlags import initConfigFlags @@ -30,6 +30,8 @@ def main(): flags = initConfigFlags() flags.Input.Files = glob.glob(options.InputFiles) + from AthenaConfiguration.TestDefaults import defaultGeometryTags + flags.GeoModel.AtlasVersion = defaultGeometryTags.autoconfigure(flags) flags.Exec.MaxEvents = -1 flags.Detector.EnableCalo = True @@ -44,7 +46,6 @@ def main(): flags.Tile.doOptATLAS=True flags.Tile.RunType='PHY' flags.Tile.BestPhaseFromCOOL=True - flags.GeoModel.AtlasVersion="ATLAS-R2-2015-03-01-00" flags.IOVDb.DBConnection = "sqlite://;schema=energyscanresults.sqlite;dbname=L1CALO" flags.IOVDb.GlobalTag = 'CONDBR2-BLKPA-2022-02' @@ -73,10 +74,8 @@ def main(): from CaloConditions.CaloConditionsConfig import CaloTriggerTowerCfg acc.merge(CaloTriggerTowerCfg(flags)) - - - from LArRecUtils.LArRecUtilsConf import LArADC2MeVCondAlg - LArADC2MeVCondAlg= CompFactory.LArADC2MeVCondAlg() + + LArADC2MeVCondAlg = CompFactory.LArADC2MeVCondAlg() LArADC2MeVCondAlg.LArHVScaleCorrKey="" acc.addCondAlgo(LArADC2MeVCondAlg, 'AthAlgSeq') diff --git a/Trigger/TrigT1/TrigT1CaloCondSvc/python/L1CaloCondConfig.py b/Trigger/TrigT1/TrigT1CaloCondSvc/python/L1CaloCondConfig.py index 1e9538dd0965f340af67eb08fdbe85b6aa47c144..c83c8ddc24b69dc80f1888196dc7ff865be377fe 100644 --- a/Trigger/TrigT1/TrigT1CaloCondSvc/python/L1CaloCondConfig.py +++ b/Trigger/TrigT1/TrigT1CaloCondSvc/python/L1CaloCondConfig.py @@ -1,4 +1,4 @@ -# Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration import sys @@ -62,13 +62,13 @@ def L1CaloCondAlgCfg(flags, readTest=False, Physics=True, Calib1=True, Calib2=Tr if __name__=="__main__": from AthenaConfiguration.AllConfigFlags import initConfigFlags - from AthenaConfiguration.TestDefaults import defaultTestFiles + from AthenaConfiguration.TestDefaults import defaultTestFiles, defaultGeometryTags flags = initConfigFlags() - flags.Input.Files = defaultTestFiles.RAW_RUN2 + flags.Input.Files = defaultTestFiles.RAW_RUN2 + flags.GeoModel.AtlasVersion = defaultGeometryTags.RUN2 flags.Exec.MaxEvents = 1 flags.IOVDb.GlobalTag = 'CONDBR2-BLKPA-2022-02' - flags.GeoModel.AtlasVersion="ATLAS-R2-2015-03-01-00" flags.Trigger.enableL1CaloLegacy = True flags.fillFromArgs() flags.lock() diff --git a/Trigger/TrigT1/TrigT1ResultByteStream/python/TrigT1ResultByteStreamConfig.py b/Trigger/TrigT1/TrigT1ResultByteStream/python/TrigT1ResultByteStreamConfig.py index 0a7d92ddefda4f13d02ed2606616c835c72488f2..5f5a6522e0f7c66c24a79f8ad42da3c6e2737279 100644 --- a/Trigger/TrigT1/TrigT1ResultByteStream/python/TrigT1ResultByteStreamConfig.py +++ b/Trigger/TrigT1/TrigT1ResultByteStream/python/TrigT1ResultByteStreamConfig.py @@ -1,5 +1,5 @@ # -# Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration # from AthenaCommon.Logging import logging from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator @@ -410,21 +410,19 @@ if __name__ == '__main__': if any(["data23" in f for f in args.filesInput]): flags.IOVDb.GlobalTag = "CONDBR2-HLTP-2022-02" flags.Trigger.triggerConfig='DB' - from AthenaConfiguration.Enums import LHCPeriod - flags.GeoModel.Run = LHCPeriod.Run3 # needed for LArGMConfig elif any(["data22" in f for f in args.filesInput]): - flags.Trigger.triggerConfig='DB' - from AthenaConfiguration.Enums import LHCPeriod - flags.GeoModel.Run = LHCPeriod.Run3 # needed for LArGMConfig flags.IOVDb.GlobalTag = "CONDBR2-ES1PA-2022-07" - - + flags.Trigger.triggerConfig='DB' + + flags.Input.Files = [file for x in args.filesInput for file in glob.glob(x)] + + from AthenaConfiguration.TestDefaults import defaultGeometryTags + flags.GeoModel.AtlasVersion = defaultGeometryTags.autoconfigure(flags) flags.Exec.OutputLevel = algLogLevel flags.Exec.MaxEvents = args.evtMax flags.Exec.SkipEvents = args.skipEvents - flags.Input.Files = [file for x in args.filesInput for file in glob.glob(x)] flags.Concurrency.NumThreads = 1 flags.Concurrency.NumConcurrentEvents = 1 flags.Output.HISTFileName = args.outputHISTFile diff --git a/Trigger/TrigTools/TrigInDetConfig/python/TrigInDetConfig.py b/Trigger/TrigTools/TrigInDetConfig/python/TrigInDetConfig.py index 5d981d85f868278f6c2997b649d38349f97c3974..c90a1b26926f81dedf74164626eb49d06f3724d8 100644 --- a/Trigger/TrigTools/TrigInDetConfig/python/TrigInDetConfig.py +++ b/Trigger/TrigTools/TrigInDetConfig/python/TrigInDetConfig.py @@ -1,5 +1,5 @@ # -# Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration # from AthenaConfiguration.AccumulatorCache import AccumulatorCache @@ -157,10 +157,11 @@ def trigInDetVertexingCfg(flags, inputTracks, outputVtx): if __name__ == "__main__": from AthenaConfiguration.AllConfigFlags import initConfigFlags - from AthenaConfiguration.TestDefaults import defaultTestFiles + from AthenaConfiguration.TestDefaults import defaultTestFiles, defaultGeometryTags ComponentAccumulator.debugMode = "trackCA trackPublicTool trackEventAlgo trackCondAlgo trackPrivateTool" flags = initConfigFlags() flags.Input.Files = defaultTestFiles.RAW_RUN2 + flags.GeoModel.AtlasVersion = defaultGeometryTags.RUN2 flags.lock() # this configuration is not runable, the test checks if there is no mistake in python scripts above # output can be used by experts to check actual configuration (e.g. here we configure to run on RAW and it should be reflected in settings) diff --git a/Trigger/TrigValidation/TrigValAlgs/python/TrigValAlgsConfig.py b/Trigger/TrigValidation/TrigValAlgs/python/TrigValAlgsConfig.py index 16b2ffb714027d07a74bb72a922d433af57e3693..e0f67b6c08b352af971e1c36464a9dcb0136e7a3 100755 --- a/Trigger/TrigValidation/TrigValAlgs/python/TrigValAlgsConfig.py +++ b/Trigger/TrigValidation/TrigValAlgs/python/TrigValAlgsConfig.py @@ -1,4 +1,4 @@ -# Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator from AthenaConfiguration.ComponentFactory import CompFactory @@ -49,9 +49,10 @@ def getEDMAuxList(flags): if __name__ == '__main__': from AthenaConfiguration.AllConfigFlags import initConfigFlags - from AthenaConfiguration.TestDefaults import defaultTestFiles + from AthenaConfiguration.TestDefaults import defaultTestFiles, defaultGeometryTags flags = initConfigFlags() flags.Input.Files = defaultTestFiles.RAW_RUN3 + flags.GeoModel.AtlasVersion = defaultGeometryTags.RUN3 flags.lock() cfg = ComponentAccumulator() diff --git a/Trigger/TriggerCommon/TriggerJobOpts/python/TriggerConfig.py b/Trigger/TriggerCommon/TriggerJobOpts/python/TriggerConfig.py index 39054b6f78cbf349bd7b937edca031fcd4879586..91bcbe7116a97625674d791ebef574af93de2353 100644 --- a/Trigger/TriggerCommon/TriggerJobOpts/python/TriggerConfig.py +++ b/Trigger/TriggerCommon/TriggerJobOpts/python/TriggerConfig.py @@ -1,4 +1,4 @@ -# Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration import re from collections import OrderedDict, defaultdict @@ -756,6 +756,8 @@ if __name__ == "__main__": flags = initConfigFlags() flags.Trigger.forceEnableAllChains = True flags.Input.Files = ["/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/TrigP1Test/data17_13TeV.00327265.physics_EnhancedBias.merge.RAW._lb0100._SFO-1._0001.1",] + from AthenaConfiguration.TestDefaults import defaultGeometryTags + flags.GeoModel.AtlasVersion = defaultGeometryTags.RUN2 flags.lock() def testMenu(flags): diff --git a/Trigger/TriggerCommon/TriggerJobOpts/python/TriggerRecoConfig.py b/Trigger/TriggerCommon/TriggerJobOpts/python/TriggerRecoConfig.py index 7752b96c124ece9f526abe4eac9839d53fe2291d..d5221757d7bbdad50460c7220ec7dd95cc592cef 100644 --- a/Trigger/TriggerCommon/TriggerJobOpts/python/TriggerRecoConfig.py +++ b/Trigger/TriggerCommon/TriggerJobOpts/python/TriggerRecoConfig.py @@ -1,4 +1,4 @@ -# Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator from AthenaConfiguration.ComponentFactory import CompFactory @@ -464,6 +464,9 @@ if __name__ == '__main__': elif flags.Trigger.EDMVersion==3: flags.Input.Files = defaultTestFiles.RAW_RUN3 + from AthenaConfiguration.TestDefaults import defaultGeometryTags + flags.GeoModel.AtlasVersion = defaultGeometryTags.autoconfigure(flags) + flags.lock() acc = MainServicesCfg(flags) diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLT/CommonSequences/EventBuildingSequences.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLT/CommonSequences/EventBuildingSequences.py index d515d04ecb8982a47776715e77d04c111bd9bc84..8ded13364a6d4eb4ce3111eb32ee0e0815d105a0 100644 --- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLT/CommonSequences/EventBuildingSequences.py +++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLT/CommonSequences/EventBuildingSequences.py @@ -1,5 +1,5 @@ # -# Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration # from TrigEDMConfig import DataScoutingInfo @@ -366,10 +366,11 @@ def isNoAlg(chain): # Unit test if __name__ == "__main__": - from AthenaConfiguration.TestDefaults import defaultTestFiles + from AthenaConfiguration.TestDefaults import defaultTestFiles, defaultGeometryTags from AthenaConfiguration.AllConfigFlags import initConfigFlags flags = initConfigFlags() flags.Input.Files = defaultTestFiles.RAW_RUN3 + flags.GeoModel.AtlasVersion = defaultGeometryTags.RUN3 flags.lock() # Ensure all DS identifiers have been added to the EB list: