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