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

[NGT] Implement new seeding module for HLT Standalone Muon seeding and streamline HLT L3 Tracker Muon reconstruction #46897

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
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
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import FWCore.ParameterSet.Config as cms

# this modifier is for enabling Phase 2 L2 Muon seeding from L1Tk Muons
# and the simplified L3 Tracker Muon reconstruction (Inside-Out first)
phase2L2AndL3Muons = cms.Modifier()
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import FWCore.ParameterSet.Config as cms

# this modifier is for enabling Phase 2 L3 Tracker Muon Outside-In first reconstruction
phase2L3MuonsOIFirst = cms.Modifier()
Original file line number Diff line number Diff line change
Expand Up @@ -814,6 +814,70 @@ def condition(self, fragment, stepList, key, hasHarvest):
upgradeWFs['ticl_v5_superclustering_mustache_pf'].step3 = {'--procModifiers': 'ticl_v5,ticl_superclustering_mustache_pf'}
upgradeWFs['ticl_v5_superclustering_mustache_pf'].step4 = {'--procModifiers': 'ticl_v5,ticl_superclustering_mustache_pf'}

# Improved L2 seeding from L1Tk Muons and L3 Tracker Muon Inside-Out reconstruction first (Phase-2 Muon default)
class UpgradeWorkflow_phase2L2AndL3Muons(UpgradeWorkflow):
def setup_(self, step, stepName, stepDict, k, properties):
if ('Digi' in step and 'NoHLT' not in step) or ('HLTOnly' in step):
stepDict[stepName][k] = merge([self.step2, stepDict[step][k]])
if 'RecoGlobal' in step:
stepDict[stepName][k] = merge([self.step3, stepDict[step][k]])
if 'HARVESTGlobal' in step:
stepDict[stepName][k] = merge([self.step4, stepDict[step][k]])
def condition(self, fragment, stepList, key, hasHarvest):
return (fragment=="ZMM_14" or 'SingleMu' in fragment or 'TTbar_14' in fragment) and 'Run4' in key

upgradeWFs['phase2L2AndL3Muons'] = UpgradeWorkflow_phase2L2AndL3Muons(
steps = [
'HLTOnly',
'DigiTrigger',
'RecoGlobal',
'HARVESTGlobal'
],
PU = [
'HLTOnly',
'DigiTrigger',
'RecoGlobal',
'HARVESTGlobal'
],
suffix = '_phase2L2AndL3MuonsIOFirst',
offset = 0.777,
)
upgradeWFs['phase2L2AndL3Muons'].step2 = {'--procModifiers':'phase2L2AndL3Muons'}
upgradeWFs['phase2L2AndL3Muons'].step3 = {'--procModifiers':'phase2L2AndL3Muons'}
upgradeWFs['phase2L2AndL3Muons'].step4 = {'--procModifiers':'phase2L2AndL3Muons'}

# Improved L2 seeding from L1Tk Muons and L3 Tracker Muon Outside-In reconstruction first
class UpgradeWorkflow_phase2L3MuonsOIFirst(UpgradeWorkflow):
def setup_(self, step, stepName, stepDict, k, properties):
if ('Digi' in step and 'NoHLT' not in step) or ('HLTOnly' in step):
stepDict[stepName][k] = merge([self.step2, stepDict[step][k]])
if 'RecoGlobal' in step:
stepDict[stepName][k] = merge([self.step3, stepDict[step][k]])
if 'HARVESTGlobal' in step:
stepDict[stepName][k] = merge([self.step4, stepDict[step][k]])
def condition(self, fragment, stepList, key, hasHarvest):
return (fragment=="ZMM_14" or 'SingleMu' in fragment or 'TTbar_14' in fragment) and 'Run4' in key

upgradeWFs['phase2L3MuonsOIFirst'] = UpgradeWorkflow_phase2L3MuonsOIFirst(
steps = [
'HLTOnly',
'DigiTrigger',
'RecoGlobal',
'HARVESTGlobal'
],
PU = [
'HLTOnly',
'DigiTrigger',
'RecoGlobal',
'HARVESTGlobal'
],
suffix = '_phase2L2AndL3MuonsOIFirst',
offset = 0.778,
)
upgradeWFs['phase2L3MuonsOIFirst'].step2 = {'--procModifiers':'phase2L2AndL3Muons,phase2L3MuonsOIFirst'}
upgradeWFs['phase2L3MuonsOIFirst'].step3 = {'--procModifiers':'phase2L2AndL3Muons,phase2L3MuonsOIFirst'}
upgradeWFs['phase2L3MuonsOIFirst'].step4 = {'--procModifiers':'phase2L2AndL3Muons,phase2L3MuonsOIFirst'}

