-
Notifications
You must be signed in to change notification settings - Fork 4.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
TkAlMuonSelectors_cfi: replace MuonSelector that express the structur…
…e of the selection in C++ code - replace in 4 ALCARECO producers separated configuration with a common block: TkAlGoodIdMuonSelector+TkAlRelCombIsoMuonSelector
- Loading branch information
Showing
7 changed files
with
47 additions
and
53 deletions.
There are no files selected for viewing
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
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
42 changes: 24 additions & 18 deletions
42
Alignment/CommonAlignmentProducer/python/TkAlMuonSelectors_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,31 +1,37 @@ | ||
import FWCore.ParameterSet.Config as cms | ||
|
||
TkAlGoodIdMuonSelector = cms.EDFilter("MuonSelector", | ||
src = cms.InputTag('muons'), | ||
cut = cms.string('isGlobalMuon &' | ||
'isTrackerMuon &' | ||
'numberOfMatches > 1 &' | ||
'globalTrack.hitPattern.numberOfValidMuonHits > 0 &' | ||
'abs(eta) < 2.5 &' | ||
'globalTrack.normalizedChi2 < 20.'), | ||
filter = cms.bool(True) | ||
) | ||
from Alignment.CommonAlignmentProducer.alignmentGoodIdMuonSelector_cfi import alignmentGoodIdMuonSelector | ||
TkAlGoodIdMuonSelector = alignmentGoodIdMuonSelector.clone(src = cms.InputTag('muons'), | ||
requireGlobal = cms.bool(True), | ||
requireTracker = cms.bool(True), | ||
minMatches = cms.int32(1), | ||
minMuonHits = cms.int32(0), | ||
maxEta = cms.double(2.5), | ||
maxChi2 = cms.double(20), | ||
filter = cms.bool(True)) | ||
|
||
TkAlRelCombIsoMuonSelector = cms.EDFilter("MuonSelector", | ||
src = cms.InputTag(''), | ||
cut = cms.string('(isolationR03().sumPt + isolationR03().emEt + isolationR03().hadEt)/pt < 0.15'), | ||
filter = cms.bool(True) | ||
) | ||
from Alignment.CommonAlignmentProducer.alignmentRelCombIsoMuonSelector_cfi import alignmentRelCombIsoMuonSelector | ||
TkAlRelCombIsoMuonSelector = alignmentRelCombIsoMuonSelector.clone(src = cms.InputTag('TkAlGoodIdMuonSelector'), | ||
filter = cms.bool(True), | ||
relCombIsoCut = cms.double(0.15), | ||
useTrackerOnlyIsolation = cms.bool(False)) | ||
|
||
# Define a common sequence to be imported in ALCARECOs | ||
seqALCARECOTkAlRelCombIsoMuons = cms.Sequence(TkAlGoodIdMuonSelector+TkAlRelCombIsoMuonSelector) | ||
|
||
## FIXME: these are needed for ALCARECO production in CMSSW_14_0_X | ||
## to avoid loosing in efficiency. To be reviewed after muon reco is fixed | ||
|
||
from Configuration.Eras.Modifier_phase2_common_cff import phase2_common | ||
phase2_common.toModify(TkAlGoodIdMuonSelector, | ||
cut = '(abs(eta) < 2.5 & isGlobalMuon & isTrackerMuon & numberOfMatches > 1 & globalTrack.hitPattern.numberOfValidMuonHits > 0 & globalTrack.normalizedChi2 < 20.) ||' # regular selection | ||
'(abs(eta) > 2.3 & abs(eta) < 3.0 & numberOfMatches >= 0 & isTrackerMuon)' # to recover GE0 tracks | ||
useSecondarySelection = cms.bool(True), # to recover tracks passing through GE0 | ||
secondaryEtaLow = cms.double(2.3), | ||
secondaryEtaHigh = cms.double(3), | ||
secondaryMinMatches = cms.int32(0), | ||
secondaryRequireTracker = cms.bool(True) | ||
) | ||
|
||
phase2_common.toModify(TkAlRelCombIsoMuonSelector, | ||
cut = '(isolationR03().sumPt)/pt < 0.1' # only tracker isolation | ||
relCombIsoCut = cms.double(0.10), | ||
useTrackerOnlyIsolation = cms.bool(True) # only tracker isolation | ||
) |
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