CMS 3D CMS Logo

trigTools.py

Go to the documentation of this file.
00001 import FWCore.ParameterSet.Config as cms
00002 
00003 def switchOffTriggerMatchingOld( process ):
00004     """ Disables old style trigger matching in PAT  """
00005     process.allLayer1Electrons.addTrigMatch = False
00006     process.allLayer1Muons.addTrigMatch     = False
00007     process.allLayer1Jets.addTrigMatch      = False
00008     process.allLayer1Photons.addTrigMatch   = False
00009     process.allLayer1Taus.addTrigMatch      = False
00010     process.layer1METs.addTrigMatch         = False
00011 #     process.patDefaultSequence.remove( process.patTrigMatch )
00012 
00013 # for (temporary) backwards compatibility
00014 def switchTriggerOff( process ):
00015     switchOffTriggerMatchingOld( process )
00016 
00017 from PhysicsTools.PatAlgos.patEventContent_cff import * 
00018     
00019 def switchOnTrigger( process ):
00020     """ Enables trigger information in PAT  """
00021     process.patTrigger.onlyStandAlone = False
00022     # add trigger modules to path
00023     process.p *= process.patTriggerSequence
00024     # add trigger specific event content to PAT event content
00025     process.out.outputCommands += patTriggerEventContent
00026     for matchLabel in process.patTriggerEvent.patTriggerMatches:
00027         process.out.outputCommands += [ 'keep patTriggerObjectsedmAssociation_patTriggerEvent_' + matchLabel + '_*' ]
00028 
00029 def switchOnTriggerStandAlone( process ):
00030     process.patTrigger.onlyStandAlone = True
00031     process.patTriggerSequence.remove( process.patTriggerEvent )
00032     process.p *= process.patTriggerSequence
00033     process.out.outputCommands += patTriggerStandAloneEventContent
00034 
00035 def switchOnTriggerAll( process ):
00036     switchOnTrigger( process )
00037     process.out.outputCommands += patTriggerStandAloneEventContent
00038 
00039 def switchOnTriggerMatchEmbedding( process ):
00040     process.patTriggerSequence += process.patTriggerMatchEmbedder
00041     process.out.outputCommands += patEventContentTriggerMatch

Generated on Tue Jun 9 17:41:44 2009 for CMSSW by  doxygen 1.5.4