Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Phase2-hgx361B Update some of the test scripts in Validation/HGCalValidation/test/python using a new tool which finds the right ERA and Global Tag #47098

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 12 additions & 4 deletions Validation/HGCalValidation/test/python/runHFNoseDigiStudy_cfg.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,25 @@
import FWCore.ParameterSet.Config as cms

from Configuration.Eras.Era_Phase2C20I13M9_cff import Phase2C20I13M9
process = cms.Process('PROD',Phase2C20I13M9)
geomName = "Run4D115"
geomFile = "Configuration.Geometry.GeometryExtended" + geomName + "Reco_cff"
import Configuration.Geometry.defaultPhase2ConditionsEra_cff as _settings
GLOBAL_TAG, ERA = _settings.get_era_and_conditions(geomName)
print("Geometry Name: ", geomName)
print("Geom file Name: ", geomFile)
print("Global Tag Name: ", GLOBAL_TAG)
print("Era Name: ", ERA)

process = cms.Process('HFNoseDigiStudy',ERA)

process.load("SimGeneral.HepPDTESSource.pythiapdt_cfi")
process.load('Configuration.Geometry.GeometryExtendedRun4D115Reco_cff')
process.load(geomFile)
process.load("Configuration.StandardSequences.MagneticField_cff")
process.load('FWCore.MessageService.MessageLogger_cfi')
process.load('Configuration.StandardSequences.RawToDigi_cff')
process.load('Validation.HGCalValidation.hfnoseDigiStudy_cfi')
process.load("Configuration.StandardSequences.FrontierConditions_GlobalTag_cff")
from Configuration.AlCa.GlobalTag import GlobalTag
process.GlobalTag = GlobalTag(process.GlobalTag, 'auto:phase2_realistic_T33', '')
process.GlobalTag = GlobalTag(process.GlobalTag, GLOBAL_TAG, '')

if hasattr(process,'MessageLogger'):
process.MessageLogger.HGCalValidation=dict()
Expand Down
18 changes: 13 additions & 5 deletions Validation/HGCalValidation/test/python/runHFNoseRecHitStudy_cfg.py
Original file line number Diff line number Diff line change
@@ -1,18 +1,26 @@
import FWCore.ParameterSet.Config as cms
import FWCore.Utilities.FileUtils as FileUtils

from Configuration.Eras.Era_Phase2C20I13M9_cff import Phase2C20I13M9
process = cms.Process('PROD',Phase2C20I13M9)

process.load('Configuration.Geometry.GeometryExtendedRun4D115Reco_cff')
geomName = "Run4D115"
geomFile = "Configuration.Geometry.GeometryExtended" + geomName + "Reco_cff"
import Configuration.Geometry.defaultPhase2ConditionsEra_cff as _settings
GLOBAL_TAG, ERA = _settings.get_era_and_conditions(geomName)
print("Geometry Name: ", geomName)
print("Geom file Name: ", geomFile)
print("Global Tag Name: ", GLOBAL_TAG)
print("Era Name: ", ERA)

process = cms.Process('HFNoseRecHitStudy',ERA)

process.load(geomFile)
process.load("SimGeneral.HepPDTESSource.pythiapdt_cfi")
process.load('Configuration.StandardSequences.MagneticField_cff')
process.load('Configuration.StandardSequences.Services_cff')
process.load('FWCore.MessageService.MessageLogger_cfi')
process.load('Configuration.EventContent.EventContent_cff')
process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff')
from Configuration.AlCa.GlobalTag import GlobalTag
process.GlobalTag = GlobalTag(process.GlobalTag, 'auto:phase2_realistic_T33', '')
process.GlobalTag = GlobalTag(process.GlobalTag, GLOBAL_TAG, '')

process.MessageLogger.cerr.FwkReport.reportEvery = 2
if 'MessageLogger' in process.__dict__:
Expand Down
16 changes: 12 additions & 4 deletions Validation/HGCalValidation/test/python/runHFNoseSimHitStudy_cfg.py
Original file line number Diff line number Diff line change
@@ -1,18 +1,26 @@
import FWCore.ParameterSet.Config as cms

