Back to home page

Project CMSSW displayed by LXR

 
 

    


Warning, /DPGAnalysis/Phase2L1TNanoAOD/README.md is written in an unsupported language. File is not indexed.

0001 # Phase2-L1Nano
0002 NanoAOD ntupler for Phase-2 L1 Objects
0003 
0004 Initially an independent package here: https://github.com/cms-l1-dpg/Phase2-L1Nano/
0005 
0006 ## Setup
0007 
0008 For more information on the latest L1T Phase 2 software developments in CMSSW see: https://twiki.cern.ch/twiki/bin/view/CMSPublic/SWGuideL1TPhase2Instructions#Development
0009 
0010 Corresponding menu twiki section: https://twiki.cern.ch/twiki/bin/viewauth/CMS/PhaseIIL1TriggerMenuTools#Phase_2_L1_Trigger_objects_based
0011 
0012 
0013 ## Usage
0014 
0015 ### Via cmsDriver
0016 
0017 One can append the L1Nano output to the `cmsDriver` command via the `NANO:@Phase2L1DPGwithGen` autoNANO handle, e.g.:
0018 ```bash
0019 cmsDriver.py -s L1,L1TrackTrigger,L1P2GT,NANO:@Phase2L1DPGwithGen
0020 ```
0021 
0022 Check `PhysicsTools/NanoAOD/python/autoNANO.py` for the way this command is defined.
0023 
0024 Note that the step key `Phase2L1DPG` does not include the generator and reco-level objects used for MenuTools studies in the nano!
0025 It is mostly created for workflow tests.
0026 
0027 An example `cmsDriver` command for 14x files:
0028 ```bash
0029 cmsDriver.py -s L1,L1TrackTrigger,L1P2GT,NANO:@Phase2L1DPGwithGen \
0030 --conditions auto:phase2_realistic_T33 \
0031 --geometry ExtendedRun4D110 \
0032 --era Phase2C17I13M9 \
0033 --eventcontent NANOAOD \
0034 --datatier GEN-SIM-DIGI-RAW-MINIAOD \
0035 --customise SLHCUpgradeSimulations/Configuration/aging.customise_aging_1000,Configuration/DataProcessing/Utils.addMonitoring,L1Trigger/Configuration/customisePhase2TTOn110.customisePhase2TTOn110 \
0036 --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 \
0037 --fileout file:output_Phase2_L1T.root \
0038 --python_filename rerunL1_cfg.py \
0039 --inputCommands="keep *, drop l1tPFJets_*_*_*, drop l1tTrackerMuons_l1tTkMuonsGmt*_*_HLT" \
0040 --mc \
0041 -n 10 --nThreads 4 --no_exec
0042 ```
0043 
0044 ### Workflows
0045 
0046 Two upgrade workflows are implemented to test/run this nano (`Phase2L1DPG`) after the full DigiTrigger chain after the complete L1:
0047 * `.781` - produces NANO in addition to FEVTDEBUG
0048 * `.782` - produces only NANO
0049 
0050 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).
0051 
0052 Note that if tou want to include the Gen/Offline references, you need to change the import function in the config after the
0053 
0054 ## Output
0055 
0056 The output file is a nanoAOD file with the output branches in the `Events` tree.
0057 
0058 An overview of the corresponding content is shown here: https://alobanov.web.cern.ch/L1T/Phase2/L1Nano/l1menu_nano_V38_1400pre3V9_doc_report.html
0059 
0060 Size report: https://alobanov.web.cern.ch/L1T/Phase2/L1Nano/l1menu_nano_V38_1400pre3V9_size_report.html
0061 
0062 Example:
0063 
0064 ```python
0065 'run',
0066 'luminosityBlock',
0067 'event',
0068 'L1tkPhoton_saId',
0069 'L1tkPhoton_hwEta',
0070 'L1tkPhoton_hwIso',
0071 'L1tkPhoton_hwPhi',
0072 ```
0073 
0074 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:
0075 
0076 ```python
0077 f = uproot.open("l1nano.root")
0078 events = f["Events"].arrays() 
0079 ```
0080 
0081 ### P2GT emulator decisions
0082 The GT emulator decisions are stored like this now:
0083 ```
0084 L1_pSingleTkMuon22_final # seed name and final for post prescale value
0085 ```