|
1 | 1 | # Menu configuration manual |
2 | 2 |
|
| 3 | +**NB! A general overview of the P2GT emulator menus is given in the `L1Trigger/Configuration/python/Phase2GTMenus/README.md`** |
| 4 | + |
3 | 5 | ## Conditions |
4 | 6 |
|
5 | 7 | 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)). |
@@ -89,6 +91,87 @@ process.TripleTkMuon533 = l1tGTTripleObjectCond.clone( |
89 | 91 | ) |
90 | 92 | ``` |
91 | 93 |
|
| 94 | +### Object presets to synchronise with the MenuTools |
| 95 | + |
| 96 | +The L1 DPG Phase-2 Menu team is responsible for implementing, maintaining and validating the L1 menu. |
| 97 | +See the twiki: https://twiki.cern.ch/twiki/bin/viewauth/CMS/PhaseIIL1TriggerMenuTools |
| 98 | + |
| 99 | +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). |
| 100 | + |
| 101 | +There are these getter functions available to simplify the seed definitions: |
| 102 | +* `get_object_etalowbounds(obj)` to get the min abs(eta) requirements to be set for `regionsAbsEtaLowerBounds` |
| 103 | +* `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. |
| 104 | +* `get_object_ids(obj, id)` to set the ID values (per regions if available) for |
| 105 | +* `get_object_isos(obj, id)` to set the ID values (per regions if available) |
| 106 | + |
| 107 | +The arguments are: |
| 108 | +- `obj`: the trigger object name as from the P2GT producer, e.g. `GMTTkMuons`, |
| 109 | +- `id`: the ID label e.g. `Loose` or `NoIso`. |
| 110 | + |
| 111 | +The definitions of the object requirements are hardcoded in these files: |
| 112 | +* IDs: `L1Trigger/Phase2L1GT/python/l1tGTObject_ids.py` |
| 113 | +* Scalings: `L1Trigger/Phase2L1GT/python/l1tGTObject_scalings.py` |
| 114 | + |
| 115 | +An example of translating the hard-coded values for `GMTTkMuon` is below: |
| 116 | +```python |
| 117 | +collection1 = cms.PSet( |
| 118 | + tag = cms.InputTag("l1tGTProducer", "GMTTkMuons"), |
| 119 | + regionsAbsEtaLowerBounds=cms.vdouble(0,0.83,1.24), |
| 120 | + regionsMinPt=cms.vdouble(13,13,13) |
| 121 | + qualityFlags = cms.uint32(0b0001) |
| 122 | + ... |
| 123 | +) |
| 124 | +``` |
| 125 | + |
| 126 | +Becomes: |
| 127 | +```python |
| 128 | +collection1 = cms.PSet( |
| 129 | + tag = cms.InputTag("l1tGTProducer", "GMTTkMuons"), |
| 130 | + regionsAbsEtaLowerBounds = get_object_etalowbounds("GMTTkMuons"), |
| 131 | + regionsMinPt = get_object_thrs(15, "GMTTkMuons","VLoose"), |
| 132 | + qualityFlags = get_object_ids("GMTTkMuons","VLoose"), |
| 133 | + ... |
| 134 | +) |
| 135 | +``` |
| 136 | + |
| 137 | +#### Simplification for common baseline objects |
| 138 | + |
| 139 | +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. |
| 140 | + |
| 141 | +E.g. in the b-physics seeds identical `Loose` `tkMuons` are used with only the pt thresholds varying. |
| 142 | +Thus a baseline tkMuon can be defined as: |
| 143 | +```python |
| 144 | + l1tGTtkMuon = cms.PSet( |
| 145 | + tag = cms.InputTag("l1tGTProducer", "GMTTkMuons"), |
| 146 | + minEta = cms.double(-2.4), |
| 147 | + maxEta = cms.double(2.4), |
| 148 | + regionsAbsEtaLowerBounds = get_object_etalowbounds("GMTTkMuons"), |
| 149 | +) |
| 150 | +l1tGTtkMuonVLoose = l1tGTtkMuon.clone( |
| 151 | + qualityFlags = get_object_ids("GMTTkMuons","VLoose"), |
| 152 | +) |
| 153 | +``` |
| 154 | +And then this can be used in seed definitions by only changing / adding what is needed, e.g.: |
| 155 | +```python |
| 156 | +FakeDiMuSeed = l1tGTDoubleObjectCond.clone( |
| 157 | + collection1 = l1tGTtkMuon.clone( |
| 158 | + minPt = cms.double(5), # overwrites minPt = 0 from template |
| 159 | + ), |
| 160 | + collection2 = l1tGTtkMuonVLoose.clone( |
| 161 | + minEta = cms.double(-1.5), # overwrites minEta = -2.4 |
| 162 | + maxEta = cms.double(1.5), # overwrites maxEta = 2.4 |
| 163 | + ), |
| 164 | +) |
| 165 | +``` |
| 166 | +**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`. |
| 167 | + |
| 168 | +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: |
| 169 | +```python |
| 170 | +SingleTkMuon22 = l1tGTSingleObjectCond.clone( |
| 171 | + l1tGTtkMuonVLoose.clone(), |
| 172 | +) |
| 173 | +``` |
| 174 | + |
92 | 175 | ### Single cuts |
93 | 176 |
|
94 | 177 | Possible cuts on single quantities are: |
@@ -288,4 +371,4 @@ process.load('L1Trigger.Phase2L1GT.l1tGTBoardWriterVU13P_cff') |
288 | 371 | process.pBoardDataInputVU13P = cms.EndPath(process.BoardDataInputVU13P) |
289 | 372 | process.pBoardDataOutputObjectsVU13P = cms.EndPath(process.BoardDataOutputObjectsVU13P) |
290 | 373 | process.pAlgoBitBoardDataVU13P = cms.EndPath(process.AlgoBitBoardDataVU13P) |
291 | | -``` |
| 374 | +``` |
0 commit comments