CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
hotlineSkims_cff.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
2 
3 #Hotline skim parameters
4 singleMuonCut = 600
5 doubleMuonCut = 300
6 tripleMuonCut = 150
7 singleElectronCut = 900
8 doubleElectronCut = 300
9 tripleElectronCut = 100
10 singlePhotonCut = 1200
11 doublePhotonCut = 700
12 triplePhotonCut = 300
13 singleJetCut = 1600
14 doubleJetCut = 1400
15 multiJetCut = 100
16 multiJetNJets = 8
17 htCut = 4000
18 dimuonMassCut = 800
19 dielectronMassCut = 800
20 diEMuMassCut = 800
21 
22 #MET hotline skim parameters
23 pfMetCut = 300
24 caloMetCut = 300
25 condPFMetCut = 100 #PF MET cut for large Calo/PF skim
26 condCaloMetCut = 100 #Calo MET cut for large PF/Calo skim
27 caloOverPFRatioCut = 2 #cut on Calo MET / PF MET
28 PFOverCaloRatioCut = 2 #cut on PF MET / Calo MET
29 
30 ## select events with at least one good PV
32 
33 ## apply HBHE Noise filter
34 from CommonTools.RecoAlgos.HBHENoiseFilter_cfi import HBHENoiseFilter
35 from CommonTools.RecoAlgos.HBHENoiseFilterResultProducer_cfi import HBHENoiseFilterResultProducer
36 
37 #CSC beam halo filter
39 
40 #one muon
41 singleMuonSelector = cms.EDFilter(
42  "CandViewSelector",
43  src = cms.InputTag("muons"),
44  cut = cms.string( "isGlobalMuon() & pt() > "+str(singleMuonCut) )
45 )
46 singleMuonFilter = cms.EDFilter(
47  "CandViewCountFilter",
48  src = cms.InputTag("singleMuonSelector"),
49  minNumber = cms.uint32(1)
50 )
51 seqHotlineSkimSingleMuon = cms.Sequence(primaryVertexFilter * globalTightHalo2016Filter * HBHENoiseFilterResultProducer * HBHENoiseFilter * singleMuonSelector * singleMuonFilter)
52 
53 #two muons
54 doubleMuonSelector = cms.EDFilter(
55  "CandViewSelector",
56  src = cms.InputTag("muons"),
57  cut = cms.string( "pt() > "+str(doubleMuonCut) )
58 )
59 doubleMuonFilter = cms.EDFilter(
60  "CandViewCountFilter",
61  src = cms.InputTag("doubleMuonSelector"),
62  minNumber = cms.uint32(2)
63 )
64 seqHotlineSkimDoubleMuon = cms.Sequence(primaryVertexFilter * globalTightHalo2016Filter * HBHENoiseFilterResultProducer * HBHENoiseFilter * doubleMuonSelector * doubleMuonFilter)
65 
66 #three muons
67 tripleMuonSelector = cms.EDFilter(
68  "CandViewSelector",
69  src = cms.InputTag("muons"),
70  cut = cms.string( "pt() > "+str(tripleMuonCut) )
71 )
72 tripleMuonFilter = cms.EDFilter(
73  "CandViewCountFilter",
74  src = cms.InputTag("tripleMuonSelector"),
75  minNumber = cms.uint32(3)
76 )
77 seqHotlineSkimTripleMuon = cms.Sequence(primaryVertexFilter * globalTightHalo2016Filter * HBHENoiseFilterResultProducer * HBHENoiseFilter * tripleMuonSelector * tripleMuonFilter)
78 
79 #one electron
80 singleElectronSelector = cms.EDFilter(
81  "CandViewSelector",
82  src = cms.InputTag("gedGsfElectrons"),
83  cut = cms.string( "pt() > "+str(singleElectronCut) )
84 )
85 singleElectronFilter = cms.EDFilter(
86  "CandViewCountFilter",
87  src = cms.InputTag("singleElectronSelector"),
88  minNumber = cms.uint32(1)
89 )
90 seqHotlineSkimSingleElectron = cms.Sequence(primaryVertexFilter * globalTightHalo2016Filter * HBHENoiseFilterResultProducer * HBHENoiseFilter * singleElectronSelector * singleElectronFilter)
91 
92 #two electrons
93 doubleElectronSelector = cms.EDFilter(
94  "CandViewSelector",
95  src = cms.InputTag("gedGsfElectrons"),
96  cut = cms.string( "pt() > "+str(doubleElectronCut) )
97 )
98 doubleElectronFilter = cms.EDFilter(
99  "CandViewCountFilter",
100  src = cms.InputTag("doubleElectronSelector"),
101  minNumber = cms.uint32(2)
102 )
103 seqHotlineSkimDoubleElectron = cms.Sequence(primaryVertexFilter * globalTightHalo2016Filter * HBHENoiseFilterResultProducer * HBHENoiseFilter * doubleElectronSelector * doubleElectronFilter)
104 
105 #three electrons
106 tripleElectronSelector = cms.EDFilter(
107  "CandViewSelector",
108  src = cms.InputTag("gedGsfElectrons"),
109  cut = cms.string( "pt() > "+str(tripleElectronCut) )
110 )
111 tripleElectronFilter = cms.EDFilter(
112  "CandViewCountFilter",
113  src = cms.InputTag("tripleElectronSelector"),
114  minNumber = cms.uint32(3)
115 )
116 seqHotlineSkimTripleElectron = cms.Sequence(primaryVertexFilter * globalTightHalo2016Filter * HBHENoiseFilterResultProducer * HBHENoiseFilter * tripleElectronSelector * tripleElectronFilter)
117 
118 #one photon
119 singlePhotonSelector = cms.EDFilter(
120  "CandViewSelector",
121  src = cms.InputTag("gedPhotons"),
122  cut = cms.string( "pt() > "+str(singlePhotonCut) )
123 )
124 singlePhotonFilter = cms.EDFilter(
125  "CandViewCountFilter",
126  src = cms.InputTag("singlePhotonSelector"),
127  minNumber = cms.uint32(1)
128 )
129 seqHotlineSkimSinglePhoton = cms.Sequence(primaryVertexFilter * globalTightHalo2016Filter * HBHENoiseFilterResultProducer * HBHENoiseFilter * singlePhotonSelector * singlePhotonFilter)
130 
131 #two photons
132 doublePhotonSelector = cms.EDFilter(
133  "CandViewSelector",
134  src = cms.InputTag("gedPhotons"),
135  cut = cms.string( "pt() > "+str(doublePhotonCut) )
136 )
137 doublePhotonFilter = cms.EDFilter(
138  "CandViewCountFilter",
139  src = cms.InputTag("doublePhotonSelector"),
140  minNumber = cms.uint32(2)
141 )
142 seqHotlineSkimDoublePhoton = cms.Sequence(primaryVertexFilter * globalTightHalo2016Filter * HBHENoiseFilterResultProducer * HBHENoiseFilter * doublePhotonSelector * doublePhotonFilter)
143 
144 #three photons
145 triplePhotonSelector = cms.EDFilter(
146  "CandViewSelector",
147  src = cms.InputTag("gedPhotons"),
148  cut = cms.string( "pt() > "+str(triplePhotonCut) )
149 )
150 triplePhotonFilter = cms.EDFilter(
151  "CandViewCountFilter",
152  src = cms.InputTag("triplePhotonSelector"),
153  minNumber = cms.uint32(3)
154 )
155 seqHotlineSkimTriplePhoton = cms.Sequence(primaryVertexFilter * globalTightHalo2016Filter * HBHENoiseFilterResultProducer * HBHENoiseFilter * triplePhotonSelector * triplePhotonFilter)
156 
157 #one jet
158 singleJetSelector = cms.EDFilter(
159  "CandViewSelector",
160  src = cms.InputTag("ak4PFJets"),
161  cut = cms.string( "pt() > "+str(singleJetCut) )
162 )
163 singleJetFilter = cms.EDFilter(
164  "CandViewCountFilter",
165  src = cms.InputTag("singleJetSelector"),
166  minNumber = cms.uint32(1)
167 )
168 seqHotlineSkimSingleJet = cms.Sequence(primaryVertexFilter * globalTightHalo2016Filter * HBHENoiseFilterResultProducer * HBHENoiseFilter * singleJetSelector * singleJetFilter)
169 
170 #two jets
171 doubleJetSelector = cms.EDFilter(
172  "CandViewSelector",
173  src = cms.InputTag("ak4PFJets"),
174  cut = cms.string( "pt() > "+str(doubleJetCut) )
175 )
176 doubleJetFilter = cms.EDFilter(
177  "CandViewCountFilter",
178  src = cms.InputTag("doubleJetSelector"),
179  minNumber = cms.uint32(2)
180 )
181 seqHotlineSkimDoubleJet = cms.Sequence(primaryVertexFilter * globalTightHalo2016Filter * HBHENoiseFilterResultProducer * HBHENoiseFilter * doubleJetSelector * doubleJetFilter)
182 
183 #many jets
184 multiJetSelector = cms.EDFilter(
185  "CandViewSelector",
186  src = cms.InputTag("ak4PFJets"),
187  cut = cms.string( "pt() > "+str(multiJetCut) )
188 )
189 multiJetFilter = cms.EDFilter(
190  "CandViewCountFilter",
191  src = cms.InputTag("multiJetSelector"),
192  minNumber = cms.uint32(multiJetNJets)
193 )
194 seqHotlineSkimMultiJet = cms.Sequence(primaryVertexFilter * globalTightHalo2016Filter * HBHENoiseFilterResultProducer * HBHENoiseFilter * multiJetSelector * multiJetFilter)
195 
196 #HT
197 htMht = cms.EDProducer( "HLTHtMhtProducer",
198  usePt = cms.bool( False ),
199  minPtJetHt = cms.double( 40.0 ),
200  maxEtaJetMht = cms.double( 5.0 ),
201  minNJetMht = cms.int32( 0 ),
202  jetsLabel = cms.InputTag( "ak4CaloJets" ),
203  maxEtaJetHt = cms.double( 3.0 ),
204  minPtJetMht = cms.double( 30.0 ),
205  minNJetHt = cms.int32( 0 ),
206  pfCandidatesLabel = cms.InputTag( "" ),
207  excludePFMuons = cms.bool( False )
208 )
209 htSelector = cms.EDFilter(
210  "CandViewSelector",
211  src = cms.InputTag("htMht"),
212  cut = cms.string( "sumEt() > "+str(htCut) )
213 )
214 htFilter = cms.EDFilter(
215  "CandViewCountFilter",
216  src = cms.InputTag("htSelector"),
217  minNumber = cms.uint32(1)
218 )
219 seqHotlineSkimHT = cms.Sequence(primaryVertexFilter * globalTightHalo2016Filter * HBHENoiseFilterResultProducer * HBHENoiseFilter * htMht * htSelector * htFilter)
220 
221 #high-mass dileptons
222 dimuons = cms.EDProducer(
223  "CandViewShallowCloneCombiner",
224  decay = cms.string("muons muons"),
225  checkCharge = cms.bool(False),
226  cut = cms.string("daughter(0).pt>150 & daughter(1).pt>150 & mass > "+str(dimuonMassCut)),
227 )
228 dielectrons = cms.EDProducer(
229  "CandViewShallowCloneCombiner",
230  decay = cms.string("gedGsfElectrons gedGsfElectrons"),
231  checkCharge = cms.bool(False),
232  cut = cms.string("daughter(0).pt>150 & daughter(1).pt>150 & mass > "+str(dielectronMassCut)),
233 )
234 diEMu = cms.EDProducer(
235  "CandViewShallowCloneCombiner",
236  decay = cms.string("muons gedGsfElectrons"),
237  checkCharge = cms.bool(False),
238  cut = cms.string("daughter(0).pt>150 & daughter(1).pt>150 & mass > "+str(diEMuMassCut)),
239 )
240 dimuonMassFilter = cms.EDFilter(
241  "CandViewCountFilter",
242  src = cms.InputTag("dimuons"),
243  minNumber = cms.uint32(1)
244 )
245 dielectronMassFilter = cms.EDFilter(
246  "CandViewCountFilter",
247  src = cms.InputTag("dielectrons"),
248  minNumber = cms.uint32(1)
249 )
250 diEMuMassFilter = cms.EDFilter(
251  "CandViewCountFilter",
252  src = cms.InputTag("diEMu"),
253  minNumber = cms.uint32(1)
254 )
255 
256 seqHotlineSkimMassiveDimuon = cms.Sequence(primaryVertexFilter * globalTightHalo2016Filter * HBHENoiseFilterResultProducer * HBHENoiseFilter * dimuons * dimuonMassFilter)
257 seqHotlineSkimMassiveDielectron = cms.Sequence(primaryVertexFilter * globalTightHalo2016Filter * HBHENoiseFilterResultProducer * HBHENoiseFilter * dielectrons * dielectronMassFilter)
258 seqHotlineSkimMassiveEMu = cms.Sequence(primaryVertexFilter * globalTightHalo2016Filter * HBHENoiseFilterResultProducer * HBHENoiseFilter * diEMu * diEMuMassFilter)
259 
260 ## select events with high pfMET
261 pfMETSelector = cms.EDFilter(
262  "CandViewSelector",
263  src = cms.InputTag("pfMet"),
264  cut = cms.string( "pt()>"+str(pfMetCut) )
265 )
266 
267 pfMETCounter = cms.EDFilter(
268  "CandViewCountFilter",
269  src = cms.InputTag("pfMETSelector"),
270  minNumber = cms.uint32(1),
271 )
272 
273 seqHotlineSkimPFMET = cms.Sequence(
274  primaryVertexFilter*
275  globalTightHalo2016Filter*
276  HBHENoiseFilterResultProducer*
277  HBHENoiseFilter*
278  pfMETSelector*
279  pfMETCounter
280 )
281 
282 ## select events with high caloMET
283 caloMETSelector = cms.EDFilter(
284  "CandViewSelector",
285  src = cms.InputTag("caloMetM"),
286  cut = cms.string( "pt()>"+str(caloMetCut) )
287 )
288 
289 caloMETCounter = cms.EDFilter(
290  "CandViewCountFilter",
291  src = cms.InputTag("caloMETSelector"),
292  minNumber = cms.uint32(1),
293 )
294 
295 seqHotlineSkimCaloMET = cms.Sequence(
296  primaryVertexFilter*
297  globalTightHalo2016Filter*
298  HBHENoiseFilterResultProducer*
299  HBHENoiseFilter*
300  caloMETSelector*
301  caloMETCounter
302 )
303 
304 ## select events with extreme PFMET/CaloMET ratio
305 CondMETSelector = cms.EDProducer(
306  "CandViewShallowCloneCombiner",
307  decay = cms.string("pfMet caloMetM"),
308  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)+" ) " )
309 )
310 
311 CondMETCounter = cms.EDFilter(
312  "CandViewCountFilter",
313  src = cms.InputTag("CondMETSelector"),
314  minNumber = cms.uint32(1),
315 )
316 
317 seqHotlineSkimCondMET = cms.Sequence(
318  primaryVertexFilter*
319  globalTightHalo2016Filter*
320  HBHENoiseFilterResultProducer*
321  HBHENoiseFilter*
322  CondMETSelector*
323  CondMETCounter
324 )
select events with at least one good PV