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 from HLTrigger.Configuration import customizeHLTforL1Emulator
4 
5 
6 def Base(process):
7 # default modifications
8 
9  process.options.wantSummary = cms.untracked.bool(True)
10 
11  process.MessageLogger.categories.append('TriggerSummaryProducerAOD')
12  process.MessageLogger.categories.append('L1GtTrigReport')
13  process.MessageLogger.categories.append('HLTrigReport')
14 
15  if 'hltTrigReport' in process.__dict__:
16  process.hltTrigReport.HLTriggerResults = cms.InputTag( 'TriggerResults','',process.name_() )
17 
18  if 'hltDQMHLTScalers' in process.__dict__:
19  process.hltDQMHLTScalers.triggerResults = cms.InputTag( 'TriggerResults','',process.name_() )
20 
21  if 'hltDQML1SeedLogicScalers' in process.__dict__:
22  process.hltDQML1SeedLogicScalers.processname = process.name_()
23 
24  return(process)
25 
26 
27 def L1T(process):
28 # modifications when running L1T only
29 
30  process.load('L1Trigger.GlobalTriggerAnalyzer.l1GtTrigReport_cfi')
31  process.l1GtTrigReport.L1GtRecordInputTag = cms.InputTag( "simGtDigis" )
32 
33  process.L1AnalyzerEndpath = cms.EndPath( process.l1GtTrigReport )
34  process.schedule.append(process.L1AnalyzerEndpath)
35 
36  process=Base(process)
37 
38  return(process)
39 
40 
41 def L1THLT(process):
42 # modifications when running L1T+HLT
43 
44  process=Base(process)
45 
46  return(process)
47 
48 
49 def L1THLT2(process):
50 # modifications when re-running L1T+HLT
51 
52 # run trigger primitive generation on unpacked digis, then central L1
53 
54  process.load("L1Trigger.Configuration.CaloTriggerPrimitives_cff")
55  process.simEcalTriggerPrimitiveDigis.Label = 'ecalDigis'
56  process.simHcalTriggerPrimitiveDigis.inputLabel = ('hcalDigis', 'hcalDigis')
57 
58 # patch the process to use 'sim*Digis' from the L1 emulator
59 # instead of 'hlt*Digis' from the RAW data
60 
61  patchToRerunL1Emulator.switchToSimGtDigis( process )
62 
63  process=Base(process)
64 
65  return(process)
66 
67 
68 def HLTDropPrevious(process):
69 # drop on input the previous HLT results
70  process.source.inputCommands = cms.untracked.vstring (
71  'keep *',
72  'drop *_hltL1GtObjectMap_*_*',
73  'drop *_TriggerResults_*_*',
74  'drop *_hltTriggerSummaryAOD_*_*',
75  )
76 
77  process=Base(process)
78 
79  return(process)
return((rh^lh)&mask)