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


Constructor & Destructor Documentation

def jetTools::AddJetID::__init__ (   self)

Definition at line 1236 of file jetTools.py.

01237                       :
01238         ConfigToolBase.__init__(self)
01239         self.addParameter(self._defaultParameters,'jetSrc',self._defaultValue, "", Type=cms.InputTag)
01240         self.addParameter(self._defaultParameters,'jetIdTag',self._defaultValue, "Tag to append to jet id map", Type=str)
01241         self._parameters=copy.deepcopy(self._defaultParameters)
01242         self._comment = ""


Member Function Documentation

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

Definition at line 1246 of file jetTools.py.

01249                                      :
01250         if  jetSrc is None:
01251             jetSrc=self._defaultParameters['jetSrc'].value
01252         if  jetIdTag is None:
01253             jetIdTag=self._defaultParameters['jetIdTag'].value
01254         self.setParameter('jetSrc',jetSrc)
01255         self.setParameter('jetIdTag',jetIdTag)
01256         self.apply(process)

def jetTools::AddJetID::getDefaultParameters (   self)

Definition at line 1243 of file jetTools.py.

01244                                   :
01245         return self._defaultParameters

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

Definition at line 1257 of file jetTools.py.

01258                                :
01259         jetSrc=self._parameters['jetSrc'].value
01260         jetIdTag=self._parameters['jetIdTag'].value
01261 
01262         jetIdLabel = jetIdTag + 'JetID'
01263         print "Making new jet ID label with label " + jetIdTag
01264 
01265         ## replace jet id sequence
01266         process.load("RecoJets.JetProducers.ak5JetID_cfi")
01267         setattr( process, jetIdLabel, process.ak5JetID.clone(src = jetSrc))
01268         process.makePatJets.replace( process.patJets, getattr(process,jetIdLabel) + process.patJets )
01269 
01270 addJetID=AddJetID()
01271 


Member Data Documentation

Definition at line 1236 of file jetTools.py.

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

Definition at line 1235 of file jetTools.py.

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

Definition at line 1234 of file jetTools.py.

Definition at line 1236 of file jetTools.py.