CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_4_1_8_patch9/src/HLTrigger/Configuration/python/CustomConfigs.py

Go to the documentation of this file.
00001 import FWCore.ParameterSet.Config as cms
00002 
00003 from HLTrigger.Configuration import customizeHLTforL1Emulator
00004 
00005 
00006 def Base(process):
00007 #   default modifications
00008 
00009     process.options.wantSummary = cms.untracked.bool(True)
00010 
00011     process.MessageLogger.categories.append('TriggerSummaryProducerAOD')
00012     process.MessageLogger.categories.append('L1GtTrigReport')
00013     process.MessageLogger.categories.append('HLTrigReport')
00014 
00015     if 'hltTrigReport' in process.__dict__:
00016         process.hltTrigReport.HLTriggerResults = cms.InputTag( 'TriggerResults','',process.name_() )
00017 
00018     if 'hltDQMHLTScalers' in process.__dict__:
00019         process.hltDQMHLTScalers.triggerResults = cms.InputTag( 'TriggerResults','',process.name_() )
00020 
00021     if 'hltDQML1SeedLogicScalers' in process.__dict__:
00022         process.hltDQML1SeedLogicScalers.processname = process.name_()
00023 
00024     return(process)
00025 
00026 
00027 def L1T(process):
00028 #   modifications when running L1T only
00029 
00030     process.load('L1Trigger.GlobalTriggerAnalyzer.l1GtTrigReport_cfi')
00031     process.l1GtTrigReport.L1GtRecordInputTag = cms.InputTag( "simGtDigis" )
00032 
00033     process.L1AnalyzerEndpath = cms.EndPath( process.l1GtTrigReport )
00034     process.schedule.append(process.L1AnalyzerEndpath)
00035 
00036     process=Base(process)
00037 
00038     return(process)
00039 
00040 
00041 def L1THLT(process):
00042 #   modifications when running L1T+HLT
00043 
00044     process=Base(process)
00045 
00046     return(process)
00047 
00048 
00049 def L1THLT2(process):
00050 #   modifications when re-running L1T+HLT    
00051 
00052 #   run trigger primitive generation on unpacked digis, then central L1
00053 
00054     process.load("L1Trigger.Configuration.CaloTriggerPrimitives_cff")
00055     process.simEcalTriggerPrimitiveDigis.Label = 'ecalDigis'
00056     process.simHcalTriggerPrimitiveDigis.inputLabel = ('hcalDigis', 'hcalDigis')
00057 
00058 #   patch the process to use 'sim*Digis' from the L1 emulator
00059 #   instead of 'hlt*Digis' from the RAW data
00060 
00061     patchToRerunL1Emulator.switchToSimGtDigis( process )
00062 
00063     process=Base(process)
00064 
00065     return(process)
00066 
00067 
00068 def HLTDropPrevious(process):
00069 #   drop on input the previous HLT results
00070     process.source.inputCommands = cms.untracked.vstring (
00071         'keep *',
00072         'drop *_hltL1GtObjectMap_*_*',
00073         'drop *_TriggerResults_*_*',
00074         'drop *_hltTriggerSummaryAOD_*_*',
00075     )
00076 
00077     process=Base(process)
00078     
00079     return(process)