# Track DNN workflows
class UpgradeWorkflow_trackdnn(UpgradeWorkflow):
def setup_(self, step, stepName, stepDict, k, properties):
Expand Down
9 changes: 8 additions & 1 deletion DataFormats/MuonSeed/interface/L2MuonTrajectorySeed.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

#include "DataFormats/TrajectorySeed/interface/TrajectorySeed.h"
#include "DataFormats/L1Trigger/interface/L1MuonParticleFwd.h"
#include "DataFormats/L1TMuonPhase2/interface/TrackerMuon.h"
#include "DataFormats/L1Trigger/interface/Muon.h"
#include "DataFormats/TrajectorySeed/interface/PropagationDirection.h"
#include "DataFormats/TrajectoryState/interface/PTrajectoryStateOnDet.h"
Expand All @@ -31,6 +32,11 @@ class L2MuonTrajectorySeed : public TrajectorySeed {
PropagationDirection dir,
l1t::MuonRef l1Ref);

L2MuonTrajectorySeed(PTrajectoryStateOnDet const& ptsos,
RecHitContainer const& rh,
PropagationDirection dir,
l1t::TrackerMuonRef l1TkMuRef);

/// Destructor
~L2MuonTrajectorySeed() override {}

Expand All @@ -39,10 +45,11 @@ class L2MuonTrajectorySeed : public TrajectorySeed {
/// Get L1 info
inline l1extra::L1MuonParticleRef l1Particle() const { return theL1Particle; }
inline l1t::MuonRef l1tParticle() const { return theL1TParticle; }
inline l1t::TrackerMuonRef l1TkMu() const { return theL1TkMu; }

protected:
private:
l1extra::L1MuonParticleRef theL1Particle;
l1t::MuonRef theL1TParticle;
l1t::TrackerMuonRef theL1TkMu;
};
#endif
8 changes: 8 additions & 0 deletions DataFormats/MuonSeed/src/L2MuonTrajectorySeed.cc
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,11 @@ L2MuonTrajectorySeed::L2MuonTrajectorySeed(PTrajectoryStateOnDet const& ptsos,
: TrajectorySeed(ptsos, rh, dir) {
theL1TParticle = l1Ref;
}

L2MuonTrajectorySeed::L2MuonTrajectorySeed(PTrajectoryStateOnDet const& ptsos,
RecHitContainer const& rh,
PropagationDirection dir,
l1t::TrackerMuonRef l1TkMuRef)
: TrajectorySeed(ptsos, rh, dir) {
theL1TkMu = l1TkMuRef;
}
3 changes: 2 additions & 1 deletion DataFormats/MuonSeed/src/classes_def.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<lcgdict>
<class name="L2MuonTrajectorySeed" ClassVersion="12">
<class name="L2MuonTrajectorySeed" ClassVersion="13">
<version ClassVersion="13" checksum="2121764882"/>
Parsifal-2045 marked this conversation as resolved.
Show resolved Hide resolved
<version ClassVersion="12" checksum="2773784798"/>
<version ClassVersion="11" checksum="541533207"/>
<version ClassVersion="10" checksum="2502730614"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,10 @@
nSeedsMax_E = cms.int32(20),
src = cms.InputTag("hltIter2Phase2L3FromL1TkMuonPixelSeeds")
)

from Configuration.ProcessModifiers.phase2L2AndL3Muons_cff import phase2L2AndL3Muons
from Configuration.ProcessModifiers.phase2L3MuonsOIFirst_cff import phase2L3MuonsOIFirst
(phase2L2AndL3Muons & phase2L3MuonsOIFirst).toModify(
hltIter2Phase2L3FromL1TkMuonPixelSeedsFiltered,
L1TkMu = "hltPhase2L3MuonFilter:L1TkMuToReuse"
)
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,30 @@
UseOfflineSeed = cms.untracked.bool(True),
UseUnassociatedL1 = cms.bool(False)
)

