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