CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
CustomConfigs.py
Go to the documentation of this file.
2 
3 def ProcessName(process):
4 # processname modifications
5 
6  if 'hltTrigReport' in process.__dict__:
7  process.hltTrigReport.HLTriggerResults = cms.InputTag( 'TriggerResults','',process.name_() )
8 
9  if 'hltDQMHLTScalers' in process.__dict__:
10  process.hltDQMHLTScalers.triggerResults = cms.InputTag( 'TriggerResults','',process.name_() )
11 
12  if 'hltDQML1SeedLogicScalers' in process.__dict__:
13  process.hltDQML1SeedLogicScalers.processname = process.name_()
14 
15  return(process)
16 
17 
18 def Base(process):
19 # default modifications
20 
21  process.options.wantSummary = cms.untracked.bool(True)
22 
23  process.MessageLogger.categories.append('TriggerSummaryProducerAOD')
24  process.MessageLogger.categories.append('L1GtTrigReport')
25  process.MessageLogger.categories.append('HLTrigReport')
26 
27 # override the GlobalTag, connection string and pfnPrefix
28  if 'GlobalTag' in process.__dict__:
29  process.GlobalTag.connect = 'frontier://FrontierProd/CMS_COND_31X_GLOBALTAG'
30  process.GlobalTag.pfnPrefix = cms.untracked.string('frontier://FrontierProd/')
31 
32  process=ProcessName(process)
33 
34  return(process)
35 
36 
37 def L1T(process):
38 # modifications when running L1T only
39 
40  process.load('L1Trigger.GlobalTriggerAnalyzer.l1GtTrigReport_cfi')
41  process.l1GtTrigReport.L1GtRecordInputTag = cms.InputTag( "simGtDigis" )
42 
43  process.L1AnalyzerEndpath = cms.EndPath( process.l1GtTrigReport )
44  process.schedule.append(process.L1AnalyzerEndpath)
45 
46  process=Base(process)
47 
48  return(process)
49 
50 
51 def L1THLT(process):
52 # modifications when running L1T+HLT
53 
54  if not ('HLTAnalyzerEndpath' in process.__dict__) :
55  from HLTrigger.Configuration.HLT_FULL_cff import hltL1GtTrigReport,hltTrigReport
56  process.hltL1GtTrigReport = hltL1GtTrigReport
57  process.hltTrigReport = hltTrigReport
58  process.HLTAnalyzerEndpath = cms.EndPath(process.hltL1GtTrigReport + process.hltTrigReport)
59  process.schedule.append(process.HLTAnalyzerEndpath)
60 
61  process=Base(process)
62 
63  return(process)
64 
65 
66 def FASTSIM(process):
67 # modifications when running L1T+HLT
68 
69  process=L1THLT(process)
70  process.hltL1GtTrigReport.L1GtRecordInputTag = cms.InputTag("gtDigis")
71 
72  return(process)
73 
74 
75 def HLTDropPrevious(process):
76 # drop on input the previous HLT results
77  process.source.inputCommands = cms.untracked.vstring (
78  'keep *',
79  'drop *_hltL1GtObjectMap_*_*',
80  'drop *_TriggerResults_*_*',
81  'drop *_hltTriggerSummaryAOD_*_*',
82  )
83 
84  process=Base(process)
85 
86  return(process)