CMS 3D CMS Logo

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