CMS 3D CMS Logo

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

Go to the documentation of this file.
00001 import FWCore.ParameterSet.Config as cms
00002 
00003 def ProcessName(process):
00004 #   processname modifications
00005 
00006     if 'hltTrigReport' in process.__dict__:
00007         process.hltTrigReport.HLTriggerResults = cms.InputTag( 'TriggerResults','',process.name_() )
00008 
00009     if 'hltDQMHLTScalers' in process.__dict__:
00010         process.hltDQMHLTScalers.triggerResults = cms.InputTag( 'TriggerResults','',process.name_() )
00011 
00012     if 'hltDQML1SeedLogicScalers' in process.__dict__:
00013         process.hltDQML1SeedLogicScalers.processname = process.name_()
00014 
00015     return(process)
00016 
00017 
00018 def Base(process):
00019 #   default modifications
00020 
00021     process.options.wantSummary = cms.untracked.bool(True)
00022 
00023     process.MessageLogger.categories.append('TriggerSummaryProducerAOD')
00024     process.MessageLogger.categories.append('L1GtTrigReport')
00025     process.MessageLogger.categories.append('HLTrigReport')
00026 
00027 # override the GlobalTag, connection string and pfnPrefix
00028     if 'GlobalTag' in process.__dict__:
00029         process.GlobalTag.connect   = 'frontier://FrontierProd/CMS_COND_31X_GLOBALTAG'
00030         process.GlobalTag.pfnPrefix = cms.untracked.string('frontier://FrontierProd/')
00031         
00032     process=ProcessName(process)
00033 
00034     return(process)
00035 
00036 
00037 def L1T(process):
00038 #   modifications when running L1T only
00039 
00040     process.load('L1Trigger.GlobalTriggerAnalyzer.l1GtTrigReport_cfi')
00041     process.l1GtTrigReport.L1GtRecordInputTag = cms.InputTag( "simGtDigis" )
00042 
00043     process.L1AnalyzerEndpath = cms.EndPath( process.l1GtTrigReport )
00044     process.schedule.append(process.L1AnalyzerEndpath)
00045 
00046     process=Base(process)
00047 
00048     return(process)
00049 
00050 
00051 def L1THLT(process):
00052 #   modifications when running L1T+HLT
00053 
00054     if not ('HLTAnalyzerEndpath' in process.__dict__) :
00055         from HLTrigger.Configuration.HLT_FULL_cff import hltL1GtTrigReport,hltTrigReport
00056         process.hltL1GtTrigReport = hltL1GtTrigReport
00057         process.hltTrigReport = hltTrigReport
00058         process.HLTAnalyzerEndpath = cms.EndPath(process.hltL1GtTrigReport +  process.hltTrigReport)
00059         process.schedule.append(process.HLTAnalyzerEndpath)
00060 
00061     process=Base(process)
00062 
00063     return(process)
00064 
00065 
00066 def FASTSIM(process):
00067 #   modifications when running L1T+HLT
00068 
00069     process=L1THLT(process)
00070     process.hltL1GtTrigReport.L1GtRecordInputTag = cms.InputTag("gtDigis")
00071 
00072     return(process)
00073 
00074 
00075 def HLTDropPrevious(process):
00076 #   drop on input the previous HLT results
00077     process.source.inputCommands = cms.untracked.vstring (
00078         'keep *',
00079         'drop *_hltL1GtObjectMap_*_*',
00080         'drop *_TriggerResults_*_*',
00081         'drop *_hltTriggerSummaryAOD_*_*',
00082     )
00083 
00084     process=Base(process)
00085     
00086     return(process)