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