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),
549 acceptedTagInfos.append(btagInfo)
550 elif hasattr(toptag, btagInfo) :
551 acceptedTagInfos.append(btagInfo)
553 print ' --> %s ignored, since not available via RecoBTag.Configuration.RecoBTag_cff!'%(btagInfo)
555 acceptedBtagDiscriminators =
list()
556 for discriminator_name
in btagDiscriminators :
557 btagDiscr = discriminator_name.split(
':')[0]
559 if hasattr(btag,btagDiscr):
560 newDiscr = btagPrefix+btagDiscr+labelName+postfix
561 if hasattr(process, newDiscr):
563 elif hasattr(getattr(btag, btagDiscr),
'tagInfos'):
566 getattr(btag, btagDiscr).
clone(
567 tagInfos = cms.VInputTag(
568 *[ cms.InputTag(btagPrefix+x+labelName+postfix) \
569 for x
in supportedBtagDiscr[discriminator_name][0] ]
575 elif hasattr(getattr(btag, btagDiscr),
'src'):
578 getattr(btag, btagDiscr).
clone(
579 src = cms.InputTag(btagPrefix+supportedBtagDiscr[discriminator_name][0][0]+labelName+postfix)
585 raise ValueError(
'I do not know how to update %s it does not have neither "tagInfos" nor "src" attributes' % btagDiscr)
586 acceptedBtagDiscriminators.append(discriminator_name)
588 print ' --> %s ignored, since not available via RecoBTag.Configuration.RecoBTag_cff!'%(btagDiscr)
590 for meta_tagger
in present_meta:
591 btagDiscr = meta_tagger.split(
':')[0]
593 if hasattr(btag,btagDiscr):
594 newDiscr = btagPrefix+btagDiscr+labelName+postfix
595 if hasattr(process, newDiscr):
600 getattr(btag, btagDiscr).
clone(),
604 for dependency
in supportedMetaDiscr[meta_tagger]:
605 if ':' in dependency:
606 new_dep = btagPrefix+dependency.split(
':')[0]+labelName+postfix+
':'+dependency.split(
':')[1]
608 new_dep = btagPrefix+dependency+labelName+postfix
609 replace = MassSearchReplaceAnyInputTagVisitor(dependency, new_dep)
610 replace.doIt(getattr(process, newDiscr), newDiscr)
611 acceptedBtagDiscriminators.append(meta_tagger)
613 print ' --> %s ignored, since not available via RecoBTag.Configuration.RecoBTag_cff!'%(btagDiscr)
616 patJets.tagInfoSources = cms.VInputTag( *[ cms.InputTag(btagPrefix+x+labelName+postfix)
for x
in acceptedTagInfos ] )
617 patJets.discriminatorSources = cms.VInputTag(*[
618 cms.InputTag(btagPrefix+x+labelName+postfix) \
619 if ':' not in x
else \
620 cms.InputTag(btagPrefix+x.split(
':')[0]+labelName+postfix+
':'+x.split(
':')[1]) \
621 for x
in acceptedBtagDiscriminators
623 if len(acceptedBtagDiscriminators) > 0 :
624 patJets.addBTagInfo =
True 627 if not tightBTagNTkHits:
628 if pvSource.getModuleLabel() ==
'offlineSlimmedPrimaryVertices':
633 ivfbTagInfos = [
'pfInclusiveSecondaryVertexFinderTagInfos',
'pfInclusiveSecondaryVertexFinderAK8TagInfos',
'pfInclusiveSecondaryVertexFinderCA15TagInfos']
634 if any(i
in acceptedTagInfos
for i
in ivfbTagInfos)
and not runIVFforCTagOnly:
635 if not hasattr( process, btagPrefix+
'inclusiveCandidateVertexFinder' ):
636 loadWithPrefix(process,
'RecoVertex.AdaptiveVertexFinder.inclusiveVertexing_cff', btagPrefix, task.label())
638 if hasattr( process, btagPrefix+
'inclusiveCandidateVertexFinder' ):
639 _temp = getattr(process, btagPrefix+
'inclusiveCandidateVertexFinder')
640 _temp.minHits = cms.uint32(8)
642 if pvSource.getModuleLabel() ==
'offlineSlimmedPrimaryVertices':
643 if hasattr( process, btagPrefix+
'inclusiveCandidateVertexFinder' ):
644 _temp = getattr(process, btagPrefix+
'inclusiveCandidateVertexFinder')
645 _temp.primaryVertices = pvSource
646 _temp.tracks = pfCandidates
647 if hasattr( process, btagPrefix+
'candidateVertexArbitrator' ):
648 _temp = getattr(process, btagPrefix+
'candidateVertexArbitrator')
649 _temp.primaryVertices = pvSource
650 _temp.tracks = pfCandidates
651 if hasattr( process, btagPrefix+
'inclusiveCandidateSecondaryVertices' )
and not hasattr( process, svSource.getModuleLabel() ):
653 getattr(process, btagPrefix+
'inclusiveCandidateSecondaryVertices').
clone(),
655 if any(i
in acceptedTagInfos
for i
in ivfcTagInfos):
656 if not hasattr( process, btagPrefix+
'inclusiveCandidateVertexFinderCvsL' ):
657 loadWithPrefix(process,
'RecoVertex.AdaptiveVertexFinder.inclusiveVertexing_cff', btagPrefix, task.label())
659 if hasattr( process, btagPrefix+
'inclusiveCandidateVertexFinderCvsL' ):
660 _temp = getattr(process, btagPrefix+
'inclusiveCandidateVertexFinderCvsL')
661 _temp.minHits = cms.uint32(8)
663 if pvSource.getModuleLabel() ==
'offlineSlimmedPrimaryVertices':
664 if hasattr( process, btagPrefix+
'inclusiveCandidateVertexFinderCvsL' ):
665 _temp = getattr(process, btagPrefix+
'inclusiveCandidateVertexFinderCvsL')
666 _temp.primaryVertices = pvSource
667 _temp.tracks = pfCandidates
668 if hasattr( process, btagPrefix+
'candidateVertexArbitratorCvsL' ):
669 _temp = getattr(process, btagPrefix+
'candidateVertexArbitratorCvsL')
670 _temp.primaryVertices = pvSource
671 _temp.tracks = pfCandidates
672 if hasattr( process, btagPrefix+
'inclusiveCandidateSecondaryVerticesCvsL' )
and not hasattr( process, svSourceCvsL.getModuleLabel() ):
674 getattr(process, btagPrefix+
'inclusiveCandidateSecondaryVerticesCvsL').
clone(),
676 if 'inclusiveSecondaryVertexFinderTagInfos' in acceptedTagInfos:
677 if not hasattr( process,
'inclusiveVertexing' ):
678 process.load(
'RecoVertex.AdaptiveVertexFinder.inclusiveVertexing_cff' )
679 task.add(process.inclusiveVertexingTask)
680 task.add(process.inclusiveCandidateVertexingTask)
681 task.add(process.inclusiveCandidateVertexingCvsLTask)
682 if 'inclusiveSecondaryVertexFinderFilteredTagInfos' in acceptedTagInfos:
683 if not hasattr( process,
'inclusiveVertexing' ):
684 process.load(
'RecoVertex.AdaptiveVertexFinder.inclusiveVertexing_cff' )
685 task.add(process.inclusiveVertexingTask)
686 task.add(process.inclusiveCandidateVertexingTask)
687 task.add(process.inclusiveCandidateVertexingCvsLTask)
688 if 'inclusiveSecondaryVertexFinderFilteredTagInfos' in acceptedTagInfos:
689 if not hasattr( process,
'inclusiveSecondaryVerticesFiltered' ):
690 process.load(
'RecoBTag.SecondaryVertex.inclusiveSecondaryVerticesFiltered_cfi' )
691 task.add(process.inclusiveSecondaryVerticesFiltered)
692 task.add(process.bVertexFilter)
693 if not hasattr( process,
'bToCharmDecayVertexMerged' ):
694 process.load(
'RecoBTag.SecondaryVertex.bToCharmDecayVertexMerger_cfi' )
695 task.add(process.bToCharmDecayVertexMerged)
696 if 'caTopTagInfos' in acceptedTagInfos :
697 patJets.addTagInfos =
True 698 if not hasattr( process,
'caTopTagInfos' )
and not hasattr( process,
'caTopTagInfosAK8' ):
699 process.load(
'RecoJets.JetProducers.caTopTaggers_cff' )
700 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