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


Constructor & Destructor Documentation

def jetTools::AddJetID::__init__ (   self)

Definition at line 877 of file jetTools.py.

00878                       :
00879         ConfigToolBase.__init__(self)
00880         self.addParameter(self._defaultParameters,'jetSrc',self._defaultValue, "", Type=cms.InputTag)
00881         self.addParameter(self._defaultParameters,'jetIdTag',self._defaultValue, "Tag to append to jet id map", Type=str)
00882         self._parameters=copy.deepcopy(self._defaultParameters)
00883         self._comment = ""


Member Function Documentation

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

Definition at line 887 of file jetTools.py.

00890                                      :
00891         if  jetSrc is None:
00892             jetSrc=self._defaultParameters['jetSrc'].value
00893         if  jetIdTag is None:
00894             jetIdTag=self._defaultParameters['jetIdTag'].value
00895         self.setParameter('jetSrc',jetSrc)
00896         self.setParameter('jetIdTag',jetIdTag)
00897         self.apply(process) 
        
def jetTools::AddJetID::getDefaultParameters (   self)

Definition at line 884 of file jetTools.py.

00885                                   :
00886         return self._defaultParameters

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

Definition at line 898 of file jetTools.py.

00898                                :        
00899         jetSrc=self._parameters['jetSrc'].value
00900         jetIdTag=self._parameters['jetIdTag'].value
00901 
00902         jetIdLabel = jetIdTag + 'JetID'
00903         print "Making new jet ID label with label " + jetIdTag
00904         
00905         ## replace jet id sequence
00906         process.load("RecoJets.JetProducers.ak5JetID_cfi")
00907         setattr( process, jetIdLabel, process.ak5JetID.clone(src = jetSrc))
00908         process.makePatJets.replace( process.patJets, getattr(process,jetIdLabel) + process.patJets )    
00909            
00910 addJetID=AddJetID()
00911 
00912 

Member Data Documentation

Definition at line 877 of file jetTools.py.

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

Definition at line 876 of file jetTools.py.

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

Definition at line 875 of file jetTools.py.

Definition at line 877 of file jetTools.py.