236 algo, rParam, btagDiscriminators, btagInfos, patJets, labelName, btagPrefix, postfix):
241 discriminators = set(btagDiscriminators)
242 present_meta = discriminators.intersection(set(supportedMetaDiscr.keys()))
243 discriminators -= present_meta
244 for meta_tagger
in present_meta:
245 for src
in supportedMetaDiscr[meta_tagger]:
246 discriminators.add(src)
247 btagDiscriminators =
list(discriminators)
251 requiredTagInfos =
list(btagInfos)
252 for btagDiscr
in btagDiscriminators :
253 for tagInfoList
in supportedBtagDiscr[btagDiscr] :
254 for requiredTagInfo
in tagInfoList :
255 tagInfoCovered =
False 256 for tagInfo
in requiredTagInfos :
257 if requiredTagInfo == tagInfo :
258 tagInfoCovered =
True 260 if not tagInfoCovered :
261 requiredTagInfos.append(requiredTagInfo)
263 if hasattr( process,
'candidateJetProbabilityComputer' ) ==
False :
265 process.load(
"RecoBTag.ImpactParameter.impactParameter_cff")
266 task.add(process.impactParameterTask)
267 process.load(
"RecoBTag.SecondaryVertex.secondaryVertex_cff")
268 task.add(process.secondaryVertexTask)
269 process.load(
"RecoBTag.SoftLepton.softLepton_cff")
270 task.add(process.softLeptonTask)
271 process.load(
"RecoBTag.Combined.combinedMVA_cff")
272 task.add(process.combinedMVATask)
273 process.load(
"RecoBTag.CTagging.cTagging_cff")
274 task.add(process.cTaggingTask)
276 process.load(
"RecoBTag.ImpactParameter.impactParameter_EventSetup_cff")
277 process.load(
"RecoBTag.SecondaryVertex.secondaryVertex_EventSetup_cff")
278 process.load(
"RecoBTag.SoftLepton.softLepton_EventSetup_cff")
279 process.load(
"RecoBTag.Combined.combinedMVA_EventSetup_cff")
280 process.load(
"RecoBTag.CTagging.cTagging_EventSetup_cff")
282 import RecoJets.JetProducers.caTopTaggers_cff
as toptag
286 sys.stderr.write(
"-------------------------------------------------------------------\n")
287 sys.stderr.write(
" Warning: For a complete switch to the legacy tight b-tag track\n")
288 sys.stderr.write(
" selection, please also enable the \'runIVF\' switch.\n")
289 sys.stderr.write(
"-------------------------------------------------------------------\n")
291 sys.stderr.write(
"-------------------------------------------------------------------\n")
292 sys.stderr.write(
" Warning: With the tight b-tag track selection enabled, it is\n")
293 sys.stderr.write(
" advisable to set \'btagPrefix\' to a non-empty string to\n")
294 sys.stderr.write(
" avoid unintentional modifications to the default\n")
295 sys.stderr.write(
" b tagging setup that might be loaded in the same job.\n")
296 sys.stderr.write(
"-------------------------------------------------------------------\n")
300 svSourceCvsL = copy.deepcopy(svSource)
301 svSourceCvsL.setModuleLabel(svSource.getModuleLabel()+
'CvsL')
304 runIVFforCTagOnly =
False 305 ivfcTagInfos = [
'pfInclusiveSecondaryVertexFinderCvsLTagInfos',
'pfInclusiveSecondaryVertexFinderNegativeCvsLTagInfos']
307 if pvSource.getModuleLabel() ==
'offlineSlimmedPrimaryVertices' and any(i
in requiredTagInfos
for i
in ivfcTagInfos)
and not runIVF:
308 runIVFforCTagOnly =
True 310 sys.stderr.write(
"-------------------------------------------------------------------\n")
311 sys.stderr.write(
" Info: To run c tagging on MiniAOD, c-tag-specific IVF secondary\n")
312 sys.stderr.write(
" vertices will be remade.\n")
313 sys.stderr.write(
"-------------------------------------------------------------------\n")
315 if runIVF
and btagPrefix !=
'':
316 if runIVFforCTagOnly:
317 svSourceCvsL.setModuleLabel(btagPrefix+svSourceCvsL.getModuleLabel())
319 svSource.setModuleLabel(btagPrefix+svSource.getModuleLabel())
320 svSourceCvsL.setModuleLabel(btagPrefix+svSourceCvsL.getModuleLabel())
325 acceptedTagInfos =
list()
326 for btagInfo
in requiredTagInfos:
327 if hasattr(btag,btagInfo):
328 if btagInfo ==
'pfImpactParameterTagInfos':
330 btag.pfImpactParameterTagInfos.clone(jets = jetSource,primaryVertex=pvSource,candidates=pfCandidates),
333 _btagInfo = getattr(process, btagPrefix+btagInfo+labelName+postfix)
334 _btagInfo.explicitJTA = cms.bool(explicitJTA)
336 _btagInfo = getattr(process, btagPrefix+btagInfo+labelName+postfix)
337 _btagInfo.minimumNumberOfPixelHits = cms.int32(2)
338 _btagInfo.minimumNumberOfHits = cms.int32(8)
339 if btagInfo ==
'pfImpactParameterAK8TagInfos':
341 btag.pfImpactParameterAK8TagInfos.clone(jets = jetSource,primaryVertex=pvSource,candidates=pfCandidates),
344 _btagInfo = getattr(process, btagPrefix+btagInfo+labelName+postfix)
345 _btagInfo.explicitJTA = cms.bool(explicitJTA)
347 _btagInfo = getattr(process, btagPrefix+btagInfo+labelName+postfix)
348 _btagInfo.minimumNumberOfPixelHits = cms.int32(2)
349 _btagInfo.minimumNumberOfHits = cms.int32(8)
350 if btagInfo ==
'pfImpactParameterCA15TagInfos':
352 btag.pfImpactParameterCA15TagInfos.clone(jets = jetSource,primaryVertex=pvSource,candidates=pfCandidates),
355 _btagInfo = getattr(process, btagPrefix+btagInfo+labelName+postfix)
356 _btagInfo.explicitJTA = cms.bool(explicitJTA)
358 _btagInfo = getattr(process, btagPrefix+btagInfo+labelName+postfix)
359 _btagInfo.minimumNumberOfPixelHits = cms.int32(2)
360 _btagInfo.minimumNumberOfHits = cms.int32(8)
361 if btagInfo ==
'pfSecondaryVertexTagInfos':
363 btag.pfSecondaryVertexTagInfos.clone(
364 trackIPTagInfos = cms.InputTag(btagPrefix+
'pfImpactParameterTagInfos'+labelName+postfix)),
367 _btagInfo = getattr(process, btagPrefix+btagInfo+labelName+postfix)
368 _btagInfo.trackSelection.pixelHitsMin = cms.uint32(2)
369 _btagInfo.trackSelection.totalHitsMin = cms.uint32(8)
370 if btagInfo ==
'pfDeepCSVTagInfos':
372 btag.pfDeepCSVTagInfos.clone(
373 svTagInfos = cms.InputTag(btagPrefix+
'pfInclusiveSecondaryVertexFinderTagInfos'+labelName+postfix)),
375 if svClustering
or fatJets != cms.InputTag(
''):
376 setupSVClustering(getattr(process, btagPrefix+btagInfo+labelName+postfix), svClustering, algo, rParam, fatJets, groomedFatJets)
377 if btagInfo ==
'pfDeepCSVNegativeTagInfos':
379 btag.pfDeepCSVNegativeTagInfos.clone(
380 svTagInfos = cms.InputTag(btagPrefix+
'pfInclusiveSecondaryVertexFinderNegativeTagInfos'+labelName+postfix)),
382 if svClustering
or fatJets != cms.InputTag(
''):
383 setupSVClustering(getattr(process, btagPrefix+btagInfo+labelName+postfix), svClustering, algo, rParam, fatJets, groomedFatJets)
384 if btagInfo ==
'pfDeepCSVPositiveTagInfos':
386 btag.pfDeepCSVPositiveTagInfos.clone(
387 svTagInfos = cms.InputTag(btagPrefix+
'pfInclusiveSecondaryVertexFinderTagInfos'+labelName+postfix)),
389 if svClustering
or fatJets != cms.InputTag(
''):
390 setupSVClustering(getattr(process, btagPrefix+btagInfo+labelName+postfix), svClustering, algo, rParam, fatJets, groomedFatJets)
391 if btagInfo ==
'pfDeepCMVATagInfos':
393 btag.pfDeepCMVATagInfos.clone(
394 deepNNTagInfos = cms.InputTag(btagPrefix+
'pfDeepCSVTagInfos'+labelName+postfix),
395 ipInfoSrc = cms.InputTag(btagPrefix+
"pfImpactParameterTagInfos"+labelName+postfix),
396 muInfoSrc = cms.InputTag(btagPrefix+
"softPFMuonsTagInfos"+labelName+postfix),
397 elInfoSrc = cms.InputTag(btagPrefix+
"softPFElectronsTagInfos"+labelName+postfix)),
399 if svClustering
or fatJets != cms.InputTag(
''):
400 setupSVClustering(getattr(process, btagPrefix+btagInfo+labelName+postfix), svClustering, algo, rParam, fatJets, groomedFatJets)
401 if btagInfo ==
'pfDeepCMVANegativeTagInfos':
403 btag.pfDeepCMVATagInfos.clone(
404 deepNNTagInfos = cms.InputTag(btagPrefix+
'pfDeepCSVTagInfos'+labelName+postfix),
405 ipInfoSrc = cms.InputTag(btagPrefix+
"pfImpactParameterTagInfos"+labelName+postfix),
406 muInfoSrc = cms.InputTag(btagPrefix+
"softPFMuonsTagInfos"+labelName+postfix),
407 elInfoSrc = cms.InputTag(btagPrefix+
"softPFElectronsTagInfos"+labelName+postfix)),
409 if svClustering
or fatJets != cms.InputTag(
''):
410 setupSVClustering(getattr(process, btagPrefix+btagInfo+labelName+postfix), svClustering, algo, rParam, fatJets, groomedFatJets)
411 if btagInfo ==
'pfDeepCMVAPositiveTagInfos':
413 btag.pfDeepCMVATagInfos.clone(
414 deepNNTagInfos = cms.InputTag(btagPrefix+
'pfDeepCSVTagInfos'+labelName+postfix),
415 ipInfoSrc = cms.InputTag(btagPrefix+
"pfImpactParameterTagInfos"+labelName+postfix),
416 muInfoSrc = cms.InputTag(btagPrefix+
"softPFMuonsTagInfos"+labelName+postfix),
417 elInfoSrc = cms.InputTag(btagPrefix+
"softPFElectronsTagInfos"+labelName+postfix)),
419 if svClustering
or fatJets != cms.InputTag(
''):
420 setupSVClustering(getattr(process, btagPrefix+btagInfo+labelName+postfix), svClustering, algo, rParam, fatJets, groomedFatJets)
421 if btagInfo ==
'pfInclusiveSecondaryVertexFinderTagInfos':
423 btag.pfInclusiveSecondaryVertexFinderTagInfos.clone(
424 trackIPTagInfos = cms.InputTag(btagPrefix+
'pfImpactParameterTagInfos'+labelName+postfix),
425 extSVCollection=svSource),
427 if svClustering
or fatJets != cms.InputTag(
''):
428 setupSVClustering(getattr(process, btagPrefix+btagInfo+labelName+postfix), svClustering, algo, rParam, fatJets, groomedFatJets)
429 if btagInfo ==
'pfInclusiveSecondaryVertexFinderAK8TagInfos':
431 btag.pfInclusiveSecondaryVertexFinderAK8TagInfos.clone(
432 trackIPTagInfos = cms.InputTag(btagPrefix+
'pfImpactParameterAK8TagInfos'+labelName+postfix),
433 extSVCollection=svSource),
435 if svClustering
or fatJets != cms.InputTag(
''):
436 setupSVClustering(getattr(process, btagPrefix+btagInfo+labelName+postfix), svClustering, algo, rParam, fatJets, groomedFatJets)
437 if btagInfo ==
'pfBoostedDoubleSVAK8TagInfos':
439 btag.pfBoostedDoubleSVAK8TagInfos.clone(
440 svTagInfos = cms.InputTag(btagPrefix+
'pfInclusiveSecondaryVertexFinderAK8TagInfos'+labelName+postfix)),
442 if btagInfo ==
'pfInclusiveSecondaryVertexFinderCA15TagInfos':
444 btag.pfInclusiveSecondaryVertexFinderCA15TagInfos.clone(
445 trackIPTagInfos = cms.InputTag(btagPrefix+
'pfImpactParameterCA15TagInfos'+labelName+postfix),
446 extSVCollection=svSource),
448 if svClustering
or fatJets != cms.InputTag(
''):
449 setupSVClustering(getattr(process, btagPrefix+btagInfo+labelName+postfix), svClustering, algo, rParam, fatJets, groomedFatJets)
450 if btagInfo ==
'pfBoostedDoubleSVCA15TagInfos':
452 btag.pfBoostedDoubleSVCA15TagInfos.clone(
453 svTagInfos = cms.InputTag(btagPrefix+
'pfInclusiveSecondaryVertexFinderCA15TagInfos'+labelName+postfix)),
455 if btagInfo ==
'pfInclusiveSecondaryVertexFinderCvsLTagInfos':
457 btag.pfInclusiveSecondaryVertexFinderCvsLTagInfos.clone(
458 trackIPTagInfos = cms.InputTag(btagPrefix+
'pfImpactParameterTagInfos'+labelName+postfix),
459 extSVCollection=svSourceCvsL),
461 if svClustering
or fatJets != cms.InputTag(
''):
462 setupSVClustering(getattr(process, btagPrefix+btagInfo+labelName+postfix), svClustering, algo, rParam, fatJets, groomedFatJets)
463 if btagInfo ==
'pfInclusiveSecondaryVertexFinderNegativeCvsLTagInfos':
465 btag.pfInclusiveSecondaryVertexFinderNegativeCvsLTagInfos.clone(
466 trackIPTagInfos = cms.InputTag(btagPrefix+
'pfImpactParameterTagInfos'+labelName+postfix),
467 extSVCollection=svSourceCvsL),
469 if svClustering
or fatJets != cms.InputTag(
''):
470 setupSVClustering(getattr(process, btagPrefix+btagInfo+labelName+postfix), svClustering, algo, rParam, fatJets, groomedFatJets)
471 if btagInfo ==
'pfGhostTrackVertexTagInfos':
473 btag.pfGhostTrackVertexTagInfos.clone(
474 trackIPTagInfos = cms.InputTag(btagPrefix+
'pfImpactParameterTagInfos'+labelName+postfix)),
476 if btagInfo ==
'pfSecondaryVertexNegativeTagInfos':
478 btag.pfSecondaryVertexNegativeTagInfos.clone(
479 trackIPTagInfos = cms.InputTag(btagPrefix+
'pfImpactParameterTagInfos'+labelName+postfix)),
482 _btagInfo = getattr(process, btagPrefix+btagInfo+labelName+postfix)
483 _btagInfo.trackSelection.pixelHitsMin = cms.uint32(2)
484 _btagInfo.trackSelection.totalHitsMin = cms.uint32(8)
485 if btagInfo ==
'pfInclusiveSecondaryVertexFinderNegativeTagInfos':
487 btag.pfInclusiveSecondaryVertexFinderNegativeTagInfos.clone(
488 trackIPTagInfos = cms.InputTag(btagPrefix+
'pfImpactParameterTagInfos'+labelName+postfix),
489 extSVCollection=svSource),
491 if svClustering
or fatJets != cms.InputTag(
''):
492 setupSVClustering(getattr(process, btagPrefix+btagInfo+labelName+postfix), svClustering, algo, rParam, fatJets, groomedFatJets)
493 if btagInfo ==
'impactParameterTagInfos':
495 btag.impactParameterTagInfos.clone(
496 jetTracks = cms.InputTag(
'jetTracksAssociatorAtVertex'+labelName+postfix),
497 primaryVertex=pvSource),
499 if btagInfo ==
'secondaryVertexTagInfos':
501 btag.secondaryVertexTagInfos.clone(
502 trackIPTagInfos = cms.InputTag(btagPrefix+
'impactParameterTagInfos'+labelName+postfix)),
504 if btagInfo ==
'inclusiveSecondaryVertexFinderTagInfos':
506 btag.inclusiveSecondaryVertexFinderTagInfos.clone(
507 trackIPTagInfos = cms.InputTag(btagPrefix+
'impactParameterTagInfos'+labelName+postfix)),
509 if svClustering
or fatJets != cms.InputTag(
''):
510 setupSVClustering(getattr(process, btagPrefix+btagInfo+labelName+postfix), svClustering, algo, rParam, fatJets, groomedFatJets)
511 if btagInfo ==
'inclusiveSecondaryVertexFinderFilteredTagInfos':
513 btag.inclusiveSecondaryVertexFinderFilteredTagInfos.clone(
514 trackIPTagInfos = cms.InputTag(btagPrefix+
'impactParameterTagInfos'+labelName+postfix)),
516 if svClustering
or fatJets != cms.InputTag(
''):
517 setupSVClustering(getattr(process, btagPrefix+btagInfo+labelName+postfix), svClustering, algo, rParam, fatJets, groomedFatJets)
518 if btagInfo ==
'secondaryVertexNegativeTagInfos':
520 btag.secondaryVertexNegativeTagInfos.clone(
521 trackIPTagInfos = cms.InputTag(btagPrefix+
'impactParameterTagInfos'+labelName+postfix)),
523 if btagInfo ==
'inclusiveSecondaryVertexFinderNegativeTagInfos':
525 btag.inclusiveSecondaryVertexFinderNegativeTagInfos.clone(
526 trackIPTagInfos = cms.InputTag(btagPrefix+
'impactParameterTagInfos'+labelName+postfix)),
528 if svClustering
or fatJets != cms.InputTag(
''):
529 setupSVClustering(getattr(process, btagPrefix+btagInfo+labelName+postfix), svClustering, algo, rParam, fatJets, groomedFatJets)
530 if btagInfo ==
'inclusiveSecondaryVertexFinderFilteredNegativeTagInfos':
532 btag.inclusiveSecondaryVertexFinderFilteredNegativeTagInfos.clone(
533 trackIPTagInfos = cms.InputTag(btagPrefix+
'impactParameterTagInfos'+labelName+postfix)),
535 if svClustering
or fatJets != cms.InputTag(
''):
536 setupSVClustering(getattr(process, btagPrefix+btagInfo+labelName+postfix), svClustering, algo, rParam, fatJets, groomedFatJets)
537 if btagInfo ==
'softMuonTagInfos':
539 btag.softMuonTagInfos.clone(jets = jetSource, primaryVertex=pvSource),
541 if btagInfo ==
'softPFMuonsTagInfos':
543 btag.softPFMuonsTagInfos.clone(jets = jetSource, primaryVertex=pvSource, muons=muSource),
545 if btagInfo ==
'softPFElectronsTagInfos':
547 btag.softPFElectronsTagInfos.clone(jets = jetSource, primaryVertex=pvSource, electrons=elSource),
550 if 'DeepFlavourTagInfos' in btagInfo:
552 if btagInfo ==
'pfNegativeDeepFlavourTagInfos':
553 deep_csv_tag_infos =
'pfDeepCSVNegativeTagInfos' 555 deep_csv_tag_infos =
'pfDeepCSVTagInfos' 559 if not (
'limmed' in jetSource.value()):
560 puppi_value_map = cms.InputTag(
"puppi")
561 vertex_associator = cms.InputTag(
"primaryVertexAssociation",
"original")
563 puppi_value_map = cms.InputTag(
"")
564 vertex_associator = cms.InputTag(
"")
566 btag.pfDeepFlavourTagInfos.clone(
569 secondary_vertices=svSource,
570 shallow_tag_infos = cms.InputTag(btagPrefix+deep_csv_tag_infos+labelName+postfix),
571 puppi_value_map = puppi_value_map,
572 vertex_associator = vertex_associator,
576 acceptedTagInfos.append(btagInfo)
577 elif hasattr(toptag, btagInfo) :
578 acceptedTagInfos.append(btagInfo)
580 print ' --> %s ignored, since not available via RecoBTag.Configuration.RecoBTag_cff!'%(btagInfo)
582 acceptedBtagDiscriminators =
list()
583 for discriminator_name
in btagDiscriminators :
584 btagDiscr = discriminator_name.split(
':')[0]
586 if hasattr(btag,btagDiscr):
587 newDiscr = btagPrefix+btagDiscr+labelName+postfix
588 if hasattr(process, newDiscr):
590 elif hasattr(getattr(btag, btagDiscr),
'tagInfos'):
593 getattr(btag, btagDiscr).
clone(
594 tagInfos = cms.VInputTag(
595 *[ cms.InputTag(btagPrefix+x+labelName+postfix) \
596 for x
in supportedBtagDiscr[discriminator_name][0] ]
602 elif hasattr(getattr(btag, btagDiscr),
'src'):
605 getattr(btag, btagDiscr).
clone(
606 src = cms.InputTag(btagPrefix+supportedBtagDiscr[discriminator_name][0][0]+labelName+postfix)
612 raise ValueError(
'I do not know how to update %s it does not have neither "tagInfos" nor "src" attributes' % btagDiscr)
613 acceptedBtagDiscriminators.append(discriminator_name)
615 print ' --> %s ignored, since not available via RecoBTag.Configuration.RecoBTag_cff!'%(btagDiscr)
617 for meta_tagger
in present_meta:
618 btagDiscr = meta_tagger.split(
':')[0]
620 if hasattr(btag,btagDiscr):
621 newDiscr = btagPrefix+btagDiscr+labelName+postfix
622 if hasattr(process, newDiscr):
627 getattr(btag, btagDiscr).
clone(),
631 for dependency
in supportedMetaDiscr[meta_tagger]:
632 if ':' in dependency:
633 new_dep = btagPrefix+dependency.split(
':')[0]+labelName+postfix+
':'+dependency.split(
':')[1]
635 new_dep = btagPrefix+dependency+labelName+postfix
636 replace = MassSearchReplaceAnyInputTagVisitor(dependency, new_dep)
637 replace.doIt(getattr(process, newDiscr), newDiscr)
638 acceptedBtagDiscriminators.append(meta_tagger)
640 print ' --> %s ignored, since not available via RecoBTag.Configuration.RecoBTag_cff!'%(btagDiscr)
643 patJets.tagInfoSources = cms.VInputTag( *[ cms.InputTag(btagPrefix+x+labelName+postfix)
for x
in acceptedTagInfos ] )
644 patJets.discriminatorSources = cms.VInputTag(*[
645 cms.InputTag(btagPrefix+x+labelName+postfix) \
646 if ':' not in x
else \
647 cms.InputTag(btagPrefix+x.split(
':')[0]+labelName+postfix+
':'+x.split(
':')[1]) \
648 for x
in acceptedBtagDiscriminators
650 if len(acceptedBtagDiscriminators) > 0 :
651 patJets.addBTagInfo =
True 654 if not tightBTagNTkHits:
655 if pvSource.getModuleLabel() ==
'offlineSlimmedPrimaryVertices':
660 ivfbTagInfos = [
'pfInclusiveSecondaryVertexFinderTagInfos',
'pfInclusiveSecondaryVertexFinderAK8TagInfos',
'pfInclusiveSecondaryVertexFinderCA15TagInfos']
661 if any(i
in acceptedTagInfos
for i
in ivfbTagInfos)
and not runIVFforCTagOnly:
662 if not hasattr( process, btagPrefix+
'inclusiveCandidateVertexFinder' ):
663 loadWithPrefix(process,
'RecoVertex.AdaptiveVertexFinder.inclusiveVertexing_cff', btagPrefix, task.label())
665 if hasattr( process, btagPrefix+
'inclusiveCandidateVertexFinder' ):
666 _temp = getattr(process, btagPrefix+
'inclusiveCandidateVertexFinder')
667 _temp.minHits = cms.uint32(8)
669 if pvSource.getModuleLabel() ==
'offlineSlimmedPrimaryVertices':
670 if hasattr( process, btagPrefix+
'inclusiveCandidateVertexFinder' ):
671 _temp = getattr(process, btagPrefix+
'inclusiveCandidateVertexFinder')
672 _temp.primaryVertices = pvSource
673 _temp.tracks = pfCandidates
674 if hasattr( process, btagPrefix+
'candidateVertexArbitrator' ):
675 _temp = getattr(process, btagPrefix+
'candidateVertexArbitrator')
676 _temp.primaryVertices = pvSource
677 _temp.tracks = pfCandidates
678 if hasattr( process, btagPrefix+
'inclusiveCandidateSecondaryVertices' )
and not hasattr( process, svSource.getModuleLabel() ):
680 getattr(process, btagPrefix+
'inclusiveCandidateSecondaryVertices').
clone(),
682 if any(i
in acceptedTagInfos
for i
in ivfcTagInfos):
683 if not hasattr( process, btagPrefix+
'inclusiveCandidateVertexFinderCvsL' ):
684 loadWithPrefix(process,
'RecoVertex.AdaptiveVertexFinder.inclusiveVertexing_cff', btagPrefix, task.label())
686 if hasattr( process, btagPrefix+
'inclusiveCandidateVertexFinderCvsL' ):
687 _temp = getattr(process, btagPrefix+
'inclusiveCandidateVertexFinderCvsL')
688 _temp.minHits = cms.uint32(8)
690 if pvSource.getModuleLabel() ==
'offlineSlimmedPrimaryVertices':
691 if hasattr( process, btagPrefix+
'inclusiveCandidateVertexFinderCvsL' ):
692 _temp = getattr(process, btagPrefix+
'inclusiveCandidateVertexFinderCvsL')
693 _temp.primaryVertices = pvSource
694 _temp.tracks = pfCandidates
695 if hasattr( process, btagPrefix+
'candidateVertexArbitratorCvsL' ):
696 _temp = getattr(process, btagPrefix+
'candidateVertexArbitratorCvsL')
697 _temp.primaryVertices = pvSource
698 _temp.tracks = pfCandidates
699 if hasattr( process, btagPrefix+
'inclusiveCandidateSecondaryVerticesCvsL' )
and not hasattr( process, svSourceCvsL.getModuleLabel() ):
701 getattr(process, btagPrefix+
'inclusiveCandidateSecondaryVerticesCvsL').
clone(),
703 if 'inclusiveSecondaryVertexFinderTagInfos' in acceptedTagInfos:
704 if not hasattr( process,
'inclusiveVertexing' ):
705 process.load(
'RecoVertex.AdaptiveVertexFinder.inclusiveVertexing_cff' )
706 task.add(process.inclusiveVertexingTask)
707 task.add(process.inclusiveCandidateVertexingTask)
708 task.add(process.inclusiveCandidateVertexingCvsLTask)
709 if 'inclusiveSecondaryVertexFinderFilteredTagInfos' in acceptedTagInfos:
710 if not hasattr( process,
'inclusiveVertexing' ):
711 process.load(
'RecoVertex.AdaptiveVertexFinder.inclusiveVertexing_cff' )
712 task.add(process.inclusiveVertexingTask)
713 task.add(process.inclusiveCandidateVertexingTask)
714 task.add(process.inclusiveCandidateVertexingCvsLTask)
715 if 'inclusiveSecondaryVertexFinderFilteredTagInfos' in acceptedTagInfos:
716 if not hasattr( process,
'inclusiveSecondaryVerticesFiltered' ):
717 process.load(
'RecoBTag.SecondaryVertex.inclusiveSecondaryVerticesFiltered_cfi' )
718 task.add(process.inclusiveSecondaryVerticesFiltered)
719 task.add(process.bVertexFilter)
720 if not hasattr( process,
'bToCharmDecayVertexMerged' ):
721 process.load(
'RecoBTag.SecondaryVertex.bToCharmDecayVertexMerger_cfi' )
722 task.add(process.bToCharmDecayVertexMerged)
723 if 'caTopTagInfos' in acceptedTagInfos :
724 patJets.addTagInfos =
True 725 if not hasattr( process,
'caTopTagInfos' )
and not hasattr( process,
'caTopTagInfosAK8' ):
726 process.load(
'RecoJets.JetProducers.caTopTaggers_cff' )
727 task.add(process.caTopTaggersTask)
bool any(const std::vector< T > &v, const T &what)
def addToProcessAndTask(label, module, process, task)
def loadWithPrefix(process, moduleName, prefix='', loadedProducersAndFilters=None)
TEveGeoShape * clone(const TEveElement *element, TEveElement *parent)
def getPatAlgosToolsTask(process)
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger list("!*","!HLTx*"if it matches 2 triggers or more) will accept the event if all the matching triggers are FAIL.It will reject the event if any of the triggers are PASS or EXCEPTION(this matches the behavior of"!*"before the partial wildcard feature was incorporated).Triggers which are in the READY state are completely ignored.(READY should never be returned since the trigger paths have been run