CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Functions
customise_ReEmulateL1_cff Namespace Reference

Functions

def customise_ReEmulateL1
 
def getSubsystemsToEmulate
 
def modifySimL1EmulatorForReEmulation
 
def setInputTags
 
def test
 

Function Documentation

def customise_ReEmulateL1_cff.customise_ReEmulateL1 (   process,
  subsys = [] 
)

Definition at line 212 of file customise_ReEmulateL1_cff.py.

References getSubsystemsToEmulate(), and modifySimL1EmulatorForReEmulation().

213 def customise_ReEmulateL1(process, subsys=[]):
214 
215  subsysFull = getSubsystemsToEmulate(subsys)
216 
217  modifySimL1EmulatorForReEmulation(process.SimL1Emulator, subsysFull)
218 
219 
def customise_ReEmulateL1_cff.getSubsystemsToEmulate (   subsys)

Definition at line 7 of file customise_ReEmulateL1_cff.py.

Referenced by customise_ReEmulateL1(), and test::ClosestApproachInRPhi_t.test().

7 
8 def getSubsystemsToEmulate(subsys):
9 
10  if not eras.stage2L1Trigger.isChosen():
11  if 'ECAL' in subsys:
12  subsys.append('RCT')
13  if 'HCAL' in subsys:
14  subsys.append('RCT')
15  if 'RCT' in subsys:
16  subsys.append('GCT')
17  if 'GCT' in subsys:
18  subsys.append('GT')
19  if 'CSC' in subsys:
20  subsys.append('CSCTF1')
21  if 'DT' in subsys:
22  subsys.append('DTTF')
23  if 'DTTF' in subsys:
24  subsys.append('CSCTF2')
25  subsys.append('GMT')
26  if 'CSCTF' in subsys:
27  subsys.append('CSCTF1')
28  subsys.append('CSCTF2')
29  subsys.append('GMT')
30  if 'CSCTF2' in subsys:
31  subsys.append('GMT')
32  if 'RPCTF' in subsys:
33  subsys.append('GMT')
34  if 'GMT' in subsys:
35  subsys.append('GT')
36 
37  if eras.stage1L1Trigger.isChosen():
38  if 'ECAL' in subsys:
39  subsys.append('RCT')
40  if 'HCAL' in subsys:
41  subsys.append('RCT')
42  if 'RCT' in subsys:
43  subsys.append('S1CALOL2')
44  if 'S1CALOL2' in subsys:
45  subsys.append('GT')
46  if 'CSC' in subsys:
47  subsys.append('CSCTF1')
48  if 'DT' in subsys:
49  subsys.append('DTTF')
50  if 'DTTF' in subsys:
51  subsys.append('CSCTF2')
52  subsys.append('GMT')
53  if 'CSCTF' in subsys:
54  subsys.append('CSCTF1')
55  subsys.append('CSCTF2')
56  subsys.append('GMT')
57  if 'CSCTF2' in subsys:
58  subsys.append('GMT')
59  if 'RPCTF' in subsys:
60  subsys.append('GMT')
61  if 'GMT' in subsys:
62  subsys.append('GT')
63 
64  if eras.stage2L1Trigger.isChosen():
65  if 'ECAL' in subsys:
66  subsys.append('CALOL1')
67  if 'HCAL' in subsys:
68  subsys.append('CALOL1')
69  if 'CALOL1' in subsys:
70  subsys.append('CALOL2')
71  if 'CALOL2' in subsys:
72  subsys.append('GT')
73  if 'CSC' in subsys:
74  subsys.append('EMTF')
75  subsys.append('OMTF')
76  if 'DT' in subsys:
77  subsys.append('BMTF')
78  subsys.append('OMTF')
79  if 'RPC' in subsys:
80  subsys.append('BMTF')
81  subsys.append('EMTF')
82  subsys.append('OMTF')
83  if 'BMTF' in subsys:
84  subsys.append('GMT')
85  if 'EMTF' in subsys:
86  subsys.append('GMT')
87  if 'OMTF' in subsys:
88  subsys.append('GMT')
89  if 'GMT' in subsys:
90  subsys.append('GT')
91 
92  out = []
93  for sys in subsys:
94  if sys not in out:
95  out.append(sys)
96 
97  return out
98 
99 
100 # this method sets the input tags of each system to be emulated
101 # depending on whether the upstream system is set to be emulated or not
102 # assumption is starting from RAW, not (SIM)DIGI !
# if starting from (SIM)DIGI, no changes in input tags required
def customise_ReEmulateL1_cff.modifySimL1EmulatorForReEmulation (   SimL1Emulator_object,
  subsys = [] 
)

