Skip to content

Commit

Permalink
Merge pull request #10608 from schoef/CMSSW_7_5_X_Devel2
Browse files Browse the repository at this point in the history
 MET Filter update (port of #10604)
  • Loading branch information
cmsbuild committed Aug 31, 2015
2 parents b307746 + c93b975 commit f9e0f12
Show file tree
Hide file tree
Showing 10 changed files with 51 additions and 90 deletions.
14 changes: 0 additions & 14 deletions CalibMuon/DTCalibration/python/ALCARECODtCalibHI_cff.py
Expand Up @@ -18,20 +18,6 @@
dt4DSegmentsNoWire.Reco4DAlgoConfig.recAlgoConfig.tTrigModeConfig.doWirePropCorrection = False
dt4DSegmentsNoWire.Reco4DAlgoConfig.Reco2DAlgoConfig.recAlgoConfig.tTrigModeConfig.doWirePropCorrection = False

#this is to select collisions
primaryVertexFilter = cms.EDFilter("VertexSelector",
src = cms.InputTag("hiSelectedVertex"),
cut = cms.string("!isFake && ndof > 4 && abs(z) <= 15 && position.Rho <= 2"),
filter = cms.bool(True),
)

noscraping = cms.EDFilter("FilterOutScraping",
applyfilter = cms.untracked.bool(True),
debugOn = cms.untracked.bool(False),
numtrack = cms.untracked.uint32(10),
thresh = cms.untracked.double(0.25)
)

#seqALCARECODtCalibHI = cms.Sequence(ALCARECODtCalibHIHLTFilter * primaryVertexFilter * DTCalibMuonSelection * dt4DSegmentsNoWire)

seqALCARECODtCalibHI = cms.Sequence(ALCARECODtCalibHIHLTFilter * dt4DSegmentsNoWire)
13 changes: 1 addition & 12 deletions CalibMuon/DTCalibration/python/ALCARECODtCalib_cff.py
Expand Up @@ -18,17 +18,6 @@
dt4DSegmentsNoWire.Reco4DAlgoConfig.Reco2DAlgoConfig.recAlgoConfig.tTrigModeConfig.doWirePropCorrection = False

#this is to select collisions
primaryVertexFilter = cms.EDFilter("VertexSelector",
src = cms.InputTag("offlinePrimaryVertices"),
cut = cms.string("!isFake && ndof > 4 && abs(z) <= 15 && position.Rho <= 2"), # tracksSize() > 3 for the older cut
filter = cms.bool(True), # otherwise it won't filter the events, just produce an empty vertex collection.
)

noscraping = cms.EDFilter("FilterOutScraping",
applyfilter = cms.untracked.bool(True),
debugOn = cms.untracked.bool(False),
numtrack = cms.untracked.uint32(10),
thresh = cms.untracked.double(0.25)
)
from RecoMET.METFilters.metFilters_cff import primaryVertexFilter, noscraping

seqALCARECODtCalib = cms.Sequence(primaryVertexFilter * noscraping * ALCARECODtCalibHLTFilter * DTCalibMuonSelection * dt4DSegmentsNoWire)
7 changes: 7 additions & 0 deletions CommonTools/RecoAlgos/python/HBHENoiseFilter_cfi.py
Expand Up @@ -12,3 +12,10 @@
inputLabel = cms.InputTag('HBHENoiseFilterResultProducer','HBHENoiseFilterResult'),
reverseDecision = cms.bool(False)
)

# Filter on the standard HCAL noise decision (isolation)
HBHENoiseIsoFilter = cms.EDFilter(
'BooleanFlagFilter',
inputLabel = cms.InputTag('HBHENoiseFilterResultProducer','HBHEIsoNoiseFilterResult'),
reverseDecision = cms.bool(False)
)
10 changes: 6 additions & 4 deletions PhysicsTools/PatAlgos/python/slimming/metFilterPaths_cff.py
Expand Up @@ -2,16 +2,18 @@

