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