from Configuration.Eras.Era_Phase2C20I13M9_cff import Phase2C20I13M9
process = cms.Process('PROD',Phase2C20I13M9)
geomName = "Run4D115"
geomFile = "Configuration.Geometry.GeometryExtended" + geomName + "Reco_cff"
import Configuration.Geometry.defaultPhase2ConditionsEra_cff as _settings
GLOBAL_TAG, ERA = _settings.get_era_and_conditions(geomName)
print("Geometry Name: ", geomName)
print("Geom file Name: ", geomFile)
print("Global Tag Name: ", GLOBAL_TAG)
print("Era Name: ", ERA)

process = cms.Process('HFNoseSimHitStudy',ERA)

process.load("SimGeneral.HepPDTESSource.pythiapdt_cfi")
process.load("IOMC.EventVertexGenerators.VtxSmearedGauss_cfi")
process.load('Configuration.Geometry.GeometryExtendedRun4D115_cff')
process.load(geomFile)
process.load("Configuration.StandardSequences.MagneticField_cff")
process.load("Configuration.EventContent.EventContent_cff")
process.load('FWCore.MessageService.MessageLogger_cfi')
process.load('Validation.HGCalValidation.hfnoseSimHitStudy_cfi')
process.load("Configuration.StandardSequences.FrontierConditions_GlobalTag_cff")
from Configuration.AlCa.GlobalTag import GlobalTag
process.GlobalTag = GlobalTag(process.GlobalTag, 'auto:phase2_realistic_T33', '')
process.GlobalTag = GlobalTag(process.GlobalTag, GLOBAL_TAG, '')

if hasattr(process,'MessageLogger'):
process.MessageLogger.HGCalValidation=dict()
Expand Down
40 changes: 12 additions & 28 deletions Validation/HGCalValidation/test/python/runHGCGeomCheck_cfg.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,36 +26,20 @@

####################################################################
# Use the options
if (options.geometry == "D115"):
from Configuration.Eras.Era_Phase2C20I13M9_cff import Phase2C20I13M9
process = cms.Process('GeomCheck',Phase2C20I13M9)
elif (options.geometry == "D104"):
from Configuration.Eras.Era_Phase2C22I13M9_cff import Phase2C22I13M9
process = cms.Process('GeomCheck',PhaseC22I13M9)
elif (options.geometry == "D106"):
from Configuration.Eras.Era_Phase2C22I13M9_cff import Phase2C22I13M9
process = cms.Process('GeomCheck',PhaseC22I13M9)
elif (options.geometry == "D109"):
from Configuration.Eras.Era_Phase2C22I13M9_cff import Phase2C22I13M9
process = cms.Process('GeomCheck',PhaseC22I13M9)
elif (options.geometry == "D111"):
from Configuration.Eras.Era_Phase2C22I13M9_cff import Phase2C22I13M9
process = cms.Process('GeomCheck',PhaseC22I13M9)
elif (options.geometry == "D112"):
from Configuration.Eras.Era_Phase2C22I13M9_cff import Phase2C22I13M9
process = cms.Process('GeomCheck',PhaseC22I13M9)
elif (options.geometry == "D113"):
from Configuration.Eras.Era_Phase2C22I13M9_cff import Phase2C22I13M9
process = cms.Process('GeomCheck',PhaseC22I13M9)
else:
from Configuration.Eras.Era_Phase2C17I13M9_cff import Phase2C17I13M9
process = cms.Process('GeomCheck',Phase2C17I13M9)

geomFile = "Configuration.Geometry.GeometryExtendedRun4" + options.geometry + "Reco_cff"
geomName = "Run4" + options.geometry
geomFile = "Configuration.Geometry.GeometryExtended" + geomName + "Reco_cff"
import Configuration.Geometry.defaultPhase2ConditionsEra_cff as _settings
GLOBAL_TAG, ERA = _settings.get_era_and_conditions(geomName)
print("Geometry Name: ", geomName)
print("Geom file Name: ", geomFile)
print("Global Tag Name: ", GLOBAL_TAG)
print("Era Name: ", ERA)

process = cms.Process('GeomCheck',ERA)

inFile = "file:testHGCalSimWatcher" + options.geometry + ".root"
outFile = "hgcGeomCheck" + options.geometry + ".root"

print("Geometry file: ", geomFile)
print("Input file: ", inFile)
print("Output file: ", outFile)

