CMS 3D CMS Logo

Classes | Functions
coreTools Namespace Reference

Classes

class  RemoveMCMatching
 
class  RunOnData
 

Functions

def _removeMCMatchingForPATObject (process, matcherName, producerName, postfix="")
 

Function Documentation

◆ _removeMCMatchingForPATObject()

def coreTools._removeMCMatchingForPATObject (   process,
  matcherName,
  producerName,
  postfix = "" 
)
private

Definition at line 219 of file coreTools.py.

Referenced by coreTools.RemoveMCMatching.toolCode().

219 def _removeMCMatchingForPATObject(process, matcherName, producerName, postfix=""):
220  if hasattr(process, matcherName+postfix):
221  objectMatcher = getattr(process, matcherName+postfix)
222  if hasattr(process, producerName+postfix):
223  objectProducer = getattr(process, producerName+postfix)
224  if hasattr(objectProducer,"addGenMatch"):
225  objectProducer.addGenMatch = False
226  if hasattr(objectProducer,"addGenMatch"):
227  objectProducer.addGenMatch = False
228  attr = objectProducer.genParticleMatch.getModuleLabel()
229  if hasattr(objectProducer,"genParticleMatch"):
230  objectProducer.genParticleMatch = ''
231  if hasattr(process,attr): delattr(process,attr)
232 
233 
def _removeMCMatchingForPATObject(process, matcherName, producerName, postfix="")
Definition: coreTools.py:219