CMS 3D CMS Logo

Public Member Functions | Private Attributes | Static Private Attributes

jetTools::AddJetID Class Reference

Inherits FWCore::GuiBrowsers::ConfigToolBase::ConfigToolBase.

List of all members.

Public Member Functions

def __call__
def __init__
def getDefaultParameters
def toolCode

Private Attributes

 _comment
 _parameters

Static Private Attributes

tuple _defaultParameters = dicttypes.SortedKeysDict()
string _label = 'addJetID'

Detailed Description

Compute jet id for process

Definition at line 951 of file jetTools.py.


Constructor & Destructor Documentation

def jetTools::AddJetID::__init__ (   self)

Definition at line 957 of file jetTools.py.

00958                       :
00959         ConfigToolBase.__init__(self)
00960         self.addParameter(self._defaultParameters,'jetSrc',self._defaultValue, "", Type=cms.InputTag)
00961         self.addParameter(self._defaultParameters,'jetIdTag',self._defaultValue, "Tag to append to jet id map", Type=str)
00962         self._parameters=copy.deepcopy(self._defaultParameters)
00963         self._comment = ""


Member Function Documentation

def jetTools::AddJetID::__call__ (   self,
  process,
  jetSrc = None,
  jetIdTag = None 
)

Definition at line 967 of file jetTools.py.

00970                                      :
00971         if  jetSrc is None:
00972             jetSrc=self._defaultParameters['jetSrc'].value
00973         if  jetIdTag is None:
00974             jetIdTag=self._defaultParameters['jetIdTag'].value
00975         self.setParameter('jetSrc',jetSrc)
00976         self.setParameter('jetIdTag',jetIdTag)
00977         self.apply(process) 
        
def jetTools::AddJetID::getDefaultParameters (   self)

Definition at line 964 of file jetTools.py.

00965                                   :
00966         return self._defaultParameters

def jetTools::AddJetID::toolCode (   self,
  process 
)

Definition at line 978 of file jetTools.py.

00978                                :        
00979         jetSrc=self._parameters['jetSrc'].value
00980         jetIdTag=self._parameters['jetIdTag'].value
00981 
00982         jetIdLabel = jetIdTag + 'JetID'
00983         print "Making new jet ID label with label " + jetIdTag
00984         
00985         ## replace jet id sequence
00986         process.load("RecoJets.JetProducers.ak5JetID_cfi")
00987         setattr( process, jetIdLabel, process.ak5JetID.clone(src = jetSrc))
00988         process.makePatJets.replace( process.patJets, getattr(process,jetIdLabel) + process.patJets )    
00989            
00990 addJetID=AddJetID()
00991 
00992 

Member Data Documentation

Definition at line 957 of file jetTools.py.

tuple jetTools::AddJetID::_defaultParameters = dicttypes.SortedKeysDict() [static, private]

Definition at line 956 of file jetTools.py.

string jetTools::AddJetID::_label = 'addJetID' [static, private]

Definition at line 955 of file jetTools.py.

Definition at line 957 of file jetTools.py.