Skip to content

Commit 91deda1

Browse files
author
Zhenbin Wu
committed
Merged tpsupdatePR2_14 from repository zhenbinwu with cms-merge-topic
2 parents eb45085 + b043e2f commit 91deda1

File tree

152 files changed

+3070
-15192
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

152 files changed

+3070
-15192
lines changed

Configuration/PyReleaseValidation/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,8 @@ The offsets currently in use are:
6262
* 0.777 New Phase 2 Standalone Muon seeding, streamlined L3 Tracker Muons reconstruction (Inside-Out first), HLT Muon NanoAOD
6363
* 0.778 New Phase 2 Standalone Muon seeding, streamlined L3 Tracker Muons reconstruction (Outside-In first), HLT Muon NanoAOD
6464
* 0.78: Complete L1 workflow
65+
* 0.781: Complete L1 workflow, producing FEVT and NANO output L1/P2GT objects
66+
* 0.782: Complete L1 workflow, producing only NANO output L1/P2GT objects
6567
* 0.8: BPH Parking (Run-2)
6668
* 0.81: Running also HeavyFlavor DQM
6769
* 0.85: Phase-2 Heavy Ion

Configuration/PyReleaseValidation/python/upgradeWorkflowComponents.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1847,6 +1847,26 @@ def condition(self, fragment, stepList, key, hasHarvest):
18471847
offset = 0.78
18481848
)
18491849

