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