CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
replaceOfflinePrimaryVerticesWithBS.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
2 from FWCore.ParameterSet.MassReplace import massReplaceInputTag as MassReplaceInputTag
3 #
4 # mass replace OfflinePrimaryVertices with OfflinePrimaryVerticesWithBS
5 # (doesn't affect defaults in the source code, e.g. provided by fillDescriptions)
6 #
8  # swap all occurrences
9  process = MassReplaceInputTag(process,"offlinePrimaryVertices","offlinePrimaryVerticesWithBS")
10 
11  # excepted of course for the primary source...
12  if hasattr(process,'offlinePrimaryVerticesWithBS'):
13  process.offlinePrimaryVerticesWithBS.src = cms.InputTag("offlinePrimaryVertices","WithBS")
14 
15  return process
16 
17 #
18 # makes OfflinePrimaryVertices equivalent to OfflinePrimaryVerticesWithBS
19 # by changing the input vertices collection of the sorted PV
20 # see file https://github.com/cms-sw/cmssw/blob/master/RecoVertex/Configuration/python/RecoVertex_cff.py
21 #
23  if hasattr(process,'offlinePrimaryVertices'):
24  process.offlinePrimaryVertices.vertices="unsortedOfflinePrimaryVertices:WithBS"
25 
26  return process