phase2HltL2MuonSeedsFromL1TkMuon = cms.EDProducer('Phase2L2MuonSeedCreator',
inputObjects = cms.InputTag('l1tTkMuonsGmt'),
cscRecSegmentLabel = cms.InputTag('hltCscSegments'),
dtRecSegmentLabel = cms.InputTag('hltDt4DSegments'),
minPL1Tk = cms.double(3.5),
maxPL1Tk = cms.double(200),
stubMatchDPhi = cms.double(0.05),
stubMatchDTheta = cms.double(0.1),
extrapolationWindowClose = cms.double(0.2),
extrapolationWindowFar = cms.double(0.1),
maximumEtaBarrel = cms.double(0.7),
maximumEtaOverlap = cms.double(1.3),
propagator = cms.string('SteppingHelixPropagatorAny'),
serviceParameters = cms.PSet(
Propagators = cms.untracked.vstring('SteppingHelixPropagatorAny'),
RPCLayers = cms.bool(True),
UseMuonNavigation = cms.untracked.bool(True)
),
estimatorMaxChi2 = cms.double(1000.0)
)

from Configuration.ProcessModifiers.phase2L2AndL3Muons_cff import phase2L2AndL3Muons
phase2L2AndL3Muons.toReplaceWith(
hltL2MuonSeedsFromL1TkMuon,
phase2HltL2MuonSeedsFromL1TkMuon
)
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,10 @@
zErrorVetex = cms.double(0.2)
)
)

from Configuration.ProcessModifiers.phase2L2AndL3Muons_cff import phase2L2AndL3Muons
from Configuration.ProcessModifiers.phase2L3MuonsOIFirst_cff import phase2L3MuonsOIFirst
(phase2L2AndL3Muons & phase2L3MuonsOIFirst).toModify(
hltPhase2L3FromL1TkMuonPixelTracksTrackingRegions.RegionPSet,
input = "hltPhase2L3MuonFilter:L1TkMuToReuse"
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import FWCore.ParameterSet.Config as cms

hltPhase2L3MuonFilter = cms.EDProducer("Phase2HLTMuonSelectorForL3",
l1TkMuons = cms.InputTag("l1tTkMuonsGmt"),
l2MuonsUpdVtx = cms.InputTag("hltL2MuonsFromL1TkMuon:UpdatedAtVtx"),
l3Tracks = cms.InputTag("hltIter2Phase2L3FromL1TkMuonMerged"),
IOFirst = cms.bool(True),
matchingDr = cms.double(0.02),
applyL3Filters = cms.bool(True),
MinNhits = cms.int32(1),
MaxNormalizedChi2 = cms.double(5.0),
MinNhitsMuons = cms.int32(0),
MinNhitsPixel = cms.int32(1),
MinNhitsTracker = cms.int32(6),
MaxPtDifference = cms.double(999.0),
)

from Configuration.ProcessModifiers.phase2L2AndL3Muons_cff import phase2L2AndL3Muons
from Configuration.ProcessModifiers.phase2L3MuonsOIFirst_cff import phase2L3MuonsOIFirst
(phase2L2AndL3Muons & phase2L3MuonsOIFirst).toModify(
hltPhase2L3MuonFilter,
l3Tracks = "hltPhase2L3OIMuonTrackSelectionHighPurity",
IOFirst = False,
)
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,47 @@
MinFound = cms.int32(3),
MinPT = cms.double(0.05),
ShareFrac = cms.double(0.19),
TrackProducers = cms.VInputTag("hltPhase2L3OIMuonTrackSelectionHighPurity", "hltIter2Phase2L3FromL1TkMuonMerged"),
TrackProducers = cms.VInputTag(
"hltPhase2L3OIMuonTrackSelectionHighPurity",
"hltIter2Phase2L3FromL1TkMuonMerged",
),
allowFirstHitShare = cms.bool(True),
copyExtras = cms.untracked.bool(True),
copyMVA = cms.bool(False),
hasSelector = cms.vint32(0, 0),
indivShareFrac = cms.vdouble(1.0, 1.0),
newQuality = cms.string('confirmed'),
selectedTrackQuals = cms.VInputTag("hltPhase2L3OIMuonTrackSelectionHighPurity", "hltIter2Phase2L3FromL1TkMuonMerged"),
setsToMerge = cms.VPSet(cms.PSet(
pQual = cms.bool(False),
tLists = cms.vint32(0, 1)
)),
trackAlgoPriorityOrder = cms.string('hltESPTrackAlgoPriorityOrder'),
writeOnlyTrkQuals = cms.bool(False)
newQuality = cms.string("confirmed"),
selectedTrackQuals = cms.VInputTag(
"hltPhase2L3OIMuonTrackSelectionHighPurity",
"hltIter2Phase2L3FromL1TkMuonMerged",
),
setsToMerge = cms.VPSet(cms.PSet(pQual = cms.bool(False), tLists = cms.vint32(0, 1))),
trackAlgoPriorityOrder = cms.string("hltESPTrackAlgoPriorityOrder"),
writeOnlyTrkQuals = cms.bool(False),
)

