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

[Backport] Fix Run3 Tracker Geometry Reco config, python3 for geometry package, unit test tracker geo #35152

Closed
Closed
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
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
from Geometry.TrackerGeometryBuilder.trackerParameters_cff import *
from Geometry.TrackerNumberingBuilder.trackerTopology_cfi import *
from Geometry.TrackerGeometryBuilder.idealForDigiTrackerGeometry_cff import *
trackerGeometry.applyAlignment = cms.bool(False)

# calo
from Geometry.CaloEventSetup.CaloTopology_cfi import *
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
from Geometry.TrackerGeometryBuilder.trackerParameters_cff import *
from Geometry.TrackerNumberingBuilder.trackerTopology_cfi import *
from Geometry.TrackerGeometryBuilder.idealForDigiTrackerGeometry_cff import *
trackerGeometry.applyAlignment = cms.bool(False)

# calo
from Geometry.CaloEventSetup.CaloTopology_cfi import *
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
from Geometry.TrackerGeometryBuilder.trackerParameters_cff import *
from Geometry.TrackerNumberingBuilder.trackerTopology_cfi import *
from Geometry.TrackerGeometryBuilder.idealForDigiTrackerGeometry_cff import *
trackerGeometry.applyAlignment = cms.bool(False)

# calo
from Geometry.CaloEventSetup.CaloTopology_cfi import *
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
from Geometry.TrackerGeometryBuilder.trackerParameters_cff import *
from Geometry.TrackerNumberingBuilder.trackerTopology_cfi import *
from Geometry.TrackerGeometryBuilder.idealForDigiTrackerGeometry_cff import *
trackerGeometry.applyAlignment = cms.bool(False)

# calo
from Geometry.CaloEventSetup.CaloTopology_cfi import *
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
from Geometry.TrackerGeometryBuilder.trackerParameters_cff import *
from Geometry.TrackerNumberingBuilder.trackerTopology_cfi import *
from Geometry.TrackerGeometryBuilder.idealForDigiTrackerGeometry_cff import *
trackerGeometry.applyAlignment = cms.bool(False)

# calo
from Geometry.CaloEventSetup.CaloTopology_cfi import *
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
from Geometry.TrackerGeometryBuilder.trackerParameters_cff import *
from Geometry.TrackerNumberingBuilder.trackerTopology_cfi import *
from Geometry.TrackerGeometryBuilder.idealForDigiTrackerGeometry_cff import *
trackerGeometry.applyAlignment = cms.bool(False)

# calo
from Geometry.CaloEventSetup.CaloTopology_cfi import *
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
from Geometry.TrackerGeometryBuilder.trackerParameters_cff import *
from Geometry.TrackerNumberingBuilder.trackerTopology_cfi import *
from Geometry.TrackerGeometryBuilder.idealForDigiTrackerGeometry_cff import *
trackerGeometry.applyAlignment = cms.bool(False)

# calo
from Geometry.CaloEventSetup.CaloTopology_cfi import *
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
from Geometry.TrackerGeometryBuilder.trackerParameters_cff import *
from Geometry.TrackerNumberingBuilder.trackerTopology_cfi import *
from Geometry.TrackerGeometryBuilder.idealForDigiTrackerGeometry_cff import *
trackerGeometry.applyAlignment = cms.bool(False)

# calo
from Geometry.CaloEventSetup.CaloTopology_cfi import *
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
from Geometry.TrackerGeometryBuilder.trackerParameters_cff import *
from Geometry.TrackerNumberingBuilder.trackerTopology_cfi import *
from Geometry.TrackerGeometryBuilder.idealForDigiTrackerGeometry_cff import *
trackerGeometry.applyAlignment = cms.bool(False)

# calo
from Geometry.CaloEventSetup.CaloTopology_cfi import *
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
from Geometry.TrackerGeometryBuilder.trackerParameters_cff import *
from Geometry.TrackerNumberingBuilder.trackerTopology_cfi import *
from Geometry.TrackerGeometryBuilder.idealForDigiTrackerGeometry_cff import *
trackerGeometry.applyAlignment = cms.bool(False)

# calo
from Geometry.CaloEventSetup.CaloTopology_cfi import *
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
from Geometry.TrackerGeometryBuilder.trackerParameters_cff import *
from Geometry.TrackerNumberingBuilder.trackerTopology_cfi import *
from Geometry.TrackerGeometryBuilder.idealForDigiTrackerGeometry_cff import *
trackerGeometry.applyAlignment = cms.bool(False)

# calo
from Geometry.CaloEventSetup.CaloTopology_cfi import *
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
from Geometry.TrackerGeometryBuilder.trackerParameters_cff import *
from Geometry.TrackerNumberingBuilder.trackerTopology_cfi import *
from Geometry.TrackerGeometryBuilder.idealForDigiTrackerGeometry_cff import *
trackerGeometry.applyAlignment = cms.bool(False)