1850+
# use HLTTiming75e33 template as it skips the steps after DIGI
1851+
upgradeWFs['L1CompleteWithNano'] = deepcopy(upgradeWFs['HLTTiming75e33'])
1852+
upgradeWFs['L1CompleteWithNano'].suffix = '_L1CompleteWithNano'
1853+
upgradeWFs['L1CompleteWithNano'].offset = 0.781
1854+
upgradeWFs['L1CompleteWithNano'].step2 = {
1855+
'-s': 'DIGI:pdigi_valid,L1,L1TrackTrigger,L1P2GT,DIGI2RAW,HLT:@relvalRun4,NANO:@Phase2L1DPG',
1856+
'--datatier':'GEN-SIM-DIGI-RAW,NANOAODSIM',
1857+
'--eventcontent':'FEVTDEBUGHLT,NANOAODSIM'
1858+
}
1859+
1860+
upgradeWFs['L1CompleteOnlyNano'] = deepcopy(upgradeWFs['L1CompleteWithNano'])
1861+
upgradeWFs['L1CompleteOnlyNano'].suffix = '_L1CompleteOnlyNano'
1862+
upgradeWFs['L1CompleteOnlyNano'].offset = 0.782
1863+
upgradeWFs['L1CompleteOnlyNano'].step2 = {
1864+
# '-s': 'NANO:@Phase2L1DPG',
1865+
'-s': 'DIGI:pdigi_valid,L1,L1TrackTrigger,L1P2GT,DIGI2RAW,HLT:@relvalRun4,NANO:@Phase2L1DPG',
1866+
'--datatier':'NANOAODSIM',
1867+
'--eventcontent':'NANOAODSIM'
1868+
}
1869+
18501870
class UpgradeWorkflow_Neutron(UpgradeWorkflow):
18511871
def setup_(self, step, stepName, stepDict, k, properties):
18521872
if 'GenSim' in step:
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<use name="FWCore/Utilities"/>
2+
<use name="FWCore/Common"/>
3+
<use name="DataFormats/Common"/>
4+
<use name="DataFormats/StdDictionaries"/>
5+
<use name="DataFormats/Candidate"/>
6+
<use name="DataFormats/PatCandidates"/>
7+
<use name="CommonTools/Utils"/>
8+
<use name="CommonTools/UtilAlgos"/>
9+
<use name="CommonTools/CandAlgos"/>
10+
<use name="DataFormats/NanoAOD"/>
11+
<use name="boost"/>
12+
<export>
13+
<lib name="1"/>
14+
</export>
Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
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+
```
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<use name="CondFormats/DataRecord"/>
2+
<use name="CondFormats/L1TObjects"/>
3+
<use name="CondFormats/RunInfo"/>
4+
<use name="DataFormats/Candidate"/>
5+
<use name="DataFormats/L1TGlobal"/>
6+
<use name="DataFormats/L1Trigger"/>
7+
<use name="DataFormats/L1TCorrelator"/>
8+
<use name="DataFormats/L1TMuonPhase2"/>
9+
<use name="DataFormats/L1TParticleFlow"/>
10+
<use name="DataFormats/NanoAOD"/>
11+
<use name="DataFormats/PatCandidates"/>
12+
<use name="DataFormats/ProtonReco"/>
13+
<use name="FWCore/Framework"/>
14+
<use name="FWCore/ParameterSet"/>
15+
<use name="FWCore/ServiceRegistry"/>
16+
<use name="FWCore/Utilities"/>
17+
<use name="IOPool/Provenance"/>
18+
<use name="PhysicsTools/PatAlgos"/>
19+
<use name="CommonTools/Utils"/>
20+
<use name="CommonTools/UtilAlgos"/>
21+
<use name="CommonTools/CandAlgos"/>
22+
<library file="*.cc" name="DPGAnalysisPhase2L1TNanoAOD_plugins">
23+
<flags EDM_PLUGIN="1"/>
24+
</library>
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
#include "PhysicsTools/NanoAOD/interface/SimpleFlatTableProducer.h"
2+
3+
#include "DataFormats/L1Trigger/interface/VertexWord.h"
4+
typedef SimpleFlatTableProducer<l1t::VertexWord> SimpleL1VtxWordCandidateFlatTableProducer;
5+
6+
#include "DataFormats/L1Trigger/interface/P2GTAlgoBlock.h"
7+
typedef SimpleFlatTableProducer<l1t::P2GTAlgoBlock> P2GTAlgoBlockFlatTableProducer;
8+
9+
#include "DataFormats/L1Trigger/interface/P2GTCandidate.h"
10+
typedef SimpleFlatTableProducer<l1t::P2GTCandidate> SimpleP2GTCandidateFlatTableProducer;
11+
12+
#include "DataFormats/L1Trigger/interface/TkJetWord.h"
13+
typedef SimpleFlatTableProducer<l1t::TkJetWord> SimpleL1TkJetWordCandidateFlatTableProducer;
14+
15+
#include "DataFormats/L1Trigger/interface/TkTripletWord.h"
16+
typedef SimpleFlatTableProducer<l1t::TkTripletWord> SimpleTkTripletWordCandidateFlatTableProducer;
17+
18+
#include "DataFormats/L1Trigger/interface/L1Candidate.h"
19+
typedef SimpleFlatTableProducer<l1t::L1Candidate> SimpleTriggerL1CandidateFlatTableProducer;
20+
21+
#include "DataFormats/L1TCorrelator/interface/TkEm.h"
22+
typedef SimpleFlatTableProducer<l1t::TkEm> SimpleTriggerL1TkEmFlatTableProducer;
23+
24+
#include "DataFormats/L1TCorrelator/interface/TkElectron.h"
25+
typedef SimpleFlatTableProducer<l1t::TkElectron> SimpleTriggerL1TkElectronFlatTableProducer;
26+
27+
#include "DataFormats/L1TMuonPhase2/interface/SAMuon.h"
28+
typedef SimpleFlatTableProducer<l1t::SAMuon> SimpleTriggerL1SAMuonFlatTableProducer;
29+
30+
#include "DataFormats/L1TMuonPhase2/interface/TrackerMuon.h"
31+
typedef SimpleFlatTableProducer<l1t::TrackerMuon> SimpleTriggerL1TrackerMuonFlatTableProducer;
32+
33+
#include "DataFormats/L1TCalorimeterPhase2/interface/Phase2L1CaloJet.h"
34+
typedef SimpleFlatTableProducer<l1tp2::Phase2L1CaloJet> SimpleTriggerL1CaloJetFlatTableProducer;
35+
36+
#include "DataFormats/L1TParticleFlow/interface/PFTau.h"
37+
typedef SimpleFlatTableProducer<l1t::PFTau> SimpleTriggerL1PFTauFlatTableProducer;
38+
39+
#include "DataFormats/L1TParticleFlow/interface/HPSPFTau.h"
40+
typedef SimpleFlatTableProducer<l1t::HPSPFTau> SimpleTriggerL1HPSPFTauFlatTableProducer;
41+
42+
#include "FWCore/Framework/interface/MakerMacros.h"
43+
DEFINE_FWK_MODULE(SimpleL1VtxWordCandidateFlatTableProducer);
44+
DEFINE_FWK_MODULE(P2GTAlgoBlockFlatTableProducer);
45+
DEFINE_FWK_MODULE(SimpleP2GTCandidateFlatTableProducer);
46+
DEFINE_FWK_MODULE(SimpleL1TkJetWordCandidateFlatTableProducer);
47+
DEFINE_FWK_MODULE(SimpleTkTripletWordCandidateFlatTableProducer);
48+
DEFINE_FWK_MODULE(SimpleTriggerL1CandidateFlatTableProducer);
49+
DEFINE_FWK_MODULE(SimpleTriggerL1TkEmFlatTableProducer);
50+
DEFINE_FWK_MODULE(SimpleTriggerL1TkElectronFlatTableProducer);
51+
DEFINE_FWK_MODULE(SimpleTriggerL1SAMuonFlatTableProducer);
52+
DEFINE_FWK_MODULE(SimpleTriggerL1TrackerMuonFlatTableProducer);
53+
DEFINE_FWK_MODULE(SimpleTriggerL1CaloJetFlatTableProducer);
54+
DEFINE_FWK_MODULE(SimpleTriggerL1PFTauFlatTableProducer);
55+
DEFINE_FWK_MODULE(SimpleTriggerL1HPSPFTauFlatTableProducer);

DPGAnalysis/L1TNanoAOD/plugins/P2GTTriggerResultsConverter.cc renamed to DPGAnalysis/Phase2L1TNanoAOD/plugins/P2GTTriggerResultsConverter.cc

File renamed without changes.

0 commit comments

Comments
 (0)