CMS 3D CMS Logo

customiseDemo.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
2 
3 import os
4 
5 ##############################################################################
6 # customisations for L1T demos
7 #
8 # Add demonstration modules to cmsDriver customs.
9 #
10 ##############################################################################
11 
12 def L1TBasicDemo(process):
13  print "L1T INFO: adding basic demo module to the process."
14  process.load('L1Trigger.L1TCommon.l1tBasicDemo_cfi')
15  process.l1tBasicDemoPath = cms.Path(process.l1tBasicDemo)
16  process.schedule.append(process.l1tBasicDemoPath)
17  return process
18 
19 def L1THLTDemo(process):
20  #process.load('L1Trigger.Configuration.SimL1Emulator_cff')
21  process.load('L1Trigger.L1TGlobal.hackConditions_cff')
22  print "L1T INFO: adding HLT demo module to the process."
23  #
24  # BEGIN HLT UNPACKER SEQUENCE FOR STAGE 2
25  #
26 
27  process.hltGtStage2Digis = cms.EDProducer(
28  "L1TRawToDigi",
29  Setup = cms.string("stage2::GTSetup"),
30  FedIds = cms.vint32( 1404 ),
31  )
32 
33  process.hltCaloStage2Digis = cms.EDProducer(
34  "L1TRawToDigi",
35  Setup = cms.string("stage2::CaloSetup"),
36  FedIds = cms.vint32( 1360, 1366 ),
37  )
38 
39  process.hltGmtStage2Digis = cms.EDProducer(
40  "L1TRawToDigi",
41  Setup = cms.string("stage2::GMTSetup"),
42  FedIds = cms.vint32(1402),
43  )
44 
45  process.hltGtStage2ObjectMap = cms.EDProducer(
46  "L1TGlobalProducer",
47  MuonInputTag = cms.InputTag("hltGmtStage2Digis","Muon"),
48  ExtInputTag = cms.InputTag("hltGtStage2Digis"), # (external conditions are not emulated, use unpacked)
49  EtSumInputTag = cms.InputTag("hltCaloStage2Digis", "EtSum"),
50  EGammaInputTag = cms.InputTag("hltCaloStage2Digis", "EGamma"),
51  TauInputTag = cms.InputTag("hltCaloStage2Digis", "Tau"),
52  JetInputTag = cms.InputTag("hltCaloStage2Digis", "Jet"),
53  AlgorithmTriggersUnprescaled = cms.bool(True),
54  AlgorithmTriggersUnmasked = cms.bool(True),
55  )
56 
57  # keeping same sequence name as for legacy system:
58  process.HLTL1UnpackerSequence = cms.Sequence(
59  process.hltGtStage2Digis +
60  process.hltCaloStage2Digis +
61  process.hltGmtStage2Digis +
62  process.hltGtStage2ObjectMap
63  )
64 
65  #
66  # END HLT UNPACKER SEQUENCE FOR STAGE 2
67  #
68 
69  #
70  # BEGIN L1T SEEDS EXAMPLE FOR STAGE 2
71  #
72  process.hltL1TSeed = cms.EDFilter(
73  "HLTL1TSeed",
74  L1SeedsLogicalExpression = cms.string( "L1_DoubleMu0er1p6_dEta_Max1p8 OR L1_DoubleMu0er1p6_dEta_Max1p8_OS " ),
75  saveTags = cms.bool( True ),
76  L1ObjectMapInputTag = cms.InputTag("hltGtStage2ObjectMap"),
77  L1GlobalInputTag = cms.InputTag("hltGtStage2Digis"),
78  L1MuonInputTag = cms.InputTag("hltGmtStage2Digis","Muon"),
79  L1EGammaInputTag = cms.InputTag("hltCaloStage2Digis","EGamma"),
80  L1JetInputTag = cms.InputTag("hltCaloStage2Digis","Jet"),
81  L1TauInputTag = cms.InputTag("hltCaloStage2Digis","Tau"),
82  L1EtSumInputTag = cms.InputTag("hltCaloStage2Digis","EtSum"),
83  )
84 
85  # HLT Seed sequence
86  process.HLTL1TSeedSequence = cms.Sequence(
87  process.hltL1TSeed
88  )
89 
90  #
91  # END L1T SEEDS EXAMPLE FOR STAGE 2
92  #
93 
94  print "L1T INFO: will dump a summary of Stage2 content as unpacked by HLT to screen."
95  process.load('L1Trigger.L1TCommon.l1tSummaryStage2HltDigis_cfi')
96 
97  # gt analyzer
98  process.l1tGlobalSummary = cms.EDAnalyzer(
99  'L1TGlobalSummary',
100  AlgInputTag = cms.InputTag("hltGtStage2ObjectMap"),
101  ExtInputTag = cms.InputTag("hltGtStage2ObjectMap"),
102  # DumpTrigResults = cms.bool(True), # per event dump of trig results
103  DumpTrigSummary = cms.bool(True), # job summary... not yet implemented...
104  )
105 
106  process.HLTL1TDebugSequence = cms.Sequence(process.l1tSummaryStage2HltDigis + process.l1tGlobalSummary)
107 
108 
109 
110  print "L1T Input: HLTL1UnpackerSequence: "
111  print process.HLTL1UnpackerSequence
112  print "L1T Input: HLTL1TSeedSequence: "
113  print process.HLTL1TSeedSequence
114  print "L1T Input: HLTL1TDebugSequence: "
115  print process.HLTL1TDebugSequence
116  process.l1tHLTDemoPath = cms.Path(process.HLTL1UnpackerSequence + process.HLTL1TSeedSequence + process.HLTL1TDebugSequence)
117  process.schedule.append(process.l1tHLTDemoPath)
118  return process
def L1THLTDemo(process)
def L1TBasicDemo(process)
customisations for L1T demos