## We don't use "import *" because the cff contains some modules for which the C++ class doesn't exist
## and this triggers an error under unscheduled mode
from RecoMET.METFilters.metFilters_cff import HBHENoiseFilterResultProducer, HBHENoiseFilter, CSCTightHaloFilter, hcalLaserEventFilter, EcalDeadCellTriggerPrimitiveFilter, eeBadScFilter, ecalLaserCorrFilter
from RecoMET.METFilters.metFilters_cff import HBHENoiseFilterResultProducer, HBHENoiseFilter, HBHENoiseIsoFilter, CSCTightHaloFilter, hcalLaserEventFilter, EcalDeadCellTriggerPrimitiveFilter, eeBadScFilter, ecalLaserCorrFilter, EcalDeadCellBoundaryEnergyFilter, primaryVertexFilter
from RecoMET.METFilters.metFilters_cff import goodVertices, trackingFailureFilter, trkPOGFilters, manystripclus53X, toomanystripclus53X, logErrorTooManyClusters
from RecoMET.METFilters.metFilters_cff import metFilters

# individual filters
Flag_HBHENoiseFilter = cms.Path(HBHENoiseFilterResultProducer * HBHENoiseFilter)
Flag_HBHENoiseIsoFilter = cms.Path(HBHENoiseFilterResultProducer * HBHENoiseIsoFilter)
Flag_CSCTightHaloFilter = cms.Path(CSCTightHaloFilter)
Flag_hcalLaserEventFilter = cms.Path(hcalLaserEventFilter)
Flag_EcalDeadCellTriggerPrimitiveFilter = cms.Path(EcalDeadCellTriggerPrimitiveFilter)
Flag_goodVertices = cms.Path(goodVertices)
Flag_EcalDeadCellBoundaryEnergyFilter = cms.Path(EcalDeadCellBoundaryEnergyFilter)
Flag_goodVertices = cms.Path(primaryVertexFilter)
Flag_trackingFailureFilter = cms.Path(goodVertices + trackingFailureFilter)
Flag_eeBadScFilter = cms.Path(eeBadScFilter)
Flag_ecalLaserCorrFilter = cms.Path(ecalLaserCorrFilter)
Expand All @@ -26,13 +28,13 @@
Flag_METFilters = cms.Path(metFilters)

