-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Streamline HLT L3 Muon reconstruction
- execute either Inside-Out or Outside-In reconstruction first, resorting to the second pass only for candidates that require it - Tracks filtered by quality using some of the same criteria as HLT Muon ID - L1/L2 objects matched with bad L3 tracks are reused to seed the second reconstruction step - Changes implemented via 2 procModifiers for IO first (default) and OI first reconstruction - Implemented changes in SingleMu, TTbar, and ZMM workflows with .777 and .778 subfixes for IO and OI first reconstruction, respectively - Change 2026 to Run4 in Phase 2 workflows
- Loading branch information
1 parent
3b4cc57
commit 81a84be
Showing
10 changed files
with
488 additions
and
23 deletions.
There are no files selected for viewing
4 changes: 4 additions & 0 deletions
4
Configuration/ProcessModifiers/python/phase2L3MuonsOIFirst_cff.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
HLTrigger/Configuration/python/HLT_75e33/modules/hltPhase2L3MuonFilter_cfi.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
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=cms.InputTag("hltPhase2L3OIMuonTrackSelectionHighPurity"), | ||
IOFirst=cms.bool(False), | ||
) |
74 changes: 52 additions & 22 deletions
74
HLTrigger/Configuration/python/HLT_75e33/modules/hltPhase2L3MuonMerged_cfi.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,55 @@ | ||
import FWCore.ParameterSet.Config as cms | ||
|
||
hltPhase2L3MuonMerged = cms.EDProducer("TrackListMerger", | ||
Epsilon = cms.double(-0.001), | ||
FoundHitBonus = cms.double(5.0), | ||
LostHitPenalty = cms.double(20.0), | ||
MaxNormalizedChisq = cms.double(1000.0), | ||
MinFound = cms.int32(3), | ||
MinPT = cms.double(0.05), | ||
ShareFrac = cms.double(0.19), | ||
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) | ||
hltPhase2L3MuonMerged = cms.EDProducer( | ||
"TrackListMerger", | ||
Epsilon=cms.double(-0.001), | ||
FoundHitBonus=cms.double(5.0), | ||
LostHitPenalty=cms.double(20.0), | ||
MaxNormalizedChisq=cms.double(1000.0), | ||
MinFound=cms.int32(3), | ||
MinPT=cms.double(0.05), | ||
ShareFrac=cms.double(0.19), | ||
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), | ||
) | ||
|
||
from Configuration.ProcessModifiers.phase2L2AndL3Muons_cff import phase2L2AndL3Muons | ||
phase2L2AndL3Muons.toModify( | ||
hltPhase2L3MuonMerged, | ||
TrackProducers=cms.VInputTag( | ||
"hltPhase2L3OIMuonTrackSelectionHighPurity", | ||
cms.InputTag("hltPhase2L3MuonFilter", "L3IOTracksFiltered"), | ||
), | ||
selectedTrackQuals=cms.VInputTag( | ||
"hltPhase2L3OIMuonTrackSelectionHighPurity", | ||
cms.InputTag("hltPhase2L3MuonFilter", "L3IOTracksFiltered"), | ||
), | ||
) | ||
|
||
from Configuration.ProcessModifiers.phase2L3MuonsOIFirst_cff import phase2L3MuonsOIFirst | ||
(phase2L2AndL3Muons & phase2L3MuonsOIFirst).toModify( | ||
hltPhase2L3MuonMerged, | ||
TrackProducers=cms.VInputTag( | ||
cms.InputTag("hltPhase2L3MuonFilter", "L3OITracksFiltered"), | ||
"hltIter2Phase2L3FromL1TkMuonMerged", | ||
), | ||
selectedTrackQuals=cms.VInputTag( | ||
cms.InputTag("hltPhase2L3MuonFilter", "L3OITracksFiltered"), | ||
"hltIter2Phase2L3FromL1TkMuonMerged", | ||
), | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
81 changes: 81 additions & 0 deletions
81
RecoMuon/L3TrackFinder/interface/phase2HLTMuonSelectorForL3.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
#ifndef RecoMuon_L3TrackFinder_phase2HLTMuonSelectorForL3_H | ||
#define RecoMuon_L3TrackFinder_phase2HLTMuonSelectorForL3_H | ||
|
||
/** \class phase2HLTMuonSelectorForL3 | ||
* | ||
* Phase-2 L3 selector for Muons | ||
* This module allows to choose whether to perform | ||
* Inside-Out or Outside-In reconstruction first for L3 Muons, | ||
* performing the second pass only on candidates that were not | ||
* reconstructed or whose quality was not good enough. Required | ||
* quality criteria are configurable, the default parameters | ||
* match the requests of HLT Muon ID. | ||
* When Inside-Out reconstruction is performed first, the resulting | ||
* L3 Tracks are filtered and geometrically matched with L2 | ||
* Standalone Muons. If either the match is unsuccessful, or | ||
* the L3 track is not of good-enough quality, the associated | ||
* Standalone Muon will be re-used to seed the Outside-In step. | ||
* The Outside-In first approach follows a similar logic by | ||
* matching the L3 tracks directly with L1 Tracker Muons. | ||
* Then, when either the match fails or the track is not of | ||
* good-enough quality, the L1 Tracker Muon is re-used to seed | ||
* the Inside-Out reconstruction. | ||
* | ||
* \author Luca Ferragina (INFN BO), 2024 | ||
*/ | ||
|
||
#include "FWCore/Framework/interface/stream/EDProducer.h" | ||
#include "FWCore/Framework/interface/ESHandle.h" | ||
#include "FWCore/Framework/interface/Frameworkfwd.h" | ||
#include "FWCore/Framework/interface/ConsumesCollector.h" | ||
#include "FWCore/Framework/interface/EventSetup.h" | ||
#include "FWCore/Framework/interface/Event.h" | ||
#include "FWCore/Framework/interface/MakerMacros.h" | ||
#include "FWCore/ParameterSet/interface/ParameterSet.h" | ||
#include "FWCore/MessageLogger/interface/MessageLogger.h" | ||
#include "FWCore/ParameterSet/interface/ConfigurationDescriptions.h" | ||
#include "FWCore/Utilities/interface/ESGetToken.h" | ||
#include "FWCore/Utilities/interface/InputTag.h" | ||
|
||
#include "DataFormats/L1TMuonPhase2/interface/TrackerMuon.h" | ||
#include "DataFormats/MuonReco/interface/MuonFwd.h" | ||
#include "DataFormats/MuonSeed/interface/L2MuonTrajectorySeedCollection.h" | ||
#include "DataFormats/TrackReco/interface/Track.h" | ||
#include "DataFormats/TrackReco/interface/TrackFwd.h" | ||
|
||
namespace edm { | ||
class ParameterSet; | ||
class Event; | ||
class EventSetup; | ||
} // End namespace edm | ||
|
||
class phase2HLTMuonSelectorForL3 : public edm::stream::EDProducer<> { | ||
public: | ||
// Constructor | ||
phase2HLTMuonSelectorForL3(const edm::ParameterSet&); | ||
|
||
// Destructor | ||
~phase2HLTMuonSelectorForL3() override = default; | ||
|
||
// Default values | ||
static void fillDescriptions(edm::ConfigurationDescriptions& descriptions); | ||
|
||
// Select objects to be reused | ||
void produce(edm::Event&, const edm::EventSetup&) override; | ||
|
||
private: | ||
const edm::EDGetTokenT<l1t::TrackerMuonCollection> l1TkMuCollToken_; | ||
const edm::EDGetTokenT<reco::TrackCollection> l2MuCollectionToken_; | ||
const edm::EDGetTokenT<reco::TrackCollection> l3TrackCollectionToken_; | ||
|
||
const bool IOFirst_; | ||
const double matchingDr_; | ||
const bool applyL3Filters_; | ||
const double maxNormalizedChi2_, maxPtDifference_; | ||
const int minNhits_, minNhitsMuons_, minNhitsPixel_, minNhitsTracker_; | ||
|
||
// Check L3 inner track quality parameters | ||
const bool rejectL3Track(l1t::TrackerMuonRef l1TkMuRef, reco::TrackRef l3TrackRef) const; | ||
}; | ||
|
||
#endif |
Oops, something went wrong.