Skip to content

Commit b62a94d

Browse files
authored
Merge pull request #45789 from bsunanda/Phase2-hgx359R
Phase2-hgx359R Modify the testing code in Geometry/HGCalGeometry in view of changes made in the Configuration/Geometry area for Phase2 scenarios
2 parents 95d44f8 + afff6bb commit b62a94d

11 files changed

+117
-134
lines changed

Geometry/HGCalGeometry/test/python/hgcGeomAnalyzer_cfg.py

Lines changed: 26 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,45 @@
1+
###############################################################################
2+
# Way to use this:
3+
# cmsRun hgcGeomAnalyzer_cfg.py geom=v17
4+
#
5+
# Options for geometry v16, v17, v18
6+
#
7+
###############################################################################
18
import FWCore.ParameterSet.Config as cms
29
from FWCore.ParameterSet.VarParsing import VarParsing
310
from Configuration.StandardSequences.Eras import eras
411
from Configuration.Eras.Era_Phase2C17I13M9_cff import Phase2C17I13M9
512

613
options = VarParsing()
7-
options.register ("geom", "", VarParsing.multiplicity.singleton, VarParsing.varType.string)
8-
options.parseArguments()
14+
options.register ("geom",
15+
"v17",
16+
VarParsing.multiplicity.singleton, VarParsing.varType.string,
17+
"geom of operations: v16, v17, v18")
918

10-
fileName = "geom_output_"+options.geom
19+
options.parseArguments()
1120

1221
process = cms.Process("demo",eras.Phase2C17I13M9)
1322

1423
process.load("Configuration.StandardSequences.FrontierConditions_GlobalTag_cff")
1524
if options.geom == 'v16':
16-
process.load('Configuration.Geometry.GeometryExtended2026D88Reco_cff')
25+
geomFile = 'Configuration.Geometry.GeometryExtended2026D100Reco_cff'
1726
elif options.geom == 'v17':
18-
process.load('Configuration.Geometry.GeometryExtended2026D92Reco_cff')
27+
geomFile = 'Configuration.Geometry.GeometryExtended2026D110Reco_cff'
28+
elif options.geom == 'v18':
29+
geomFile = 'Configuration.Geometry.GeometryExtended2026D104Reco_cff'
1930
else:
20-
raise Exception('UNKNOWN GEOMETRY!')
31+
geomFile = 'UNKNOWN GEOMETRY!'
32+
raise Exception(geomFile)
33+
34+
fileName = "geom_output_"+options.geom
35+
36+
print("Geometry file: ", geomFile)
37+
print("Output file: ", fileName)
2138

39+
process.load(geomFile)
40+
2241
from Configuration.AlCa.GlobalTag import GlobalTag
23-
process.GlobalTag = GlobalTag(process.GlobalTag, 'auto:phase2_realistic', '')
42+
process.GlobalTag = GlobalTag(process.GlobalTag, 'auto:phase2_realistic_T25', '')
2443

2544
process.load('FWCore.MessageService.MessageLogger_cfi')
2645
if hasattr(process,'MessageLogger'):

Geometry/HGCalGeometry/test/python/runCaloCellGeometryTest_cfg.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44

55
process = cms.Process("CaloCellGeometryTest",Phase2C17I13M9)
66

7-
process.load("Configuration.Geometry.GeometryExtended2026D92_cff")
8-
process.load("Configuration.Geometry.GeometryExtended2026D92Reco_cff")
7+
process.load("Configuration.Geometry.GeometryExtended2026D110_cff")
8+
process.load("Configuration.Geometry.GeometryExtended2026D110Reco_cff")
99
process.load('FWCore.MessageService.MessageLogger_cfi')
1010

1111
if hasattr(process,'MessageLogger'):

Geometry/HGCalGeometry/test/python/testHGCalCellDumpDDD_cfg.py

