183 def getPTAveVPSet(thresholds = [30, 60, 80, 100, 160, 220, 300], flavour="HFJEC", disableCalo = False):
186 if flavour ==
"HFJEC":
187 probeEtaSelection =
"abs(eta) > 2.7"
188 probeEtaSelectionCombined =
"abs(at(1).eta) > 2.7"
189 elif flavour ==
"Central":
190 probeEtaSelection =
"abs(eta) < 2.7"
191 probeEtaSelectionCombined =
"abs(at(1).eta) < 2.7"
193 raise Exception(
"Flavour not known "+ flavour)
197 partialPathName =
"HLT_DiPFJetAve"+
str(t)+
"_" + flavour +
"_v"
200 ptBinHigh =
max(100, t*2)
201 ptBins =
min(100, ptBinHigh-ptBinLow)
206 triggerSelection = cms.string(partialPathName+
"*"),
207 handlerType = cms.string(
"FromHLT"),
208 partialPathName = cms.string(partialPathName),
209 partialFilterName = cms.string(
"ForHFJECBase"),
210 dqmhistolabel = cms.string(
"hltCaloJets"),
211 mainDQMDirname = cms.untracked.string(fsqdirname),
212 singleObjectsPreselection = cms.string(
"abs(eta)<1.4 || " + probeEtaSelection),
213 singleObjectDrawables = cms.VPSet(),
214 combinedObjectSelection = cms.string(
"1==1"),
215 combinedObjectSortCriteria = cms.string(
"at(0).pt"),
216 combinedObjectDimension = cms.int32(1),
217 combinedObjectDrawables = cms.VPSet(
218 cms.PSet (name = cms.string(
"pt"), expression = cms.string(
"at(0).pt"), bins = cms.int32(ptBins), min = cms.double(ptBinLow), max = cms.double(ptBinHigh)),
219 cms.PSet (name = cms.string(
"eta"), expression = cms.string(
"at(0).eta"), bins = cms.int32(104), min = cms.double(-5.2), max = cms.double(5.2))
225 triggerSelection = cms.string(partialPathName+
"*"),
226 handlerType = cms.string(
"FromHLT"),
227 partialPathName = cms.string(partialPathName),
228 partialFilterName = cms.string(
"hltL1"),
229 dqmhistolabel = cms.string(
"l1"),
230 mainDQMDirname = cms.untracked.string(fsqdirname),
231 singleObjectsPreselection = cms.string(
"1==1"),
232 singleObjectDrawables = cms.VPSet(),
233 combinedObjectSelection = cms.string(
"1==1"),
234 combinedObjectSortCriteria = cms.string(
"at(0).pt"),
235 combinedObjectDimension = cms.int32(1),
236 combinedObjectDrawables = cms.VPSet(
237 cms.PSet (name = cms.string(
"pt"), expression = cms.string(
"at(0).pt"), bins = cms.int32(256//4), min = cms.double(0), max = cms.double(256)),
238 cms.PSet (name = cms.string(
"eta"), expression = cms.string(
"at(0).eta"), bins = cms.int32(104//4), min = cms.double(-5.2), max = cms.double(5.2))
244 hltPFSingle = cms.PSet(
245 triggerSelection = cms.string(partialPathName+"*"),
246 handlerType = cms.string("FromHLT"),
247 partialPathName = cms.string(partialPathName),
248 partialFilterName = cms.string("hltDiPFJetAve"),
249 dqmhistolabel = cms.string("hltpfsingle"),
250 mainDQMDirname = cms.untracked.string(fsqdirname),
251 singleObjectsPreselection = cms.string("abs(eta)<1.4 || abs(eta) > 2.7 "),
252 singleObjectDrawables = cms.VPSet(),
253 combinedObjectSelection = cms.string("1==1"),
254 combinedObjectSortCriteria = cms.string("at(0).pt"),
255 combinedObjectDimension = cms.int32(1),
256 combinedObjectDrawables = cms.VPSet(
257 cms.PSet (name = cms.string("pt"), expression = cms.string("at(0).pt"), bins = cms.int32(ptBins), min = cms.double(ptBinLow), max = cms.double(ptBinHigh)),
258 cms.PSet (name = cms.string("eta"), expression = cms.string("at(0).eta"), bins = cms.int32(104), min = cms.double(-5.2), max = cms.double(5.2))
261 ret.append(hltPFSingle)
265 hltPFtopology = cms.PSet(
266 triggerSelection = cms.string(partialPathName+
"*"),
267 handlerType = cms.string(
"FromHLT"),
268 partialPathName = cms.string(partialPathName),
269 partialFilterName = cms.string(
"hltDiPFJetAve"),
270 dqmhistolabel = cms.string(
"hltPFJetsTopology"),
271 mainDQMDirname = cms.untracked.string(fsqdirname),
272 singleObjectsPreselection = cms.string(
"abs(eta)<1.4 || " + probeEtaSelection),
273 singleObjectDrawables = cms.VPSet(),
274 combinedObjectSelection = cms.string(
"abs(at(0).eta())< 1.4 && "+ probeEtaSelectionCombined +
275 " && abs(deltaPhi(at(0).phi, at(1).phi)) > 2.5"),
276 combinedObjectSortCriteria = cms.string(
"(at(0).pt+at(1).pt)/2"),
277 combinedObjectDimension = cms.int32(2),
278 combinedObjectDrawables = cms.VPSet(
279 cms.PSet (name = cms.string(
"deltaEta"), expression = cms.string(
"abs(at(0).eta-at(1).eta)"),
280 bins = cms.int32(70), min = cms.double(0), max = cms.double(7)),
281 cms.PSet (name = cms.string(
"deltaPhi"), expression = cms.string(
"abs(deltaPhi(at(0).phi, at(1).phi))"),
282 bins = cms.int32(100), min = cms.double(0), max = cms.double(3.2)),
283 cms.PSet (name = cms.string(
"ptAve"), expression = cms.string(
"(at(0).pt+at(1).pt)/2"),
284 bins = cms.int32(ptBins), min = cms.double(ptBinLow), max = cms.double(ptBinHigh)),
285 cms.PSet (name = cms.string(
"ptTag"), expression =
286 cms.string(
"? abs(at(0).eta) < abs(at(1).eta) ? at(0).pt : at(1).pt "),
287 bins = cms.int32(ptBins), min = cms.double(ptBinLow), max = cms.double(ptBinHigh) ),
288 cms.PSet (name = cms.string(
"ptProbe"), expression =
289 cms.string(
"? abs(at(0).eta) < abs(at(1).eta) ? at(1).pt : at(0).pt "),
290 bins = cms.int32(ptBins), min = cms.double(ptBinLow), max = cms.double(ptBinHigh) )
293 ret.append(hltPFtopology)
302 triggerSelection = cms.string(partialPathName+"*"),
303 handlerType = cms.string("FromRecoCandidate"),
304 inputCol = cms.InputTag("ak4PFJetsCHS"),
305 partialPathName = cms.string(partialPathName),
306 partialFilterName = cms.string("hltDiPFJetAve"),
307 dqmhistolabel = cms.string("recoJet"),
308 mainDQMDirname = cms.untracked.string(fsqdirname),
309 singleObjectsPreselection = cms.string("pt > + "+str(recoThr) +" && (abs(eta)<1.3 || abs(eta) > 2.8) "),
310 singleObjectDrawables = cms.VPSet(),
311 combinedObjectSelection = cms.string("1==1"),
312 combinedObjectSortCriteria = cms.string("at(0).pt"),
313 combinedObjectDimension = cms.int32(1),
314 combinedObjectDrawables = cms.VPSet(
315 cms.PSet (name = cms.string("pt"), expression = cms.string("at(0).pt"), bins = cms.int32(ptBins), min = cms.double(ptBinLow), max = cms.double(ptBinHigh)),
316 cms.PSet (name = cms.string("eta"), expression = cms.string("at(0).eta"), bins = cms.int32(52), min = cms.double(-5.2), max = cms.double(5.2))
322 recoPFtopology = cms.PSet(
323 triggerSelection = cms.string(partialPathName+
"*"),
324 handlerType = cms.string(
"RecoPFJetWithJEC"),
325 PFJetCorLabel = cms.InputTag(
"ak4PFL1FastL2L3Corrector"),
326 inputCol = cms.InputTag(
"ak4PFJetsCHS"),
327 partialPathName = cms.string(partialPathName),
328 partialFilterName = cms.string(
"hltDiPFJetAve"),
329 dqmhistolabel = cms.string(
"recoPFJetsTopology"),
330 mainDQMDirname = cms.untracked.string(fsqdirname),
331 singleObjectsPreselection = cms.string(
"pt > "+
str(recoThr) +
" && (abs(eta)<1.4 ||"+probeEtaSelection +
")" ),
332 singleObjectDrawables = cms.VPSet(),
333 combinedObjectSelection = cms.string(
"abs(at(0).eta())< 1.3 && " + probeEtaSelectionCombined +
334 " && abs(deltaPhi(at(0).phi, at(1).phi)) > 2.5"),
335 combinedObjectSortCriteria = cms.string(
"(at(0).pt+at(1).pt)/2"),
336 combinedObjectDimension = cms.int32(2),
337 combinedObjectDrawables = cms.VPSet(
338 cms.PSet (name = cms.string(
"deltaEta"), expression = cms.string(
"abs(at(0).eta-at(1).eta)"),
339 bins = cms.int32(70), min = cms.double(0), max = cms.double(7)),
340 cms.PSet (name = cms.string(
"deltaPhi"), expression = cms.string(
"abs(deltaPhi(at(0).phi, at(1).phi))"),
341 bins = cms.int32(100), min = cms.double(0), max = cms.double(3.2)),
342 cms.PSet (name = cms.string(
"ptAve"), expression = cms.string(
"(at(0).pt+at(1).pt)/2"),
343 bins = cms.int32(ptBins), min = cms.double(ptBinLow), max = cms.double(ptBinHigh)),
344 cms.PSet (name = cms.string(
"ptTag"), expression =
345 cms.string(
"? abs(at(0).eta) < abs(at(1).eta) ? at(0).pt : at(1).pt "),
346 bins = cms.int32(ptBins), min = cms.double(ptBinLow), max = cms.double(ptBinHigh) ),
347 cms.PSet (name = cms.string(
"ptProbe"), expression =
348 cms.string(
"? abs(at(0).eta) < abs(at(1).eta) ? at(1).pt : at(0).pt "),
349 bins = cms.int32(ptBins), min = cms.double(ptBinLow), max = cms.double(ptBinHigh) ),
350 cms.PSet (name = cms.string(
"ptAve_nominator"), expression = cms.string(
"(at(0).pt+at(1).pt)/2"),
351 bins = cms.int32(ptBins), min = cms.double(ptBinLow), max = cms.double(ptBinHigh) ),
354 ret.append(recoPFtopology)
355 recoPFtopologyDenom = recoPFtopology.clone()
358 recoPFtopologyDenom.triggerSelection = cms.string(
"TRUE")
359 recoPFtopologyDenom.combinedObjectDrawables = cms.VPSet(
360 cms.PSet (name = cms.string(
"ptAve_denominator"), expression = cms.string(
"(at(0).pt+at(1).pt)/2"),
361 bins = cms.int32(ptBins), min = cms.double(ptBinLow), max = cms.double(ptBinHigh) )
363 ret.append(recoPFtopologyDenom)
366 ''' example on how to count objects
368 recoPFJetCnt = cms.PSet(
369 triggerSelection = cms.string(partialPathName+"*"),
370 handlerType = cms.string("RecoCandidateCounter"),
371 inputCol = cms.InputTag("ak4PFJetsCHS"),
372 partialPathName = cms.string(partialPathName),
373 partialFilterName = cms.string("hltDiPFJetAve"),
374 dqmhistolabel = cms.string("recoPFJetsCnt"),
375 mainDQMDirname = cms.untracked.string(fsqdirname),
376 singleObjectsPreselection = cms.string("pt > "+str(recoThr) +" && abs(eta)<1.4 || abs(eta) > 2.7 "),
377 singleObjectDrawables = cms.VPSet(),
378 combinedObjectSelection = cms.string("1==1"),
379 combinedObjectSortCriteria = cms.string('size()'),
380 combinedObjectDimension = cms.int32(1),
381 combinedObjectDrawables = cms.VPSet(
382 cms.PSet (name = cms.string("count"), expression = cms.string('at(0)'),
383 bins = cms.int32(30), min = cms.double(0), max = cms.double(30))
386 ret.append(recoPFJetCnt)