test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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  print "L1T INFO: adding HLT demo module to the process."
21  #
22  # BEGIN HLT UNPACKER SEQUENCE FOR STAGE 2
23  #
24 
25  process.hltGtStage2Digis = cms.EDProducer(
26  "L1TRawToDigi",
27  Setup = cms.string("stage2::GTSetup"),
28  FedIds = cms.vint32( 1404 ),
29  )
30 
31  process.hltCaloStage2Digis = cms.EDProducer(
32  "L1TRawToDigi",
33  Setup = cms.string("stage2::CaloSetup"),
34  FedIds = cms.vint32( 1360, 1366 ),
35  )
36 
37  process.hltGmtStage2Digis = cms.EDProducer(
38  "L1TRawToDigi",
39  Setup = cms.string("stage2::GMTSetup"),
40  FedIds = cms.vint32(1402),
41  )
42 
43  process.hltGtStage2ObjectMap = cms.EDProducer(
44  "L1TGlobalProducer",
45  GmtInputTag = cms.InputTag("hltGmtStage2Digis"),
46  ExtInputTag = cms.InputTag("hltGtStage2Digis"), # (external conditions are not emulated, use unpacked)
47  CaloInputTag = cms.InputTag("hltCaloStage2Digis"),
48  AlgorithmTriggersUnprescaled = cms.bool(True),
49  AlgorithmTriggersUnmasked = cms.bool(True),
50  )
51 
52  # keeping same sequence name as for legacy system:
53  process.HLTL1UnpackerSequence = cms.Sequence(
54  process.hltGtStage2Digis +
55  process.hltCaloStage2Digis +
56  process.hltGmtStage2Digis +
57  process.hltGtStage2ObjectMap
58  )
59 
60  #
61  # END HLT UNPACKER SEQUENCE FOR STAGE 2
62  #
63 
64  #
65  # BEGIN L1T SEEDS EXAMPLE FOR STAGE 2
66  #
67  process.hltL1TSeed = cms.EDFilter(
68  "HLTL1TSeed",
69  L1SeedsLogicalExpression = cms.string( "L1_SingleS1Jet36 AND L1_SingleEG10" ),
70  SaveTags = cms.bool( True ),
71  L1ObjectMapInputTag = cms.InputTag("hltGtStage2ObjectMap"),
72  L1GlobalInputTag = cms.InputTag("hltGtStage2Digis"),
73  L1MuonInputTag = cms.InputTag("hltGmtStage2Digis"),
74  L1EGammaInputTag = cms.InputTag("hltCaloStage2Digis"),
75  L1JetInputTag = cms.InputTag("hltCaloStage2Digis"),
76  L1TauInputTag = cms.InputTag("hltCaloStage2Digis"),
77  L1EtSumInputTag = cms.InputTag("hltCaloStage2Digis"),
78  )
79 
80  # HLT Seed sequence
81  process.HLTL1TSeedSequence = cms.Sequence(
82  process.hltL1TSeed
83  )
84 
85  #
86  # END L1T SEEDS EXAMPLE FOR STAGE 2
87  #
88 
89  print "L1T INFO: will dump a summary of Stage2 content as unpacked by HLT to screen."
90  process.load('L1Trigger.L1TCommon.l1tSummaryStage2HltDigis_cfi')
91 
92  # gt analyzer
93  process.l1tGlobalSummary = cms.EDAnalyzer(
94  'L1TGlobalSummary',
95  AlgInputTag = cms.InputTag("hltGtStage2ObjectMap"),
96  ExtInputTag = cms.InputTag("hltGtStage2ObjectMap"),
97  # DumpTrigResults = cms.bool(True), # per event dump of trig results
98  DumpTrigSummary = cms.bool(True), # job summary... not yet implemented...
99  )
100 
101  process.HLTL1TDebugSequence = cms.Sequence(process.l1tSummaryStage2HltDigis + process.l1tGlobalSummary)
102 
103 
104 
105  print "L1T Input: HLTL1UnpackerSequence: "
106  print process.HLTL1UnpackerSequence
107  print "L1T Input: HLTL1TSeedSequence: "
108  print process.HLTL1TSeedSequence
109  print "L1T Input: HLTL1TDebugSequence: "
110  print process.HLTL1TDebugSequence
111  process.l1tHLTDemoPath = cms.Path(process.HLTL1UnpackerSequence + process.HLTL1TSeedSequence + process.HLTL1TDebugSequence)
112  process.schedule.append(process.l1tHLTDemoPath)
113  return process
def L1TBasicDemo
customisations for L1T demos