Lines changed: 12 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
###############################################################################
22
# Way to use this:
3-
# cmsRun testHGCalCellDumpDDD_cfg.py geometry=D86
3+
# cmsRun testHGCalCellDumpDDD_cfg.py geometry=D110
44
#
5-
# Options for geometry D86, D88, D92, D93
5+
# Options for geometry D95, D96, D98, D99, D100, D101, D102, D103, D104, D105,
6+
# D106, D107, D108, D109, D110, D111, D112, D113, D114
67
#
78
###############################################################################
89
import FWCore.ParameterSet.Config as cms
@@ -13,36 +14,27 @@
1314
### SETUP OPTIONS
1415
options = VarParsing.VarParsing('standard')
1516
options.register('geometry',
16-
"D86",
17+
"D110",
1718
VarParsing.VarParsing.multiplicity.singleton,
1819
VarParsing.VarParsing.varType.string,
19-
"geometry of operations: D86, D88, D92, D93")
20+
"geometry of operations: D95, D96, D98, D99, D100, D101, D102, D103, D104, D105, D106, D107, D108, D109, D110, D111, D112, D113, D114")
2021

2122
### get and parse the command line arguments
2223
options.parseArguments()
2324

2425
print(options)
2526

27+
2628
####################################################################
2729
# Use the options
2830

29-
if (options.geometry == "D88"):
30-
from Configuration.Eras.Era_Phase2C17I13M9_cff import Phase2C17I13M9
31-
process = cms.Process('PROD',Phase2C17I13M9)
32-
process.load('Configuration.Geometry.GeometryExtended2026D88Reco_cff')
33-
elif (options.geometry == "D92"):
34-
from Configuration.Eras.Era_Phase2C17I13M9_cff import Phase2C17I13M9
35-
process = cms.Process('PROD',Phase2C17I13M9)
36-
process.load('Configuration.Geometry.GeometryExtended2026D92Reco_cff')
37-
elif (options.geometry == "D93"):
38-
from Configuration.Eras.Era_Phase2C17I13M9_cff import Phase2C17I13M9
39-
process = cms.Process('PROD',Phase2C17I13M9)
40-
process.load('Configuration.Geometry.GeometryExtended2026D93Reco_cff')
41-
else:
42-
from Configuration.Eras.Era_Phase2C17I13M9_cff import Phase2C17I13M9
43-
process = cms.Process('PROD',Phase2C17I13M9)
44-
process.load('Configuration.Geometry.GeometryExtended2026D86Reco_cff')
31+
from Configuration.Eras.Era_Phase2C17I13M9_cff import Phase2C17I13M9
32+
process = cms.Process('PROD',Phase2C17I13M9)
33+
34+
geomFile = "Configuration.Geometry.GeometryExtended2026" + options.geometry + "Reco_cff"
35+
print("Geometry file: ", geomFile)
4536

37+
process.load(geomFile)
4638
process.load("Geometry.HGCalGeometry.hgcalGeometryDump_cfi")
4739
process.load('FWCore.MessageService.MessageLogger_cfi')
4840

Geometry/HGCalGeometry/test/python/testHGCalCorner_cfg.py

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
###############################################################################
22
# Way to use this:
3-
# cmsRun testHGCalCorner_cfg.py geometry=D88
3+
# cmsRun testHGCalCorner_cfg.py geometry=D110
44
#
5-
# Options for type D88, D92, D93
5+
# Options for geometry D95, D96, D98, D99, D100, D101, D102, D103, D104, D105,
6+
# D106, D107, D108, D109, D110, D111, D112, D113, D114
67
#
78
###############################################################################
89
import FWCore.ParameterSet.Config as cms
@@ -13,10 +14,11 @@
1314
### SETUP OPTIONS
1415
options = VarParsing.VarParsing('standard')
1516
options.register('geometry',
16-
"D92",
17+
"D110",
1718
VarParsing.VarParsing.multiplicity.singleton,
1819
VarParsing.VarParsing.varType.string,
19-
"type of operations: D88, D92, D93")
20+
"geometry of operations: D95, D96, D98, D99, D100, D101, D102, D103, D104, D105, D106, D107, D108, D109, D110, D111, D112, D113, D114")
21+
2022

2123
### get and parse the command line arguments
2224
options.parseArguments()
@@ -27,13 +29,10 @@
2729

