CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
changePFTauJetSource.py
Go to the documentation of this file.
1 '''
2 
3 Change the jets with which the PFTau collections are built.
4 
5 Author: Evan K. Friis, UC Davis
6 
7 '''
8 
9 def changePFTauJetSource(process, jetSrc):
10  # Update all the tau producers
11  for producer in ['combinatoricRecoTaus', 'shrinkingConePFTauProducer']:
12  # Update the pizero producer associated to this tau
13  tauProducer = getattr(process, producer)
14  tauProducer.jetSrc = jetSrc
15  piZeroProdName = getattr(tauProducer, 'piZeroSrc').value()
16  piZeroProducer = getattr(process, piZeroProdName)
17  piZeroProducer.src = jetSrc
18  # Set the PFTauTagInfoProducer jet tracks associator correctly
19  process.ak4PFJetTracksAssociatorAtVertex.jets = jetSrc
20 
21 #if __name__ == "__main__":
22  #import FWCore.ParameterSet.Config as cms
23  #process = cms.Process("TEST")
24  #process.load("RecoTauTag.Configuration.RecoPFTauTag_cff")
25  #changePFTauJetSource(process, "myJets")
26  #print process.combinatoricRecoTaus.jetSrc
27  #print process.ak4PFJetsLegacyTaNCPiZeros.src
Definition: value.py:1