Skip to content

Commit b3b4fd8

Browse files
authored
Merge pull request cms-sw#42254 from bsunanda/Phase2-hgx342A
Phase2-hgx342A Extend the muon tomography test code for dd4hep usage
2 parents 42b9d84 + 4893616 commit b3b4fd8

File tree

6 files changed

+254
-50
lines changed

6 files changed

+254
-50
lines changed
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
import FWCore.ParameterSet.Config as cms
2+
3+
# This config came from a copy of 2 files from Configuration/Geometry/python
4+
5+
from Configuration.Geometry.GeometryDD4hep_cff import *
6+
DDDetectorESProducer.confGeomXMLFiles = cms.FileInPath("Geometry/HGCalCommonData/data/dd4hep/testHGCalV17Shift.xml")
7+
8+
from Geometry.TrackerNumberingBuilder.trackerNumberingGeometry_cff import *
9+
from SLHCUpgradeSimulations.Geometry.fakePhase2OuterTrackerConditions_cff import *
10+
from Geometry.EcalCommonData.ecalSimulationParameters_cff import *
11+
from Geometry.HcalCommonData.hcalDDDSimConstants_cff import *
12+
from Geometry.HGCalCommonData.hgcalParametersInitialization_cfi import *
13+
from Geometry.HGCalCommonData.hgcalNumberingInitialization_cfi import *
14+
from Geometry.MuonNumbering.muonGeometryConstants_cff import *
15+
from Geometry.MuonNumbering.muonOffsetESProducer_cff import *
16+
from Geometry.MTDNumberingBuilder.mtdNumberingGeometry_cff import *
17+
18+
# tracker
19+
from Geometry.CommonTopologies.globalTrackingGeometry_cfi import *
20+
from RecoTracker.GeometryESProducer.TrackerRecoGeometryESProducer_cfi import *
21+
from Geometry.TrackerGeometryBuilder.trackerParameters_cff import *
22+
from Geometry.TrackerNumberingBuilder.trackerTopology_cfi import *
23+
from Geometry.TrackerGeometryBuilder.idealForDigiTrackerGeometry_cff import *
24+
trackerGeometry.applyAlignment = False
25+
26+
# calo
27+
from Geometry.CaloEventSetup.HGCalTopology_cfi import *
28+
from Geometry.HGCalGeometry.HGCalGeometryESProducer_cfi import *
29+
from Geometry.CaloEventSetup.CaloTopology_cfi import *
30+
from Geometry.CaloEventSetup.CaloGeometryBuilder_cfi import *
31+
CaloGeometryBuilder = cms.ESProducer("CaloGeometryBuilder",
32+
SelectedCalos = cms.vstring("HCAL",
33+
"ZDC",
34+
"EcalBarrel",
35+
"TOWER",
36+
"HGCalEESensitive",
37+
"HGCalHESiliconSensitive",
38+
"HGCalHEScintillatorSensitive"
39+
)
40+
)
41+
from Geometry.EcalAlgo.EcalBarrelGeometry_cfi import *
42+
from Geometry.HcalEventSetup.HcalGeometry_cfi import *
43+
from Geometry.HcalEventSetup.CaloTowerGeometry_cfi import *
44+
from Geometry.HcalEventSetup.CaloTowerTopology_cfi import *
45+
from Geometry.HcalCommonData.hcalDDDRecConstants_cfi import *
46+
from Geometry.HcalEventSetup.hcalTopologyIdeal_cfi import *
47+
from Geometry.CaloEventSetup.EcalTrigTowerConstituents_cfi import *
48+
from Geometry.EcalMapping.EcalMapping_cfi import *
49+
from Geometry.EcalMapping.EcalMappingRecord_cfi import *
50+
51+
# muon
52+
from Geometry.MuonNumbering.muonNumberingInitialization_cfi import *
53+
from RecoMuon.DetLayers.muonDetLayerGeometry_cfi import *
54+
from Geometry.GEMGeometryBuilder.gemGeometry_cff import *
55+
from Geometry.CSCGeometryBuilder.idealForDigiCscGeometry_cff import *
56+
from Geometry.DTGeometryBuilder.idealForDigiDtGeometry_cff import *
57+
58+
# forward
59+
from Geometry.ForwardGeometry.ForwardGeometry_cfi import *
60+
61+
# timing
62+
from RecoMTD.DetLayers.mtdDetLayerGeometry_cfi import *
63+
from Geometry.MTDGeometryBuilder.mtdParameters_cff import *
64+
from Geometry.MTDNumberingBuilder.mtdNumberingGeometry_cff import *
65+
from Geometry.MTDNumberingBuilder.mtdTopology_cfi import *
66+
from Geometry.MTDGeometryBuilder.mtdGeometry_cfi import *
67+
from Geometry.MTDGeometryBuilder.idealForDigiMTDGeometry_cff import *
68+
mtdGeometry.applyAlignment = False
69+
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
import FWCore.ParameterSet.Config as cms
2+
3+
# This config came from a copy of 2 files from Configuration/Geometry/python
4+
5+
from Configuration.Geometry.GeometryDD4hep_cff import *
6+
DDDetectorESProducer.confGeomXMLFiles = cms.FileInPath("Geometry/HGCalCommonData/data/dd4hep/testHGCalV18.xml")
7+
8+
from Geometry.TrackerNumberingBuilder.trackerNumberingGeometry_cff import *
9+
from SLHCUpgradeSimulations.Geometry.fakePhase2OuterTrackerConditions_cff import *
10+
from Geometry.EcalCommonData.ecalSimulationParameters_cff import *
11+
from Geometry.HcalCommonData.hcalDDDSimConstants_cff import *
12+
from Geometry.HGCalCommonData.hgcalParametersInitialization_cfi import *
13+
from Geometry.HGCalCommonData.hgcalNumberingInitialization_cfi import *
14+
from Geometry.MuonNumbering.muonGeometryConstants_cff import *
15+
from Geometry.MuonNumbering.muonOffsetESProducer_cff import *
16+
from Geometry.MTDNumberingBuilder.mtdNumberingGeometry_cff import *
17+
18+
# tracker
19+
from Geometry.CommonTopologies.globalTrackingGeometry_cfi import *
20+
from RecoTracker.GeometryESProducer.TrackerRecoGeometryESProducer_cfi import *
21+
from Geometry.TrackerGeometryBuilder.trackerParameters_cff import *
22+
from Geometry.TrackerNumberingBuilder.trackerTopology_cfi import *
23+
from Geometry.TrackerGeometryBuilder.idealForDigiTrackerGeometry_cff import *
24+
trackerGeometry.applyAlignment = False
25+
26+
# calo
27+
from Geometry.CaloEventSetup.HGCalTopology_cfi import *
28+
from Geometry.HGCalGeometry.HGCalGeometryESProducer_cfi import *
29+
from Geometry.CaloEventSetup.CaloTopology_cfi import *
30+
from Geometry.CaloEventSetup.CaloGeometryBuilder_cfi import *
31+
CaloGeometryBuilder = cms.ESProducer("CaloGeometryBuilder",
32+
SelectedCalos = cms.vstring("HCAL",
33+
"ZDC",
34+
"EcalBarrel",
35+
"TOWER",
36+
"HGCalEESensitive",
37+
"HGCalHESiliconSensitive",
38+
"HGCalHEScintillatorSensitive"
39+
)
40+
)
41+
from Geometry.EcalAlgo.EcalBarrelGeometry_cfi import *
42+
from Geometry.HcalEventSetup.HcalGeometry_cfi import *
43+
from Geometry.HcalEventSetup.CaloTowerGeometry_cfi import *
44+
from Geometry.HcalEventSetup.CaloTowerTopology_cfi import *
45+
from Geometry.HcalCommonData.hcalDDDRecConstants_cfi import *
46+
from Geometry.HcalEventSetup.hcalTopologyIdeal_cfi import *
47+
from Geometry.CaloEventSetup.EcalTrigTowerConstituents_cfi import *
48+
from Geometry.EcalMapping.EcalMapping_cfi import *
49+
from Geometry.EcalMapping.EcalMappingRecord_cfi import *
50+
51+
# muon
52+
from Geometry.MuonNumbering.muonNumberingInitialization_cfi import *
53+
from RecoMuon.DetLayers.muonDetLayerGeometry_cfi import *
54+
from Geometry.GEMGeometryBuilder.gemGeometry_cff import *
55+
from Geometry.CSCGeometryBuilder.idealForDigiCscGeometry_cff import *
56+
from Geometry.DTGeometryBuilder.idealForDigiDtGeometry_cff import *
57+
58+
# forward
59+
from Geometry.ForwardGeometry.ForwardGeometry_cfi import *
60+
61+
# timing
62+
from RecoMTD.DetLayers.mtdDetLayerGeometry_cfi import *
63+
from Geometry.MTDGeometryBuilder.mtdParameters_cff import *
64+
from Geometry.MTDNumberingBuilder.mtdNumberingGeometry_cff import *
65+
from Geometry.MTDNumberingBuilder.mtdTopology_cfi import *
66+
from Geometry.MTDGeometryBuilder.mtdGeometry_cfi import *
67+
from Geometry.MTDGeometryBuilder.idealForDigiMTDGeometry_cff import *
68+
mtdGeometry.applyAlignment = False

