CMS 3D CMS Logo

/data/git/CMSSW_5_3_11_patch5/src/RecoTauTag/Configuration/python/tools/changePFTauJetSource.py

Go to the documentation of this file.
00001 '''
00002 
00003 Change the jets with which the PFTau collections are built.
00004 
00005 Author: Evan K. Friis, UC Davis
00006 
00007 '''
00008 
00009 def changePFTauJetSource(process, jetSrc):
00010     # Update all the tau producers
00011     for producer in ['combinatoricRecoTaus', 'shrinkingConePFTauProducer']:
00012         # Update the pizero producer associated to this tau
00013         tauProducer = getattr(process, producer)
00014         tauProducer.jetSrc = jetSrc
00015         piZeroProdName = getattr(tauProducer, 'piZeroSrc').value()
00016         piZeroProducer = getattr(process, piZeroProdName)
00017         piZeroProducer.src = jetSrc
00018     # Set the PFTauTagInfoProducer jet tracks associator correctly
00019     process.ak5PFJetTracksAssociatorAtVertex.jets = jetSrc
00020 
00021 #if __name__ == "__main__":
00022     #import FWCore.ParameterSet.Config as cms
00023     #process = cms.Process("TEST")
00024     #process.load("RecoTauTag.Configuration.RecoPFTauTag_cff")
00025     #changePFTauJetSource(process, "myJets")
00026     #print process.combinatoricRecoTaus.jetSrc
00027     #print process.ak5PFJetsLegacyTaNCPiZeros.src