Expand All @@ -67,7 +51,7 @@
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_T21', '')
process.GlobalTag = GlobalTag(process.GlobalTag, GLOBAL_TAG, '')

process.MessageLogger.cerr.FwkReport.reportEvery = 5
if hasattr(process,'MessageLogger'):
Expand Down
41 changes: 13 additions & 28 deletions Validation/HGCalValidation/test/python/runHGCHitAnalyzer_cfg.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,36 +26,21 @@

####################################################################
# Use the options
if (options.geometry == "D115"):
from Configuration.Eras.Era_Phase2C20I13M9_cff import Phase2C20I13M9
process = cms.Process('HitAnalysis',Phase2C20I13M9)
elif (options.geometry == "D104"):
from Configuration.Eras.Era_Phase2C22I13M9_cff import Phase2C22I13M9
process = cms.Process('HitAnalysis',PhaseC22I13M9)
elif (options.geometry == "D106"):
from Configuration.Eras.Era_Phase2C22I13M9_cff import Phase2C22I13M9
process = cms.Process('HitAnalysis',PhaseC22I13M9)
elif (options.geometry == "D109"):
from Configuration.Eras.Era_Phase2C22I13M9_cff import Phase2C22I13M9
process = cms.Process('HitAnalysis',PhaseC22I13M9)
elif (options.geometry == "D111"):
from Configuration.Eras.Era_Phase2C22I13M9_cff import Phase2C22I13M9
process = cms.Process('HitAnalysis',PhaseC22I13M9)
elif (options.geometry == "D112"):
from Configuration.Eras.Era_Phase2C22I13M9_cff import Phase2C22I13M9
process = cms.Process('HitAnalysis',PhaseC22I13M9)
elif (options.geometry == "D113"):
from Configuration.Eras.Era_Phase2C22I13M9_cff import Phase2C22I13M9
process = cms.Process('HitAnalysis',PhaseC22I13M9)
else:
from Configuration.Eras.Era_Phase2C17I13M9_cff import Phase2C17I13M9
process = cms.Process('HitAnalysis',Phase2C17I13M9)

geomFile = "Configuration.Geometry.GeometryExtendedRun4" + options.geometry + "Reco_cff"

geomName = "Run4" + options.geometry
geomFile = "Configuration.Geometry.GeometryExtended" + geomName + "Reco_cff"
import Configuration.Geometry.defaultPhase2ConditionsEra_cff as _settings
GLOBAL_TAG, ERA = _settings.get_era_and_conditions(geomName)
print("Geometry Name: ", geomName)
print("Geom file Name: ", geomFile)
print("Global Tag Name: ", GLOBAL_TAG)
print("Era Name: ", ERA)

process = cms.Process('HitAnalysis',ERA)

inFile = "file:step3" + options.geometry + ".root"
outFile = "relValTTbar" + options.geometry + ".root"

print("Geometry file: ", geomFile)
print("Input file: ", inFile)
print("Output file: ", outFile)

Expand All @@ -69,7 +54,7 @@
process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff')

from Configuration.AlCa.GlobalTag import GlobalTag
process.GlobalTag = GlobalTag(process.GlobalTag, 'auto:phase2_realistic_T21', '')
process.GlobalTag = GlobalTag(process.GlobalTag, GLOBAL_TAG, '')
process.MessageLogger.cerr.FwkReport.reportEvery = 10

#
Expand Down
38 changes: 11 additions & 27 deletions Validation/HGCalValidation/test/python/runHGCMissingRecHit_cfg.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,36 +26,20 @@

