Back to home page

Project CMSSW displayed by LXR

 
 

    


Warning, /L1Trigger/Phase2L1GT/README.md is written in an unsupported language. File is not indexed.

0001 # Menu configuration manual
0002 
0003 **NB! A general overview of the P2GT emulator menus is given in the `L1Trigger/Configuration/python/Phase2GTMenus/README.md`**
0004 
0005 ## Conditions
0006 
0007 The basic building blocks of a Phase-2 Global Trigger menu are conditions. In order to start writing a menu one should first pull the standard definitions for the conditions into the configuration. These standard definitions contain the scale parameters (c.f. [l1tGTScales.py](python/l1tGTScales.py)) as well as the values for the $\cos$ and $\cosh$ LUT (computed in [l1tGTSingleInOutLUT.py](python/l1tGTSingleInOutLUT.py)).
0008 
0009 ```python
0010 from L1Trigger.Phase2L1GT.l1tGTSingleObjectCond_cfi import l1tGTSingleObjectCond
0011 from L1Trigger.Phase2L1GT.l1tGTDoubleObjectCond_cfi import l1tGTDoubleObjectCond
0012 from L1Trigger.Phase2L1GT.l1tGTTripleObjectCond_cfi import l1tGTTripleObjectCond
0013 from L1Trigger.Phase2L1GT.l1tGTQuadObjectCond_cfi import l1tGTQuadObjectCond
0014 ```
0015 One can utilize the standard definitions by invoking the `clone` function and specifying a cut configuration as well as the collection(s) the condition should act on. This is done by setting the corresponding input tag(s) to use, `tag = cms.InputTag("l1tGTProducer", "XXX")`, with `XXX` as the collection name. Available collections are:
0016 
0017 | GCT | GMT |  GTT | Correlator Layer 2 |
0018 |:-----|:----------|:-------------|:--------|
0019 | ~~`GCTNonIsoEg`~~ |  `GMTSaPromptMuons` | `GTTPromptJets` | `CL2JetsSC4` |
0020 | ~~`GCTIsoEg`~~ | `GMTSaDisplacedMuons` | `GTTDisplacedJets` | `CL2JetsSC8` |
0021 | ~~`GCTJets`~~ |  `GMTTkMuons` | ~~`GTTPhiCandidates`~~ | `CL2Taus` |
0022 | ~~`GCTTaus`~~ | ~~`GMTTopo`~~ | ~~`GTTRhoCandidates`~~ | `CL2Electrons` |
0023 | ~~`GCTHtSum`~~ |  | ~~`GTTBsCandidates`~~ | `CL2Photons` |
0024 | ~~`GCTEtSum`~~ |  | ~~`GTTHadronicTaus`~~ | `CL2HtSum` |
0025 | | | `GTTPrimaryVert` | `CL2EtSum` |
0026 | | | ~~`GTTPromptHtSum`~~ | |
0027 | | | ~~`GTTDisplacedHtSum`~~ | |
0028 | | | ~~`GTTEtSum`~~ | |
0029 
0030 ~~`XXX`~~: Not yet available from upstream emulator.
0031 
0032 A condition can have any number of cuts. Cuts omitted  from the configuration are regarded as disabled. They can either be applied to single objects of a collection or to topological correlations within one or between multiple collections. In general the configuration follows an ambiguity scheme, as long as there are no ambiguities the configuration should be specified in the top level `PSet`. If there are ambiguities the configuration requires either a `collectionX` sub `PSet` for single object cuts or a `correlXY`/`correlXYZ` sub `PSet` for correlations. For illustration the following shows some examples:
0033 
0034 ```python
0035 process.SingleTkMuon22 = l1tGTSingleObjectCond.clone(
0036     # No ambiguities, thus everything in the top level PSet
0037     tag = cms.InputTag("l1tGTProducer", "GMTTkMuons"),
0038     maxAbsEta = cms.double(2.4),
0039     regionsAbsEtaLowerBounds = cms.vdouble(0, 0.83, 1.24),
0040     regionsMinPt = cms.vdouble(20, 20, 20)
0041 )
0042 ```
0043 
0044 ```python
0045 process.DoubleTkEle2512 = l1tGTDoubleObjectCond.clone(
0046     # 2 single cuts, thus cuts are ambiguous and require collectionX PSets.
0047     collection1 = cms.PSet(
0048         tag = cms.InputTag("l1tGTProducer", "CL2Electrons"),
0049         minPt = cms.double(20),
0050         maxAbsEta = cms.double(2.4),
0051         regionsAbsEtaLowerBounds = cms.vdouble(0, 1.479),
0052         regionsQualityFlags = cms.vuint32(0b0010, 0b0000)
0053     ),
0054     collection2 = cms.PSet(
0055         tag = cms.InputTag("l1tGTProducer", "CL2Electrons"),
0056         minPt = cms.double(9),
0057         maxAbsEta = cms.double(2.4),
0058         regionsAbsEtaLowerBounds = cms.vdouble(0, 1.479),
0059         regionsQualityFlags = cms.vuint32(0b0010, 0b0000)
0060     ),
0061     # Correlation can only be between 1 and 2 -> no ambiguities 
0062     maxDz = cms.double(1),
0063 )
0064 ```
0065 
0066 ```python
0067 process.TripleTkMuon533 = l1tGTTripleObjectCond.clone(
0068     # 3 single cuts, thus cuts are ambiguous and require collectionX PSets.
0069     collection1 = cms.PSet(
0070         tag = cms.InputTag("l1tGTProducer", "GMTTkMuons"),
0071         minPt = cms.double(5),
0072         maxAbsEta = cms.double(2.4),
0073         qualityFlags = cms.uint32(0b0001)
0074     ),
0075     collection2 = cms.PSet(
0076         tag = cms.InputTag("l1tGTProducer", "GMTTkMuons"),
0077         minPt = cms.double(3),
0078         maxAbsEta = cms.double(2.4),
0079         qualityFlags = cms.uint32(0b0001)
0080     ),
0081     collection3 = cms.PSet(
0082         tag = cms.InputTag("l1tGTProducer", "GMTTkMuons"),
0083         minPt = cms.double(3),
0084         maxAbsEta = cms.double(2.4),
0085         qualityFlags = cms.uint32(0b0001)
0086     ),
0087     # Correlations are ambiguous (can be {1,2}, {1,3}, or {2,3}), correlXY PSets are thus required.
0088     correl12 = cms.PSet(
0089         maxDz = cms.double(1)
0090     ),
0091 )
0092 ```
0093 
0094 ### Object presets to synchronise with the MenuTools
0095 
0096 The L1 DPG Phase-2 Menu team is responsible for implementing, maintaining and validating the L1 menu.
0097 See the twiki: https://twiki.cern.ch/twiki/bin/viewauth/CMS/PhaseIIL1TriggerMenuTools
0098 
0099 In `L1Trigger/Phase2L1GT/python/l1tGTObject_constants.py` there are several functions to extract object cut properties defined by the menu team, which allow to simplify and synchronise the seed definitions between the P2GT emulator in CMSSW and the [MenuTools](https://github.com/cms-l1-dpg/Phase2-L1MenuTools).
0100 
0101 There are these getter functions available to simplify the seed definitions:
0102 * `get_object_etalowbounds(obj)` to get the min abs(eta) requirements to be set for `regionsAbsEtaLowerBounds`
0103 * `get_object_thrs(thr, obj, id)` to set the thresholds using the online-offline scalings (per regions if available, otherwise a single value e.g. for sums). The `thr` argument is the offline threshold.
0104 * `get_object_ids(obj, id)` to set the ID values (per regions if available) for 
0105 * `get_object_isos(obj, id)`  to set the ID values (per regions if available)
0106 
0107 The arguments are:
0108 - `obj`: the trigger object name as from the P2GT producer, e.g. `GMTTkMuons`, 
0109 - `id`: the ID label e.g. `Loose` or `NoIso`.
0110 
0111 The definitions of the object requirements are hardcoded in these files:
0112 * IDs: `L1Trigger/Phase2L1GT/python/l1tGTObject_ids.py`
0113 * Scalings: `L1Trigger/Phase2L1GT/python/l1tGTObject_scalings.py`
0114 
0115 An example of translating the hard-coded values for `GMTTkMuon` is below:
0116 ```python
0117 collection1 = cms.PSet(
0118     tag = cms.InputTag("l1tGTProducer", "GMTTkMuons"),
0119     regionsAbsEtaLowerBounds=cms.vdouble(0,0.83,1.24),
0120     regionsMinPt=cms.vdouble(13,13,13)
0121     qualityFlags = cms.uint32(0b0001)
0122     ...
0123 )
0124 ```
0125 
0126 Becomes:
0127 ```python
0128 collection1 = cms.PSet(
0129     tag = cms.InputTag("l1tGTProducer", "GMTTkMuons"),
0130     regionsAbsEtaLowerBounds = get_object_etalowbounds("GMTTkMuons"),
0131     regionsMinPt = get_object_thrs(15, "GMTTkMuons","VLoose"),
0132     qualityFlags = get_object_ids("GMTTkMuons","VLoose"),
0133     ...
0134 )
0135 ```
0136 
0137 #### Simplification for common baseline objects
0138 
0139 As there are only few baseline objects which are are used in many seeds, it might be simpler to define some baseline objects that could be re-used in many seeds, modifying/extending only with additional cuts. 
0140 
0141 E.g. in the b-physics seeds identical `Loose` `tkMuons` are used with only the pt thresholds varying.
0142 Thus a baseline tkMuon can be defined as:
0143 ```python
0144  l1tGTtkMuon = cms.PSet(
0145     tag = cms.InputTag("l1tGTProducer", "GMTTkMuons"),
0146     minEta = cms.double(-2.4),
0147     maxEta = cms.double(2.4),
0148     regionsAbsEtaLowerBounds = get_object_etalowbounds("GMTTkMuons"),
0149 )
0150 l1tGTtkMuonVLoose = l1tGTtkMuon.clone(
0151     qualityFlags = get_object_ids("GMTTkMuons","VLoose"),
0152 )
0153 ```
0154 And then this can be used in seed definitions by only changing / adding what is needed, e.g.:
0155 ```python
0156 FakeDiMuSeed = l1tGTDoubleObjectCond.clone(
0157     collection1 = l1tGTtkMuon.clone(
0158         minPt = cms.double(5), # overwrites minPt = 0 from template
0159     ),
0160     collection2 = l1tGTtkMuonVLoose.clone(
0161         minEta = cms.double(-1.5), # overwrites minEta = -2.4 
0162         maxEta = cms.double(1.5), # overwrites maxEta = 2.4 
0163     ),
0164 )
0165 ```
0166 **NB!** Also new cuts can be added, however caution is needed to not mix per-region cuts such as `regionsMinPt` and the inclusive version `minPt`.
0167 
0168 For single object conditions using pre-defined objects requires to first clone the condition and then extend it with the objects PSet as shown below:
0169 ```python
0170 SingleTkMuon22 = l1tGTSingleObjectCond.clone(
0171     l1tGTtkMuonVLoose.clone(),
0172 )    
0173 ```
0174 
0175 ### Single cuts
0176 
0177 Possible cuts on single quantities are:
0178 
0179 | Name | Expression |     Datatype |  Hardware conversion |
0180 |:-----|:----------:|:-------------:|:--------:|
0181 | `minPt`    |  $p_T > X$ or $\| \sum \vec p_T \| > X$ | `cms.double` | `floor(X / pT_lsb)` |
0182 | `maxPt`    |  $p_T < X$ or $\| \sum \vec p_T \| < X$ | `cms.double` | `ceil(X / pT_lsb)` |
0183 | `minEta`   |  $\eta > X$ | `cms.double` | `floor(X / eta_lsb)` |
0184 | `maxEta`   | $\eta < X$ | `cms.double` | `ceil(X / eta_lsb)` |
0185 | `minPhi`   | $\phi > X$ | `cms.double` | `floor(X / phi_lsb)` |
0186 | `maxPhi`   | $\phi < X$ | `cms.double` | `ceil(X / phi_lsb)` |
0187 | `minZ0`   | $z_0 > X$ | `cms.double` | `floor(X / z0_lsb)` |
0188 | `maxZ0`   | $z_0 < X$ | `cms.double` | `ceil(X / z0_lsb)` |
0189 | `minScalarSumPt`   | $\sum p_T > X$ | `cms.double` | `floor(X / scalarSumPT_lsb)` |
0190 | `maxScalarSumPt`   | $\sum p_T < X$ | `cms.double` | `ceil(X / scalarSumPT_lsb)` |
0191 | `minQualityScore`   | $\mathrm{qualityScore} > X$ | `cms.uint32` | `X` |
0192 | `maxQualityScore`   | $\mathrm{qualityScore} < X$ | `cms.uint32` | `X` |
0193 | `qualityFlags`   |  $\mathrm{qualityFlags} \wedge X = X$ | `cms.uint32` | `X` |
0194 | `minAbsEta`   | $\| \eta \| > X $ | `cms.double` | `floor(X / eta_lsb)` |
0195 | `maxAbsEta`   | $\| \eta \| < X $ | `cms.double` | `ceil(X / eta_lsb)` |
0196 | `minIsolationPt`   | $\mathrm{isolationPT} > X$ | `cms.double` | `floor(X / isolationPT_lsb)` |
0197 | `maxIsolationPt`   | $\mathrm{isolationPT} < X$ | `cms.double` | `ceil(X / isolationPT_lsb)` |
0198 | `minRelIsolationPt` | $\mathrm{isolationPT} > X \cdot p_T$ | `cms.double` | `floor(X * pT_lsb * 2**18 / isolationPT)` |
0199 | `maxRelIsolationPt` |  $\mathrm{isolationPT} < X \cdot p_T$ | `cms.double` | `ceil(X * pT_lsb * 2**18 / isolationPT)` |
0200 | `minPrimVertDz`* | $\| z_0 - Z_{0,i} \| > X $ | `cms.double` | `floor(X / z0_lsb)` |
0201 | `maxPrimVertDz`* | $\| z_0 - Z_{0,i} \| < X $ | `cms.double` | `ceil(X / z0_lsb)` |
0202 | `minPtMultiplicityCut`** | $\sum \left( p_T > X\right) \geq N$ | `cms.double` | `floor(X / pT_lsb)` |
0203 
0204 \* : To select a $Z_0$ index $i$ from the `GTTPrimaryVert` collection for the comparison use `primVertex = cms.uint32(i)`. This parameter is mandatory when using a `maxPrimVertDz` cut.
0205 
0206 \** : Requires additional parameter $N$ with `minPtMultiplicityN = cms.uint32(N)`.
0207 
0208 ### $\eta$-regional cuts
0209 
0210 Certain cuts can also be specified $\eta$-region dependent, to allow different thresholds in different regions. In order to use this feature, one has to first provide the lower bounds for the regions via `regionsAbsEtaLowerBounds`. This parameter takes an `cms.vdouble`, whose length determines the number of $\eta$-regions. A region then ranges from the specified lower bound (inclusive) up to the next region's lower bound (exclusive). The last region's upper bound is always the maximum allowed $|\eta| = 2\pi$. One can use additional global $\eta$ or $|\eta|$ cuts to exclude large $|\eta|$ values, effectively overriding the last region's upper bound. The following cuts can be specified per each $\eta$-region:
0211 
0212 | Name | Expression |     Datatype |  Hardware conversion |
0213 |:-----|:----------:|:-------------:|:--------:|
0214 | `regionsMinPt`    |  $p_T > X$ or $\| \sum \vec p_T \| > X$ | `cms.vdouble` | `floor(X / pT_lsb)` |
0215 | `regionsQualityFlags`   |  $\mathrm{qualityFlags} \wedge X = X$ | `cms.vuint32` | `X` |
0216 | `regionsMaxRelIsolationPt`   |  $\mathrm{isolationPT} < X \cdot p_T$ | `cms.vdouble` | `ceil(X * pT_lsb * 2**18 / isolationPT)` |
0217 
0218 Note: The vector parameters for the $\eta$-region cuts must have the same length as the number of $\eta$-regions initially set via `regionsAbsEtaLowerBounds`.
0219 
0220 ### Correlational cuts
0221 
0222 Cuts can also be performed on topological correlations. The following 2-body correlational cuts are available:
0223 
0224 | Name | Expression | Datatype | Hardware conversion |
0225 |:-----|:----------:|:-------------:|:--------:|
0226 | `minDEta` | $\|\eta_1 - \eta_2\| > X$ | `cms.double` | `floor(X / eta_lsb)` |
0227 | `maxDEta` | $\|\eta_1 - \eta_2\| < X$ | `cms.double` | `ceil(X / eta_lsb)` |
0228 | `minDPhi` | $\Delta \phi > X$ | `cms.double` | `floor(X / phi_lsb)` |
0229 | `maxDPhi` | $\Delta \phi < X$ | `cms.double` | `ceil(X / phi_lsb)` |
0230 | `minDz` | $\|z_{0,1} - z_{0,2}\| > X$ | `cms.double` | `floor(X / z0_lsb)` |
0231 | `maxDz` | $\|z_{0,1} - z_{0,2}\| < X$ | `cms.double` | `ceil(X / z0_lsb)` |
0232 | `minDR` | $\Delta \phi ^2 + \Delta \eta^2 > X^2$ | `cms.double` | `floor(X**2 / eta_lsb**2)` |
0233 | `maxDR` | $\Delta \phi ^2 + \Delta \eta^2 < X^2$ | `cms.double` | `ceil(X**2 / eta_lsb**2)` |
0234 | `minInvMass` | $p_{T,1} \, p_{T,2} \left[ \cosh(\Delta \eta) - \cos(\Delta \phi) \right] > X^2/2$ | `cms.double` | `floor(X**2 * LUT_Scale / (2 * pT_lsb**2))` |
0235 | `maxInvMass` |  $p_{T,1} \, p_{T,2} \left[ \cosh(\Delta \eta) - \cos(\Delta \phi) \right] < X^2/2$ | `cms.double` | `ceil(X**2 * LUT_Scale / (2 * pT_lsb**2))` |
0236 | `minTransMass` | $p_{T,1} \, p_{T,2} \left[1 - \cos(\Delta \phi) \right] > X^2/2$ | `cms.double` |  `floor(X**2 * LUT_Scale / (2 * pT_lsb**2))` |
0237 | `maxTransMass` | $p_{T,1} \, p_{T,2} \left[1 - \cos(\Delta \phi) \right] < X^2/2$ | `cms.double` |  `ceil(X**2 * LUT_Scale / (2 * pT_lsb**2))` |
0238 | `minCombPt` | $p_{T,1}^2 + p_{T,2}^2 + 2 p_{T,1} \, p_{T,2}  \cos(\Delta \phi) > X^2$ | `cms.double` | `floor(X**2 * LUT_Scale / pT_lsb**2)` |
0239 | `maxCombPt` |  $p_{T,1}^2 + p_{T,2}^2 + 2 p_{T,1} \, p_{T,2}  \cos(\Delta \phi) < X^2$ | `cms.double` | `ceil(X**2 * LUT_Scale / pT_lsb**2)` |
0240 | `minInvMassOverDR` | $m^2/2 > X^2 \cdot \Delta R^2/2$ | `cms.double` | `floor(X**2 * LUT_Scale * 2**19 * eta_lsb**2 / (2 * pT_lsb**2))` | 
0241 | `maxInvMassOverDR` | $m^2/2 < X^2 \cdot \Delta R^2/2$ | `cms.double` | `ceil(X**2 * LUT_Scale * 2**19 * eta_lsb**2 / (2 * pT_lsb**2))` | 
0242 | `os` | $q_1 \neq q_2$ | `cms.bool` | |
0243 | `ss` | $q_1 = q_2$  | `cms.bool` | |
0244 
0245 Note: $\Delta \eta = |\eta_1 - \eta_2|$, $\Delta \phi$ is the smallest angle between two legs, also taking into account that $\phi$ wraps around i.e. $\phi = \pi = - \pi$.
0246 
0247 The following 3-body correlational cuts are available:
0248 
0249 | Name | Expression | Datatype | Hardware conversion |
0250 |:-----|:----------:|:-------------:|:--------:|
0251 | `minInvMass` | $\frac{m_{1,2}^2}{2} +  \frac{m_{1,3}^2}{2} +  \frac{m_{2,3}^2}{2} > \frac{X^2}{2}$ | `cms.double` | `floor(X**2 * LUT_Scale / (2 * pT_lsb**2))` |
0252 | `maxInvMass` | $\frac{m_{1,2}^2}{2} +  \frac{m_{1,3}^2}{2} +  \frac{m_{2,3}^2}{2} < \frac{X^2}{2}$ | `cms.double` | `ceil(X**2 * LUT_Scale / (2 * pT_lsb**2))` |
0253 | `minTransMass` | $\frac{m_{T,1,2}^2}{2} +  \frac{m_{T,1,3}^2}{2} +  \frac{m_{T,2,3}^2}{2} > \frac{X^2}{2}$ | `cms.double` |  `floor(X**2 * LUT_Scale / (2 * pT_lsb**2))` |
0254 | `maxTransMass` | $\frac{m_{T,1,2}^2}{2} +  \frac{m_{T,1,3}^2}{2} +  \frac{m_{T,2,3}^2}{2} < \frac{X^2}{2}$ | `cms.double` |  `ceil(X**2 * LUT_Scale / (2 * pT_lsb**2))` |
0255 
0256 The following N-body correlational cuts are available (N = 2 for DoubleObjectCondition, N = 3 for TripleObjectCondition and N = 4 for the QuadObjectCondition):
0257 
0258 | Name | Expression | Datatype | Hardware conversion |
0259 |:-----|:----------:|:-------------:|:--------:|
0260 | `minQualityScoreSum`* | $\sum^N_{i=1} \mathrm{qualityScore} > X$ | `cms.unit32` | `X` |
0261 | `maxQualityScoreSum`* | $\sum^N_{i=1} \mathrm{qualityScore} < X$ | `cms.unit32` | `X` |
0262 
0263 \*: For N=4 the 4 objects should be from the same input collection to guarantee timing closure of the FPGA firmware.
0264 
0265 ## Algorithms
0266 
0267 Conditions are combined to algorithms via the [`L1GTAlgoBlockProducer`](plugins/L1GTAlgoBlockProducer.cc). To configure this behavior, a `cms.PSet` algorithm configuration should be added to the `algorithms` `cms.VPset`, included via:
0268 
0269 ```python
0270 from L1Trigger.Phase2L1GT.l1tGTAlgoBlockProducer_cff import algorithms
0271 ```
0272 A minimal configuration just includes an `expression` of `cms.Path`s. The available configuration parameters are:
0273 
0274 | Name | Datatype | Description |
0275 |:-----|:----------:|:--------------|
0276 | `name` | `cms.string` | A unique algorithm identifier (default: `expression`) |
0277 | `expression` | `cms.string` | `cms.Path` expression (required) |
0278 | `prescale` | `cms.double` | Prescale value: 0 or in [1, $2^{24} - 1$) (default: 1) |
0279 | `prescalePreview` | `cms.double` | Prescale preview value: 0 or in [1, $2^{24} - 1$) (default: 1) |
0280 | `bunchMask` | `cms.vuint32` | Vector of bunch crossing numbers to mask (default: empty) |
0281 | `triggerTypes` | `cms.vint32` | Vector of trigger type numbers assigned to this algorithm (default: 1) |
0282 | `veto` | `cms.bool` | Indicates whether the algorithm is a veto (default: false) |
0283 
0284 Utilizing the examples from the [Conditions section](#conditions) one could define an algorithm as follows:
0285 
0286 ```python
0287 from L1Trigger.Phase2L1GT.l1tGTAlgoBlockProducer_cff import algorithms
0288 
0289 process.pSingleTkMuon22 = cms.Path(process.SingleTkMuon22)
0290 process.pDoubleTkEle25_12 = cms.Path(process.DoubleTkEle2512)
0291 
0292 algorithms.append(cms.PSet(expression = cms.string("pSingleTkMuon22 or pDoubleTkEle25_12")))
0293 ```
0294 
0295 ## Firmware pattern writers
0296 
0297 There are 3 types of Global Trigger pattern writers currently implemented.
0298 
0299 * `L1GTAlgoBoardWriter`: Used to write out the algorithm bits into 2 channels. With config
0300 
0301 | Name | Datatype | Description |
0302 |:-----|:----------:|:--------------|
0303 | `filename` | `cms.string` | The filename prefix to use for pattern files (required) |
0304 | `fileExtension` | `cms.string` | `txt`, `txt.gz` or `txt.xz` (default: `txt`) |
0305 | `algoBlocksTag` | `cms.InputTag` | AlgoBlock producer input tag to use (required) |
0306 | `maxFrames` | `cms.unit32` | Maximum number of frames (default: 1024) |
0307 | `maxEvents` | `cms.unit32` | Maximum number of events (default: events that fit into `maxFrames`) |
0308 | `channels` | `cms.vuint32` | Vector of 2 channel numbers for output (required) |
0309 | `algoBitMask` | `cms.vuint64` | Vector of 9 64 bit masks (default: all set to 1) |
0310 | `patternFormat` | `cms.string` | `APx`, `EMPv1`, `EMPv2` or `X2O` (default: `EMPv2`) |
0311 
0312 * `L1GTFinOrBoardWriter`: Used to write out Final OR bits (beforeBxMaskAndPrescale, beforePrescale and final) each on a different channel for the low bits (0 - 575), mid bits (576 - 1151) and high bits (1152 - 1727). 9 channels in total + one channel for the passing Final OR trigger types. Config:
0313 
0314 | Name | Datatype | Description |
0315 |:-----|:----------:|:--------------|
0316 | `filename` | `cms.string` | The filename prefix to use for pattern files (required) |
0317 | `fileExtension` | `cms.string` | `txt`, `txt.gz` or `txt.xz` (default: `txt`) |
0318 | `algoBlocksTag` | `cms.InputTag` | AlgoBlock producer input tag to use (required) |
0319 | `maxFrames` | `cms.unit32` | Maximum number of frames (default: 1024) |
0320 | `maxEvents` | `cms.unit32` | Maximum number of events (default: events that fit into `maxFrames`) |
0321 | `channelsLow` | `cms.vuint32` | Vector of 3 channel numbers for low bits (0 - 575) (required) |
0322 | `channelsMid` | `cms.vuint32` | Vector of 3 channel numbers for mid bits (576 - 1151) (required) |
0323 | `channelsHigh` | `cms.vuint32` | Vector of 3 channel numbers for high bits (1152 - 1727) (required) |
0324 | `channelFinOr` | `cms.uint32` | Channel for FinalOr trigger types (required) |
0325 | `patternFormat` | `cms.string` | `APx`, `EMPv1`, `EMPv2` or `X2O` (default: `EMPv2`) |
0326 
0327 * `L1GTObjectBoardWriter`: Used to write input and output object patterns using the upstream provided pack functions.
0328 
0329 | Name | Datatype | Description |
0330 |:-----|:----------:|:--------------|
0331 | `filename` | `cms.string` | The filename prefix to use for pattern files (required) |
0332 | `fileExtension` | `cms.string` | `txt`, `txt.gz` or `txt.xz` (default: `txt`) |
0333 | `maxFrames` | `cms.unit32` | Maximum number of frames (default: 1024) |
0334 | `maxEvents` | `cms.unit32` | Maximum number of events (default: events that fit into `maxFrames`) |
0335 | `patternFormat` | `cms.string` | `APx`, `EMPv1`, `EMPv2` or `X2O` (default: `EMPv2`) |
0336 | `bufferFileType`| `cms.string` | Either `input` or `output` (required) |
0337 | `InputChannels.GCT_1` | `cms.vuint32` | Channels for GCT link 1 (required if `bufferFileType` = `input`) |
0338 | `InputChannels.GMT_1` | `cms.vuint32` | Channels for GMT link 1 (required if `bufferFileType` = `input`) |
0339 | `InputChannels.GTT_1` | `cms.vuint32` | Channels for GTT link 1 (required if `bufferFileType` = `input`) |
0340 | `InputChannels.GTT_2` | `cms.vuint32` | Channels for GTT link 2 (required if `bufferFileType` = `input`) |
0341 | `InputChannels.GTT_3` | `cms.vuint32` | Channels for GTT link 3 (required if `bufferFileType` = `input`) |
0342 | `InputChannels.GTT_4` | `cms.vuint32` | Channels for GTT link 4 (required if `bufferFileType` = `input`) |
0343 | `InputChannels.CL2_1` | `cms.vuint32` | Channels for CL2 link 1 (required if `bufferFileType` = `input`) |
0344 | `InputChannels.CL2_2` | `cms.vuint32` | Channels for CL2 link 2 (required if `bufferFileType` = `input`) |
0345 | `InputChannels.CL2_3` | `cms.vuint32` | Channels for CL2 link 3 (required if `bufferFileType` = `input`) |
0346 | `OutputChannels.GTTPromptJets` | `cms.vuint32` | Channels for collection GTTPromptJets (required if `bufferFileType` = `output`) |
0347 | `OutputChannels.GTTDisplacedJets` | `cms.vuint32` | Channels for collection GTTDisplacedJets (required if `bufferFileType` = `output`) |
0348 | `OutputChannels.GTTPromptHtSum` | `cms.vuint32` | Channels for collection GTTPromptHtSum (required if `bufferFileType` = `output`) |
0349 | `OutputChannels.GTTDisplacedHtSum` | `cms.vuint32` | Channels for collection GTTDisplacedHtSum (required if `bufferFileType` = `output`) |
0350 | `OutputChannels.GTTEtSum` | `cms.vuint32` | Channels for collection GTTEtSum (required if `bufferFileType` = `output`) |
0351 | `OutputChannels.GTTPrimaryVert` | `cms.vuint32` | Channels for collection GTTPrimaryVert (required if `bufferFileType` = `output`) |
0352 | `OutputChannels.GMTSaPromptMuons` | `cms.vuint32` | Channels for collection GMTSaPromptMuons (required if `bufferFileType` = `output`) |
0353 | `OutputChannels.GMTSaDisplacedMuons` | `cms.vuint32` | Channels for collection GMTSaDisplacedMuons (required if `bufferFileType` = `output`) |
0354 | `OutputChannels.GMTTkMuons` | `cms.vuint32` | Channels for collection GMTTkMuons (required if `bufferFileType` = `output`) |
0355 | `OutputChannels.CL2JetsSC4` | `cms.vuint32` | Channels for collection CL2JetsSC4 (required if `bufferFileType` = `output`) |
0356 | `OutputChannels.CL2JetsSC8` | `cms.vuint32` | Channels for collection CL2JetsSC8 (required if `bufferFileType` = `output`) |
0357 | `OutputChannels.CL2Photons` | `cms.vuint32` | Channels for collection CL2Photons (required if `bufferFileType` = `output`) |
0358 | `OutputChannels.CL2Electrons` | `cms.vuint32` | Channels for collection CL2Electrons (required if `bufferFileType` = `output`) |
0359 | `OutputChannels.CL2Taus` | `cms.vuint32` | Channels for collection CL2Taus (required if `bufferFileType` = `output`) |
0360 | `OutputChannels.CL2EtSum` | `cms.vuint32` | Channels for collection CL2EtSum (required if `bufferFileType` = `output`) |
0361 | `OutputChannels.CL2HtSum` | `cms.vuint32` | Channels for collection CL2HtSum (required if `bufferFileType` = `output`) |
0362 
0363 Note: In order to get consistency across multiple pattern files written by multiple writers it is recommended to produce patterns in single threaded mode only (i.e. `process.options.numberOfThreads = 1`).
0364 
0365 Default configurations for `L1GTAlgoBoardWriter` and `L1GTObjectBoardWriter` in input and output direction can be pulled into the configuration for each of the two prototype implementations VU9P and VU13P via:
0366 
0367 ```python
0368 # Serenity VU9P prototype board
0369 process.load('L1Trigger.Phase2L1GT.l1tGTBoardWriterVU9P_cff')
0370 
0371 process.pBoardDataInputVU9P = cms.EndPath(process.BoardDataInputVU9P)
0372 process.pBoardDataOutputObjectsVU9P = cms.EndPath(process.BoardDataOutputObjectsVU9P)
0373 process.pAlgoBitBoardDataVU9P = cms.EndPath(process.AlgoBitBoardDataVU9P)
0374 ```
0375 
0376 ```python
0377 # Serenity VU13P prototype board
0378 process.load('L1Trigger.Phase2L1GT.l1tGTBoardWriterVU13P_cff')
0379 
0380 process.pBoardDataInputVU13P = cms.EndPath(process.BoardDataInputVU13P)
0381 process.pBoardDataOutputObjectsVU13P = cms.EndPath(process.BoardDataOutputObjectsVU13P)
0382 process.pAlgoBitBoardDataVU13P = cms.EndPath(process.AlgoBitBoardDataVU13P)
0383 ```