Validation/HGCalValidation/scripts/testHGCalDigi_cfg.py

Lines changed: 33 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
###############################################################################
22
# Way to use this:
3-
# cmsRun testHGCalDigi_cfg.py geometry=D92 type=mu noise=none threshold=none
3+
# cmsRun testHGCalDigi_cfg.py geometry=D92 type=DDD data=mu noise=none
4+
# threshold=none
45
#
5-
# Options for geometry D88, D92, D93, D92Shift
6-
# type mu, tt
7-
# noise none, ok
8-
# threshold none, ok
6+
# Options for geometry: D88, D92, D93, V17Shift, V18
7+
# type: DDD, DD4hep
8+
# data: mu, tt
9+
# noise: none, ok
10+
# threshold: none, ok
911
#
1012
###############################################################################
1113
import FWCore.ParameterSet.Config as cms
@@ -19,12 +21,17 @@
1921
"D92",
2022
VarParsing.VarParsing.multiplicity.singleton,
2123
VarParsing.VarParsing.varType.string,
22-
"geometry of operations: D88, D92, D93, D92Shift")
24+
"geometry of operations: D88, D92, D93, V17Shift, V18")
2325
options.register('type',
26+
"DDD",
27+
VarParsing.VarParsing.multiplicity.singleton,
28+
VarParsing.VarParsing.varType.string,
29+
"type of operations: DDD, DD4hep")
30+
options.register('data',
2431
"mu",
2532
VarParsing.VarParsing.multiplicity.singleton,
2633
VarParsing.VarParsing.varType.string,
27-
"type of operations: mu, tt")
34+
"data of operations: mu, tt")
2835
options.register('noise',
2936
"ok",
3037
VarParsing.VarParsing.multiplicity.singleton,
@@ -44,15 +51,27 @@
4451
####################################################################
4552
# Use the options
4653
from Configuration.Eras.Era_Phase2C17I13M9_cff import Phase2C17I13M9
47-
process = cms.Process('Digi',Phase2C17I13M9)
48-
49-
if (options.geometry == "D92Shift"):
50-
geomFile = "Geometry.HGCalCommonData.testHGCalV17ShiftReco_cff"
54+
if (options.type == "DD4hep"):
55+
from Configuration.ProcessModifiers.dd4hep_cff import dd4hep
56+
process = cms.Process('SingleMuonSim',Phase2C17I13M9,dd4hep)
57+
if (options.geometry == "V17Shift"):
58+
geomFile = "Geometry.HGCalCommonData.testHGCal" + options.type + options.geometry + "Reco_cff"
59+
elif (options.geometry == "V18"):
60+
geomFile = "Geometry.HGCalCommonData.testHGCal" + options.type + options.geometry + "Reco_cff"
61+
else:
62+
geomFile = "Configuration.Geometry.Geometry" + options.type +"Extended2026" + options.geometry + "Reco_cff"
5163
else:
52-
geomFile = "Configuration.Geometry.GeometryExtended2026" + options.geometry + "Reco_cff"
64+
process = cms.Process('SingleMuonSim',Phase2C17I13M9)
65+
if (options.geometry == "V17Shift"):
66+
geomFile = "Geometry.HGCalCommonData.testHGCal" + options.geometry + "Reco_cff"
67+
elif (options.geometry == "V18"):
68+
geomFile = "Geometry.HGCalCommonData.testHGCal" + options.geometry + "Reco_cff"
69+
else:
70+
geomFile = "Configuration.Geometry.GeometryExtended2026" + options.geometry + "Reco_cff"
71+
5372
globalTag = "auto:phase2_realistic_T21"
54-
inFile = "file:step1" + options.geometry + options.type + ".root"
55-
outFile = "file:step2" + options.geometry + options.type + ".root"
73+
inFile = "file:step1" + options.type + options.geometry + options.data + ".root"
74+
outFile = "file:step2" + options.type + options.geometry + options.data + ".root"
5675

5776
print("Geometry file: ", geomFile)
5877
print("Global Tag: ", globalTag)

Validation/HGCalValidation/scripts/testHGCalReco_cfg.py

Lines changed: 31 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
###############################################################################
22
# Way to use this:
3-
# cmsRun testHGCalDigi_cfg.py geometry=D92 type=mu tag=Def
3+
# cmsRun testHGCalDigi_cfg.py geometry=D92 type=DDD data=mu tag=Def
44
#
5-
# Options for geometry D88, D92, D93, D92Shift
6-
# type mu, tt
7-
# tag Def, Thr, 0Noise
5+
# Options for geometry: D88, D92, D93, V17Shift, V18
6+
# type: DDD, DD4hep
7+
# data: mu, tt
8+
# tag: Def, Thr, 0Noise
89
#
910
###############################################################################
1011
import FWCore.ParameterSet.Config as cms
@@ -18,12 +19,17 @@
1819
"D92",
1920
VarParsing.VarParsing.multiplicity.singleton,
2021
VarParsing.VarParsing.varType.string,
21-
"geometry of operations: D88, D92, D93, D92Shift")
22+
"geometry of operations: D88, D92, D93, V17Shift, V18")
2223
options.register('type',
24+
"DDD",
25+
VarParsing.VarParsing.multiplicity.singleton,
26+
VarParsing.VarParsing.varType.string,
27+
"type of operations: DDD, DD4hep")
28+
options.register('data',
2329
"mu",
2430
VarParsing.VarParsing.multiplicity.singleton,
2531
VarParsing.VarParsing.varType.string,
26-
"type of operations: mu, tt")
32+
"data of operations: mu, tt")
2733
options.register('tag',
2834
"Def",
2935
VarParsing.VarParsing.multiplicity.singleton,
@@ -37,16 +43,27 @@
3743
####################################################################
3844
# Use the options
3945
from Configuration.Eras.Era_Phase2C17I13M9_cff import Phase2C17I13M9
40-
process = cms.Process('TestReco',Phase2C17I13M9)
41-
42-
if (options.geometry == "D92Shift"):
43-
geomFile = "Geometry.HGCalCommonData.testHGCalV17ShiftReco_cff"
46+
if (options.type == "DD4hep"):
47+
from Configuration.ProcessModifiers.dd4hep_cff import dd4hep
48+
process = cms.Process('SingleMuonSim',Phase2C17I13M9,dd4hep)
49+
if (options.geometry == "V17Shift"):
50+
geomFile = "Geometry.HGCalCommonData.testHGCal" + options.type + options.geometry + "Reco_cff"
51+
elif (options.geometry == "V18"):
52+
geomFile = "Geometry.HGCalCommonData.testHGCal" + options.type + options.geometry + "Reco_cff"
53+
else:
54+
geomFile = "Configuration.Geometry.Geometry" + options.type +"Extended2026" + options.geometry + "Reco_cff"
4455
else:
45-
geomFile = "Configuration.Geometry.GeometryExtended2026" + options.geometry + "Reco_cff"
56+
process = cms.Process('SingleMuonSim',Phase2C17I13M9)
57+
if (options.geometry == "V17Shift"):
58+
geomFile = "Geometry.HGCalCommonData.testHGCal" + options.geometry + "Reco_cff"
59+
elif (options.geometry == "V18"):
60+
geomFile = "Geometry.HGCalCommonData.testHGCal" + options.geometry + "Reco_cff"
61+
else:
62+
geomFile = "Configuration.Geometry.GeometryExtended2026" + options.geometry + "Reco_cff"
4663
globalTag = "auto:phase2_realistic_T21"
47-
inFile = "file:step2" + options.geometry + options.type + ".root"
48-
outFile = "file:step3" + options.geometry + options.type + ".root"
49-
fileName = "missing" + options.geometry + options.type + options.tag + ".root"
64+
inFile = "file:step2" + options.type + options.geometry + options.data + ".root"
65+
outFile = "file:step3" + options.type + options.geometry + options.data + ".root"
66+
fileName = "missing" + options.type + options.geometry + options.data + options.tag + ".root"
5067

5168
print("Geometry file: ", geomFile)
5269
print("Global Tag: ", globalTag)

Validation/HGCalValidation/scripts/testHGCalSimSingleMuonPt100_cfg.py

Lines changed: 26 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
###############################################################################
22
# Way to use this:
3-
# cmsRun testHGCalSingleMuonPt100_cfg.py geometry=D92
3+
# cmsRun testHGCalSingleMuonPt100_cfg.py geometry=D92 type=DDD
44
#
5-
# Options for geometry D88, D92, D93, D92Shift, V18
5+
# Options for geometry: D88, D92, D93, V17Shift, V18
6+
# type: DDD, DD4hep
67
#
78
###############################################################################
89
import FWCore.ParameterSet.Config as cms
@@ -16,7 +17,12 @@
1617
"D92",
1718
VarParsing.VarParsing.multiplicity.singleton,
1819
VarParsing.VarParsing.varType.string,
19-
"geometry of operations: D88, D92, D93, D92Shift, V18")
20+
"geometry of operations: D88, D92, D93, V17Shift, V18")
21+
options.register('type',
22+
"DDD",
23+
VarParsing.VarParsing.multiplicity.singleton,
24+
VarParsing.VarParsing.varType.string,
25+
"type of operations: DDD, DD4hep")
2026

