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