2830
####################################################################
2931
# Use the options
30-
if (options.geometry == "D88"):
31-
process.load('Configuration.Geometry.GeometryExtended2026D88Reco_cff')
32-
elif (options.geometry == "D93"):
33-
process.load('Configuration.Geometry.GeometryExtended2026D93Reco_cff')
34-
else:
35-
process.load('Configuration.Geometry.GeometryExtended2026D92Reco_cff')
32+
geomFile = "Configuration.Geometry.GeometryExtended2026" + options.geometry + "Reco_cff"
33+
print("Geometry file: ", geomFile)
3634

35+
process.load(geomFile)
3736
process.load("SimGeneral.HepPDTESSource.pdt_cfi")
3837
process.load('FWCore.MessageService.MessageLogger_cfi')
3938

Geometry/HGCalGeometry/test/python/testHGCalGeomLocatorSc_cfg.py

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
###############################################################################
22
# Way to use this:
3-
# cmsRun testHGCalGeomLocatorSc_cfg.py geometry=D88
3+
# cmsRun testHGCalGeomLocatorSc_cfg.py geometry=D110
44
#
5-
# Options for type D88, D92, D93
5+
# Options for geometry D95, D96, D98, D99, D100, D101, D102, D103, D104, D105,
6+
# D106, D107, D108, D109, D110, D111, D112, D113, D114
67
#
78
###############################################################################
89
import FWCore.ParameterSet.Config as cms
@@ -13,10 +14,10 @@
1314
### SETUP OPTIONS
1415
options = VarParsing.VarParsing('standard')
1516
options.register('geometry',
16-
"D92",
17+
"D110",
1718
VarParsing.VarParsing.multiplicity.singleton,
1819
VarParsing.VarParsing.varType.string,
19-
"type of operations: D88, D92, D93")
20+
"geometry of operations: D95, D96, D98, D99, D100, D101, D102, D103, D104, D105, D106, D107, D108, D109, D110, D111, D112, D113, D114")
2021

2122
### get and parse the command line arguments
2223
options.parseArguments()
@@ -27,12 +28,9 @@
2728

2829
####################################################################
2930
# Use the options
30-
if (options.geometry == "D88"):
31-
process.load('Configuration.Geometry.GeometryExtended2026D88Reco_cff')
32-
elif (options.geometry == "D93"):
33-
process.load('Configuration.Geometry.GeometryExtended2026D93Reco_cff')
34-
else:
35-
process.load('Configuration.Geometry.GeometryExtended2026D92Reco_cff')
31+
geomFile = "Configuration.Geometry.GeometryExtended2026" + options.geometry + "Reco_cff"
32+
print("Geometry file: ", geomFile)
33+
process.load(geomFile)
3634

3735
process.load("SimGeneral.HepPDTESSource.pdt_cfi")
3836
process.load('FWCore.MessageService.MessageLogger_cfi')

Geometry/HGCalGeometry/test/python/testHGCalGeomLocator_cfg.py

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
###############################################################################
22
# Way to use this:
3-
# cmsRun testHGCalGeomLocator_cfg.py geometry=D88
3+
# cmsRun testHGCalGeomLocator_cfg.py geometry=D110
44
#
5-
# Options for type D88, D92, D93
5+
# Options for geometry D95, D96, D98, D99, D100, D101, D102, D103, D104, D105,
6+
# D106, D107, D108, D109, D110, D111, D112, D113, D114
67
#
78
###############################################################################
89
import FWCore.ParameterSet.Config as cms
@@ -13,10 +14,10 @@
1314
### SETUP OPTIONS
1415
options = VarParsing.VarParsing('standard')
1516
options.register('geometry',
16-
"D92",
17+
"D110",
1718
VarParsing.VarParsing.multiplicity.singleton,
1819
VarParsing.VarParsing.varType.string,
19-
"type of operations: D88, D92, D93")
20+
"geometry of operations: D95, D96, D98, D99, D100, D101, D102, D103, D104, D105, D106, D107, D108, D109, D110, D111, D112, D113, D114")
2021

2122
### get and parse the command line arguments
2223
options.parseArguments()
@@ -27,13 +28,10 @@
2728

