CMS 3D CMS Logo

Public Member Functions | Private Attributes | Static Private Attributes

metTools::AddTcMET 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 = 'addTcMET'

Detailed Description

Add track corrected MET collection to patEventContent

Definition at line 4 of file metTools.py.


Constructor & Destructor Documentation

def metTools::AddTcMET::__init__ (   self)

Definition at line 11 of file metTools.py.

00012                       :
00013         ConfigToolBase.__init__(self)
00014         self.addParameter(self._defaultParameters,'postfixLabel','TC', '')
00015         self._parameters=copy.deepcopy(self._defaultParameters)
00016         self._comment = ''


Member Function Documentation

def metTools::AddTcMET::__call__ (   self,
  process,
  postfixLabel = None 
)

Definition at line 20 of file metTools.py.

00021                                                  :
00022         if  postfixLabel is None:
00023             postfixLabel=self._defaultParameters['postfixLabel'].value 
00024         self.setParameter('postfixLabel',postfixLabel)
00025         self.apply(process) 
        
def metTools::AddTcMET::getDefaultParameters (   self)

Definition at line 17 of file metTools.py.

00018                                   :
00019         return self._defaultParameters

def metTools::AddTcMET::toolCode (   self,
  process 
)

Definition at line 26 of file metTools.py.

00026                                :                
00027         postfixLabel=self._parameters['postfixLabel'].value
00028 
00029 
00030         ## add module as process to the default sequence
00031         def addAlso (label,value):
00032             existing = getattr(process, label)
00033             setattr( process, label+postfixLabel, value)
00034             process.patDefaultSequence.replace( existing, existing*value )        
00035 
00036         ## clone and add a module as process to the
00037         ## default sequence
00038         def addClone(label,**replaceStatements):
00039             new = getattr(process, label).clone(**replaceStatements)
00040             addAlso(label, new)
00041 
00042         ## addClone('corMetType1Icone5Muons', uncorMETInputTag = cms.InputTag("tcMet"))
00043         addClone('patMETs', metSource = cms.InputTag("tcMet"))
00044 
00045         ## add new met collections output to the pat summary
00046         process.patCandidateSummary.candidates += [ cms.InputTag('patMETs'+postfixLabel) ]
00047        
00048 
00049 addTcMET=AddTcMET()
00050 

Member Data Documentation

Definition at line 11 of file metTools.py.

tuple metTools::AddTcMET::_defaultParameters = dicttypes.SortedKeysDict() [static, private]

Definition at line 9 of file metTools.py.

string metTools::AddTcMET::_label = 'addTcMET' [static, private]

Definition at line 8 of file metTools.py.

Definition at line 11 of file metTools.py.