cms-sw / cmssw

CMS Offline Software
http://cms-sw.github.io/
Apache License 2.0
1.07k stars 4.28k forks source link

Geometry D110: failure in creating Tracker misalignment scenarios #45792

Open mmusich opened 2 weeks ago

mmusich commented 2 weeks ago

This issue stems from PR https://github.com/cms-sw/cmssw/pull/45764. After #45370 a bunch of unit tests relying on deprecated geometries have started to fail, which was fixed at #45764. The default geometry (D110 - i.e. Tracker T35) cannot be used for createRandomlyMisalignedGeometry_Phase2_cfg.py as doing so as in:

diff --git a/Alignment/TrackerAlignment/test/Misalignments/createRandomlyMisalignedGeometry_Phase2_cfg.py b/Alignment/TrackerAlignment/test/Misalignments/createRandomlyMisalignedGeometry_Phase2_cfg.py
index e73a48ca19a..9ab4f03e6dc 100644
--- a/Alignment/TrackerAlignment/test/Misalignments/createRandomlyMisalignedGeometry_Phase2_cfg.py
+++ b/Alignment/TrackerAlignment/test/Misalignments/createRandomlyMisalignedGeometry_Phase2_cfg.py
@@ -4,7 +4,8 @@ import FWCore.ParameterSet.VarParsing as VarParsing
 import copy, sys, os

 import Configuration.Geometry.defaultPhase2ConditionsEra_cff as _settings
-GLOBAL_TAG, ERA = _settings.get_era_and_conditions("2026D107")  # this should really be _settings.DEFAULT_VERSION :(
+#GLOBAL_TAG, ERA = _settings.get_era_and_conditions("2026D107")  # this should really be _settings.DEFAULT_VERSION :(
+GLOBAL_TAG, ERA = _settings.get_era_and_conditions(_settings.DEFAULT_VERSION)
 process = cms.Process("Misaligner", ERA)

 ###################################################################
@@ -48,7 +49,7 @@ process.MessageLogger.cout = cms.untracked.PSet(
 ###################################################################
 # Ideal geometry producer and standard includes
 ###################################################################
-process.load('Configuration.Geometry.GeometryExtended2026D107Reco_cff')
+process.load('Configuration.Geometry.GeometryExtended2026DefaultReco_cff')
 process.trackerGeometry.applyAlignment = True

 ###################################################################

results in

----- Begin Fatal Exception 24-Aug-2024 17:54:17 CEST-----------------------
An exception of category 'BadHierarchy' occurred while
   [0] Calling EventProcessor::runToCompletion (which does almost everything after beginJob and before endJob)
Exception Message:
[AlignableTrackerBuilder] Pixel GeomDet (subdetector 1) is not a GeomDetUnit.
----- End Fatal Exception -------------------------------------------------

see also https://github.com/cms-sw/cmssw/pull/45764#discussion_r1724853973.

Possibly related to https://github.com/cms-sw/cmssw/issues/43097

cmsbuild commented 2 weeks ago

cms-bot internal usage

cmsbuild commented 2 weeks ago

A new Issue was created by @mmusich.

@Dr15Jones, @antoniovilela, @makortel, @mandrenguyen, @rappoccio, @sextonkennedy, @smuzaffar can you please review it and eventually sign/assign? Thanks.

cms-bot commands are listed here

makortel commented 2 weeks ago

assign geometry, upgrade, alca

cmsbuild commented 2 weeks ago

New categories assigned: geometry,upgrade,alca

@Dr15Jones,@civanch,@bsunanda,@makortel,@mdhildreth,@srimanob,@subirsarkar,@saumyaphor4252,@perrotta,@consuegs you have been requested to review this Pull request/Issue and eventually sign? Thanks

makortel commented 2 weeks ago

FYI @cms-sw/trk-dpg-l2

mmusich commented 1 week ago

Another symptom. By adding this change:

diff --git a/Geometry/TrackerGeometryBuilder/test/python/testTrackerHierarchy_cfg.py b/Geometry/TrackerGeometryBuilder/test/python/testTrackerHierarchy_cfg.py
index a10920d3b09..be6f958f2f1 100644
--- a/Geometry/TrackerGeometryBuilder/test/python/testTrackerHierarchy_cfg.py
+++ b/Geometry/TrackerGeometryBuilder/test/python/testTrackerHierarchy_cfg.py
@@ -1,10 +1,14 @@
 import FWCore.ParameterSet.Config as cms

-process = cms.Process("GeometryTest")
+from Configuration.Eras.Era_Phase2C17I13M9_cff import Phase2C17I13M9
+
+process = cms.Process('GeometryTest',Phase2C17I13M9)
+
 process.load("FWCore.MessageLogger.MessageLogger_cfi")

 # Choose Tracker Geometry
-process.load("Configuration.Geometry.GeometryExtended2021Reco_cff")
+process.load('Configuration.Geometry.GeometryExtended2026D110Reco_cff')

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

and then running the test, it results in:

$ cmsRun testTrackerHierarchy_cfg.py                                                                                                                                              Begin processing the 1st record. Run 1, Event 1, LumiSection 1 on stream 0 at 03-Sep-2024 16:03:31.938 CEST

GeometricDet Hierarchy

In Tracker Geom there are 30400 modules
in filling An exception of category 'InvalidReference' occurred.
Exception Message:
Trie::insert called with a key already in collection;
key value: 

303042566 1
1/1/1/1/ 303042565

GDet Hierarchy

In Tracker Geom there are 43708 modules
in filling An exception of category 'InvalidReference' occurred.
Exception Message:
Trie::insert called with a key already in collection;
key value: 

303042564 1
1/1/1/1/ 303042565
mmusich commented 1 day ago

This will be solved by https://github.com/cms-sw/cmssw/pull/45993