#add your new path here!!
allMetFilterPaths=['HBHENoiseFilter','CSCTightHaloFilter','hcalLaserEventFilter','EcalDeadCellTriggerPrimitiveFilter','goodVertices','eeBadScFilter',
allMetFilterPaths=['HBHENoiseFilter','HBHENoiseIsoFilter','CSCTightHaloFilter','hcalLaserEventFilter','EcalDeadCellTriggerPrimitiveFilter','EcalDeadCellBoundaryEnergyFilter','goodVertices','eeBadScFilter',
'ecalLaserCorrFilter','trkPOGFilters','trkPOG_manystripclus53X','trkPOG_toomanystripclus53X','trkPOG_logErrorTooManyClusters','METFilters']


def miniAOD_customizeMETFiltersFastSim(process):
"""Replace some MET filters that don't work in FastSim with trivial bools"""
for X in 'CSCTightHaloFilter', 'HBHENoiseFilter', 'HBHENoiseFilterResultProducer':
for X in 'CSCTightHaloFilter', 'HBHENoiseFilter', 'HBHENoiseIsoFilter', 'HBHENoiseFilterResultProducer':
process.globalReplace(X, cms.EDFilter("HLTBool", result=cms.bool(True)))
for X in 'manystripclus53X', 'toomanystripclus53X', 'logErrorTooManyClusters':
process.globalReplace(X, cms.EDFilter("HLTBool", result=cms.bool(False)))
Expand Down
Expand Up @@ -38,8 +38,8 @@
#### limitDeadCellToChannelStatusEB=cms.vint32(12,14)
#### limitDeadCellToChannelStatusEE=cms.vint32()
#### for negative values all status>=abs(given value) are used (e.g. limitDeadCellToChannelStatusEE=cms.vint32(-13)--->limitDeadCellToChannelStatusEE=cms.vint32(13,14,15,16,17,...))
limitDeadCellToChannelStatusEB=cms.vint32(12, 14),
limitDeadCellToChannelStatusEE=cms.vint32(12, 14),
limitDeadCellToChannelStatusEB=cms.vint32(12, 13, 14),
limitDeadCellToChannelStatusEE=cms.vint32(12, 13, 14),
#### enable calculation of energy deposits next to cracks/gaps
enableGap=cms.untracked.bool(False),
taggingMode = cms.bool(False),
Expand Down
50 changes: 0 additions & 50 deletions RecoMET/METFilters/python/EcalDeadCellDeltaRFilter_cfi.py

This file was deleted.

Expand Up @@ -12,7 +12,7 @@
verbose = cms.int32( 1 ),

tpDigiCollection = cms.InputTag("ecalTPSkimNA"),
etValToBeFlagged = cms.double(63.75),
etValToBeFlagged = cms.double(127.5),

ebReducedRecHitCollection = cms.InputTag("reducedEcalRecHitsEB"),
eeReducedRecHitCollection = cms.InputTag("reducedEcalRecHitsEE"),
Expand Down
25 changes: 18 additions & 7 deletions RecoMET/METFilters/python/metFilters_cff.py
Expand Up @@ -13,6 +13,9 @@
## The ECAL dead cell trigger primitive filter _______________________________||
from RecoMET.METFilters.EcalDeadCellTriggerPrimitiveFilter_cfi import *

## The ECAL dead cell trigger primitive filter _______________________________||
from RecoMET.METFilters.EcalDeadCellBoundaryEnergyFilter_cfi import *

## The EE bad SuperCrystal filter ____________________________________________||
from RecoMET.METFilters.eeBadScFilter_cfi import *

Expand All @@ -22,14 +25,20 @@
## The Good vertices collection needed by the tracking failure filter ________||
goodVertices = cms.EDFilter(
"VertexSelector",
filter = cms.bool(False),
filter = cms.bool(True),
src = cms.InputTag("offlinePrimaryVertices"),
cut = cms.string("!isFake && ndof > 4 && abs(z) <= 24 && position.rho < 2")
)

## The tracking failure filter _______________________________________________||
from RecoMET.METFilters.trackingFailureFilter_cfi import *

##noscraping (outdated)_______________________________________________________||
from RecoMET.METFilters.scrapingFilter_cfi import *

## The primary vertex filter__ _______________________________________________||
from RecoMET.METFilters.primaryVertexFilter_cfi import *

## The tracking POG filters __________________________________________________||
from RecoMET.METFilters.trackingPOGFilters_cff import *
## NOTE: to make tagging mode of the tracking POG filters (three of them), please do:
Expand All @@ -46,11 +55,13 @@
metFilters = cms.Sequence(
HBHENoiseFilterResultProducer *
HBHENoiseFilter *
# HBHENoiseIsoFilter*
primaryVertexFilter*
CSCTightHaloFilter *
hcalLaserEventFilter *
EcalDeadCellTriggerPrimitiveFilter *
goodVertices * trackingFailureFilter *
eeBadScFilter *
ecalLaserCorrFilter *
trkPOGFilters
# hcalLaserEventFilter *
EcalDeadCellTriggerPrimitiveFilter*
# *goodVertices * trackingFailureFilter *
eeBadScFilter
# ecalLaserCorrFilter *
# trkPOGFilters
)
9 changes: 9 additions & 0 deletions RecoMET/METFilters/python/primaryVertexFilter_cfi.py
@@ -0,0 +1,9 @@

import FWCore.ParameterSet.Config as cms

primaryVertexFilter = cms.EDFilter("GoodVertexFilter",
vertexCollection = cms.InputTag('offlinePrimaryVertices'),
minimumNDOF = cms.uint32(4) ,
maxAbsZ = cms.double(24),
maxd0 = cms.double(2)
)
7 changes: 7 additions & 0 deletions RecoMET/METFilters/python/scrapingFilter_cfi.py
@@ -0,0 +1,7 @@
import FWCore.ParameterSet.Config as cms
noscraping = cms.EDFilter("FilterOutScraping",
applyfilter = cms.untracked.bool(True),
debugOn = cms.untracked.bool(False),
numtrack = cms.untracked.uint32(10),
thresh = cms.untracked.double(0.25)
)

0 comments on commit f9e0f12

Please sign in to comment.