2829
####################################################################
2930
# Use the options
30-
if (options.geometry == "D88"):
31-
process.load('Configuration.Geometry.GeometryExtended2026D88Reco_cff')
32-
elif (options.geometry == "D93"):
33-
process.load('Configuration.Geometry.GeometryExtended2026D93Reco_cff')
34-
else:
35-
process.load('Configuration.Geometry.GeometryExtended2026D92Reco_cff')
31+
geomFile = "Configuration.Geometry.GeometryExtended2026" + options.geometry + "Reco_cff"
32+
print("Geometry file: ", geomFile)
3633

34+
process.load(geomFile)
3735
process.load("SimGeneral.HepPDTESSource.pdt_cfi")
3836
process.load('FWCore.MessageService.MessageLogger_cfi')
3937

Geometry/HGCalGeometry/test/python/testHGCalGeometryCheck_cfg.py

Lines changed: 14 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
###############################################################################
22
# Way to use this:
3-
# cmsRun testHGCalGeometryCheck_cfg.py geometry=D88
3+
# cmsRun testHGCalGeometryCheck_cfg.py geometry=D110
44
#
5-
# Options for geometry D88, D92, D93
5+
# Options for geometry D95, D96, D98, D99, D100, D101, D102, D103, D104, D105,
6+
# D106, D107, D108, D109, D110, D111, D112, D113, D114
67
#
78
###############################################################################
89
import FWCore.ParameterSet.Config as cms
@@ -13,10 +14,10 @@
1314
### SETUP OPTIONS
1415
options = VarParsing.VarParsing('standard')
1516
options.register('geometry',
16-
"D88",
17+
"D110",
1718
VarParsing.VarParsing.multiplicity.singleton,
1819
VarParsing.VarParsing.varType.string,
19-
"geometry of operations: D88, D92, D93")
20+
"geometry of operations: D95, D96, D98, D99, D100, D101, D102, D103, D104, D105, D106, D107, D108, D109, D110, D111, D112, D113, D114")
2021

2122
### get and parse the command line arguments
2223
options.parseArguments()
@@ -26,24 +27,16 @@
2627
####################################################################
2728
# Use the options
2829

29-
if (options.geometry == "D93"):
30-
from Configuration.Eras.Era_Phase2C17I13M9_cff import Phase2C17I13M9
31-
process = cms.Process('HGCGeomCheck',Phase2C17I13M9)
32-
process.load('Configuration.Geometry.GeometryExtended2026D93Reco_cff')
33-
fileName = 'HGCGeomStudyV17n.root'
34-
elif (options.geometry == "D92"):
35-
from Configuration.Eras.Era_Phase2C17I13M9_cff import Phase2C17I13M9
36-
process = cms.Process('HGCGeomCheck',Phase2C17I13M9)
37-
process.load('Configuration.Geometry.GeometryExtended2026D92Reco_cff')
38-
fileName = 'HGCGeomStudyV17.root'
39-
else:
40-
from Configuration.Eras.Era_Phase2C17I13M9_cff import Phase2C17I13M9
41-
process = cms.Process('HGCGeomCheck',Phase2C17I13M9)
42-
process.load('Configuration.Geometry.GeometryExtended2026D88Reco_cff')
43-
fileName = 'HGCGeomStudyV16.root'
44-
45-
print("Output file: ", fileName)
30+
geomFile = "Configuration.Geometry.GeometryExtended2026" + options.geometry + "Reco_cff"
31+
fileName = "HGCGeomStudy" + options.geometry + ".root"
4632

33+
from Configuration.Eras.Era_Phase2C17I13M9_cff import Phase2C17I13M9
34+
process = cms.Process('HGCGeomCheck',Phase2C17I13M9)
35+
36+
print("Geometry file: ", geomFile)
37+
print("Output file: ", fileName)
38+
39+
process.load(geomFile)
4740
process.load("SimGeneral.HepPDTESSource.pdt_cfi")
4841
process.load('Geometry.HGCalGeometry.hgcalGeometryCheck_cfi')
4942
process.load('FWCore.MessageService.MessageLogger_cfi')

