CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Functions
changePFTauJetSource Namespace Reference

Functions

def changePFTauJetSource
 

Detailed Description

Change the jets with which the PFTau collections are built.

Author: Evan K. Friis, UC Davis

Function Documentation

def changePFTauJetSource.changePFTauJetSource (   process,
  jetSrc 
)

Definition at line 9 of file changePFTauJetSource.py.

References relativeConstraints.value.

9 
10 def changePFTauJetSource(process, jetSrc):
11  # Update all the tau producers
12  for producer in ['combinatoricRecoTaus', 'shrinkingConePFTauProducer']:
13  # Update the pizero producer associated to this tau
14  tauProducer = getattr(process, producer)
15  tauProducer.jetSrc = jetSrc
16  piZeroProdName = getattr(tauProducer, 'piZeroSrc').value()
17  piZeroProducer = getattr(process, piZeroProdName)
18  piZeroProducer.src = jetSrc
19  # Set the PFTauTagInfoProducer jet tracks associator correctly
20  process.ak5PFJetTracksAssociatorAtVertex.jets = jetSrc
21 
22 #if __name__ == "__main__":
23  #import FWCore.ParameterSet.Config as cms
24  #process = cms.Process("TEST")
25  #process.load("RecoTauTag.Configuration.RecoPFTauTag_cff")
26  #changePFTauJetSource(process, "myJets")
27  #print process.combinatoricRecoTaus.jetSrc
28  #print process.ak5PFJetsLegacyTaNCPiZeros.src