From 3412226346e594eabf47de5f0d6dfacd5e4e3c2f Mon Sep 17 00:00:00 2001 From: mmusich Date: Wed, 6 Nov 2024 10:07:57 +0100 Subject: [PATCH] fix a bunch of tests broken by cms-sw/cmssw#46582 --- .../test/testStandaloneTrackerTopology.sh | 2 +- .../test/testStandaloneTrackerTopology_cfg.py | 29 +++++++++++++++---- .../MTDCommonData/test/testMTDinDD4hep.py | 7 +++-- Geometry/MTDCommonData/test/testMTDinDDD.py | 7 +++-- .../MTDGeometryBuilder/test/dd4hep_mtd_cfg.py | 8 +++-- Geometry/MTDGeometryBuilder/test/mtd_cfg.py | 7 +++-- .../test/dd4hep_mtd_cfg.py | 8 +++-- Geometry/MTDNumberingBuilder/test/mtd_cfg.py | 7 +++-- .../python/HLT_75e33/test/runHLTTiming.sh | 2 +- .../scripts/hltPhase2UpgradeIntegrationTests | 2 +- .../NavigationSchoolAnalyzer_Phase2_cfg.py | 8 +++-- Validation/Geometry/test/genHGCalPlots.sh | 2 +- 12 files changed, 59 insertions(+), 30 deletions(-) diff --git a/CalibTracker/StandaloneTrackerTopology/test/testStandaloneTrackerTopology.sh b/CalibTracker/StandaloneTrackerTopology/test/testStandaloneTrackerTopology.sh index afa0a21421eae..837ab11b025cb 100755 --- a/CalibTracker/StandaloneTrackerTopology/test/testStandaloneTrackerTopology.sh +++ b/CalibTracker/StandaloneTrackerTopology/test/testStandaloneTrackerTopology.sh @@ -6,4 +6,4 @@ echo " testing CalibTracker/StandalonTrackerTopology" cmsRun ${SCRAM_TEST_PATH}/testStandaloneTrackerTopology_cfg.py || die "Failure using cmsRun testPixelTopologyMapTest_cfg.py (Phase-0 test)" $? cmsRun ${SCRAM_TEST_PATH}/testStandaloneTrackerTopology_cfg.py runNumber=300000 || die "Failure using cmsRun testPixelTopologyMapTest_cfg.py (Phase-1 test)" $? -cmsRun ${SCRAM_TEST_PATH}/testStandaloneTrackerTopology_cfg.py globalTag=auto:phase2_realistic_T21 || die "Failure using cmsRun testPixelTopologyMapTest_cfg.py (Phase-2 test)" $? +cmsRun ${SCRAM_TEST_PATH}/testStandaloneTrackerTopology_cfg.py isPhase2=True || die "Failure using cmsRun testPixelTopologyMapTest_cfg.py (Phase-2 test)" $? diff --git a/CalibTracker/StandaloneTrackerTopology/test/testStandaloneTrackerTopology_cfg.py b/CalibTracker/StandaloneTrackerTopology/test/testStandaloneTrackerTopology_cfg.py index c4896e4e59c96..51f49c21baf95 100644 --- a/CalibTracker/StandaloneTrackerTopology/test/testStandaloneTrackerTopology_cfg.py +++ b/CalibTracker/StandaloneTrackerTopology/test/testStandaloneTrackerTopology_cfg.py @@ -1,7 +1,6 @@ import FWCore.ParameterSet.Config as cms import FWCore.ParameterSet.VarParsing as VarParsing -process = cms.Process("TopologyAnalysis") options = VarParsing.VarParsing("analysis") options.register ('globalTag', @@ -16,8 +15,25 @@ VarParsing.VarParsing.varType.int, # string, int, or float "run number") +options.register ('isPhase2', + False, + VarParsing.VarParsing.multiplicity.singleton, # singleton or list + VarParsing.VarParsing.varType.bool, # string, int, or float + "is phase2?") + options.parseArguments() +################################################################### +# Set default phase-2 settings +################################################################### +import Configuration.Geometry.defaultPhase2ConditionsEra_cff as _settings +_PH2_GLOBAL_TAG, _PH2_ERA = _settings.get_era_and_conditions(_settings.DEFAULT_VERSION) + +if(options.isPhase2): + process = cms.Process("TopologyAnalysis",_PH2_ERA) +else: + process = cms.Process("TopologyAnalysis") + ################################################################### # Message logger service ################################################################### @@ -29,9 +45,9 @@ ################################################################### process.load("Configuration.StandardSequences.Services_cff") -if 'phase2' in options.globalTag: - process.load("Configuration.Geometry.GeometryExtended2026D98_cff") - process.load("Configuration.Geometry.GeometryExtended2026D98Reco_cff") +if(options.isPhase2): + process.load("Configuration.Geometry.GeometryExtendedRun4Default_cff") + process.load("Configuration.Geometry.GeometryExtendedRun4DefaultReco_cff") else: process.load("Configuration.StandardSequences.GeometryRecoDB_cff") @@ -40,7 +56,10 @@ #################################################################### process.load("Configuration.StandardSequences.FrontierConditions_GlobalTag_cff") from Configuration.AlCa.GlobalTag import GlobalTag -process.GlobalTag = GlobalTag(process.GlobalTag, options.globalTag, '') +if(options.isPhase2): + process.GlobalTag = GlobalTag(process.GlobalTag, _PH2_GLOBAL_TAG, '') +else: + process.GlobalTag = GlobalTag(process.GlobalTag, options.globalTag, '') ################################################################### # Empty Source diff --git a/Geometry/MTDCommonData/test/testMTDinDD4hep.py b/Geometry/MTDCommonData/test/testMTDinDD4hep.py index 2b14c8c270869..80c92252d09c2 100644 --- a/Geometry/MTDCommonData/test/testMTDinDD4hep.py +++ b/Geometry/MTDCommonData/test/testMTDinDD4hep.py @@ -1,9 +1,10 @@ import FWCore.ParameterSet.Config as cms -from Configuration.Eras.Era_Phase2C17I13M9_cff import Phase2C17I13M9 +import Configuration.Geometry.defaultPhase2ConditionsEra_cff as _settings +_PH2_GLOBAL_TAG, _PH2_ERA = _settings.get_era_and_conditions(_settings.DEFAULT_VERSION) from Configuration.ProcessModifiers.dd4hep_cff import dd4hep -process = cms.Process("CompareGeometryTest",Phase2C17I13M9,dd4hep) +process = cms.Process("CompareGeometryTest",_PH2_ERA,dd4hep) process.source = cms.Source("EmptySource") process.maxEvents = cms.untracked.PSet( @@ -54,7 +55,7 @@ threshold = cms.untracked.string('INFO') ) -process.load('Configuration.Geometry.GeometryDD4hepExtended2026D110_cff') +process.load('Configuration.Geometry.GeometryDD4hepExtendedRun4Default_cff') process.testBTL = cms.EDAnalyzer("DD4hep_TestMTDIdealGeometry", DDDetector = cms.ESInputTag('',''), diff --git a/Geometry/MTDCommonData/test/testMTDinDDD.py b/Geometry/MTDCommonData/test/testMTDinDDD.py index 9a872cbe25a77..439a2e3c70584 100644 --- a/Geometry/MTDCommonData/test/testMTDinDDD.py +++ b/Geometry/MTDCommonData/test/testMTDinDDD.py @@ -1,8 +1,9 @@ import FWCore.ParameterSet.Config as cms -from Configuration.Eras.Era_Phase2C17I13M9_cff import Phase2C17I13M9 +import Configuration.Geometry.defaultPhase2ConditionsEra_cff as _settings +_PH2_GLOBAL_TAG, _PH2_ERA = _settings.get_era_and_conditions(_settings.DEFAULT_VERSION) -process = cms.Process("CompareGeometryTest",Phase2C17I13M9) +process = cms.Process("CompareGeometryTest", _PH2_ERA) process.source = cms.Source("EmptySource") process.maxEvents = cms.untracked.PSet( @@ -53,7 +54,7 @@ threshold = cms.untracked.string('INFO') ) -process.load('Configuration.Geometry.GeometryExtended2026D110_cff') +process.load('Configuration.Geometry.GeometryExtendedRun4Default_cff') process.testBTL = cms.EDAnalyzer("TestMTDIdealGeometry", ddTopNodeName = cms.untracked.string('BarrelTimingLayer') diff --git a/Geometry/MTDGeometryBuilder/test/dd4hep_mtd_cfg.py b/Geometry/MTDGeometryBuilder/test/dd4hep_mtd_cfg.py index 773ce1bc4c21a..42df806bdad16 100644 --- a/Geometry/MTDGeometryBuilder/test/dd4hep_mtd_cfg.py +++ b/Geometry/MTDGeometryBuilder/test/dd4hep_mtd_cfg.py @@ -1,9 +1,11 @@ import FWCore.ParameterSet.Config as cms -from Configuration.Eras.Era_Phase2C17I13M9_cff import Phase2C17I13M9 +import Configuration.Geometry.defaultPhase2ConditionsEra_cff as _settings +_PH2_GLOBAL_TAG, _PH2_ERA = _settings.get_era_and_conditions(_settings.DEFAULT_VERSION) + from Configuration.ProcessModifiers.dd4hep_cff import dd4hep -process = cms.Process("GeometryTest",Phase2C17I13M9,dd4hep) +process = cms.Process("GeometryTest",_PH2_ERA,dd4hep) process.source = cms.Source("EmptyIOVSource", lastValue = cms.uint64(1), @@ -50,7 +52,7 @@ threshold = cms.untracked.string('INFO') ) -process.load("Configuration.Geometry.GeometryDD4hepExtended2026D110Reco_cff") +process.load("Configuration.Geometry.GeometryDD4hepExtendedRun4DefaultReco_cff") process.Timing = cms.Service("Timing") diff --git a/Geometry/MTDGeometryBuilder/test/mtd_cfg.py b/Geometry/MTDGeometryBuilder/test/mtd_cfg.py index 5655d299e567d..59e7243471ceb 100644 --- a/Geometry/MTDGeometryBuilder/test/mtd_cfg.py +++ b/Geometry/MTDGeometryBuilder/test/mtd_cfg.py @@ -1,8 +1,9 @@ import FWCore.ParameterSet.Config as cms -from Configuration.Eras.Era_Phase2C17I13M9_cff import Phase2C17I13M9 +import Configuration.Geometry.defaultPhase2ConditionsEra_cff as _settings +_PH2_GLOBAL_TAG, _PH2_ERA = _settings.get_era_and_conditions(_settings.DEFAULT_VERSION) -process = cms.Process("GeometryTest",Phase2C17I13M9) +process = cms.Process("GeometryTest", _PH2_ERA) process.source = cms.Source("EmptyIOVSource", lastValue = cms.uint64(1), @@ -46,7 +47,7 @@ threshold = cms.untracked.string('INFO') ) -process.load("Configuration.Geometry.GeometryExtended2026D110_cff") +process.load("Configuration.Geometry.GeometryExtendedRun4Default_cff") process.load("Geometry.MTDNumberingBuilder.mtdNumberingGeometry_cff") diff --git a/Geometry/MTDNumberingBuilder/test/dd4hep_mtd_cfg.py b/Geometry/MTDNumberingBuilder/test/dd4hep_mtd_cfg.py index 558b161e9660c..8f8f70417c74b 100644 --- a/Geometry/MTDNumberingBuilder/test/dd4hep_mtd_cfg.py +++ b/Geometry/MTDNumberingBuilder/test/dd4hep_mtd_cfg.py @@ -1,9 +1,11 @@ import FWCore.ParameterSet.Config as cms -from Configuration.Eras.Era_Phase2C17I13M9_cff import Phase2C17I13M9 +import Configuration.Geometry.defaultPhase2ConditionsEra_cff as _settings +_PH2_GLOBAL_TAG, _PH2_ERA = _settings.get_era_and_conditions(_settings.DEFAULT_VERSION) + from Configuration.ProcessModifiers.dd4hep_cff import dd4hep -process = cms.Process("GeometryTest",Phase2C17I13M9,dd4hep) +process = cms.Process("GeometryTest",_PH2_ERA,dd4hep) process.source = cms.Source("EmptyIOVSource", lastValue = cms.uint64(1), @@ -47,7 +49,7 @@ threshold = cms.untracked.string('INFO') ) -process.load("Configuration.Geometry.GeometryDD4hepExtended2026D110Reco_cff") +process.load("Configuration.Geometry.GeometryDD4hepExtendedRun4DefaultReco_cff") process.prod = cms.EDAnalyzer("GeometricTimingDetAnalyzer") diff --git a/Geometry/MTDNumberingBuilder/test/mtd_cfg.py b/Geometry/MTDNumberingBuilder/test/mtd_cfg.py index c8ed561c1d8f4..26ad5930e64ee 100644 --- a/Geometry/MTDNumberingBuilder/test/mtd_cfg.py +++ b/Geometry/MTDNumberingBuilder/test/mtd_cfg.py @@ -1,8 +1,9 @@ import FWCore.ParameterSet.Config as cms -from Configuration.Eras.Era_Phase2C17I13M9_cff import Phase2C17I13M9 +import Configuration.Geometry.defaultPhase2ConditionsEra_cff as _settings +_PH2_GLOBAL_TAG, _PH2_ERA = _settings.get_era_and_conditions(_settings.DEFAULT_VERSION) -process = cms.Process("GeometryTest",Phase2C17I13M9) +process = cms.Process("GeometryTest",_PH2_ERA) process.source = cms.Source("EmptyIOVSource", lastValue = cms.uint64(1), @@ -46,7 +47,7 @@ threshold = cms.untracked.string('INFO') ) -process.load("Configuration.Geometry.GeometryExtended2026D110Reco_cff") +process.load("Configuration.Geometry.GeometryExtendedRun4DefaultReco_cff") process.Timing = cms.Service("Timing") diff --git a/HLTrigger/Configuration/python/HLT_75e33/test/runHLTTiming.sh b/HLTrigger/Configuration/python/HLT_75e33/test/runHLTTiming.sh index bbb147424fd8a..2e7c046ccd9c9 100755 --- a/HLTrigger/Configuration/python/HLT_75e33/test/runHLTTiming.sh +++ b/HLTrigger/Configuration/python/HLT_75e33/test/runHLTTiming.sh @@ -37,7 +37,7 @@ ALL_FILES="${ALL_FILES%?}" echo "Discovered files: $ALL_FILES" cmsDriver.py Phase2 -s L1P2GT,HLT:75e33_timing --processName=HLTX \ - --conditions auto:phase2_realistic_T33 --geometry Extended2026D110 \ + --conditions auto:phase2_realistic_T33 --geometry ExtendedRun4D110 \ --era Phase2C17I13M9 \ --customise SLHCUpgradeSimulations/Configuration/aging.customise_aging_1000 \ --eventcontent FEVTDEBUGHLT \ diff --git a/HLTrigger/Configuration/scripts/hltPhase2UpgradeIntegrationTests b/HLTrigger/Configuration/scripts/hltPhase2UpgradeIntegrationTests index c89f185e79b7a..0d35e4208b260 100755 --- a/HLTrigger/Configuration/scripts/hltPhase2UpgradeIntegrationTests +++ b/HLTrigger/Configuration/scripts/hltPhase2UpgradeIntegrationTests @@ -16,7 +16,7 @@ _PH2_GLOBAL_TAG, _PH2_ERA = _settings.get_era_and_conditions(_settings.DEFAULT_V _PH2_GEOMETRY = f"Extended{_settings.DEFAULT_VERSION}" # Get the actual era name from the version key -_PH2_ERA_NAME = _settings.properties[2026][_settings.DEFAULT_VERSION]['Era'] +_PH2_ERA_NAME = _settings.properties['Run4'][_settings.DEFAULT_VERSION]['Era'] # Function to display help information def print_help(): diff --git a/RecoTracker/TkNavigation/test/NavigationSchoolAnalyzer_Phase2_cfg.py b/RecoTracker/TkNavigation/test/NavigationSchoolAnalyzer_Phase2_cfg.py index b7a8d02ac47ea..b3b5e1415c67a 100644 --- a/RecoTracker/TkNavigation/test/NavigationSchoolAnalyzer_Phase2_cfg.py +++ b/RecoTracker/TkNavigation/test/NavigationSchoolAnalyzer_Phase2_cfg.py @@ -1,18 +1,20 @@ import FWCore.ParameterSet.Config as cms # set the geometry and the GlobalTag +import Configuration.Geometry.defaultPhase2ConditionsEra_cff as _settings +_PH2_GLOBAL_TAG, _PH2_ERA = _settings.get_era_and_conditions(_settings.DEFAULT_VERSION) -process = cms.Process("NavigationSchoolAnalyzer") +process = cms.Process("NavigationSchoolAnalyzer",_PH2_ERA) # the following lines are kept for when the phase-2 geometry wil be moved to DB #process.load("Configuration.StandardSequences.GeometryDB_cff") #process.load('Configuration.StandardSequences.GeometryRecoDB_cff') -process.load('Configuration.Geometry.GeometryExtended2026D98Reco_cff') +process.load('Configuration.Geometry.GeometryExtendedRun4DefaultReco_cff') process.load("Configuration.StandardSequences.MagneticField_cff") process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff') from Configuration.AlCa.GlobalTag import GlobalTag -process.GlobalTag = GlobalTag(process.GlobalTag, 'auto:phase2_realistic_T25', '') +process.GlobalTag = GlobalTag(process.GlobalTag, _PH2_GLOBAL_TAG, '') process.load("RecoTracker.TkNavigation.NavigationSchoolESProducer_cff") #process.MessageLogger = cms.Service("MessageLogger", diff --git a/Validation/Geometry/test/genHGCalPlots.sh b/Validation/Geometry/test/genHGCalPlots.sh index 814313b72e149..a1dea3056e2b1 100755 --- a/Validation/Geometry/test/genHGCalPlots.sh +++ b/Validation/Geometry/test/genHGCalPlots.sh @@ -1,6 +1,6 @@ #!/bin/bash -ex -geom=Extended2026D110 +geom=ExtendedRun4D110 VGEO_DIR=${CMSSW_BASE}/src/Validation/Geometry/test TEST_DIR=.