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

TOP DQM: Fixed MuonRelIso #29309

Merged
merged 3 commits into from Apr 9, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
135 changes: 4 additions & 131 deletions DQM/Physics/python/singleTopDQM_cfi.py
Expand Up @@ -10,7 +10,7 @@

#Loose muon selection
looseMuonCut = "(muonRef.isNonnull && (muonRef.isGlobalMuon || muonRef.isTrackerMuon) && muonRef.isPFMuon)"
looseIsoCut = "((muonRef.pfIsolationR04.sumChargedHadronPt + max(0., muonRef.pfIsolationR04.sumNeutralHadronEt + muonRef.pfIsolationR04.sumPhotonEt - 0.5 * muonRef.pfIsolationR04.sumPUPt) ) / muonRef.pt < 0.25)"
looseIsoCut = "(muonRef.pfIsolationR04.sumChargedHadronPt + max(0., muonRef.pfIsolationR04.sumNeutralHadronEt + muonRef.pfIsolationR04.sumPhotonEt - 0.5 * muonRef.pfIsolationR04.sumPUPt) ) / muonRef.pt < 0.25"

#Medium muon selection. Also requires either good global muon or tight segment compatibility
mediumMuonCut = looseMuonCut + " muonRef.innerTrack.validFraction > 0.8"
Expand All @@ -26,133 +26,6 @@
tightEleCut = "((gsfElectronRef.full5x5_sigmaIetaIeta() < 0.00998 && gsfElectronRef.superCluster().isNonnull() && gsfElectronRef.superCluster().seed().isNonnull() && (gsfElectronRef.deltaEtaSuperClusterTrackAtVtx() - gsfElectronRef.superCluster().eta() + gsfElectronRef.superCluster().seed().eta()) < 0.00308 && abs(gsfElectronRef.deltaPhiSuperClusterTrackAtVtx()) < 0.0816 && gsfElectronRef.hadronicOverEm() < 0.0414 && abs(1.0 - gsfElectronRef.eSuperClusterOverP())*1.0/gsfElectronRef.ecalEnergy() < 0.0129 && gsfElectronRef.gsfTrack.hitPattern().numberOfLostHits('MISSING_INNER_HITS') <= 1 && abs(gsfElectronRef.superCluster().eta()) < 1.479) || (gsfElectronRef.full5x5_sigmaIetaIeta() < 0.0292 && gsfElectronRef.superCluster().isNonnull() && gsfElectronRef.superCluster().seed().isNonnull() && (gsfElectronRef.deltaEtaSuperClusterTrackAtVtx() - gsfElectronRef.superCluster().eta() + gsfElectronRef.superCluster().seed().eta()) < 0.00605 && abs(gsfElectronRef.deltaPhiSuperClusterTrackAtVtx()) < 0.0394 && gsfElectronRef.hadronicOverEm() < 0.0641 && abs(1.0 - gsfElectronRef.eSuperClusterOverP())*1.0/gsfElectronRef.ecalEnergy() < 0.0129 && gsfElectronRef.gsfTrack.hitPattern().numberOfLostHits('MISSING_INNER_HITS') <= 1 && abs(gsfElectronRef.superCluster().eta()) > 1.479))"