Geometry/HGCalGeometry/test/python/testHGCalGeometryMouseBite_cfg.py

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
###############################################################################
22
# Way to use this:
3-
# cmsRun testHGCalGeometryMouseBite_cfg.py geometry=D88
3+
# cmsRun testHGCalGeometryMouseBite_cfg.py geometry=D110
44
#
5-
# Options for type D88, D92, D93, D94
5+
# Options for geometry D95, D96, D98, D99, D100, D101, D102, D103, D104, D105,
6+
# D106, D107, D108, D109, D110, D111, D112, D113, D114
67
#
78
###############################################################################
89
import FWCore.ParameterSet.Config as cms
@@ -13,10 +14,10 @@
1314
### SETUP OPTIONS
1415
options = VarParsing.VarParsing('standard')
1516
options.register('geometry',
16-
"D92",
17+
"D110",
1718
VarParsing.VarParsing.multiplicity.singleton,
1819
VarParsing.VarParsing.varType.string,
19-
"type of operations: D88, D92, D93, D94")
20+
"geometry of operations: D95, D96, D98, D99, D100, D101, D102, D103, D104, D105, D106, D107, D108, D109, D110, D111, D112, D113, D114")
2021

2122
### get and parse the command line arguments
2223
options.parseArguments()
@@ -27,15 +28,10 @@
2728

2829
####################################################################
2930
# Use the options
30-
if (options.geometry == "D88"):
31-
process.load('Configuration.Geometry.GeometryExtended2026D88Reco_cff')
32-
elif (options.geometry == "D93"):
33-
process.load('Configuration.Geometry.GeometryExtended2026D93Reco_cff')
34-
elif (options.geometry == "D94"):
35-
process.load('Configuration.Geometry.GeometryExtended2026D94Reco_cff')
36-
else:
37-
process.load('Configuration.Geometry.GeometryExtended2026D92Reco_cff')
31+
geomFile = "Configuration.Geometry.GeometryExtended2026" + options.geometry + "Reco_cff"
32+
print("Geometry file: ", geomFile)
3833

34+
process.load(geomFile)
3935
process.load("SimGeneral.HepPDTESSource.pdt_cfi")
4036
process.load('FWCore.MessageService.MessageLogger_cfi')
4137

Geometry/HGCalGeometry/test/python/testHGCalGeometryNewCorners_cfg.py

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
###############################################################################
22
# Way to use this:
3-
# cmsRun testHGCalGeometryNewCorners_cfg.py geometry=D88
3+
# cmsRun testHGCalGeometryNewCorners_cfg.py geometry=D110
44
#
5-
# Options for type D88, D92, D93
5+
# Options for geometry D95, D96, D98, D99, D100, D101, D102, D103, D104, D105,
6+
# D106, D107, D108, D109, D110, D111, D112, D113, D114
67
#
78
###############################################################################
89
import FWCore.ParameterSet.Config as cms
@@ -13,10 +14,10 @@
1314
### SETUP OPTIONS
1415
options = VarParsing.VarParsing('standard')
1516
options.register('geometry',
16-
"D92",
17+
"D110",
1718
VarParsing.VarParsing.multiplicity.singleton,
1819
VarParsing.VarParsing.varType.string,
19-
"type of operations: D88, D92, D93")
20+
"geometry of operations: D95, D96, D98, D99, D100, D101, D102, D103, D104, D105, D106, D107, D108, D109, D110, D111, D112, D113, D114")
2021

2122
### get and parse the command line arguments
2223
options.parseArguments()
@@ -27,13 +28,10 @@
2728

2829
####################################################################
2930
# Use the options
30-
if (options.geometry == "D88"):
31-
process.load('Configuration.Geometry.GeometryExtended2026D88Reco_cff')
32-
elif (options.geometry == "D93"):
33-
process.load('Configuration.Geometry.GeometryExtended2026D93Reco_cff')
34-
else:
35-
process.load('Configuration.Geometry.GeometryExtended2026D92Reco_cff')
31+
geomFile = "Configuration.Geometry.GeometryExtended2026" + options.geometry + "Reco_cff"
32+
print("Geometry file: ", geomFile)
3633

34+
process.load(geomFile)
3735
process.load("SimGeneral.HepPDTESSource.pdt_cfi")
3836
process.load('Geometry.HGCalGeometry.hgcalGeometryNewCornersTest_cfi')
3937
process.load('FWCore.MessageService.MessageLogger_cfi')

0 commit comments

Comments
 (0)