Definition at line 170 of file customise_ReEmulateL1_cff.py.

Referenced by customise_ReEmulateL1().

171 def modifySimL1EmulatorForReEmulation(SimL1Emulator_object, subsys=[]):
172 
173  if not eras.stage2L1Trigger.isChosen():
174 # if 'ECAL' not in subsys:
175 # digiSeq_object.remove(simEcalTriggerPrimitiveDigis)
176 # if 'HCAL' not in subsys:
177 # digiSeq_object.remove(simHcalTriggerPrimitiveDigis)
178  if 'RCT' not in subsys:
179  SimL1Emulator_object.remove(simRctDigis)
180  if 'GCT' not in subsys:
181  SimL1Emulator_object.remove(simGctDigis)
182  if 'CSC' not in subsys:
183  SimL1Emulator_object.remove(simCscTriggerPrimitiveDigis)
184  if 'DT' not in subsys:
185  SimL1Emulator_object.remove(simDtTriggerPrimitiveDigis)
186  if 'CSCTF1' not in subsys:
187  SimL1Emulator_object.remove(simCsctfTrackDigis)
188  if 'CSCTF2' not in subsys:
189  SimL1Emulator_object.remove(simCsctfDigis)
190  if 'DTTF' not in subsys:
191  SimL1Emulator_object.remove(simDttfDigis)
192  if 'RPCTF' not in subsys:
193  SimL1Emulator_object.remove(simRpcTriggerDigis)
194  if 'GMT' not in subsys:
195  SimL1Emulator_object.remove(simGmtDigis)
196  if 'GT' not in subsys:
197  SimL1Emulator_object.remove(simGtDigis)
198 
199  if eras.stage1L1Trigger.isChosen():
200  if 'S1CALOL2' not in subsys:
201  SimL1Emulator_object.remove(simRctUpgradeFormatDigis)
202  SimL1Emulator_object.remove(simCaloStage1Digis)
203  SimL1Emulator_object.remove(simCaloStage1FinalDigis)
204  SimL1Emulator_object.remove(simCaloStage1LegacyFormatDigis)
205 
206  if eras.stage1L1Trigger.isChosen():
207  if 'CALOL1' not in subsys:
208  SimL1Emulator_object.remove(simCaloStage2Layer1Digis)
209  if 'CALOL2' not in subsys:
210  SimL1Emulator_object.remove(simCaloStage2Digis)
211 
def customise_ReEmulateL1_cff.setInputTags (   process,
  subsys 
)

Definition at line 103 of file customise_ReEmulateL1_cff.py.