from Configuration.ProcessModifiers.phase2L2AndL3Muons_cff import phase2L2AndL3Muons
phase2L2AndL3Muons.toModify(
hltPhase2L3MuonMerged,
TrackProducers = cms.VInputTag(
"hltPhase2L3OIMuonTrackSelectionHighPurity",
"hltPhase2L3MuonFilter:L3IOTracksFiltered",
),
selectedTrackQuals = cms.VInputTag(
"hltPhase2L3OIMuonTrackSelectionHighPurity",
"hltPhase2L3MuonFilter:L3IOTracksFiltered",
),
)

from Configuration.ProcessModifiers.phase2L3MuonsOIFirst_cff import phase2L3MuonsOIFirst
(phase2L2AndL3Muons & phase2L3MuonsOIFirst).toModify(
hltPhase2L3MuonMerged,
TrackProducers = cms.VInputTag(
"hltPhase2L3MuonFilter:L3OITracksFiltered",
"hltIter2Phase2L3FromL1TkMuonMerged",
),
selectedTrackQuals = cms.VInputTag(
"hltPhase2L3MuonFilter:L3OITracksFiltered",
"hltIter2Phase2L3FromL1TkMuonMerged",
),
)
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,15 @@
tsosDiff1 = cms.double(0.2),
tsosDiff2 = cms.double(0.02)
)

from Configuration.ProcessModifiers.phase2L2AndL3Muons_cff import phase2L2AndL3Muons
phase2L2AndL3Muons.toModify(
hltPhase2L3OISeedsFromL2Muons,
src = "hltPhase2L3MuonFilter:L2MuToReuse"
)

from Configuration.ProcessModifiers.phase2L3MuonsOIFirst_cff import phase2L3MuonsOIFirst
(phase2L2AndL3Muons & phase2L3MuonsOIFirst).toModify(
hltPhase2L3OISeedsFromL2Muons,
src ="hltL2MuonsFromL1TkMuon:UpdatedAtVtx"
)
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,16 @@
from ..sequences.HLTLocalrecoSequence_cfi import *
from ..sequences.HLTRawToDigiSequence_cfi import *

HLT_AK4PFPuppiJet520 = cms.Path(HLTBeginSequence+hltL1SeedsForPuppiJetFilter+HLTRawToDigiSequence+HLTHgcalLocalRecoSequence+HLTLocalrecoSequence+HLTTrackingV61Sequence+HLTMuonsSequence+HLTParticleFlowSequence+HLTAK4PFPuppiJetsReconstruction+hltSingleAK4PFPuppiJet520+HLTEndSequence)
HLT_AK4PFPuppiJet520 = cms.Path(
HLTBeginSequence
+ hltL1SeedsForPuppiJetFilter
+ HLTRawToDigiSequence
+ HLTHgcalLocalRecoSequence
+ HLTLocalrecoSequence
+ HLTTrackingV61Sequence
+ HLTMuonsSequence
+ HLTParticleFlowSequence
+ HLTAK4PFPuppiJetsReconstruction
+ hltSingleAK4PFPuppiJet520
+ HLTEndSequence
)
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,21 @@
from ..sequences.HLTRawToDigiSequence_cfi import *
from ..modules.hltL1SeedForDoublePuppiTau_cfi import *

