|
| 1 | +# Phase2-L1Nano |
| 2 | +NanoAOD ntupler for Phase-2 L1 Objects |
| 3 | + |
| 4 | +Initially an independent package here: https://github.com/cms-l1-dpg/Phase2-L1Nano/ |
| 5 | + |
| 6 | +## Setup |
| 7 | + |
| 8 | +For more information on the latest L1T Phase 2 software developments in CMSSW see: https://twiki.cern.ch/twiki/bin/view/CMSPublic/SWGuideL1TPhase2Instructions#Development |
| 9 | + |
| 10 | +Corresponding menu twiki section: https://twiki.cern.ch/twiki/bin/viewauth/CMS/PhaseIIL1TriggerMenuTools#Phase_2_L1_Trigger_objects_based |
| 11 | + |
| 12 | + |
| 13 | +## Usage |
| 14 | + |
| 15 | +### Via cmsDriver |
| 16 | + |
| 17 | +One can append the L1Nano output to the `cmsDriver` command via the `NANO:@Phase2L1DPGwithGen` autoNANO handle, e.g.: |
| 18 | +```bash |
| 19 | +cmsDriver.py -s L1,L1TrackTrigger,L1P2GT,NANO:@Phase2L1DPGwithGen |
| 20 | +``` |
| 21 | + |
| 22 | +Check `PhysicsTools/NanoAOD/python/autoNANO.py` for the way this command is defined. |
| 23 | + |
| 24 | +Note that the step key `Phase2L1DPG` does not include the generator and reco-level objects used for MenuTools studies in the nano! |
| 25 | +It is mostly created for workflow tests. |
| 26 | + |
| 27 | +An example `cmsDriver` command for 14x files: |
| 28 | +```bash |
| 29 | +cmsDriver.py -s L1,L1TrackTrigger,L1P2GT,NANO:@Phase2L1DPGwithGen \ |
| 30 | +--conditions auto:phase2_realistic_T33 \ |
| 31 | +--geometry ExtendedRun4D110 \ |
| 32 | +--era Phase2C17I13M9 \ |
| 33 | +--eventcontent NANOAOD \ |
| 34 | +--datatier GEN-SIM-DIGI-RAW-MINIAOD \ |
| 35 | +--customise SLHCUpgradeSimulations/Configuration/aging.customise_aging_1000,Configuration/DataProcessing/Utils.addMonitoring,L1Trigger/Configuration/customisePhase2TTOn110.customisePhase2TTOn110 \ |
| 36 | +--filein /store/mc/Phase2Spring24DIGIRECOMiniAOD/TT_TuneCP5_14TeV-powheg-pythia8/GEN-SIM-DIGI-RAW-MINIAOD/PU200_AllTP_140X_mcRun4_realistic_v4-v1/2560000/11d1f6f0-5f03-421e-90c7-b5815197fc85.root \ |
| 37 | +--fileout file:output_Phase2_L1T.root \ |
| 38 | +--python_filename rerunL1_cfg.py \ |
| 39 | +--inputCommands="keep *, drop l1tPFJets_*_*_*, drop l1tTrackerMuons_l1tTkMuonsGmt*_*_HLT" \ |
| 40 | +--mc \ |
| 41 | +-n 10 --nThreads 4 --no_exec |
| 42 | +``` |
| 43 | + |
| 44 | +### Workflows |
| 45 | + |
| 46 | +Two upgrade workflows are implemented to test/run this nano (`Phase2L1DPG`) after the full DigiTrigger chain after the complete L1: |
| 47 | +* `.781` - produces NANO in addition to FEVTDEBUG |
| 48 | +* `.782` - produces only NANO |
| 49 | + |
| 50 | +And can be executed as e.g. `runTheMatrix.py --what upgrade -i all --ibeos -l 29634.782`. See [here the readme of `runTheMatrix`](https://github.com/cms-sw/cmssw/tree/master/Configuration/PyReleaseValidation/scripts#interactive-runthematrix-shell) and [here a list of workflows](https://github.com/cms-sw/cmssw/tree/master/Configuration/PyReleaseValidation). |
| 51 | + |
| 52 | +Note that if tou want to include the Gen/Offline references, you need to change the import function in the config after the |
| 53 | + |
| 54 | +## Output |
| 55 | + |
| 56 | +The output file is a nanoAOD file with the output branches in the `Events` tree. |
| 57 | + |
| 58 | +An overview of the corresponding content is shown here: https://alobanov.web.cern.ch/L1T/Phase2/L1Nano/l1menu_nano_V38_1400pre3V9_doc_report.html |
| 59 | + |
| 60 | +Size report: https://alobanov.web.cern.ch/L1T/Phase2/L1Nano/l1menu_nano_V38_1400pre3V9_size_report.html |
| 61 | + |
| 62 | +Example: |
| 63 | + |
| 64 | +```python |
| 65 | +'run', |
| 66 | +'luminosityBlock', |
| 67 | +'event', |
| 68 | +'L1tkPhoton_saId', |
| 69 | +'L1tkPhoton_hwEta', |
| 70 | +'L1tkPhoton_hwIso', |
| 71 | +'L1tkPhoton_hwPhi', |
| 72 | +``` |
| 73 | + |
| 74 | +This can be easily handled with [`uproot/awkward`](https://gitlab.cern.ch/cms-podas23/dpg/trigger-exercise/-/blob/solutions/1_Intro_NanoAwk_Analysis_Solution.ipynb) like this: |
| 75 | + |
| 76 | +```python |
| 77 | +f = uproot.open("l1nano.root") |
| 78 | +events = f["Events"].arrays() |
| 79 | +``` |
| 80 | + |
| 81 | +### P2GT emulator decisions |
| 82 | +The GT emulator decisions are stored like this now: |
| 83 | +``` |
| 84 | +L1_pSingleTkMuon22_final # seed name and final for post prescale value |
| 85 | +``` |
0 commit comments