Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 14:13:58

0001 import FWCore.ParameterSet.Config as cms
0002 
0003 #Hotline skim parameters
0004 singleMuonCut = 600
0005 doubleMuonCut = 300
0006 tripleMuonCut = 150
0007 singleElectronCut = 900
0008 doubleElectronCut = 300
0009 tripleElectronCut = 100
0010 singlePhotonCut = 1200
0011 doublePhotonCut = 700
0012 triplePhotonCut = 300
0013 singleJetCut = 1600
0014 doubleJetCut = 1400
0015 multiJetCut = 100
0016 multiJetNJets = 8
0017 htCut = 4000
0018 dimuonMassCut = 800
0019 dielectronMassCut = 800
0020 diEMuMassCut = 800
0021 
0022 #MET hotline skim parameters
0023 pfMetCut = 300
0024 caloMetCut = 300
0025 condPFMetCut = 100 #PF MET cut for large Calo/PF skim
0026 condCaloMetCut = 100 #Calo MET cut for large PF/Calo skim
0027 caloOverPFRatioCut = 2 #cut on Calo MET / PF MET
0028 PFOverCaloRatioCut = 2 #cut on PF MET / Calo MET
0029 
0030 ## select events with at least one good PV
0031 from RecoMET.METFilters.primaryVertexFilter_cfi import *
0032 
0033 ## apply HBHE Noise filter
0034 from CommonTools.RecoAlgos.HBHENoiseFilter_cfi import HBHENoiseFilter
0035 from CommonTools.RecoAlgos.HBHENoiseFilterResultProducer_cfi import HBHENoiseFilterResultProducer
0036 
0037 #CSC beam halo filter
0038 from RecoMET.METFilters.globalTightHalo2016Filter_cfi import *
0039 
0040 #one muon
0041 singleMuonSelector = cms.EDFilter(
0042     "CandViewSelector",
0043     src = cms.InputTag("muons"),
0044     cut = cms.string( "isGlobalMuon() & pt() > "+str(singleMuonCut) )
0045 )
0046 singleMuonFilter = cms.EDFilter(
0047     "CandViewCountFilter",
0048     src = cms.InputTag("singleMuonSelector"),
0049     minNumber = cms.uint32(1)
0050 )
0051 seqHotlineSkimSingleMuon = cms.Sequence(primaryVertexFilter * globalTightHalo2016Filter * HBHENoiseFilterResultProducer * HBHENoiseFilter * singleMuonSelector * singleMuonFilter)
0052 
0053 #two muons
0054 doubleMuonSelector = cms.EDFilter(
0055     "CandViewSelector",
0056     src = cms.InputTag("muons"),
0057     cut = cms.string( "pt() > "+str(doubleMuonCut) )
0058 )
0059 doubleMuonFilter = cms.EDFilter(
0060     "CandViewCountFilter",
0061     src = cms.InputTag("doubleMuonSelector"),
0062     minNumber = cms.uint32(2)
0063 )
0064 seqHotlineSkimDoubleMuon = cms.Sequence(primaryVertexFilter * globalTightHalo2016Filter * HBHENoiseFilterResultProducer * HBHENoiseFilter * doubleMuonSelector * doubleMuonFilter)
0065 
0066 #three muons
0067 tripleMuonSelector = cms.EDFilter(
0068     "CandViewSelector",
0069     src = cms.InputTag("muons"),
0070     cut = cms.string( "pt() > "+str(tripleMuonCut) )
0071 )
0072 tripleMuonFilter = cms.EDFilter(
0073     "CandViewCountFilter",
0074     src = cms.InputTag("tripleMuonSelector"),
0075     minNumber = cms.uint32(3)
0076 )
0077 seqHotlineSkimTripleMuon = cms.Sequence(primaryVertexFilter * globalTightHalo2016Filter * HBHENoiseFilterResultProducer * HBHENoiseFilter * tripleMuonSelector * tripleMuonFilter)
0078 
0079 #one electron
0080 singleElectronSelector = cms.EDFilter(
0081     "CandViewSelector",
0082     src = cms.InputTag("gedGsfElectrons"),
0083     cut = cms.string( "pt() > "+str(singleElectronCut) )
0084 )
0085 singleElectronFilter = cms.EDFilter(
0086     "CandViewCountFilter",
0087     src = cms.InputTag("singleElectronSelector"),
0088     minNumber = cms.uint32(1)
0089 )
0090 seqHotlineSkimSingleElectron = cms.Sequence(primaryVertexFilter * globalTightHalo2016Filter * HBHENoiseFilterResultProducer * HBHENoiseFilter * singleElectronSelector * singleElectronFilter)
0091 
0092 #two electrons
0093 doubleElectronSelector = cms.EDFilter(
0094     "CandViewSelector",
0095     src = cms.InputTag("gedGsfElectrons"),
0096     cut = cms.string( "pt() > "+str(doubleElectronCut) )
0097 )
0098 doubleElectronFilter = cms.EDFilter(
0099     "CandViewCountFilter",
0100     src = cms.InputTag("doubleElectronSelector"),
0101     minNumber = cms.uint32(2)
0102 )
0103 seqHotlineSkimDoubleElectron = cms.Sequence(primaryVertexFilter * globalTightHalo2016Filter * HBHENoiseFilterResultProducer * HBHENoiseFilter * doubleElectronSelector * doubleElectronFilter)
0104 
0105 #three electrons
0106 tripleElectronSelector = cms.EDFilter(
0107     "CandViewSelector",
0108     src = cms.InputTag("gedGsfElectrons"),
0109     cut = cms.string( "pt() > "+str(tripleElectronCut) )
0110 )
0111 tripleElectronFilter = cms.EDFilter(
0112     "CandViewCountFilter",
0113     src = cms.InputTag("tripleElectronSelector"),
0114     minNumber = cms.uint32(3)
0115 )
0116 seqHotlineSkimTripleElectron = cms.Sequence(primaryVertexFilter * globalTightHalo2016Filter * HBHENoiseFilterResultProducer * HBHENoiseFilter * tripleElectronSelector * tripleElectronFilter)
0117 
0118 #one photon
0119 singlePhotonSelector = cms.EDFilter(
0120     "CandViewSelector",
0121     src = cms.InputTag("gedPhotons"),
0122     cut = cms.string( "pt() > "+str(singlePhotonCut) )
0123 )
0124 singlePhotonFilter = cms.EDFilter(
0125     "CandViewCountFilter",
0126     src = cms.InputTag("singlePhotonSelector"),
0127     minNumber = cms.uint32(1)
0128 )
0129 seqHotlineSkimSinglePhoton = cms.Sequence(primaryVertexFilter * globalTightHalo2016Filter * HBHENoiseFilterResultProducer * HBHENoiseFilter * singlePhotonSelector * singlePhotonFilter)
0130 
0131 #two photons
0132 doublePhotonSelector = cms.EDFilter(
0133     "CandViewSelector",
0134     src = cms.InputTag("gedPhotons"),
0135     cut = cms.string( "pt() > "+str(doublePhotonCut) )
0136 )
0137 doublePhotonFilter = cms.EDFilter(
0138     "CandViewCountFilter",
0139     src = cms.InputTag("doublePhotonSelector"),
0140     minNumber = cms.uint32(2)
0141 )
0142 seqHotlineSkimDoublePhoton = cms.Sequence(primaryVertexFilter * globalTightHalo2016Filter * HBHENoiseFilterResultProducer * HBHENoiseFilter * doublePhotonSelector * doublePhotonFilter)
0143 
0144 #three photons
0145 triplePhotonSelector = cms.EDFilter(
0146     "CandViewSelector",
0147     src = cms.InputTag("gedPhotons"),
0148     cut = cms.string( "pt() > "+str(triplePhotonCut) )
0149 )
0150 triplePhotonFilter = cms.EDFilter(
0151     "CandViewCountFilter",
0152     src = cms.InputTag("triplePhotonSelector"),
0153     minNumber = cms.uint32(3)
0154 )
0155 seqHotlineSkimTriplePhoton = cms.Sequence(primaryVertexFilter * globalTightHalo2016Filter * HBHENoiseFilterResultProducer * HBHENoiseFilter * triplePhotonSelector * triplePhotonFilter)
0156 
0157 #one jet
0158 singleJetSelector = cms.EDFilter(
0159     "CandViewSelector",
0160     src = cms.InputTag("ak4PFJets"),
0161     cut = cms.string( "pt() > "+str(singleJetCut) )
0162 )
0163 singleJetFilter = cms.EDFilter(
0164     "CandViewCountFilter",
0165     src = cms.InputTag("singleJetSelector"),
0166     minNumber = cms.uint32(1)
0167 )
0168 seqHotlineSkimSingleJet = cms.Sequence(primaryVertexFilter * globalTightHalo2016Filter * HBHENoiseFilterResultProducer * HBHENoiseFilter * singleJetSelector * singleJetFilter)
0169 
0170 #two jets
0171 doubleJetSelector = cms.EDFilter(
0172     "CandViewSelector",
0173     src = cms.InputTag("ak4PFJets"),
0174     cut = cms.string( "pt() > "+str(doubleJetCut) )
0175 )
0176 doubleJetFilter = cms.EDFilter(
0177     "CandViewCountFilter",
0178     src = cms.InputTag("doubleJetSelector"),
0179     minNumber = cms.uint32(2)
0180 )
0181 seqHotlineSkimDoubleJet = cms.Sequence(primaryVertexFilter * globalTightHalo2016Filter * HBHENoiseFilterResultProducer * HBHENoiseFilter * doubleJetSelector * doubleJetFilter)
0182 
0183 #many jets
0184 multiJetSelector = cms.EDFilter(
0185     "CandViewSelector",
0186     src = cms.InputTag("ak4PFJets"),
0187     cut = cms.string( "pt() > "+str(multiJetCut) )
0188 )
0189 multiJetFilter = cms.EDFilter(
0190     "CandViewCountFilter",
0191     src = cms.InputTag("multiJetSelector"),
0192     minNumber = cms.uint32(multiJetNJets)
0193 )
0194 seqHotlineSkimMultiJet = cms.Sequence(primaryVertexFilter * globalTightHalo2016Filter * HBHENoiseFilterResultProducer * HBHENoiseFilter * multiJetSelector * multiJetFilter)
0195 
0196 #HT
0197 htMht = cms.EDProducer( "HLTHtMhtProducer",
0198     usePt = cms.bool( False ),
0199     minPtJetHt = cms.double( 40.0 ),
0200     maxEtaJetMht = cms.double( 5.0 ),
0201     minNJetMht = cms.int32( 0 ),
0202     jetsLabel = cms.InputTag( "ak4CaloJets" ),
0203     maxEtaJetHt = cms.double( 3.0 ),
0204     minPtJetMht = cms.double( 30.0 ),
0205     minNJetHt = cms.int32( 0 ),
0206     pfCandidatesLabel = cms.InputTag( "" ),
0207     excludePFMuons = cms.bool( False )
0208 )
0209 htSelector = cms.EDFilter(
0210     "CandViewSelector",
0211     src = cms.InputTag("htMht"),
0212     cut = cms.string( "sumEt() > "+str(htCut) )
0213 )
0214 htFilter = cms.EDFilter(
0215     "CandViewCountFilter",
0216     src = cms.InputTag("htSelector"),
0217     minNumber = cms.uint32(1)
0218 )
0219 seqHotlineSkimHT = cms.Sequence(primaryVertexFilter * globalTightHalo2016Filter * HBHENoiseFilterResultProducer * HBHENoiseFilter * htMht * htSelector * htFilter)
0220 
0221 #high-mass dileptons
0222 dimuons = cms.EDProducer(
0223     "CandViewShallowCloneCombiner",
0224     decay = cms.string("muons muons"),
0225     checkCharge = cms.bool(False),
0226     cut = cms.string("daughter(0).pt>150 & daughter(1).pt>150 & mass > "+str(dimuonMassCut)),
0227 )
0228 dielectrons = cms.EDProducer(
0229     "CandViewShallowCloneCombiner",
0230     decay = cms.string("gedGsfElectrons gedGsfElectrons"),
0231     checkCharge = cms.bool(False),
0232     cut = cms.string("daughter(0).pt>150 & daughter(1).pt>150 & mass > "+str(dielectronMassCut)),
0233 )
0234 diEMu = cms.EDProducer(
0235     "CandViewShallowCloneCombiner",
0236     decay = cms.string("muons gedGsfElectrons"),
0237     checkCharge = cms.bool(False),
0238     cut = cms.string("daughter(0).pt>150 & daughter(1).pt>150 & mass > "+str(diEMuMassCut)),
0239 )
0240 dimuonMassFilter = cms.EDFilter(
0241     "CandViewCountFilter",
0242     src = cms.InputTag("dimuons"),
0243     minNumber = cms.uint32(1)
0244 )
0245 dielectronMassFilter = cms.EDFilter(
0246     "CandViewCountFilter",
0247     src = cms.InputTag("dielectrons"),
0248     minNumber = cms.uint32(1)
0249 )
0250 diEMuMassFilter = cms.EDFilter(
0251     "CandViewCountFilter",
0252     src = cms.InputTag("diEMu"),
0253     minNumber = cms.uint32(1)
0254 )
0255 
0256 seqHotlineSkimMassiveDimuon = cms.Sequence(primaryVertexFilter * globalTightHalo2016Filter * HBHENoiseFilterResultProducer * HBHENoiseFilter * dimuons * dimuonMassFilter)
0257 seqHotlineSkimMassiveDielectron = cms.Sequence(primaryVertexFilter * globalTightHalo2016Filter * HBHENoiseFilterResultProducer * HBHENoiseFilter * dielectrons * dielectronMassFilter)
0258 seqHotlineSkimMassiveEMu = cms.Sequence(primaryVertexFilter * globalTightHalo2016Filter * HBHENoiseFilterResultProducer * HBHENoiseFilter * diEMu * diEMuMassFilter)
0259 
0260 ## select events with high pfMET
0261 pfMETSelector = cms.EDFilter(
0262     "CandViewSelector",
0263     src = cms.InputTag("pfMet"),
0264     cut = cms.string( "pt()>"+str(pfMetCut) )
0265 )
0266 
0267 pfMETCounter = cms.EDFilter(
0268     "CandViewCountFilter",
0269     src = cms.InputTag("pfMETSelector"),
0270     minNumber = cms.uint32(1),
0271 )
0272 
0273 seqHotlineSkimPFMET = cms.Sequence(
0274    primaryVertexFilter*
0275    globalTightHalo2016Filter*
0276    HBHENoiseFilterResultProducer*
0277    HBHENoiseFilter*
0278    pfMETSelector*
0279    pfMETCounter
0280 )
0281 
0282 ## select events with high caloMET
0283 caloMETSelector = cms.EDFilter(
0284     "CandViewSelector",
0285     src = cms.InputTag("caloMetM"),
0286     cut = cms.string( "pt()>"+str(caloMetCut) )
0287 )
0288 
0289 caloMETCounter = cms.EDFilter(
0290     "CandViewCountFilter",
0291     src = cms.InputTag("caloMETSelector"),
0292     minNumber = cms.uint32(1),
0293 )
0294 
0295 seqHotlineSkimCaloMET = cms.Sequence(
0296    primaryVertexFilter* 
0297    globalTightHalo2016Filter*
0298    HBHENoiseFilterResultProducer*
0299    HBHENoiseFilter*
0300    caloMETSelector*
0301    caloMETCounter
0302 )
0303 
0304 ## select events with extreme PFMET/CaloMET ratio
0305 CondMETSelector = cms.EDProducer(
0306    "CandViewShallowCloneCombiner",
0307    decay = cms.string("pfMet caloMetM"),
0308    cut = cms.string("(daughter(0).pt/daughter(1).pt > "+str(PFOverCaloRatioCut)+" && daughter(1).pt > "+str(condCaloMetCut)+") || (daughter(1).pt/daughter(0).pt > "+str(caloOverPFRatioCut)+" && daughter(0).pt > "+str(condPFMetCut)+" )  " )
0309 )
0310 
0311 CondMETCounter = cms.EDFilter(
0312     "CandViewCountFilter",
0313     src = cms.InputTag("CondMETSelector"),
0314     minNumber = cms.uint32(1),
0315 )
0316 
0317 seqHotlineSkimCondMET = cms.Sequence(
0318    primaryVertexFilter* 
0319    globalTightHalo2016Filter*
0320    HBHENoiseFilterResultProducer*
0321    HBHENoiseFilter*
0322    CondMETSelector*
0323    CondMETCounter
0324 )