from DQMServices.Core.DQMEDAnalyzer import DQMEDAnalyzer
singleTopTChannelLeptonDQM = DQMEDAnalyzer('SingleTopTChannelLeptonDQM',
## ------------------------------------------------------
## SETUP
##
## configuration of the MonitoringEnsemble(s)
## [mandatory] : optional PSets may be omitted
##
setup = cms.PSet(
## sub-directory to write the monitor histograms to
## [mandatory] : should not be changed w/o explicit
## communication to TopCom!
directory = cms.string("Physics/Top/SingleTopDQM/"),
## [mandatory]
sources = cms.PSet(
muons = cms.InputTag("pfIsolatedMuonsEI"),
elecs = cms.InputTag("pfIsolatedElectronsEI"),
jets = cms.InputTag("ak4PFJetsCHS"),
mets = cms.VInputTag("met", "tcMet", "pfMetEI"),
pvs = cms.InputTag("offlinePrimaryVertices")
),
## [optional] : when omitted the verbosity level is set to STANDARD
monitoring = cms.PSet(
verbosity = cms.string("DEBUG")
),
## [optional] : when omitted all monitoring plots for primary vertices
## will be filled w/o extras
# pvExtras = cms.PSet(
## when omitted electron plots will be filled w/o additional pre-
## selection of the primary vertex candidates
# select = cms.string("abs(x)<1. & abs(y)<1. & abs(z)<20. & tracksSize>3 & !isFake")
# ),
## [optional] : when omitted all monitoring plots for electrons
## will be filled w/o extras
elecExtras = cms.PSet(
## when omitted electron plots will be filled w/o cut on electronId
##electronId = cms.PSet( src = cms.InputTag("mvaTrigV0"), cutValue = cms.double(0.5) ),
## when omitted electron plots will be filled w/o additional pre-
## selection of the electron candidates
select = cms.string("pt>15 & abs(eta)<2.5 & abs(gsfElectronRef.gsfTrack.d0)<1 & abs(gsfElectronRef.gsfTrack.dz)<20"),
## when omitted isolated electron multiplicity plot will be equi-
## valent to inclusive electron multiplicity plot
#isolation = cms.string(ElelooseIsoCut),
),
## [optional] : when omitted all monitoring plots for muons
## will be filled w/o extras
muonExtras = cms.PSet(
## when omitted muon plots will be filled w/o additional pre-
## selection of the muon candidates
select = cms.string("pt>10 & abs(eta)<2.1 & isGlobalMuon & abs(globalTrack.d0)<1 & abs(globalTrack.dz)<20"),
## when omitted isolated muon multiplicity plot will be equi-
## valent to inclusive muon multiplicity plot
# isolation = cms.string("(isolationR03.sumPt+isolationR03.emEt+isolationR03.hadEt)/pt<0.1"),
),
## [optional] : when omitted all monitoring plots for jets will
## be filled from uncorrected jets
jetExtras = cms.PSet(
## when omitted monitor plots for pt will be filled from uncorrected
## jets
jetCorrector = cms.string("ak4CaloL2L3"),
## when omitted monitor plots will be filled w/o additional cut on
## jetID
# jetID = cms.PSet(
# label = cms.InputTag("ak4JetID"),
# select = cms.string("fHPD < 0.98 & n90Hits>1 & restrictedEMF<1")
# ),
## when omitted no extra selection will be applied on jets before
## filling the monitor histograms; if jetCorrector is present the
## selection will be applied to corrected jets
select = cms.string("pt>15 & abs(eta)<2.5 & emEnergyFraction>0.01"),
),
## [optional] : when omitted no mass window will be applied
## for the W mass befor filling the event monitoring plots
# massExtras = cms.PSet(
# lowerEdge = cms.double( 70.),
# upperEdge = cms.double(110.)
# ),
## [optional] : when omitted the monitoring plots for triggering
## will be empty
triggerExtras = cms.PSet(
src = cms.InputTag("TriggerResults","","HLT"),
paths = cms.vstring(['HLT_Mu3:HLT_QuadJet15U',
'HLT_Mu5:HLT_QuadJet15U',
'HLT_Mu7:HLT_QuadJet15U',
'HLT_Mu9:HLT_QuadJet15U'])
)
),
## ------------------------------------------------------
## PRESELECTION
##
## setup of the event preselection, which will not
## be monitored
## [mandatory] : but may be empty
##
preselection = cms.PSet(
## [optional] : when omitted no preselection is applied
# trigger = cms.PSet(
# src = cms.InputTag("TriggerResults","","HLT"),
# select = cms.vstring(['HLT_Mu11', 'HLT_Ele15_LW_L1R', 'HLT_QuadJet30'])
# ),
## [optional] : when omitted no preselection is applied
# vertex = cms.PSet(
# src = cms.InputTag("offlinePrimaryVertices"),
# select = cms.string('abs(x)<1. & abs(y)<1. & abs(z)<20. & tracksSize>3 & !isFake')
# )
),
## ------------------------------------------------------
## SELECTION
##
## monitor histrograms are filled after each selection
## step, the selection is applied in the order defined
## by this vector
## [mandatory] : may be empty or contain an arbitrary
## number of PSets
##
selection = cms.VPSet(
cms.PSet(
label = cms.string("jets/calo:step0"),
src = cms.InputTag("ak4CaloJets"),
select = cms.string("pt>20 & abs(eta)<2.1 & 0.05<emEnergyFraction"),
jetID = cms.PSet(
label = cms.InputTag("ak4JetID"),
select = cms.string("fHPD < 0.98 & n90Hits>1 & restrictedEMF<1")
),
min = cms.int32(2),
)
)
)

