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