From 47c2e128bd5f080ecb8713037a7464a713fd6baa Mon Sep 17 00:00:00 2001 From: Luca Ferragina Date: Fri, 29 Nov 2024 11:07:09 +0100 Subject: [PATCH] Implement validation for new Phase 2 muon workflows --- .../EventContent/python/EventContent_cff.py | 6 +++ Validation/RecoMuon/python/associators_cff.py | 48 +++++++++++++++++ .../RecoMuon/python/muonValidationHLT_cff.py | 51 +++++++++++++++++++ 3 files changed, 105 insertions(+) diff --git a/Configuration/EventContent/python/EventContent_cff.py b/Configuration/EventContent/python/EventContent_cff.py index 927c439e01b94..b73c7a4626594 100644 --- a/Configuration/EventContent/python/EventContent_cff.py +++ b/Configuration/EventContent/python/EventContent_cff.py @@ -703,6 +703,12 @@ def SwapKeepAndDrop(l): 'keep *_hltPhase2L3MuonsNoID_*_*', 'keep *_hltPhase2L3Muons_*_*']) +from Configuration.ProcessModifiers.phase2L2AndL3Muons_cff import phase2L2AndL3Muons +(phase2_muon & phase2L2AndL3Muons).toModify(FEVTDEBUGHLTEventContent, + outputCommands = FEVTDEBUGHLTEventContent.outputCommands + [ + 'keep *_hltPhase2L3MuonFilter_*_*' + ]) + phase2_hgcal.toModify(FEVTDEBUGHLTEventContent, outputCommands = FEVTDEBUGHLTEventContent.outputCommands + TICL_FEVTHLT.outputCommands) diff --git a/Validation/RecoMuon/python/associators_cff.py b/Validation/RecoMuon/python/associators_cff.py index 5c2b16a5ca16c..8bf86963bdda6 100644 --- a/Validation/RecoMuon/python/associators_cff.py +++ b/Validation/RecoMuon/python/associators_cff.py @@ -265,6 +265,24 @@ UseTracker = True, UseMuon = False ) +# L2 muons to reuse (IO first only) +Phase2tpToL2MuonToReuseAssociation = MABHhlt.clone( + tracksTag = 'hltPhase2L3MuonFilter:L2MuToReuse', + UseTracker = False, + UseMuon = True +) +# L3 IO inner tracks filtered (IO first only) +Phase2tpToL3IOTkFilteredAssociation = MABHhlt.clone( + tracksTag = 'hltPhase2L3MuonFilter:L3IOTracksFiltered', + UseTracker = True, + UseMuon = False +) +# L3 OI inner tracks filtered (OI first only) +Phase2tpToL3OITkFilteredAssociation = MABHhlt.clone( + tracksTag = 'hltPhase2L3MuonFilter:L3OITracksFiltered', + UseTracker = True, + UseMuon = False +) # L3 inner tracks merged Phase2tpToL3TkMergedAssociation = MABHhlt.clone( tracksTag = 'hltPhase2L3MuonMerged', @@ -408,6 +426,33 @@ from Configuration.Eras.Modifier_phase2_muon_cff import phase2_muon phase2_muon.toReplaceWith(muonAssociationHLT_seq, Phase2MuonAssociationHLT_seq) +# Inside-Out first +Phase2IOFirstMuonAssociationHLT_seq = cms.Sequence( + hltPhase2L2MuonSeedTracks+Phase2tpToL2SeedAssociation + +Phase2tpToL2MuonAssociation+Phase2tpToL2MuonUpdAssociation + +Phase2tpToL3IOTkAssociation+Phase2tpToL3OITkAssociation + +Phase2tpToL2MuonToReuseAssociation+Phase2tpToL3IOTkFilteredAssociation + +Phase2tpToL3TkMergedAssociation+Phase2tpToL3GlbMuonMergedAssociation + +hltPhase2L3MuonNoIdTracks+Phase2tpToL3MuonNoIdAssociation + +hltPhase2L3MuonIdTracks+Phase2tpToL3MuonIdAssociation + ) +# Outside-In first +Phase2OIFirstMuonAssociationHLT_seq = cms.Sequence( + hltPhase2L2MuonSeedTracks+Phase2tpToL2SeedAssociation + +Phase2tpToL2MuonAssociation+Phase2tpToL2MuonUpdAssociation + +Phase2tpToL3OITkAssociation+Phase2tpToL3OITkFilteredAssociation + +Phase2tpToL3IOTkAssociation+Phase2tpToL3TkMergedAssociation + +Phase2tpToL3GlbMuonMergedAssociation + +hltPhase2L3MuonNoIdTracks+Phase2tpToL3MuonNoIdAssociation + +hltPhase2L3MuonIdTracks+Phase2tpToL3MuonIdAssociation + ) + +from Configuration.ProcessModifiers.phase2L2AndL3Muons_cff import phase2L2AndL3Muons +phase2L2AndL3Muons.toReplaceWith(muonAssociationHLT_seq, Phase2IOFirstMuonAssociationHLT_seq) + +from Configuration.ProcessModifiers.phase2L3MuonsOIFirst_cff import phase2L3MuonsOIFirst +(phase2L2AndL3Muons & phase2L3MuonsOIFirst).toReplaceWith(muonAssociationHLT_seq, Phase2OIFirstMuonAssociationHLT_seq) + # fastsim has no hlt specific dt hit collection from Configuration.Eras.Modifier_fastSim_cff import fastSim _DTrechitTag = SimMuon.MCTruth.MuonAssociatorByHits_cfi.muonAssociatorByHits.DTrechitTag @@ -427,6 +472,9 @@ fastSim.toModify(Phase2tpToL2MuonUpdAssociation, DTrechitTag = _DTrechitTag) fastSim.toModify(Phase2tpToL3IOTkAssociation, DTrechitTag = _DTrechitTag) fastSim.toModify(Phase2tpToL3OITkAssociation, DTrechitTag = _DTrechitTag) +fastSim.toModify(Phase2tpToL2MuonToReuseAssociation, DTrechitTag = _DTrechitTag) +fastSim.toModify(Phase2tpToL3IOTkFilteredAssociation, DTrechitTag = _DTrechitTag) +fastSim.toModify(Phase2tpToL3OITkFilteredAssociation, DTrechitTag = _DTrechitTag) fastSim.toModify(Phase2tpToL3TkMergedAssociation, DTrechitTag = _DTrechitTag) fastSim.toModify(Phase2tpToL3GlbMuonMergedAssociation, DTrechitTag = _DTrechitTag) fastSim.toModify(Phase2tpToL3MuonNoIdAssociation, DTrechitTag = _DTrechitTag) diff --git a/Validation/RecoMuon/python/muonValidationHLT_cff.py b/Validation/RecoMuon/python/muonValidationHLT_cff.py index f677606f90065..50c8d3b52cfd7 100644 --- a/Validation/RecoMuon/python/muonValidationHLT_cff.py +++ b/Validation/RecoMuon/python/muonValidationHLT_cff.py @@ -101,6 +101,24 @@ label = ('hltPhase2L3OIMuonTrackSelectionHighPurity',), muonHistoParameters = trkMuonHistoParameters ) +# L2 muons to reuse (IO first only) +Phase2L2MuToReuseV = MTVhlt.clone( + associatormap = 'Phase2tpToL2MuonToReuseAssociation', + label = ('hltPhase2L3MuonFilter:L2MuToReuse',), + muonHistoParameters = staMuonHistoParameters +) +# L3 IO inner tracks filtered (IO first only) +Phase2l3IOTkFilteredV = MTVhlt.clone( + associatormap = 'Phase2tpToL3IOTkFilteredAssociation', + label = ('hltPhase2L3MuonFilter:L3IOTracksFiltered',), + muonHistoParameters = trkMuonHistoParameters +) +# L3 OI inner tracks filtered (OI first only) +Phase2l3OITkFilteredV = MTVhlt.clone( + associatormap = 'Phase2tpToL3OITkFilteredAssociation', + label = ('hltPhase2L3MuonFilter:L3OITracksFiltered',), + muonHistoParameters = trkMuonHistoParameters +) # L3 inner tracks merged Phase2l3TkMergedV = MTVhlt.clone( associatormap = 'Phase2tpToL3TkMergedAssociation', @@ -157,10 +175,43 @@ +Phase2l3MuNoIdTrackV +Phase2l3MuIdTrackV ) +# Inside-Out first sequence +Phase2IOFirstMuonValidationHLT_seq = cms.Sequence(muonAssociationHLT_seq + +Phase2l2MuSeedV + +Phase2l2MuV + +Phase2l2MuUpdV + +Phase2l3IOTkV + +Phase2L2MuToReuseV + +Phase2l3IOTkFilteredV + +Phase2l3OITkV + +Phase2l3TkMergedV + +Phase2l3GlbMuonV + +Phase2l3MuNoIdTrackV + +Phase2l3MuIdTrackV + ) +# Outside-In first sequence +Phase2OIFirstMuonValidationHLT_seq = cms.Sequence(muonAssociationHLT_seq + +Phase2l2MuSeedV + +Phase2l2MuV + +Phase2l2MuUpdV + +Phase2l3OITkV + +Phase2l3OITkFilteredV + +Phase2l3IOTkV + +Phase2l3TkMergedV + +Phase2l3GlbMuonV + +Phase2l3MuNoIdTrackV + +Phase2l3MuIdTrackV + ) from Configuration.Eras.Modifier_phase2_muon_cff import phase2_muon phase2_muon.toReplaceWith(muonValidationHLT_seq, Phase2MuonValidationHLT_seq) +from Configuration.ProcessModifiers.phase2L2AndL3Muons_cff import phase2L2AndL3Muons +phase2L2AndL3Muons.toReplaceWith(muonValidationHLT_seq, Phase2IOFirstMuonValidationHLT_seq) + +from Configuration.ProcessModifiers.phase2L3MuonsOIFirst_cff import phase2L3MuonsOIFirst +(phase2L2AndL3Muons & phase2L3MuonsOIFirst).toReplaceWith(muonValidationHLT_seq, Phase2OIFirstMuonValidationHLT_seq) + recoMuonValidationHLT_seq = cms.Sequence( cms.SequencePlaceholder("TPmu") + muonValidationHLT_seq