104 def setInputTags(process, subsys):
105 
106  if 'ECAL' in subsys:
107  process.simEcalTriggerPrimitiveDigis.inputLabel = cms.InputTag( 'ecalDigis' )
108 
109  if 'HCAL' in subsys:
110  process.simHcalTriggerPrimitiveDigis.inputLabel = cms.InputTag( 'hcalDigis' )
111 
112  if 'RCT' in subsys:
113  if 'ECAL' not in subsys:
114  process.simRctDigis.ecalDigis = cms.VInputTag( cms.InputTag( 'ecalDigis:ECALTriggerPrimitives' ) )
115  if 'HCAL' not in subsys:
116  process.simRctDigis.ecalDigis = cms.VInputTag( cms.InputTag( 'hcalDigis' ) )
117 
118  if ('GCT' in subsys) and ('RCT' not in subsys):
119  process.simGctDigis.inputLabel = 'gctDigis'
120 
121  if 'DT' in subsys:
122  process.simDtTriggerPrimitiveDigis.digiTag = 'muonDTDigis'
123 
124  if 'CSC' in subsys:
125  process.simCscTriggerPrimitiveDigis.CSCComparatorDigiProducer = cms.InputTag( 'muonCSCDigis', 'MuonCSCComparatorDigi' )
126  process.simCscTriggerPrimitiveDigis.CSCWireDigiProducer = cms.InputTag( 'muonCSCDigis', 'MuonCSCWireDigi' )
127 
128  if 'DTTF' in subsys:
129  if 'DT' not in subsys:
130  process.simDttfDigis.DTDigi_Source = 'dtTriggerPrimitiveDigis'
131  if 'CSCTF1' not in subsys:
132  process.simDttfDigis.CSCStub_Source = 'csctfDigis'
133 
134  if 'CSCTF1' in subsys:
135  if 'CSC' not in subsys:
136  process.simCsctfTrackDigis.SectorReceiverInput = cms.untracked.InputTag( 'cscTriggerPrimitiveDigis', 'MPCSORTED' )
137  if 'DT' not in subsys:
138  process.simCsctfTrackDigis.DTproducer = 'dtTriggerPrimitiveDigis'
139 
140  if 'CSCTF2' in subsys and 'CSCTF1' not in subsys:
141  process.simCsctfDigis.CSCTrackProducer = 'csctfDigis'
142 
143  if 'RPCTF' in subsys:
144  process.simRpcTriggerDigis.label = 'muonRPCDigis'
145 
146  if 'GMT' in subsys:
147  if 'DTTF' not in subsys:
148  process.simGmtDigis.DTCandidates = cms.InputTag( 'dttfDigis', 'DT' )
149  if 'CSCTF2' not in subsys:
150  process.simGmtDigis.CSCCandidates = cms.InputTag( 'csctfDigis', 'CSC' )
151  if 'RPCTF' not in subsys:
152  process.simGmtDigis.RPCbCandidates = cms.InputTag( 'rpcTriggerDigis', 'RPCb' )
153  process.simGmtDigis.RPCfCandidates = cms.InputTag( 'rpcTriggerDigis', 'RPCf' )
154 
155  if 'S1CALOL2' in subsys:
156  if 'RCT' not in subsys:
157  process.simRctUpgradeFormatDigis.regionTag = cms.InputTag("caloStage1Digis")
158  process.simRctUpgradeFormatDigis.emTag = cms.InputTag("caloStage1Digis")
159 
160  if 'CALOL1' in subsys:
161  if 'ECAL' not in subsys:
162  process.ecalToken = cms.InputTag("ecalDigis:EcalTriggerPrimitiveDigis")
163  if 'HCAL' not in subsys:
164  process.hcalToken = cms.InputTag("hcalDigis")
165 
166  if 'CALOL2' in subsys:
167  if 'CALOL1' not in subsys:
168  process.simCaloStage2Digis.towerToken = cms.InputTag("caloStage2Digis", "CaloTower")
169 
def customise_ReEmulateL1_cff.test ( )

Definition at line 220 of file customise_ReEmulateL1_cff.py.

References getSubsystemsToEmulate().

221 def test():
222  print "Testing"
223  test = ['ECAL', 'DTTF']
224  print "Subsys in : ", test
225  print "Subsys out : ", getSubsystemsToEmulate(test, 'legacy')
226  test = ['ECAL', 'BMTF']
227  print "Subsys in : ", test
228  print "Subsys out : ", getSubsystemsToEmulate(test, 'stage2')