Skip to content

Commit

Permalink
Implement validation for new Phase 2 muon workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
Parsifal-2045 committed Dec 10, 2024
1 parent 9d7592f commit 2eab640
Show file tree
Hide file tree
Showing 3 changed files with 105 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Configuration/EventContent/python/EventContent_cff.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
48 changes: 48 additions & 0 deletions Validation/RecoMuon/python/associators_cff.py
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down Expand Up @@ -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
Expand All @@ -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)
Expand Down
51 changes: 51 additions & 0 deletions Validation/RecoMuon/python/muonValidationHLT_cff.py
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 2eab640

Please sign in to comment.