####################################################################
# Use the options
if (options.geometry == "D115"):
from Configuration.Eras.Era_Phase2C20I13M9_cff import Phase2C20I13M9
process = cms.Process('HGCMissingHits',Phase2C20I13M9)
elif (options.geometry == "D104"):
from Configuration.Eras.Era_Phase2C22I13M9_cff import Phase2C22I13M9
process = cms.Process('HGCMissingHits',PhaseC22I13M9)
elif (options.geometry == "D106"):
from Configuration.Eras.Era_Phase2C22I13M9_cff import Phase2C22I13M9
process = cms.Process('HGCMissingHits',PhaseC22I13M9)
elif (options.geometry == "D109"):
from Configuration.Eras.Era_Phase2C22I13M9_cff import Phase2C22I13M9
process = cms.Process('HGCMissingHits',PhaseC22I13M9)
elif (options.geometry == "D111"):
from Configuration.Eras.Era_Phase2C22I13M9_cff import Phase2C22I13M9
process = cms.Process('HGCMissingHits',PhaseC22I13M9)
elif (options.geometry == "D112"):
from Configuration.Eras.Era_Phase2C22I13M9_cff import Phase2C22I13M9
process = cms.Process('HGCMissingHits',PhaseC22I13M9)
elif (options.geometry == "D113"):
from Configuration.Eras.Era_Phase2C22I13M9_cff import Phase2C22I13M9
process = cms.Process('HGCMissingHits',PhaseC22I13M9)
else:
from Configuration.Eras.Era_Phase2C17I13M9_cff import Phase2C17I13M9
process = cms.Process('HGCMissingHits',Phase2C17I13M9)
geomName = "Run4" + options.geometry
geomFile = "Configuration.Geometry.GeometryExtended" + geomName + "Reco_cff"
import Configuration.Geometry.defaultPhase2ConditionsEra_cff as _settings
GLOBAL_TAG, ERA = _settings.get_era_and_conditions(geomName)
print("Geometry Name: ", geomName)
print("Geom file Name: ", geomFile)
print("Global Tag Name: ", GLOBAL_TAG)
print("Era Name: ", ERA)

process = cms.Process('HGCMissingHits',ERA)

geomFile = "Configuration.Geometry.GeometryExtendedRun4" + options.geometry + "Reco_cff"
inFile = "file:step3" + options.geometry + ".root"
outFile = "missedRecHit" + options.geometry + ".root"

print("Geometry file: ", geomFile)
print("Input file: ", inFile)
print("Output file: ", outFile)

Expand All @@ -68,7 +52,7 @@
process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff')

from Configuration.AlCa.GlobalTag import GlobalTag
process.GlobalTag = GlobalTag(process.GlobalTag, 'auto:phase2_realistic_T21', '')
process.GlobalTag = GlobalTag(process.GlobalTag, GLOBAL_TAG, '')
process.MessageLogger.cerr.FwkReport.reportEvery = 1
if hasattr(process,'MessageLogger'):
process.MessageLogger.HGCalMiss=dict()
Expand Down
38 changes: 11 additions & 27 deletions Validation/HGCalValidation/test/python/runHGCalDigiStudy_cfg.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,36 +26,20 @@

####################################################################
# Use the options
if (options.geometry == "D115"):
from Configuration.Eras.Era_Phase2C20I13M9_cff import Phase2C20I13M9
process = cms.Process('DigiStudy',Phase2C20I13M9)
elif (options.geometry == "D104"):
from Configuration.Eras.Era_Phase2C22I13M9_cff import Phase2C22I13M9
process = cms.Process('DigiStudy',PhaseC22I13M9)
elif (options.geometry == "D106"):
from Configuration.Eras.Era_Phase2C22I13M9_cff import Phase2C22I13M9
process = cms.Process('DigiStudy',PhaseC22I13M9)
elif (options.geometry == "D109"):
from Configuration.Eras.Era_Phase2C22I13M9_cff import Phase2C22I13M9
process = cms.Process('DigiStudy',PhaseC22I13M9)
elif (options.geometry == "D111"):
from Configuration.Eras.Era_Phase2C22I13M9_cff import Phase2C22I13M9
process = cms.Process('DigiStudy',PhaseC22I13M9)
elif (options.geometry == "D112"):
from Configuration.Eras.Era_Phase2C22I13M9_cff import Phase2C22I13M9
process = cms.Process('DigiStudy',PhaseC22I13M9)
elif (options.geometry == "D113"):
from Configuration.Eras.Era_Phase2C22I13M9_cff import Phase2C22I13M9
process = cms.Process('DigiStudy',PhaseC22I13M9)
else:
from Configuration.Eras.Era_Phase2C17I13M9_cff import Phase2C17I13M9
process = cms.Process('DigiStudy',Phase2C17I13M9)
geomName = "Run4" + options.geometry
geomFile = "Configuration.Geometry.GeometryExtended" + geomName + "Reco_cff"
import Configuration.Geometry.defaultPhase2ConditionsEra_cff as _settings
GLOBAL_TAG, ERA = _settings.get_era_and_conditions(geomName)
print("Geometry Name: ", geomName)
print("Geom file Name: ", geomFile)
print("Global Tag Name: ", GLOBAL_TAG)
print("Era Name: ", ERA)