# calo
from Geometry.CaloEventSetup.CaloTopology_cfi import *
Expand Down
8 changes: 0 additions & 8 deletions Configuration/Geometry/python/dict2021Geometry.py
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,6 @@
'from Geometry.TrackerGeometryBuilder.trackerParameters_cff import *',
'from Geometry.TrackerNumberingBuilder.trackerTopology_cfi import *',
'from Geometry.TrackerGeometryBuilder.idealForDigiTrackerGeometry_cff import *',
'trackerGeometry.applyAlignment = cms.bool(False)',
],
},
"T2" : {
Expand Down Expand Up @@ -553,7 +552,6 @@
'from Geometry.TrackerGeometryBuilder.trackerParameters_cff import *',
'from Geometry.TrackerNumberingBuilder.trackerTopology_cfi import *',
'from Geometry.TrackerGeometryBuilder.idealForDigiTrackerGeometry_cff import *',
'trackerGeometry.applyAlignment = cms.bool(False)',
],
},
"T3" : {
Expand Down Expand Up @@ -757,7 +755,6 @@
'from Geometry.TrackerGeometryBuilder.trackerParameters_cff import *',
'from Geometry.TrackerNumberingBuilder.trackerTopology_cfi import *',
'from Geometry.TrackerGeometryBuilder.idealForDigiTrackerGeometry_cff import *',
'trackerGeometry.applyAlignment = cms.bool(False)',
],
},
"T4" : {
Expand Down Expand Up @@ -961,7 +958,6 @@
'from Geometry.TrackerGeometryBuilder.trackerParameters_cff import *',
'from Geometry.TrackerNumberingBuilder.trackerTopology_cfi import *',
'from Geometry.TrackerGeometryBuilder.idealForDigiTrackerGeometry_cff import *',
'trackerGeometry.applyAlignment = cms.bool(False)',
],
},
"T5" : {
Expand Down Expand Up @@ -1166,7 +1162,6 @@
'from Geometry.TrackerGeometryBuilder.trackerParameters_cff import *',
'from Geometry.TrackerNumberingBuilder.trackerTopology_cfi import *',
'from Geometry.TrackerGeometryBuilder.idealForDigiTrackerGeometry_cff import *',
'trackerGeometry.applyAlignment = cms.bool(False)',
],
},
"T6" : {
Expand Down Expand Up @@ -1371,7 +1366,6 @@
'from Geometry.TrackerGeometryBuilder.trackerParameters_cff import *',
'from Geometry.TrackerNumberingBuilder.trackerTopology_cfi import *',
'from Geometry.TrackerGeometryBuilder.idealForDigiTrackerGeometry_cff import *',
'trackerGeometry.applyAlignment = cms.bool(False)',
],
},
"T7" : {
Expand Down Expand Up @@ -1576,7 +1570,6 @@
'from Geometry.TrackerGeometryBuilder.trackerParameters_cff import *',
'from Geometry.TrackerNumberingBuilder.trackerTopology_cfi import *',
'from Geometry.TrackerGeometryBuilder.idealForDigiTrackerGeometry_cff import *',
'trackerGeometry.applyAlignment = cms.bool(False)',
],
},
"T8" : {
Expand Down Expand Up @@ -1781,7 +1774,6 @@
'from Geometry.TrackerGeometryBuilder.trackerParameters_cff import *',
'from Geometry.TrackerNumberingBuilder.trackerTopology_cfi import *',
'from Geometry.TrackerGeometryBuilder.idealForDigiTrackerGeometry_cff import *',
'trackerGeometry.applyAlignment = cms.bool(False)',
],
},
}
Expand Down
7 changes: 4 additions & 3 deletions Configuration/Geometry/python/generateGeometry.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,15 @@ def __init__(self, scriptName, detectorVersionDefault, detectorPrefix, detectorY
self.deprecatedDets = deprecatedDets
self.deprecatedSubdets = deprecatedSubdets
self.detectorVersionType = detectorVersionType
self.detectorVersionNull = self.detectorVersionType(0)

def generateGeom(self, detectorTuple, args):
detectorVersion = self.detectorPrefix+str(args.detectorVersionManual)
# reverse dict search if overall D# specified
if args.v_detector>0:
if args.v_detector!=self.detectorVersionNull:
detectorVersion = self.detectorPrefix+str(args.v_detector)
if detectorVersion in self.detectorVersionDict.values():
detectorTuple = self.detectorVersionDict.keys()[self.detectorVersionDict.values().index(detectorVersion)]
detectorTuple = list(self.detectorVersionDict.keys())[list(self.detectorVersionDict.values()).index(detectorVersion)]
else:
print("Unknown detector "+detectorVersion)
sys.exit(1)
Expand Down Expand Up @@ -249,7 +250,7 @@ def run(self):
for aDict in self.allDicts:
parser.add_argument("-"+aDict["abbrev"], "--"+aDict["name"], dest="v_"+aDict["name"], default=aDict["default"], type=int, help="version for "+aDict["name"])
parser.add_argument("-V", "--version", dest="detectorVersionManual", default=self.detectorVersionDefault, type=int, help="manual detector version number")
parser.add_argument("-D", "--detector", dest="v_detector", default=0, type=self.detectorVersionType, help="version for whole detector, ignored if 0, overrides subdet versions otherwise")
parser.add_argument("-D", "--detector", dest="v_detector", default=self.detectorVersionNull, type=self.detectorVersionType, help="version for whole detector, ignored if 0, overrides subdet versions otherwise")
parser.add_argument("-l", "--list", dest="doList", default=False, action="store_true", help="list known detector versions and exit")
parser.add_argument("-t", "--test", dest="doTest", default=False, action="store_true", help="enable unit test mode")
args = parser.parse_args()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@
fromDDD = cms.bool(True)
)

process.load("Alignment.CommonAlignmentProducer.FakeAlignmentSource_cfi")
process.preferFakeAlign = cms.ESPrefer("FakeAlignmentSource")

process.p1 = cms.Path(process.prod)


Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@

process.source = cms.Source("EmptySource")

process.load("Alignment.CommonAlignmentProducer.FakeAlignmentSource_cfi")
process.preferFakeAlign = cms.ESPrefer("FakeAlignmentSource")

process.maxEvents = cms.untracked.PSet(
input = cms.untracked.int32(1)
)
Expand Down