CMS 3D CMS Logo

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
cscTriggerPrimitiveDigis_cfi.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
2 
4 # Default parameters for CSCTriggerPrimitives generator
5 # =====================================================
6 cscTriggerPrimitiveDigis = cms.EDProducer("CSCTriggerPrimitivesProducer",
7  CSCCommonTrigger,
8 
9  # if False, parameters will be read in from DB using EventSetup mechanism
10  # else will use parameters from this config
11  debugParameters = cms.bool(False),
12 
13  # Name of digi producer module(s)
14  CSCComparatorDigiProducer = cms.InputTag("simMuonCSCDigis","MuonCSCComparatorDigi"),
15  CSCWireDigiProducer = cms.InputTag("simMuonCSCDigis","MuonCSCWireDigi"),
16 
17  # If True, output collections will only be built for good chambers
18  checkBadChambers = cms.bool(True),
19 
20  # Write out pre-triggers
21  savePreTriggers = cms.bool(False),
22 
23  # Parameters common for all boards
24  commonParam = cms.PSet(
25  # Master flag for SLHC studies
26  isSLHC = cms.bool(False),
27 
28  # Debug
29  verbosity = cms.int32(0),
30 
31  ## Whether or not to use the SLHC ALCT algorithm
32  enableAlctSLHC = cms.bool(False),
33 
34  ## During Run-1, ME1a strips were triple-ganged
35  ## Effectively, this means there were only 16 strips
36  ## As of Run-2, ME1a strips are unganged,
37  ## which increased the number of strips to 48
38  gangedME1a = cms.bool(True),
39 
40  # flags to optionally disable finding stubs in ME42 or ME1a
41  disableME1a = cms.bool(False),
42  disableME42 = cms.bool(False),
43 
44  # offset between the ALCT and CLCT central BX in simulation
45  alctClctOffset = cms.uint32(1),
46 
47  runME11Up = cms.bool(False),
48  runME21Up = cms.bool(False),
49  runME31Up = cms.bool(False),
50  runME41Up = cms.bool(False),
51  ),
52 
53  # Parameters for ALCT processors: 2007 and later
54  alctParam07 = cms.PSet(
55  alctFifoTbins = cms.uint32(16),
56  alctFifoPretrig = cms.uint32(10),
57  alctDriftDelay = cms.uint32(2),
58  alctNplanesHitPretrig = cms.uint32(3),
59  alctNplanesHitPattern = cms.uint32(4),
60  alctNplanesHitAccelPretrig = cms.uint32(3),
61  alctNplanesHitAccelPattern = cms.uint32(4),
62  alctTrigMode = cms.uint32(2),
63  alctAccelMode = cms.uint32(0),
64  alctL1aWindowWidth = cms.uint32(7),
65  verbosity = cms.int32(0),
66 
67  # Configure early_tbins instead of hardcoding it
68  alctEarlyTbins = cms.int32(4),
69 
70  # Use narrow pattern mask for ring 1 chambers
71  alctNarrowMaskForR1 = cms.bool(False),
72 
73  # configured, not hardcoded, hit persistency
74  alctHitPersist = cms.uint32(6),
75 
76  # configure, not hardcode, up to how many BXs in the past
77  # ghost cancellation in neighboring WGs may happen
78  alctGhostCancellationBxDepth = cms.int32(4),
79 
80  # whether to compare the quality of stubs in neighboring WGs in the past
81  # to the quality of a stub in current WG
82  # when doing ghost cancellation
83  alctGhostCancellationSideQuality = cms.bool(False),
84 
85  # how soon after pretrigger and alctDriftDelay can next pretrigger happen?
86  alctPretrigDeadtime = cms.uint32(4),
87 
88  # SLHC only for ME11:
89  # whether to store the "corrected" ALCT stub time
90  # (currently it is median time of particular hits in a pattern) into the ASCCLCTDigi bx,
91  # and temporary store the regular "key layer hit" time into the CSCCLCTDigi fullBX:
92  alctUseCorrectedBx = cms.bool(False)
93  ),
94 
95  # Parameters for ALCT processors: SLHC studies
96  alctSLHC = cms.PSet(
97  alctFifoTbins = cms.uint32(16),
98  alctFifoPretrig = cms.uint32(10),
99  alctDriftDelay = cms.uint32(2),
100  alctNplanesHitPretrig = cms.uint32(3),
101  alctNplanesHitPattern = cms.uint32(4),
102  alctNplanesHitAccelPretrig = cms.uint32(3),
103  alctNplanesHitAccelPattern = cms.uint32(4),
104  alctTrigMode = cms.uint32(2),
105  alctAccelMode = cms.uint32(0),
106  alctL1aWindowWidth = cms.uint32(7),
107  verbosity = cms.int32(0),
108 
109  # Configure early_tbins instead of hardcoding it
110  alctEarlyTbins = cms.int32(4),
111 
112  # Use narrow pattern mask for ring 1 chambers
113  alctNarrowMaskForR1 = cms.bool(True),
114 
115  # configured, not hardcoded, hit persistency
116  alctHitPersist = cms.uint32(6),
117 
118  # configure, not hardcode, up to how many BXs in the past
119  # ghost cancellation in neighboring WGs may happen
120  alctGhostCancellationBxDepth = cms.int32(1),
121 
122  # whether to compare the quality of stubs in neighboring WGs in the past
123  # to the quality of a stub in current WG
124  # when doing ghost cancellation
125  alctGhostCancellationSideQuality = cms.bool(True),
126 
127  # how soon after pretrigger and alctDriftDelay can next pretrigger happen?
128  alctPretrigDeadtime = cms.uint32(0),
129 
130  # SLHC only for ME11:
131  # whether to store the "corrected" ALCT stub time
132  # (currently it is median time of particular hits in a pattern) into the ASCCLCTDigi bx,
133  # and temporary store the regular "key layer hit" time into the CSCCLCTDigi fullBX:
134  alctUseCorrectedBx = cms.bool(True),
135  ),
136 
137  # Parameters for CLCT processors: 2007 and later
138  clctParam07 = cms.PSet(
139  clctFifoTbins = cms.uint32(12),
140  clctFifoPretrig = cms.uint32(7),
141  clctHitPersist = cms.uint32(4),
142  clctDriftDelay = cms.uint32(2),
143  clctNplanesHitPretrig = cms.uint32(3),
144  clctNplanesHitPattern = cms.uint32(4),
145  clctPidThreshPretrig = cms.uint32(2),
146  clctMinSeparation = cms.uint32(10),
147  # Debug
148  verbosity = cms.int32(0),
149 
150  # BX to start CLCT finding (poor man's dead-time shortening):
151  clctStartBxShift = cms.int32(0)
152  ),
153 
154  # Parameters for CLCT processors: SLHC studies
155  clctSLHC = cms.PSet(
156  clctFifoTbins = cms.uint32(12),
157  clctFifoPretrig = cms.uint32(7),
158  clctHitPersist = cms.uint32(4),
159  clctDriftDelay = cms.uint32(2),
160  clctNplanesHitPretrig = cms.uint32(3),
161  clctNplanesHitPattern = cms.uint32(4),
162  # increase pattern ID threshold from 2 to 4 to trigger higher pt tracks,ignored--Tao
163  clctPidThreshPretrig = cms.uint32(2),
164  # decrease possible minimal #HS distance between two CLCTs in a BX from 10 to 5:
165  clctMinSeparation = cms.uint32(5),
166  # Debug
167  verbosity = cms.int32(0),
168 
169  # BX to start CLCT finding (poor man's to shorten the dead-time):
170  clctStartBxShift = cms.int32(0),
171 
172  # Turns on algorithms of localized dead-time zones:
173  useDeadTimeZoning = cms.bool(True),
174 
175  # Width (in #HS) of a fixed dead zone around a key HS:
176  clctStateMachineZone = cms.uint32(4),
177 
178  # Enables the algo which instead of using the fixed dead zone width,
179  # varies it depending on the width of a triggered CLCT pattern
180  # (if True, the clctStateMachineZone is ignored):
181  useDynamicStateMachineZone = cms.bool(False),
182 
183  # Pretrigger HS +- clctPretriggerTriggerZone sets the trigger matching zone
184  # which defines how far from pretrigger HS the TMB may look for a trigger HS
185  # (it becomes important to do so with localized dead-time zoning):
186  # not implemented yet, 2018-10-18, Tao
187  clctPretriggerTriggerZone = cms.uint32(224),
188 
189  # whether to store the "corrected" CLCT stub time
190  # (currently it is median time of all hits in a pattern) into the CSCCLCTDigi bx,
191  # and temporary store the regular "key layer hit" time into the CSCCLCTDigi fullBX:
192  # not feasible --Tao
193  clctUseCorrectedBx = cms.bool(False)
194  ),
195 
196  tmbParam = cms.PSet(
197  mpcBlockMe1a = cms.uint32(0),
198  alctTrigEnable = cms.uint32(0),
199  clctTrigEnable = cms.uint32(0),
200  matchTrigEnable = cms.uint32(1),
201  matchTrigWindowSize = cms.uint32(7),
202  tmbL1aWindowSize = cms.uint32(7),
203  # Debug
204  verbosity = cms.int32(0),
205 
206  # Configure early_tbins instead of hardcoding it
207  tmbEarlyTbins = cms.int32(4),
208 
209  # Flag for whether to readout only the earliest max two LCTs in a
210  # L1A readout window, as there is only room just for two in the TMB header.
211  # If false, all LCTs would be readout in L1A window.
212  tmbReadoutEarliest2 = cms.bool(True),
213 
214  # For CLCT-centric matching, whether to drop ALCTs that were matched
215  # to CLCTs in this BX, and not use them in the following BX
216  tmbDropUsedAlcts = cms.bool(True),
217 
218  # For ALCT-centric matching, whether to drop CLCTs that were matched
219  # to ALCTs in this BX, and not use them in the following BX
220  tmbDropUsedClcts = cms.bool(False),
221 
222  # Switch to enable
223  # True = CLCT-centric matching (default non-upgrade behavior,
224  # take CLCTs in BX look for matching ALCTs in window)
225  # False = ALCT-centric matching (recommended for SLHC,
226  # take ALCTs in BX look for matching CLCTs in window)
227  clctToAlct = cms.bool(False),
228  ),
229 
230  # to be used by ME11 chambers with upgraded TMB and ALCT
231  tmbSLHC = cms.PSet(
232  mpcBlockMe1a = cms.uint32(0),
233  alctTrigEnable = cms.uint32(0),
234  clctTrigEnable = cms.uint32(0),
235  matchTrigEnable = cms.uint32(1),
236  # reduce ALCT-CLCT matching window size from 7 to 3
237  matchTrigWindowSize = cms.uint32(3),
238  tmbL1aWindowSize = cms.uint32(7),
239  # Debug
240  verbosity = cms.int32(0),
241 
242  # Configure early_tbins instead of hardcoding it
243  tmbEarlyTbins = cms.int32(4),
244 
245  # Flag for whether to readout only the earliest max two LCTs in a
246  # L1A readout window, as there is only room just for two in the TMB header.
247  # If false, all LCTs would be readout in L1A window.
248  tmbReadoutEarliest2 = cms.bool(False),
249 
250  # For CLCT-centric matching, whether to drop ALCTs that were matched
251  # to CLCTs in this BX, and not use them in the following BX
252  # (default non-upgrade TMB behavior).
253  tmbDropUsedAlcts = cms.bool(False),
254 
255  # Switch to enable
256  # True = CLCT-centric matching (default non-upgrade behavior,
257  # take CLCTs in BX look for matching ALCTs in window)
258  # False = ALCT-centric matching (recommended for SLHC,
259  # take ALCTs in BX look for matching CLCTs in window)
260  clctToAlct = cms.bool(False),
261 
262  # For ALCT-centric matching, whether to drop CLCTs that were matched
263  # to ALCTs in this BX, and not use them in the following BX
264  tmbDropUsedClcts = cms.bool(False),
265 
266  # For CLCT-centric matching in ME11, break after finding
267  # the first BX with matching ALCT
268  matchEarliestAlctOnly = cms.bool(False),
269 
270  # For ALCT-centric matching in ME11, break after finding
271  # the first BX with matching CLCT
272  matchEarliestClctOnly = cms.bool(False),
273 
274  # 0 = default "non-X-BX" sorting algorithm,
275  # where the first BX with match goes first
276  # 1 = simple X-BX sorting algorithm,
277  # where the central match BX goes first,
278  # then the closest early, the slocest late, etc.
279  tmbCrossBxAlgorithm = cms.uint32(1),
280 
281  # How many maximum LCTs per whole chamber per BX to keep
282  # (supposedly, 1b and 1a can have max 2 each)
283  maxLCTs = cms.uint32(2),
284 
285  # True: allow construction of unphysical LCTs
286  # in ME11 for which WG and HS do not intersect
287  # False: do not build unphysical LCTs
288  ignoreAlctCrossClct = cms.bool(True),
289 
290  ## run in debug mode
291  debugLUTs = cms.bool(False),
292  debugMatching = cms.bool(False),
293 
294  ),
295 
296  # MPC sorter config for Run2 and beyond
297  mpcRun2 = cms.PSet(
298  sortStubs = cms.bool(False),
299  dropInvalidStubs = cms.bool(False),
300  dropLowQualityStubs = cms.bool(False),
301  )
302 )
303 
304 # Upgrade era customizations involving GEMs
305 # =========================================
306 copadParamGE11 = cms.PSet(
307  verbosity = cms.uint32(0),
308  maxDeltaPad = cms.uint32(2),
309  maxDeltaRoll = cms.uint32(1),
310  maxDeltaBX = cms.uint32(0)
311  )
312 
313 copadParamGE21 = cms.PSet(
314  verbosity = cms.uint32(0),
315  maxDeltaPad = cms.uint32(2),
316  maxDeltaRoll = cms.uint32(1),
317  maxDeltaBX = cms.uint32(0)
318  )
319 
320 # to be used by ME11 chambers with GEM-CSC ILT
321 me11tmbSLHCGEM = cms.PSet(
322  mpcBlockMe1a = cms.uint32(0),
323  alctTrigEnable = cms.uint32(0),
324  clctTrigEnable = cms.uint32(0),
325  matchTrigEnable = cms.uint32(1),
326  matchTrigWindowSize = cms.uint32(3),
327  tmbL1aWindowSize = cms.uint32(7),
328  verbosity = cms.int32(0),
329  tmbEarlyTbins = cms.int32(4),
330  tmbReadoutEarliest2 = cms.bool(False),
331  tmbDropUsedAlcts = cms.bool(False),
332  clctToAlct = cms.bool(False),
333  tmbDropUsedClcts = cms.bool(False),
334  matchEarliestAlctOnly = cms.bool(False),
335  matchEarliestClctOnly = cms.bool(False),
336  tmbCrossBxAlgorithm = cms.uint32(2),
337  maxLCTs = cms.uint32(2),
338 
339  ## run in debug mode
340  debugLUTs = cms.bool(False),
341  debugMatching = cms.bool(False),
342 
343  ## use old dataformat
344  useOldLCTDataFormat = cms.bool(True),
345 
346  ## matching to pads
347  maxDeltaBXPad = cms.int32(1),
348  maxDeltaBXCoPad = cms.int32(1),
349  maxDeltaPadL1Even = cms.int32(12),
350  maxDeltaPadL1Odd = cms.int32(24),
351  maxDeltaPadL2Even = cms.int32(12),
352  maxDeltaPadL2Odd = cms.int32(24),
353 
354  ## efficiency recovery switches
355  dropLowQualityCLCTsNoGEMs_ME1a = cms.bool(False),
356  dropLowQualityCLCTsNoGEMs_ME1b = cms.bool(True),
357  dropLowQualityALCTsNoGEMs_ME1a = cms.bool(False),
358  dropLowQualityALCTsNoGEMs_ME1b = cms.bool(False),
359  buildLCTfromALCTandGEM_ME1a = cms.bool(False),
360  buildLCTfromALCTandGEM_ME1b = cms.bool(True),
361  buildLCTfromCLCTandGEM_ME1a = cms.bool(False),
362  buildLCTfromCLCTandGEM_ME1b = cms.bool(True),
363  doLCTGhostBustingWithGEMs = cms.bool(False),
364  promoteALCTGEMpattern = cms.bool(True),
365  promoteALCTGEMquality = cms.bool(True),
366  promoteCLCTGEMquality_ME1a = cms.bool(True),
367  promoteCLCTGEMquality_ME1b = cms.bool(True),
368 )
369 
370 # to be used by ME21 chambers with GEM-CSC ILT
371 me21tmbSLHCGEM = cms.PSet(
372  mpcBlockMe1a = cms.uint32(0),
373  alctTrigEnable = cms.uint32(0),
374  clctTrigEnable = cms.uint32(0),
375  matchTrigEnable = cms.uint32(1),
376  matchTrigWindowSize = cms.uint32(3),
377  tmbL1aWindowSize = cms.uint32(7),
378  verbosity = cms.int32(0),
379  tmbEarlyTbins = cms.int32(4),
380  tmbReadoutEarliest2 = cms.bool(False),
381  tmbDropUsedAlcts = cms.bool(False),
382  clctToAlct = cms.bool(False),
383  tmbDropUsedClcts = cms.bool(False),
384  matchEarliestAlctOnly = cms.bool(False),
385  matchEarliestClctOnly = cms.bool(False),
386  tmbCrossBxAlgorithm = cms.uint32(2),
387  maxLCTs = cms.uint32(2),
388 
389  ## run in debug mode
390  debugLUTs = cms.bool(False),
391  debugMatching = cms.bool(False),
392 
393  ## use old dataformat
394  useOldLCTDataFormat = cms.bool(True),
395 
396  ## matching to pads
397  maxDeltaBXPad = cms.int32(1),
398  maxDeltaBXCoPad = cms.int32(1),
399  maxDeltaPadL1Even = cms.int32(12),
400  maxDeltaPadL1Odd = cms.int32(24),
401  maxDeltaPadL2Even = cms.int32(12),
402  maxDeltaPadL2Odd = cms.int32(24),
403 
404  ## efficiency recovery switches
405  dropLowQualityALCTsNoGEMs = cms.bool(True),
406  dropLowQualityCLCTsNoGEMs = cms.bool(True),
407  buildLCTfromALCTandGEM = cms.bool(True),
408  buildLCTfromCLCTandGEM = cms.bool(True),
409  doLCTGhostBustingWithGEMs = cms.bool(False),
410  promoteALCTGEMpattern = cms.bool(True),
411  promoteALCTGEMquality = cms.bool(True),
412  promoteCLCTGEMquality = cms.bool(True),
413 )
414 
415 # to be used by ME31-ME41 chambers
416 meX1tmbSLHC = cms.PSet(
417  mpcBlockMe1a = cms.uint32(0),
418  alctTrigEnable = cms.uint32(0),
419  clctTrigEnable = cms.uint32(0),
420  matchTrigEnable = cms.uint32(1),
421  matchTrigWindowSize = cms.uint32(3),
422  tmbL1aWindowSize = cms.uint32(7),
423  verbosity = cms.int32(0),
424  tmbEarlyTbins = cms.int32(4),
425  tmbReadoutEarliest2 = cms.bool(False),
426  tmbDropUsedAlcts = cms.bool(False),
427  clctToAlct = cms.bool(False),
428  tmbDropUsedClcts = cms.bool(False),
429  matchEarliestAlctOnly = cms.bool(False),
430  matchEarliestClctOnly = cms.bool(False),
431  tmbCrossBxAlgorithm = cms.uint32(2),
432  maxLCTs = cms.uint32(2),
433 
434  ## run in debug mode
435  debugLUTs = cms.bool(False),
436  debugMatching = cms.bool(False),
437 )
438 
439 ## unganging in ME1/a
440 from Configuration.Eras.Modifier_run2_common_cff import run2_common
441 run2_common.toModify( cscTriggerPrimitiveDigis,
442  debugParameters = True,
443  checkBadChambers = False,
444  commonParam = dict(gangedME1a = False),
445  )
446 
447 ## GEM-CSC ILT in ME1/1
448 from Configuration.Eras.Modifier_run3_GEM_cff import run3_GEM
449 run3_GEM.toModify( cscTriggerPrimitiveDigis,
450  GEMPadDigiProducer = cms.InputTag("simMuonGEMPadDigis"),
451  GEMPadDigiClusterProducer = cms.InputTag("simMuonGEMPadDigiClusters"),
452  commonParam = dict(isSLHC = True,
453  runME11Up = cms.bool(True),
454  runME11ILT = cms.bool(True),
455  useClusters = cms.bool(True),
456  enableAlctSLHC = cms.bool(True)),
457  clctSLHC = dict(clctNplanesHitPattern = 3),
458  me11tmbSLHCGEM = me11tmbSLHCGEM,
459  copadParamGE11 = copadParamGE11
460  )
461 
462 ## GEM-CSC ILT in ME2/1, CSC in ME3/1 and ME4/1
463 from Configuration.Eras.Modifier_phase2_muon_cff import phase2_muon
464 phase2_muon.toModify( cscTriggerPrimitiveDigis,
465  commonParam = dict(runME21Up = cms.bool(True),
466  runME21ILT = cms.bool(True),
467  runME31Up = cms.bool(True),
468  runME41Up = cms.bool(True)),
469  tmbSLHC = dict(ignoreAlctCrossClct = cms.bool(False)),
470  clctSLHC = dict(useDynamicStateMachineZone = cms.bool(True)),
471  alctSLHCME21 = cscTriggerPrimitiveDigis.alctSLHC.clone(alctNplanesHitPattern = 3),
472  clctSLHCME21 = cscTriggerPrimitiveDigis.clctSLHC.clone(clctNplanesHitPattern = 3),
473  me21tmbSLHCGEM = me21tmbSLHCGEM,
474  alctSLHCME3141 = cscTriggerPrimitiveDigis.alctSLHC.clone(alctNplanesHitPattern = 4),
475  clctSLHCME3141 = cscTriggerPrimitiveDigis.clctSLHC.clone(clctNplanesHitPattern = 4),
476  meX1tmbSLHC = meX1tmbSLHC,
477  copadParamGE11 = copadParamGE11,
478  copadParamGE21 = copadParamGE21
479 )