process = cms.Process('DigiStudy',ERA)

geomFile = "Configuration.Geometry.GeometryExtendedRun4" + options.geometry + "Reco_cff"
fileInput = "file:step2" + options.geometry + "tt.root"
fileName = "hgcDigi" + options.geometry + "tt.root"

print("Geometry file: ", geomFile)
print("Input file: ", fileInput)
print("Output file: ", fileName)

Expand All @@ -67,7 +51,7 @@
process.load('Validation.HGCalValidation.hgcDigiStudy_cfi')
process.load("Configuration.StandardSequences.FrontierConditions_GlobalTag_cff")
from Configuration.AlCa.GlobalTag import GlobalTag
process.GlobalTag = GlobalTag(process.GlobalTag, 'auto:phase2_realistic_T21', '')
process.GlobalTag = GlobalTag(process.GlobalTag, GLOBAL_TAG, '')

process.source = cms.Source("PoolSource",
fileNames = cms.untracked.vstring(fileInput) )
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,36 +27,20 @@

####################################################################
# Use the options
if (options.geometry == "D115"):
from Configuration.Eras.Era_Phase2C20I13M9_cff import Phase2C20I13M9
process = cms.Process('HitCalibration',Phase2C20I13M9)
elif (options.geometry == "D104"):
from Configuration.Eras.Era_Phase2C22I13M9_cff import Phase2C22I13M9
process = cms.Process('HitCalibration',PhaseC22I13M9)
elif (options.geometry == "D106"):
from Configuration.Eras.Era_Phase2C22I13M9_cff import Phase2C22I13M9
process = cms.Process('HitCalibration',PhaseC22I13M9)
elif (options.geometry == "D109"):
from Configuration.Eras.Era_Phase2C22I13M9_cff import Phase2C22I13M9
process = cms.Process('HitCalibration',PhaseC22I13M9)
elif (options.geometry == "D111"):
from Configuration.Eras.Era_Phase2C22I13M9_cff import Phase2C22I13M9
process = cms.Process('HitCalibration',PhaseC22I13M9)
elif (options.geometry == "D112"):
from Configuration.Eras.Era_Phase2C22I13M9_cff import Phase2C22I13M9
process = cms.Process('HitCalibration',PhaseC22I13M9)
elif (options.geometry == "D113"):
from Configuration.Eras.Era_Phase2C22I13M9_cff import Phase2C22I13M9
process = cms.Process('HitCalibration',PhaseC22I13M9)
else:
from Configuration.Eras.Era_Phase2C17I13M9_cff import Phase2C17I13M9
process = cms.Process('HitCalibration',Phase2C17I13M9)

geomFile = "Configuration.Geometry.GeometryExtendedRun4" + options.geometry + "Reco_cff"

geomName = "Run4" + options.geometry
geomFile = "Configuration.Geometry.GeometryExtended" + geomName + "Reco_cff"
import Configuration.Geometry.defaultPhase2ConditionsEra_cff as _settings
GLOBAL_TAG, ERA = _settings.get_era_and_conditions(geomName)
print("Geometry Name: ", geomName)
print("Geom file Name: ", geomFile)
print("Global Tag Name: ", GLOBAL_TAG)
print("Era Name: ", ERA)

process = cms.Process('HitCalibration',ERA)

fileInput = "file:step3" + options.geometry + "tt.root"
fileName = "relVal" + options.geometry + "tt.root"

print("Geometry file: ", geomFile)
print("Input file: ", fileInput)
print("Output file: ", fileName)

Expand All @@ -68,8 +52,7 @@
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_T21', '')
process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff')
process.GlobalTag = GlobalTag(process.GlobalTag, GLOBAL_TAG, '')

process.MessageLogger.cerr.FwkReport.reportEvery = 100

Expand Down
Loading