HLT_DoubleMediumChargedIsoPFTauHPS40_eta2p1 = cms.Path(HLTBeginSequence+hltL1SeedForDoublePuppiTau+hltPreDoublePFTauHPS+HLTRawToDigiSequence+HLTHgcalLocalRecoSequence+HLTLocalrecoSequence+HLTTrackingV61Sequence+HLTMuonsSequence+HLTParticleFlowSequence+HLTAK4PFJetsReconstruction+hltAK4PFJetsForTaus+HLTPFTauHPS+HLTHPSMediumChargedIsoPFTauSequence+hltHpsSelectedPFTausTrackPt1MediumChargedIsolation+hltHpsDoublePFTau40TrackPt1MediumChargedIsolation+HLTEndSequence)
HLT_DoubleMediumChargedIsoPFTauHPS40_eta2p1 = cms.Path(
HLTBeginSequence
+ hltL1SeedForDoublePuppiTau
+ hltPreDoublePFTauHPS
+ HLTRawToDigiSequence
+ HLTHgcalLocalRecoSequence
+ HLTLocalrecoSequence
+ HLTTrackingV61Sequence
+ HLTMuonsSequence
+ HLTParticleFlowSequence
+ HLTAK4PFJetsReconstruction
+ hltAK4PFJetsForTaus
+ HLTPFTauHPS
+ HLTHPSMediumChargedIsoPFTauSequence
+ hltHpsSelectedPFTausTrackPt1MediumChargedIsolation
+ hltHpsDoublePFTau40TrackPt1MediumChargedIsolation
+ HLTEndSequence
)
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,21 @@
from ..sequences.HLTRawToDigiSequence_cfi import *
from ..modules.hltL1SeedForDoublePuppiTau_cfi import *

HLT_DoubleMediumDeepTauPFTauHPS35_eta2p1 = cms.Path(HLTBeginSequence+hltL1SeedForDoublePuppiTau+hltPreDoublePFTauHPS+HLTRawToDigiSequence+HLTHgcalLocalRecoSequence+HLTLocalrecoSequence+HLTTrackingV61Sequence+HLTMuonsSequence+HLTParticleFlowSequence+HLTAK4PFJetsReconstruction+hltAK4PFJetsForTaus+HLTPFTauHPS+HLTHPSDeepTauPFTauSequence+hltHpsSelectedPFTausMediumDitauWPDeepTau+hltHpsDoublePFTau35MediumDitauWPDeepTau+HLTEndSequence)
HLT_DoubleMediumDeepTauPFTauHPS35_eta2p1 = cms.Path(
HLTBeginSequence
+ hltL1SeedForDoublePuppiTau
+ hltPreDoublePFTauHPS
+ HLTRawToDigiSequence
+ HLTHgcalLocalRecoSequence
+ HLTLocalrecoSequence
+ HLTTrackingV61Sequence
+ HLTMuonsSequence
+ HLTParticleFlowSequence
+ HLTAK4PFJetsReconstruction
+ hltAK4PFJetsForTaus
+ HLTPFTauHPS
+ HLTHPSDeepTauPFTauSequence
+ hltHpsSelectedPFTausMediumDitauWPDeepTau
+ hltHpsDoublePFTau35MediumDitauWPDeepTau
+ HLTEndSequence
)
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,19 @@
from ..sequences.HLTLocalrecoSequence_cfi import *
from ..sequences.HLTRawToDigiSequence_cfi import *

HLT_DoublePFPuppiJets128_DoublePFPuppiBTagDeepCSV_2p4 = cms.Path(HLTBeginSequence+hltL1SeedsForDoublePuppiJetBtagFilter+HLTRawToDigiSequence+HLTHgcalLocalRecoSequence+HLTLocalrecoSequence+HLTTrackingV61Sequence+HLTMuonsSequence+HLTParticleFlowSequence+HLTAK4PFPuppiJetsReconstruction+hltDoublePFPuppiJets128MaxEta2p4+hltDoublePFPuppiJets128Eta2p4MaxDeta1p6+HLTBtagDeepCSVSequencePFPuppiModEta2p4+hltBTagPFPuppiDeepCSV0p865DoubleEta2p4+HLTEndSequence)
HLT_DoublePFPuppiJets128_DoublePFPuppiBTagDeepCSV_2p4 = cms.Path(
HLTBeginSequence
+ hltL1SeedsForDoublePuppiJetBtagFilter
+ HLTRawToDigiSequence
+ HLTHgcalLocalRecoSequence
+ HLTLocalrecoSequence
+ HLTTrackingV61Sequence
+ HLTMuonsSequence
+ HLTParticleFlowSequence
+ HLTAK4PFPuppiJetsReconstruction
+ hltDoublePFPuppiJets128MaxEta2p4
+ hltDoublePFPuppiJets128Eta2p4MaxDeta1p6
+ HLTBtagDeepCSVSequencePFPuppiModEta2p4
+ hltBTagPFPuppiDeepCSV0p865DoubleEta2p4
+ HLTEndSequence
)
Loading