Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:27:42

0001 '''
0002 
0003 Change the jets with which the PFTau collections are built.
0004 
0005 Author: Evan K. Friis, UC Davis
0006 
0007 '''
0008 
0009 def changePFTauJetSource(process, jetSrc):
0010     # Update all the tau producers
0011     for producer in ['combinatoricRecoTaus', 'shrinkingConePFTauProducer']:
0012         # Update the pizero producer associated to this tau
0013         tauProducer = getattr(process, producer)
0014         tauProducer.jetSrc = jetSrc
0015         piZeroProdName = getattr(tauProducer, 'piZeroSrc').value()
0016         piZeroProducer = getattr(process, piZeroProdName)
0017         piZeroProducer.src = jetSrc
0018     # Set the PFTauTagInfoProducer jet tracks associator correctly
0019     process.ak4PFJetTracksAssociatorAtVertex.jets = jetSrc
0020 
0021 #if __name__ == "__main__":
0022     #import FWCore.ParameterSet.Config as cms
0023     #process = cms.Process("TEST")
0024     #process.load("RecoTauTag.Configuration.RecoPFTauTag_cff")
0025     #changePFTauJetSource(process, "myJets")
0026     #print process.combinatoricRecoTaus.jetSrc
0027     #print process.ak4PFJetsLegacyTaNCPiZeros.src