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 541 of file jetTools.py.


Constructor & Destructor Documentation

def jetTools::AddJetID::__init__ (   self)

Definition at line 547 of file jetTools.py.

00548                       :
00549         ConfigToolBase.__init__(self)
00550         self.addParameter(self._defaultParameters,'jetSrc','', "", Type=cms.InputTag)
00551         self.addParameter(self._defaultParameters,'jetIdTag','', "Tag to append to jet id map", Type=str)
00552         self._parameters=copy.deepcopy(self._defaultParameters)
00553         self._comment = ""


Member Function Documentation

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

Definition at line 557 of file jetTools.py.

00560                                      :
00561         if  jetSrc is None:
00562             jetSrc=self._defaultParameters['jetSrc'].value
00563         if  jetIdTag is None:
00564             jetIdTag=self._defaultParameters['jetIdTag'].value
00565         self.setParameter('jetSrc',jetSrc)
00566         self.setParameter('jetIdTag',jetIdTag)
00567         self.apply(process)

def jetTools::AddJetID::getDefaultParameters (   self)

Definition at line 554 of file jetTools.py.

00555                                   :
00556         return self._defaultParameters

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

Definition at line 568 of file jetTools.py.

00569                                :
00570         jetSrc=self._parameters['jetSrc'].value
00571         jetIdTag=self._parameters['jetIdTag'].value
00572 
00573         jetIdLabel = jetIdTag + 'JetID'
00574         print "Making new jet ID label with label " + jetIdTag
00575 
00576         ## replace jet id sequence
00577         process.load("RecoJets.JetProducers.ak5JetID_cfi")
00578         setattr( process, jetIdLabel, process.ak5JetID.clone(src = jetSrc))
00579 
00580 
00581 addJetID=AddJetID()
00582 


Member Data Documentation

Definition at line 547 of file jetTools.py.

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

Definition at line 546 of file jetTools.py.

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

Definition at line 545 of file jetTools.py.

Definition at line 547 of file jetTools.py.