singleTopMuonMediumDQM = DQMEDAnalyzer('SingleTopTChannelLeptonDQM',
## ------------------------------------------------------
Expand Down Expand Up @@ -181,7 +54,7 @@
rho = cms.InputTag("fixedGridRhoFastjetAll"),
),
muonExtras = cms.PSet(
select = cms.string(looseMuonCut + " && pt>20 & abs(eta)<2.1"),
select = cms.string(tightMuonCut + " && pt>20 & abs(eta)<2.4"),
isolation = cms.string(looseIsoCut)
),
jetExtras = cms.PSet(
Expand Down Expand Up @@ -215,7 +88,7 @@
cms.PSet(
label = cms.string("muons/pf:step0"),
src = cms.InputTag("pfIsolatedMuonsEI"),
select = cms.string(looseMuonCut + " && pt>20 & abs(eta)<2.1"),
select = cms.string(tightMuonCut + " && pt>20 & abs(eta)<2.4"),
min = cms.int32(1),
),
cms.PSet(
Expand Down Expand Up @@ -262,7 +135,7 @@
rho = cms.InputTag("fixedGridRhoFastjetAll"),
),
muonExtras = cms.PSet(
select = cms.string(looseMuonCut + " && pt>20 & abs(eta)<2.1"),
select = cms.string(tightMuonCut + " && pt>20 & abs(eta)<2.4"),
isolation = cms.string(looseIsoCut)
),
jetExtras = cms.PSet(
Expand Down
72 changes: 3 additions & 69 deletions DQM/Physics/python/singleTopDQM_miniAOD_cfi.py
Expand Up @@ -21,72 +21,6 @@
tightElecCut = "((full5x5_sigmaIetaIeta < 0.00998 && superCluster.isNonnull && superCluster.seed.isNonnull && (deltaEtaSuperClusterTrackAtVtx - superCluster.eta + superCluster.seed.eta) < 0.00308 && abs(deltaPhiSuperClusterTrackAtVtx) < 0.0816 && hadronicOverEm < 0.0414 && abs(1.0 - eSuperClusterOverP)*1.0/ecalEnergy < 0.0129 && gsfTrack.hitPattern().numberOfLostHits('MISSING_INNER_HITS') <= 1 && abs(superCluster.eta) < 1.479) || (full5x5_sigmaIetaIeta() < 0.0292 && superCluster.isNonnull && superCluster.seed.isNonnull && (deltaEtaSuperClusterTrackAtVtx - superCluster.eta + superCluster.seed.eta) < 0.00605 && abs(deltaPhiSuperClusterTrackAtVtx) < 0.0394 && hadronicOverEm < 0.0641 && abs(1.0 - eSuperClusterOverP)*1.0/ecalEnergy < 0.0129 && gsfTrack.hitPattern().numberOfLostHits('MISSING_INNER_HITS') <= 1 && abs(superCluster.eta) > 1.479))"

from DQMServices.Core.DQMEDAnalyzer import DQMEDAnalyzer
singleTopTChannelLeptonDQM_miniAOD = DQMEDAnalyzer('SingleTopTChannelLeptonDQM_miniAOD',

setup = cms.PSet(

directory = cms.string("Physics/Top/SingleTopDQM_miniAOD/"),

sources = cms.PSet(
muons = cms.InputTag("slimmedMuons"),
elecs = cms.InputTag("slimmedElectrons"),
jets = cms.InputTag("slimmedJets"),
mets = cms.VInputTag("slimmedMETs", "slimmedMETsNoHF", "slimmedMETsPuppi"),
pvs = cms.InputTag("offlineSlimmedPrimaryVertices")
),

monitoring = cms.PSet(
verbosity = cms.string("DEBUG")
),

pvExtras = cms.PSet(
select = cms.string("abs(z) < 24. & position.rho < 2. & ndof > 4 & !isFake")
),
elecExtras = cms.PSet(

select = cms.string(looseElecCut+ "&& pt>20 & abs(eta)<2.5 & (abs(superCluster.eta) <= 1.4442 || abs(superCluster.eta) >= 1.5660)"),
rho = cms.InputTag("fixedGridRhoFastjetAll"),
#isolation = cms.string(ElelooseIsoCut),

),

muonExtras = cms.PSet(

select = cms.string(looseMuonCut + " && pt>20 & abs(eta)<2.1"),
isolation = cms.string(looseIsoCut),
),

jetExtras = cms.PSet(

select = cms.string("pt>30 & abs(eta)<2.4"),
),

triggerExtras = cms.PSet(
src = cms.InputTag("TriggerResults","","HLT"),
paths = cms.vstring(['HLT_Mu3:HLT_QuadJet15U',
'HLT_Mu5:HLT_QuadJet15U',
'HLT_Mu7:HLT_QuadJet15U',
'HLT_Mu9:HLT_QuadJet15U'])
)
),

preselection = cms.PSet(

),

selection = cms.VPSet(
cms.PSet(
label = cms.string("jets/calo:step0"),
src = cms.InputTag("ak4CaloJets"),
select = cms.string("pt>20 & abs(eta)<2.1 & 0.05<emEnergyFraction"),
jetID = cms.PSet(
label = cms.InputTag("ak4JetID"),
select = cms.string("fHPD < 0.98 & n90Hits>1 & restrictedEMF<1")
),
min = cms.int32(2),
),
)
)

singleTopMuonMediumDQM_miniAOD = DQMEDAnalyzer('SingleTopTChannelLeptonDQM_miniAOD',
setup = cms.PSet(
Expand Down Expand Up @@ -114,7 +48,7 @@
),

muonExtras = cms.PSet(
select = cms.string(looseMuonCut + " && pt>20 & abs(eta)<2.1"),
select = cms.string(tightMuonCut + " && pt>20 & abs(eta)<2.4 && " + looseIsoCut),
isolation = cms.string(looseIsoCut)
),
jetExtras = cms.PSet(
Expand Down Expand Up @@ -155,7 +89,7 @@
cms.PSet(
label = cms.string("muons:step0"),
src = cms.InputTag("slimmedMuons"),
select = cms.string(looseMuonCut + " && pt > 20 & abs(eta)<2.1"), #tightMuonCut +"&&"+ tightIsoCut + " && pt>20 & abs(eta)<2.1"), # CB what about iso? CD Added tightIso
select = cms.string(tightMuonCut + " && pt>20 & abs(eta)<2.4 && " + looseIsoCut), #tightMuonCut +"&&"+ tightIsoCut + " && pt>20 & abs(eta)<2.1"), # CB what about iso? CD Added tightIso
min = cms.int32(1),
#max = cms.int32(1),
),
Expand Down Expand Up @@ -203,7 +137,7 @@
#isolation = cms.string(ElelooseIsoCut),
),
muonExtras = cms.PSet(
select = cms.string(looseMuonCut + " && pt>20 & abs(eta)<2.1"),
select = cms.string(tightMuonCut + " && pt>20 & abs(eta)<2.4 && " + looseIsoCut),
isolation = cms.string(looseIsoCut)
),

Expand Down