File indexing completed on 2024-04-06 12:24:03
0001 import FWCore.ParameterSet.Config as cms
0002
0003
0004 from PhysicsTools.PatAlgos.patTemplate_cfg import *
0005
0006 from PhysicsTools.PatAlgos.tools.cmsswVersionTools import run36xOn35xInput
0007
0008 from PhysicsTools.PatAlgos.tools.coreTools import *
0009 removeMCMatching(process, ['All'])
0010
0011 removeSpecificPATObjects(process,
0012 ['Photons','Taus'],
0013 outputInProcess=False)
0014
0015 removeCleaning(process,
0016 outputInProcess=False)
0017
0018 process.patJetCorrFactors.useRho = False
0019 process.patMuons.usePV = False
0020
0021
0022
0023
0024
0025 from HLTrigger.HLTfilters.hltHighLevel_cfi import *
0026 process.step1 = hltHighLevel.clone(TriggerResultsTag = "TriggerResults::HLT", HLTPaths = ["HLT_Mu15"])
0027
0028
0029
0030
0031
0032
0033 process.step2 = cms.EDFilter("VertexSelector",
0034 src = cms.InputTag("offlinePrimaryVertices"),
0035 cut = cms.string("!isFake && ndof > 4 && abs(z) < 15 && position.Rho < 2"),
0036 filter = cms.bool(True),
0037 )
0038
0039
0040
0041
0042
0043 from PhysicsTools.PatAlgos.cleaningLayer1.muonCleaner_cfi import *
0044 process.isolatedMuons010 = cleanPatMuons.clone(preselection =
0045 'isGlobalMuon & isTrackerMuon &'
0046 'pt > 20. &'
0047 'abs(eta) < 2.1 &'
0048 '(trackIso+caloIso)/pt < 0.1 &'
0049 'innerTrack.numberOfValidHits > 10 &'
0050 'globalTrack.normalizedChi2 < 10.0 &'
0051 'globalTrack.hitPattern.numberOfValidMuonHits > 0 &'
0052 'abs(dB) < 0.02'
0053 )
0054
0055 process.isolatedMuons010.checkOverlaps = cms.PSet(
0056 jets = cms.PSet(src = cms.InputTag("goodJets"),
0057 algorithm = cms.string("byDeltaR"),
0058 preselection = cms.string(""),
0059 deltaR = cms.double(0.3),
0060 checkRecoComponents = cms.bool(False),
0061 pairCut = cms.string(""),
0062 requireNoOverlaps = cms.bool(True),
0063 )
0064 )
0065 process.isolatedMuons005 = cleanPatMuons.clone(src = 'isolatedMuons010',
0066 preselection = '(trackIso+caloIso)/pt < 0.05'
0067 )
0068
0069 process.vetoMuons = cleanPatMuons.clone(preselection =
0070 'isGlobalMuon &'
0071 'pt > 10. &'
0072 'abs(eta) < 2.5 &'
0073 '(trackIso+caloIso)/pt < 0.2'
0074 )
0075
0076 from PhysicsTools.PatAlgos.selectionLayer1.muonCountFilter_cfi import *
0077 process.step3a = countPatMuons.clone(src = 'isolatedMuons005', minNumber = 1, maxNumber = 1)
0078 process.step3b = countPatMuons.clone(src = 'isolatedMuons010', minNumber = 1, maxNumber = 1)
0079 process.step4 = countPatMuons.clone(src = 'vetoMuons', maxNumber = 1)
0080
0081
0082
0083
0084
0085 from PhysicsTools.PatAlgos.selectionLayer1.electronSelector_cfi import *
0086 process.vetoElectrons = selectedPatElectrons.clone(src = 'selectedPatElectrons',
0087 cut =
0088 'et > 15. &'
0089 'abs(eta) < 2.5 &'
0090 '(dr03TkSumPt+dr03EcalRecHitSumEt+dr03HcalTowerSumEt)/et < 0.2'
0091 )
0092
0093 from PhysicsTools.PatAlgos.selectionLayer1.electronCountFilter_cfi import *
0094 process.step5 = countPatMuons.clone(src = 'vetoElectrons', maxNumber = 0)
0095
0096
0097
0098
0099
0100 from PhysicsTools.PatAlgos.selectionLayer1.jetSelector_cfi import *
0101 process.goodJets = selectedPatJets.clone(src = 'patJets',
0102 cut =
0103 'pt > 30. &'
0104 'abs(eta) < 2.4 &'
0105 'emEnergyFraction > 0.01 &'
0106 'jetID.n90Hits > 1 &'
0107 'jetID.fHPD < 0.98'
0108 )
0109
0110 from PhysicsTools.PatAlgos.selectionLayer1.jetCountFilter_cfi import *
0111 process.step6a = countPatJets.clone(src = 'goodJets', minNumber = 1)
0112 process.step6b = countPatJets.clone(src = 'goodJets', minNumber = 2)
0113 process.step6c = countPatJets.clone(src = 'goodJets', minNumber = 3)
0114 process.step7 = countPatJets.clone(src = 'goodJets', minNumber = 4)
0115
0116
0117
0118
0119
0120 process.looseSequence = cms.Path(process.step1 *
0121 process.step2 *
0122 process.patDefaultSequence *
0123 process.goodJets *
0124 process.isolatedMuons010 *
0125 process.step3b *
0126 process.vetoMuons *
0127 process.step4 *
0128 process.vetoElectrons *
0129 process.step5 *
0130 process.step6a *
0131 process.step6b *
0132 process.step6c
0133 )
0134
0135 process.tightSequence = cms.Path(process.step1 *
0136 process.step2 *
0137 process.patDefaultSequence *
0138 process.goodJets *
0139 process.isolatedMuons010 *
0140 process.isolatedMuons005 *
0141 process.step3a *
0142 process.vetoMuons *
0143 process.step4 *
0144 process.vetoElectrons *
0145 process.step5 *
0146 process.step6a *
0147 process.step6b *
0148 process.step6c *
0149 process.step7
0150 )
0151
0152
0153 process.out.SelectEvents.SelectEvents = ['tightSequence',
0154 'looseSequence' ]
0155
0156 from PhysicsTools.PatAlgos.patEventContent_cff import patEventContentNoCleaning
0157 process.out.outputCommands = cms.untracked.vstring('drop *', *patEventContentNoCleaning )
0158 process.out.outputCommands+=[ 'keep *_isolatedMuons010_*_*',
0159 'keep *_isolatedMuons005_*_*',
0160 'keep *_vetoMuons_*_*',
0161 'keep *_vetoElectrons_*_*',
0162 'keep *_goodJets_*_*'
0163 ]