Skip to content

Commit 0308cd8

Browse files
authored
Merge pull request #47069 from Parsifal-2045/hltMuonNtuples
[NGT] Implement `NanoAOD` ntuples production for HLT Muon objects
2 parents c7e8a06 + 1838003 commit 0308cd8

File tree

9 files changed

+442
-2
lines changed

9 files changed

+442
-2
lines changed

Configuration/EventContent/python/EventContent_cff.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -712,6 +712,11 @@ def SwapKeepAndDrop(l):
712712
'keep *_hltPhase2L3Muons_*_*'])
713713

714714
from Configuration.ProcessModifiers.phase2L2AndL3Muons_cff import phase2L2AndL3Muons
715+
(phase2_muon & ~phase2L2AndL3Muons).toModify(FEVTDEBUGHLTEventContent,
716+
outputCommands = FEVTDEBUGHLTEventContent.outputCommands + [
717+
'keep *_hltL2OfflineMuonSeeds_*_*'
718+
])
719+
715720
(phase2_muon & phase2L2AndL3Muons).toModify(FEVTDEBUGHLTEventContent,
716721
outputCommands = FEVTDEBUGHLTEventContent.outputCommands + [
717722
'keep *_hltPhase2L3MuonFilter_*_*'

Configuration/PyReleaseValidation/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,8 @@ The offsets currently in use are:
5959
* 0.753: HLT phase-2 timing menu Alpaka, single tracking iteration variant
6060
* 0.754: HLT phase-2 timing menu Alpaka, single tracking iteration, LST building variant
6161
* 0.755: HLT phase-2 timing menu Alpaka, LST building variant
62+
* 0.777 New Phase 2 Standalone Muon seeding, streamlined L3 Tracker Muons reconstruction (Inside-Out first), HLT Muon NanoAOD
63+
* 0.778 New Phase 2 Standalone Muon seeding, streamlined L3 Tracker Muons reconstruction (Outside-In first), HLT Muon NanoAOD
6264
* 0.78: Complete L1 workflow
6365
* 0.8: BPH Parking (Run-2)
6466
* 0.81: Running also HeavyFlavor DQM

Configuration/PyReleaseValidation/python/upgradeWorkflowComponents.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -851,7 +851,10 @@ def condition(self, fragment, stepList, key, hasHarvest):
851851
suffix = '_phase2L2AndL3MuonsIOFirst',
852852
offset = 0.777,
853853
)
854-
upgradeWFs['phase2L2AndL3Muons'].step2 = {'--procModifiers':'phase2L2AndL3Muons'}
854+
upgradeWFs['phase2L2AndL3Muons'].step2 = {'-s':'DIGI:pdigi_valid,L1TrackTrigger,L1,L1P2GT,DIGI2RAW,HLT:@relvalRun4,NANO:@MUHLT',
855+
'--datatier':'GEN-SIM-DIGI-RAW,NANOAODSIM',
856+
'--eventcontent':'FEVTDEBUGHLT,NANOAODSIM',
857+
'--procModifiers':'phase2L2AndL3Muons'}
855858
upgradeWFs['phase2L2AndL3Muons'].step3 = {'--procModifiers':'phase2L2AndL3Muons'}
856859
upgradeWFs['phase2L2AndL3Muons'].step4 = {'--procModifiers':'phase2L2AndL3Muons'}
857860

@@ -883,7 +886,10 @@ def condition(self, fragment, stepList, key, hasHarvest):
883886
suffix = '_phase2L2AndL3MuonsOIFirst',
884887
offset = 0.778,
885888
)
886-
upgradeWFs['phase2L3MuonsOIFirst'].step2 = {'--procModifiers':'phase2L2AndL3Muons,phase2L3MuonsOIFirst'}
889+
upgradeWFs['phase2L3MuonsOIFirst'].step2 = {'-s':'DIGI:pdigi_valid,L1TrackTrigger,L1,L1P2GT,DIGI2RAW,HLT:@relvalRun4,NANO:@MUHLT',
890+
'--datatier':'GEN-SIM-DIGI-RAW,NANOAODSIM',
891+
'--eventcontent':'FEVTDEBUGHLT,NANOAODSIM',
892+
'--procModifiers':'phase2L2AndL3Muons,phase2L3MuonsOIFirst'}
887893
upgradeWFs['phase2L3MuonsOIFirst'].step3 = {'--procModifiers':'phase2L2AndL3Muons,phase2L3MuonsOIFirst'}
888894
upgradeWFs['phase2L3MuonsOIFirst'].step4 = {'--procModifiers':'phase2L2AndL3Muons,phase2L3MuonsOIFirst'}
889895

DPGAnalysis/MuonTools/plugins/MuLocalRecoFlatTableProducers.cc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,12 @@
1515

1616
using DTSegmentFlatTableProducer = MuRecObjBaseProducer<DTChamberId, DTRecSegment4D, DTGeometry>;
1717

18+
#include "Geometry/CSCGeometry/interface/CSCGeometry.h"
19+
#include "Geometry/Records/interface/MuonGeometryRecord.h"
20+
#include "DataFormats/CSCRecHit/interface/CSCSegmentCollection.h"
21+
22+
using CSCSegmentFlatTableProducer = MuRecObjBaseProducer<CSCDetId, CSCSegment, CSCGeometry>;
23+
1824
#include "Geometry/RPCGeometry/interface/RPCGeometry.h"
1925
#include "Geometry/Records/interface/MuonGeometryRecord.h"
2026
#include "DataFormats/RPCRecHit/interface/RPCRecHitCollection.h"
@@ -37,6 +43,7 @@ using GEMSegmentFlatTableProducer = MuRecObjBaseProducer<GEMDetId, GEMSegment, G
3743
#include "FWCore/Framework/interface/MakerMacros.h"
3844

3945
DEFINE_FWK_MODULE(DTSegmentFlatTableProducer);
46+
DEFINE_FWK_MODULE(CSCSegmentFlatTableProducer);
4047
DEFINE_FWK_MODULE(RPCRecHitFlatTableProducer);
4148
DEFINE_FWK_MODULE(GEMRecHitFlatTableProducer);
4249
DEFINE_FWK_MODULE(GEMSegmentFlatTableProducer);
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
import FWCore.ParameterSet.Config as cms
2+
3+
from PhysicsTools.NanoAOD.common_cff import *
4+
5+
from PhysicsTools.NanoAOD.genparticles_cff import *
6+
from PhysicsTools.PatAlgos.slimming.prunedGenParticles_cfi import *
7+
from DPGAnalysis.MuonTools.nano_mu_hlt_cff import *
8+
9+
10+
hltMuNanoProducer = cms.Sequence(
11+
prunedGenParticles + finalGenParticles + genParticleTable + hltMuonTriggerProducers
12+
)
13+
14+
15+
def hltMuNanoCustomize(process):
16+
17+
if hasattr(process, "NANOAODSIMoutput"):
18+
process.prunedGenParticles.src = "genParticles"
19+
process.genParticleTable.externalVariables = cms.PSet() # remove iso as external variable from PhysicsTools/NanoAOD/python/genparticles_cff.py:37 (hopefully temporarily)
20+
process.NANOAODSIMoutput.outputCommands.append(
21+
"keep nanoaodFlatTable_*Table*_*_*"
22+
)
23+
process.NANOAODSIMoutput.outputCommands.append("drop edmTriggerResults_*_*_*")
24+
25+
return process

0 commit comments

Comments
 (0)