2127
### get and parse the command line arguments
2228
options.parseArguments()
@@ -27,17 +33,26 @@
2733
# Use the options
2834

2935
from Configuration.Eras.Era_Phase2C17I13M9_cff import Phase2C17I13M9
30-
process = cms.Process('SingleMuonSim',Phase2C17I13M9)
31-
32-
if (options.geometry == "D92Shift"):
33-
geomFile = "Geometry.HGCalCommonData.testHGCalV17ShiftReco_cff"
34-
elif (options.geometry == "V18"):
35-
geomFile = "Geometry.HGCalCommonData.testHGCalV18Reco_cff"
36+
if (options.type == "DD4hep"):
37+
from Configuration.ProcessModifiers.dd4hep_cff import dd4hep
38+
process = cms.Process('SingleMuonSim',Phase2C17I13M9,dd4hep)
39+
if (options.geometry == "V17Shift"):
40+
geomFile = "Geometry.HGCalCommonData.testHGCal" + options.type + options.geometry + "Reco_cff"
41+
elif (options.geometry == "V18"):
42+
geomFile = "Geometry.HGCalCommonData.testHGCal" + options.type + options.geometry + "Reco_cff"
43+
else:
44+
geomFile = "Configuration.Geometry.Geometry" + options.type +"Extended2026" + options.geometry + "Reco_cff"
3645
else:
37-
geomFile = "Configuration.Geometry.GeometryExtended2026" + options.geometry + "Reco_cff"
46+
process = cms.Process('SingleMuonSim',Phase2C17I13M9)
47+
if (options.geometry == "V17Shift"):
48+
geomFile = "Geometry.HGCalCommonData.testHGCal" + options.geometry + "Reco_cff"
49+
elif (options.geometry == "V18"):
50+
geomFile = "Geometry.HGCalCommonData.testHGCal" + options.geometry + "Reco_cff"
51+
else:
52+
geomFile = "Configuration.Geometry.GeometryExtended2026" + options.geometry + "Reco_cff"
3853

3954
globalTag = "auto:phase2_realistic_T21"
40-
outFile = "file:step1" + options.geometry + "mu.root"
55+
outFile = "file:step1" + options.type + options.geometry + "mu.root"
4156

4257
print("Geometry file: ", geomFile)
4358
print("Global Tag: ", globalTag)

0 commit comments

Comments
 (0)