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.
2 
3 
4 # This function makes all the changes to cscTriggerPrimitiveDigis required
5 # for it to work in Run 2. It is declared here to be obvious when this file
6 # is opened, but not applied until after cscTriggerPrimitiveDigis is
7 # declared (and then only if the "run2" era is active).
9  """
10  Modifies cscTriggerPrimitiveDigis for Run 2
11  """
12  object.debugParameters = True
13  object.checkBadChambers_ = False
14  object.commonParam.isSLHC = True
15  object.commonParam.smartME1aME1b = True
16  object.commonParam.gangedME1a = False
17  object.alctParam07.alctNarrowMaskForR1 = True
18  object.alctParam07.alctGhostCancellationBxDepth = cms.untracked.int32(1)
19  object.alctParam07.alctGhostCancellationSideQuality = cms.untracked.bool(True)
20  object.alctParam07.alctPretrigDeadtime = cms.untracked.uint32(4)
21  object.clctParam07.clctPidThreshPretrig = 4
22  object.clctParam07.clctMinSeparation = 5
23  object.tmbParam.matchTrigWindowSize = 3
24 
25 
27 # Default parameters for CSCTriggerPrimitives generator
28 # =====================================================
29 cscTriggerPrimitiveDigis = cms.EDProducer("CSCTriggerPrimitivesProducer",
30  CSCCommonTrigger,
31 
32  # if False, parameters will be read in from DB using EventSetup mechanism
33  # else will use parameters from this config
34  debugParameters = cms.untracked.bool(False),
35 
36  # Name of digi producer module(s)
37  CSCComparatorDigiProducer = cms.InputTag("simMuonCSCDigis","MuonCSCComparatorDigi"),
38  CSCWireDigiProducer = cms.InputTag("simMuonCSCDigis","MuonCSCWireDigi"),
39 
40  # for SLHC studies we don't want bad chambers checks so far
41  checkBadChambers_ = cms.untracked.bool(True),
42 
43  # Parameters common for all boards
44  commonParam = cms.PSet(
45  isTMB07 = cms.bool(True),
46  isMTCC = cms.bool(False),
47 
48  # Flag for SLHC studies (upgraded ME11, MPC)
49  # (if true, isTMB07 should be true as well)
50  isSLHC = cms.untracked.bool(False),
51 
52  # ME1a configuration:
53  # smartME1aME1b=f, gangedME1a=t
54  # default logic for current HW
55  # smartME1aME1b=t, gangedME1a=f
56  # realistic upgrade scenario:
57  # one ALCT finder and two CLCT finders per ME11
58  # with additional logic for A/CLCT matching with ME1a unganged
59  # smartME1aME1b=t, gangedME1a=t
60  # the previous case with ME1a still being ganged
61  # Note: gangedME1a has effect only if smartME1aME1b=t
62  smartME1aME1b = cms.untracked.bool(False),
63  gangedME1a = cms.untracked.bool(True),
64 
65  # flagis to optionally disable finding stubs in ME42 or ME1a
66  disableME1a = cms.untracked.bool(False),
67  disableME42 = cms.untracked.bool(False)
68  ),
69 
70  # Parameters for ALCT processors: old MC studies
71  alctParamOldMC = cms.PSet(
72  alctFifoTbins = cms.uint32(16),
73  alctFifoPretrig = cms.uint32(10),
74  alctDriftDelay = cms.uint32(3),
75  alctNplanesHitPretrig = cms.uint32(2),
76  alctNplanesHitPattern = cms.uint32(4),
77  alctNplanesHitAccelPretrig = cms.uint32(2),
78  alctNplanesHitAccelPattern = cms.uint32(4),
79  alctTrigMode = cms.uint32(3),
80  alctAccelMode = cms.uint32(1),
81  alctL1aWindowWidth = cms.uint32(5),
82  verbosity = cms.untracked.int32(0)
83  ),
84 
85  # Parameters for ALCT processors: MTCC-II
86  alctParamMTCC = cms.PSet(
87  alctFifoTbins = cms.uint32(16),
88  alctFifoPretrig = cms.uint32(10),
89  alctDriftDelay = cms.uint32(3),
90  alctNplanesHitPretrig = cms.uint32(2),
91  alctNplanesHitPattern = cms.uint32(4),
92  alctNplanesHitAccelPretrig = cms.uint32(2),
93  alctNplanesHitAccelPattern = cms.uint32(4),
94  alctTrigMode = cms.uint32(2),
95  alctAccelMode = cms.uint32(0),
96  alctL1aWindowWidth = cms.uint32(3),
97  verbosity = cms.untracked.int32(0)
98  ),
99 
100  # Parameters for ALCT processors: 2007 and later
101  alctParam07 = cms.PSet(
102  alctFifoTbins = cms.uint32(16),
103  alctFifoPretrig = cms.uint32(10),
104  alctDriftDelay = cms.uint32(2),
105  alctNplanesHitPretrig = cms.uint32(3),
106  alctNplanesHitPattern = cms.uint32(4),
107  alctNplanesHitAccelPretrig = cms.uint32(3),
108  alctNplanesHitAccelPattern = cms.uint32(4),
109  alctTrigMode = cms.uint32(2),
110  alctAccelMode = cms.uint32(0),
111  alctL1aWindowWidth = cms.uint32(7),
112  verbosity = cms.untracked.int32(0),
113 
114  # Configure early_tbins instead of hardcoding it
115  alctEarlyTbins = cms.untracked.int32(4),
116 
117  # Use narrow pattern mask for ring 1 chambers
118  alctNarrowMaskForR1 = cms.untracked.bool(False),
119 
120  # configured, not hardcoded, hit persistency
121  alctHitPersist = cms.untracked.uint32(6)
122  ),
123 
124  # Parameters for ALCT processors: SLHC studies
125  alctSLHC = cms.PSet(
126  alctFifoTbins = cms.uint32(16),
127  alctFifoPretrig = cms.uint32(10),
128  alctDriftDelay = cms.uint32(2),
129  alctNplanesHitPretrig = cms.uint32(3),
130  alctNplanesHitPattern = cms.uint32(4),
131  alctNplanesHitAccelPretrig = cms.uint32(3),
132  alctNplanesHitAccelPattern = cms.uint32(4),
133  alctTrigMode = cms.uint32(2),
134  alctAccelMode = cms.uint32(0),
135  alctL1aWindowWidth = cms.uint32(7),
136  verbosity = cms.untracked.int32(0),
137 
138  # Configure early_tbins instead of hardcoding it
139  alctEarlyTbins = cms.untracked.int32(4),
140 
141  # Use narrow pattern mask for ring 1 chambers
142  alctNarrowMaskForR1 = cms.untracked.bool(True),
143 
144  # configured, not hardcoded, hit persistency
145  alctHitPersist = cms.untracked.uint32(6),
146 
147  # configure, not hardcode, up to how many BXs in the past
148  # ghost cancellation in neighboring WGs may happen
149  alctGhostCancellationBxDepth = cms.untracked.int32(1),
150 
151  # whether to compare the quality of stubs in neighboring WGs in the past
152  # to the quality of a stub in current WG
153  # when doing ghost cancellation
154  alctGhostCancellationSideQuality = cms.untracked.bool(True),
155 
156  # how soon after pretrigger and alctDriftDelay can next pretrigger happen?
157  alctPretrigDeadtime = cms.untracked.uint32(0),
158 
159  # SLHC only for ME11:
160  # whether to store the "corrected" ALCT stub time
161  # (currently it is median time of particular hits in a pattern) into the ASCCLCTDigi bx,
162  # and temporary store the regular "key layer hit" time into the CSCCLCTDigi fullBX:
163  alctUseCorrectedBx = cms.untracked.bool(True)
164  ),
165 
166  # Parameters for CLCT processors: old MC studies
167  clctParamOldMC = cms.PSet(
168  clctFifoTbins = cms.uint32(12),
169  clctFifoPretrig = cms.uint32(7),
170  clctHitPersist = cms.uint32(6),
171  clctDriftDelay = cms.uint32(2),
172  clctNplanesHitPretrig = cms.uint32(2),
173  clctNplanesHitPattern = cms.uint32(4),
174  clctPidThreshPretrig = cms.uint32(2),
175  clctMinSeparation = cms.uint32(10),
176  # Debug
177  verbosity = cms.untracked.int32(0)
178  ),
179 
180  # Parameters for CLCT processors: MTCC-II
181  clctParamMTCC = cms.PSet(
182  clctFifoTbins = cms.uint32(12),
183  clctFifoPretrig = cms.uint32(7),
184  clctHitPersist = cms.uint32(6),
185  clctDriftDelay = cms.uint32(2),
186  clctNplanesHitPretrig = cms.uint32(4),
187  clctNplanesHitPattern = cms.uint32(1),
188  clctPidThreshPretrig = cms.uint32(2),
189  clctMinSeparation = cms.uint32(10),
190  # Debug
191  verbosity = cms.untracked.int32(0)
192  ),
193 
194  # Parameters for CLCT processors: 2007 and later
195  clctParam07 = cms.PSet(
196  clctFifoTbins = cms.uint32(12),
197  clctFifoPretrig = cms.uint32(7),
198  clctHitPersist = cms.uint32(4),
199  clctDriftDelay = cms.uint32(2),
200  clctNplanesHitPretrig = cms.uint32(3),
201  clctNplanesHitPattern = cms.uint32(4),
202  clctPidThreshPretrig = cms.uint32(2),
203  clctMinSeparation = cms.uint32(10),
204  # Debug
205  verbosity = cms.untracked.int32(0),
206 
207  # BX to start CLCT finding (poor man's dead-time shortening):
208  clctStartBxShift = cms.untracked.int32(0)
209  ),
210 
211  # Parameters for CLCT processors: SLHC studies
212  clctSLHC = cms.PSet(
213  clctFifoTbins = cms.uint32(12),
214  clctFifoPretrig = cms.uint32(7),
215  clctHitPersist = cms.uint32(4),
216  clctDriftDelay = cms.uint32(2),
217  clctNplanesHitPretrig = cms.uint32(3),
218  clctNplanesHitPattern = cms.uint32(4),
219  # increase pattern ID threshold from 2 to 4 to trigger higher pt tracks
220  clctPidThreshPretrig = cms.uint32(4),
221  # decrease possible minimal #HS distance between two CLCTs in a BX from 10 to 5:
222  clctMinSeparation = cms.uint32(5),
223  # Debug
224  verbosity = cms.untracked.int32(0),
225 
226  # BX to start CLCT finding (poor man's to shorten the dead-time):
227  clctStartBxShift = cms.untracked.int32(0),
228 
229  # Turns on algorithms of localized dead-time zones:
230  useDeadTimeZoning = cms.untracked.bool(True),
231 
232  # Width (in #HS) of a fixed dead zone around a key HS:
233  clctStateMachineZone = cms.untracked.uint32(8),
234 
235  # Enables the algo which instead of using the fixed dead zone width,
236  # varies it depending on the width of a triggered CLCT pattern
237  # (if True, the clctStateMachineZone is ignored):
238  useDynamicStateMachineZone = cms.untracked.bool(True),
239 
240  # Pretrigger HS +- clctPretriggerTriggerZone sets the trigger matching zone
241  # which defines how far from pretrigger HS the TMB may look for a trigger HS
242  # (it becomes important to do so with localized dead-time zoning):
243  clctPretriggerTriggerZone = cms.untracked.uint32(5),
244 
245  # whether to store the "corrected" CLCT stub time
246  # (currently it is median time of all hits in a pattern) into the CSCCLCTDigi bx,
247  # and temporary store the regular "key layer hit" time into the CSCCLCTDigi fullBX:
248  clctUseCorrectedBx = cms.untracked.bool(True)
249  ),
250 
251  tmbParam = cms.PSet(
252  mpcBlockMe1a = cms.uint32(0),
253  alctTrigEnable = cms.uint32(0),
254  clctTrigEnable = cms.uint32(0),
255  matchTrigEnable = cms.uint32(1),
256  matchTrigWindowSize = cms.uint32(7),
257  tmbL1aWindowSize = cms.uint32(7),
258  # Debug
259  verbosity = cms.untracked.int32(0),
260 
261  # Configure early_tbins instead of hardcoding it
262  tmbEarlyTbins = cms.untracked.int32(4),
263 
264  # Flag for whether to readout only the earliest max two LCTs in a
265  # L1A readout window, as there is only room just for two in the TMB header.
266  # If false, all LCTs would be readout in L1A window.
267  tmbReadoutEarliest2 = cms.untracked.bool(True),
268 
269  # For CLCT-centric matching, whether to drop ALCTs that were matched
270  # to CLCTs in this BX, and not use them in the following BX
271  # (default non-upgrade TMB behavior).
272  tmbDropUsedAlcts = cms.untracked.bool(True)
273  ),
274 
275  # to be used by ME11 chambers with upgraded TMB and ALCT
276  tmbSLHC = cms.PSet(
277  mpcBlockMe1a = cms.uint32(0),
278  alctTrigEnable = cms.uint32(0),
279  clctTrigEnable = cms.uint32(0),
280  matchTrigEnable = cms.uint32(1),
281  # reduce ALCT-CLCT matching window size from 7 to 3
282  matchTrigWindowSize = cms.uint32(3),
283  tmbL1aWindowSize = cms.uint32(7),
284  # Debug
285  verbosity = cms.untracked.int32(0),
286 
287  # Configure early_tbins instead of hardcoding it
288  tmbEarlyTbins = cms.untracked.int32(4),
289 
290  # Flag for whether to readout only the earliest max two LCTs in a
291  # L1A readout window, as there is only room just for two in the TMB header.
292  # If false, all LCTs would be readout in L1A window.
293  tmbReadoutEarliest2 = cms.untracked.bool(False),
294 
295  # For CLCT-centric matching, whether to drop ALCTs that were matched
296  # to CLCTs in this BX, and not use them in the following BX
297  # (default non-upgrade TMB behavior).
298  tmbDropUsedAlcts = cms.untracked.bool(False),
299 
300  # Switch to enable
301  # True = CLCT-centric matching (default non-upgrade behavior,
302  # take CLCTs in BX look for matching ALCTs in window)
303  # False = ALCT-centric matching (recommended for SLHC,
304  # take ALCTs in BX look for matching CLCTs in window)
305  clctToAlct = cms.untracked.bool(False),
306 
307  # For ALCT-centric matching, whether to drop CLCTs that were matched
308  # to ALCTs in this BX, and not use them in the following BX
309  tmbDropUsedClcts = cms.untracked.bool(False),
310 
311  # For CLCT-centric matching in ME11, break after finding
312  # the first BX with matching ALCT
313  matchEarliestAlctME11Only = cms.untracked.bool(False),
314 
315  # For ALCT-centric matching in ME11, break after finding
316  # the first BX with matching CLCT
317  matchEarliestClctME11Only = cms.untracked.bool(False),
318 
319  # 0 = default "non-X-BX" sorting algorithm,
320  # where the first BX with match goes first
321  # 1 = simple X-BX sorting algorithm,
322  # where the central match BX goes first,
323  # then the closest early, the slocest late, etc.
324  tmbCrossBxAlgorithm = cms.untracked.uint32(1),
325 
326  # How many maximum LCTs per whole chamber per BX to keep
327  # (supposedly, 1b and 1a can have max 2 each)
328  maxME11LCTs = cms.untracked.uint32(2)
329  ),
330 
331  # MPC sorter config for SLHC studies
332  mpcSLHC = cms.PSet(
333  mpcMaxStubs = cms.untracked.uint32(3)
334  )
335 )
336 
337 #
338 # If the run2 era is active, make the required changes
339 #
340 from Configuration.StandardSequences.Eras import eras
341 eras.run2_common.toModify( cscTriggerPrimitiveDigis, _modifyCscTriggerPrimitiveDigisForRun2 )