From 76e3f75c9efd24aebf95601d4ccfd4aca30fa266 Mon Sep 17 00:00:00 2001 From: Carlo Battilana Date: Fri, 21 Jul 2023 17:39:39 +0200 Subject: [PATCH 1/3] Update muon ntuple content based on feedback from first PR version - fix bug generating broken flat table in CSC TnP producer - add missing information to allow DT TnP analysis - add CSC/DT segment extrapolation to nearby RPC chambers - fix propagation issue in GEMMuonExtTable producer - add producer writing online luminosity information --- .../plugins/MuCSCTnPFlatTableProducer.cc | 8 +- .../plugins/MuDTMuonExtTableProducer.cc | 11 ++- .../plugins/MuGEMMuonExtTableProducer.cc | 5 +- .../python/muNtupleProducerBkg_cff.py | 5 +- .../MuonTools/python/muNtupleProducer_cff.py | 15 +++- .../MuonTools/python/nano_mu_global_cff.py | 15 ++++ .../python/nano_mu_local_reco_cff.py | 81 +++++++++++++++++++ PhysicsTools/NanoAOD/plugins/BuildFile.xml | 1 + .../plugins/SimpleFlatTableProducerPlugins.cc | 4 + 9 files changed, 137 insertions(+), 8 deletions(-) create mode 100644 DPGAnalysis/MuonTools/python/nano_mu_global_cff.py diff --git a/DPGAnalysis/MuonTools/plugins/MuCSCTnPFlatTableProducer.cc b/DPGAnalysis/MuonTools/plugins/MuCSCTnPFlatTableProducer.cc index 552d22aa1768f..ad0b36aa31e45 100644 --- a/DPGAnalysis/MuonTools/plugins/MuCSCTnPFlatTableProducer.cc +++ b/DPGAnalysis/MuonTools/plugins/MuCSCTnPFlatTableProducer.cc @@ -56,8 +56,6 @@ #include "TrackingTools/Records/interface/TransientTrackRecord.h" #include "TrackingTools/TrajectoryState/interface/TrajectoryStateOnSurface.h" #include "TrackingTools/GeomPropagators/interface/Propagator.h" -#include "TrackingTools/TrajectoryParametrization/interface/GlobalTrajectoryParameters.h" -#include "TrackingTools/TrajectoryState/interface/FreeTrajectoryState.h" class MuonServiceProxy; @@ -383,9 +381,13 @@ void MuCSCTnPFlatTableProducer::fillTable(edm::Event& ev) { m_chamberEndcap.push_back(endcapCSC * 1); Int_t iiStationFail = 0; + Int_t iiStation0Pass = 0; for (int iiStationZ = 0; iiStationZ < 6; iiStationZ++) { UChar_t stationCSC = iiStationZ > 2 ? iiStationZ - 2 : 0; UChar_t ringCSC = 0; + // Could monitor this problem here if necessary; + if (stationCSC == 0 && iiStation0Pass > 0) + continue; TrajectoryStateOnSurface tsos = surfExtrapTrkSam(track, ec ? MEZ[iiStationZ] : -MEZ[iiStationZ]); if (tsos.isValid()) { @@ -407,6 +409,8 @@ void MuCSCTnPFlatTableProducer::fillTable(edm::Event& ev) { tsos = surfExtrapTrkSam(track, Layer3Surface.position().z()); if (tsos.isValid()) { + if (stationCSC == 0) + iiStation0Pass++; // Fill track intersection denominator information LocalPoint localTTIntPoint = Layer3Surface.toLocal(tsos.freeState()->position()); const CSCLayerGeometry* layerGeoma = m_cscGeometry->chamber(Layer0Id)->layer(3)->geometry(); diff --git a/DPGAnalysis/MuonTools/plugins/MuDTMuonExtTableProducer.cc b/DPGAnalysis/MuonTools/plugins/MuDTMuonExtTableProducer.cc index a1653d692407c..8ebcacb24c231 100644 --- a/DPGAnalysis/MuonTools/plugins/MuDTMuonExtTableProducer.cc +++ b/DPGAnalysis/MuonTools/plugins/MuDTMuonExtTableProducer.cc @@ -329,7 +329,16 @@ void MuDTMuonExtTableProducer::fillTable(edm::Event& ev) { tabMatches->setDoc("RECO muon matches_* vectors"); addColumn(tabMatches, "x", matches_x, "x position of the extrapolated track on the matched DT chamber"); - addColumn(tabMatches, "y", matches_y, "x position of the extrapolated track on the matched DT chamber"); + addColumn(tabMatches, "y", matches_y, "y position of the extrapolated track on the matched DT chamber"); + + addColumn(tabMatches, + "edgeX", + matches_edgeX, + "distance in x of the extrapolated track to the matched DT chamber border (<0 == inside the chamber)"); + addColumn(tabMatches, + "edgeY", + matches_edgeY, + "distance in y of the extrapolated track to the matched DT chamber border (<0 == inside the chamber)"); addColumn(tabMatches, "wheel", matches_wheel, "matched DT chamber wheel"); addColumn(tabMatches, "sector", matches_sector, "matched DT chamber sector"); diff --git a/DPGAnalysis/MuonTools/plugins/MuGEMMuonExtTableProducer.cc b/DPGAnalysis/MuonTools/plugins/MuGEMMuonExtTableProducer.cc index a8ba0a8d92d02..6b49b1c34cc8b 100644 --- a/DPGAnalysis/MuonTools/plugins/MuGEMMuonExtTableProducer.cc +++ b/DPGAnalysis/MuonTools/plugins/MuGEMMuonExtTableProducer.cc @@ -213,9 +213,8 @@ void MuGEMMuonExtTableProducer::fillTable(edm::Event& ev) { continue; } - const auto&& start_state = - is_insideout ? transient_track.outermostMeasurementState() : transient_track.innermostMeasurementState(); - auto& propagator = is_incoming ? propagator_along : propagator_opposite; + const auto&& start_state = transient_track.innermostMeasurementState(); + auto& propagator = propagator_any; auto recHitMu = outerTrackRef->recHitsBegin(); auto recHitMuEnd = outerTrackRef->recHitsEnd(); diff --git a/DPGAnalysis/MuonTools/python/muNtupleProducerBkg_cff.py b/DPGAnalysis/MuonTools/python/muNtupleProducerBkg_cff.py index b928bf610b491..350d5647451ff 100644 --- a/DPGAnalysis/MuonTools/python/muNtupleProducerBkg_cff.py +++ b/DPGAnalysis/MuonTools/python/muNtupleProducerBkg_cff.py @@ -2,9 +2,12 @@ from PhysicsTools.NanoAOD.common_cff import * +from DPGAnalysis.MuonTools.nano_mu_global_cff import * from DPGAnalysis.MuonTools.nano_mu_digi_cff import * -muNtupleProducerBkg = cms.Sequence(muDigiProducersBkg) +muNtupleProducerBkg = cms.Sequence(lhcInfoTableProducer + + lumiTableProducer + + muDigiProducersBkg) def nanoAOD_customizeCommon(process) : diff --git a/DPGAnalysis/MuonTools/python/muNtupleProducer_cff.py b/DPGAnalysis/MuonTools/python/muNtupleProducer_cff.py index 993e2e1098e90..f071f35ba8612 100644 --- a/DPGAnalysis/MuonTools/python/muNtupleProducer_cff.py +++ b/DPGAnalysis/MuonTools/python/muNtupleProducer_cff.py @@ -2,12 +2,16 @@ from PhysicsTools.NanoAOD.common_cff import * +from DPGAnalysis.MuonTools.nano_mu_global_cff import * from DPGAnalysis.MuonTools.nano_mu_digi_cff import * from DPGAnalysis.MuonTools.nano_mu_local_reco_cff import * from DPGAnalysis.MuonTools.nano_mu_reco_cff import * from DPGAnalysis.MuonTools.nano_mu_l1t_cff import * +from DPGAnalysis.MuonTools.nano_mu_l1t_cff import * -muNtupleProducer = cms.Sequence(muDigiProducers +muNtupleProducer = cms.Sequence(lhcInfoTableProducer + + lumiTableProducer + + muDigiProducers + muLocalRecoProducers + muRecoProducers + muL1TriggerProducers @@ -15,6 +19,15 @@ def nanoAOD_customizeCommon(process) : + if hasattr(process, "dtrpcPointFlatTableProducer") and \ + hasattr(process, "cscrpcPointFlatTableProducer") and \ + hasattr(process, "RawToDigiTask"): + process.load("RecoLocalMuon.RPCRecHit.rpcPointProducer_cff") + process.rpcPointProducer.dt4DSegments = 'dt4DSegments' + process.rpcPointProducer.cscSegments = 'cscSegments' + process.rpcPointProducer.ExtrapolatedRegion = 0.6 + process.RawToDigiTask.add(process.rpcPointProducer) + if hasattr(process, "muGEMMuonExtTableProducer") or hasattr(process, "muCSCTnPFlatTableProducer"): process.load("TrackingTools/TransientTrack/TransientTrackBuilder_cfi") process.load("TrackPropagation.SteppingHelixPropagator.SteppingHelixPropagatorAny_cfi") diff --git a/DPGAnalysis/MuonTools/python/nano_mu_global_cff.py b/DPGAnalysis/MuonTools/python/nano_mu_global_cff.py new file mode 100644 index 0000000000000..18cace397e6ee --- /dev/null +++ b/DPGAnalysis/MuonTools/python/nano_mu_global_cff.py @@ -0,0 +1,15 @@ +import FWCore.ParameterSet.Config as cms + +from PhysicsTools.NanoAOD.common_cff import * + +lumiTableProducer = cms.EDProducer("SimpleOnlineLuminosityFlatTableProducer", + src = cms.InputTag("onlineMetaDataDigis"), + name = cms.string("lumi"), + doc = cms.string("Online luminosity information"), + variables = cms.PSet( + instLumi = Var( "instLumi()", "double", doc = "Instantaneous luminosity"), + avgPileUp = Var( "avgPileUp()", "double", doc = "Average PU") + ) +) + +lhcInfoTableProducer = cms.EDProducer("LHCInfoProducer") diff --git a/DPGAnalysis/MuonTools/python/nano_mu_local_reco_cff.py b/DPGAnalysis/MuonTools/python/nano_mu_local_reco_cff.py index 307c3c90cc1e7..40fd37ccfa739 100644 --- a/DPGAnalysis/MuonTools/python/nano_mu_local_reco_cff.py +++ b/DPGAnalysis/MuonTools/python/nano_mu_local_reco_cff.py @@ -82,6 +82,85 @@ rawId = DetIdVar("rawId()", "uint", doc = "unique detector unit ID") ) +dtrpcPointFlatTableProducer = rpcRecHitFlatTableProducer.clone(name = 'dtrpcPointProducer', src = cms.InputTag('rpcPointProducer','RPCDTExtrapolatedPoints'), doc = "DT extrapolated point on RPC") + +dtrpcPointFlatTableProducer.variables = cms.PSet( + coordX = Var("localPosition().x()", float, doc = "position x in local coordinates - cm"), + coordY = Var("localPosition().y()", float, doc = "position y in local coordinates - cm"), + coordZ = Var("localPosition().z()", float, doc = "position z in local coordinates - cm"), +) + +dtrpcPointFlatTableProducer.detIdVariables = cms.PSet( + region = DetIdVar("region()", "int8", doc = "0: barrel, +-1: endcap"), + ring = DetIdVar("ring()", "int8", doc = "ring id:" + "
wheel number in barrel (from -2 to +2)" + "
ring number in endcap (from 1 to 3)"), + station = DetIdVar("station()", "int8", doc = "chambers at same R in barrel, chambers at same Z ion endcap"), + layer = DetIdVar("layer()", "int8", doc = "layer id:" + "
in station 1 and 2 for barrel, we have two layers of chambers:" + "
layer 1 is the inner chamber and layer 2 is the outer chamber"), + sector = DetIdVar("sector()", "int8", doc = "group of chambers at same phi"), + subsector = DetIdVar("subsector()", "int8", doc = "Some sectors are divided along the phi direction in subsectors " + "(from 1 to 4 in Barrel, from 1 to 6 in Endcap)"), + roll = DetIdVar("roll()", "int8", doc = "roll id (also known as eta partition):" + "
each chamber is divided along the strip direction"), + rawId = DetIdVar("rawId()", "uint", doc = "unique detector unit ID") +) +cscrpcPointFlatTableProducer = rpcRecHitFlatTableProducer.clone(name = 'cscToRpc', + src = cms.InputTag('rpcPointProducer','RPCCSCExtrapolatedPoints'), + doc = "CSC segment extrapolated on RPC") + +cscrpcPointFlatTableProducer.variables = cms.PSet( + coordX = Var("localPosition().x()", float, doc = "position x in local coordinates - cm"), + coordY = Var("localPosition().y()", float, doc = "position y in local coordinates - cm"), + coordZ = Var("localPosition().z()", float, doc = "position z in local coordinates - cm"), +) + +cscrpcPointFlatTableProducer.detIdVariables = cms.PSet( + region = DetIdVar("region()", "int8", doc = "0: barrel, +-1: endcap"), + ring = DetIdVar("ring()", "int8", doc = "ring id:" + "
wheel number in barrel (from -2 to +2)" + "
ring number in endcap (from 1 to 3)"), + station = DetIdVar("station()", "int8", doc = "chambers at same R in barrel, chambers at same Z ion endcap"), + layer = DetIdVar("layer()", "int8", doc = "layer id:" + "
in station 1 and 2 for barrel, we have two layers of chambers:" + "
layer 1 is the inner chamber and layer 2 is the outer chamber"), + sector = DetIdVar("sector()", "int8", doc = "group of chambers at same phi"), + subsector = DetIdVar("subsector()", "int8", doc = "Some sectors are divided along the phi direction in subsectors " + "(from 1 to 4 in Barrel, from 1 to 6 in Endcap)"), + roll = DetIdVar("roll()", "int8", doc = "roll id (also known as eta partition):" + "
each chamber is divided along the strip direction"), + rawId = DetIdVar("rawId()", "uint", doc = "unique detector unit ID") +) + +dtrpcPointFlatTableProducer = rpcRecHitFlatTableProducer.clone(name = 'dtToRpc', + src = cms.InputTag('rpcPointProducer','RPCDTExtrapolatedPoints'), + doc = "DT segment extrapolated on RPC") + +dtrpcPointFlatTableProducer.variables = cms.PSet( + coordX = Var("localPosition().x()", float, doc = "position x in local coordinates - cm"), + coordY = Var("localPosition().y()", float, doc = "position y in local coordinates - cm"), + coordZ = Var("localPosition().z()", float, doc = "position z in local coordinates - cm"), +) + +dtrpcPointFlatTableProducer.detIdVariables = cms.PSet( + region = DetIdVar("region()", "int8", doc = "0: barrel, +-1: endcap"), + ring = DetIdVar("ring()", "int8", doc = "ring id:" + "
wheel number in barrel (from -2 to +2)" + "
ring number in endcap (from 1 to 3)"), + station = DetIdVar("station()", "int8", doc = "chambers at same R in barrel, chambers at same Z ion endcap"), + layer = DetIdVar("layer()", "int8", doc = "layer id:" + "
in station 1 and 2 for barrel, we have two layers of chambers:" + "
layer 1 is the inner chamber and layer 2 is the outer chamber"), + sector = DetIdVar("sector()", "int8", doc = "group of chambers at same phi"), + subsector = DetIdVar("subsector()", "int8", doc = "Some sectors are divided along the phi direction in subsectors " + "(from 1 to 4 in Barrel, from 1 to 6 in Endcap)"), + roll = DetIdVar("roll()", "int8", doc = "roll id (also known as eta partition):" + "
each chamber is divided along the strip direction"), + rawId = DetIdVar("rawId()", "uint", doc = "unique detector unit ID") +) + + from DPGAnalysis.MuonTools.gemRecHitFlatTableProducer_cfi import gemRecHitFlatTableProducer gemRecHitFlatTableProducer.name = "gemRecHit" @@ -156,6 +235,8 @@ ) muLocalRecoProducers = cms.Sequence(rpcRecHitFlatTableProducer + + dtrpcPointFlatTableProducer + + cscrpcPointFlatTableProducer + gemRecHitFlatTableProducer + dtSegmentFlatTableProducer + muDTSegmentExtTableProducer diff --git a/PhysicsTools/NanoAOD/plugins/BuildFile.xml b/PhysicsTools/NanoAOD/plugins/BuildFile.xml index aaffe2b44b891..2d06b9ec6bfd6 100644 --- a/PhysicsTools/NanoAOD/plugins/BuildFile.xml +++ b/PhysicsTools/NanoAOD/plugins/BuildFile.xml @@ -14,6 +14,7 @@ + diff --git a/PhysicsTools/NanoAOD/plugins/SimpleFlatTableProducerPlugins.cc b/PhysicsTools/NanoAOD/plugins/SimpleFlatTableProducerPlugins.cc index 2288d1fab0b67..f9a2fa3efe213 100644 --- a/PhysicsTools/NanoAOD/plugins/SimpleFlatTableProducerPlugins.cc +++ b/PhysicsTools/NanoAOD/plugins/SimpleFlatTableProducerPlugins.cc @@ -21,6 +21,9 @@ typedef SimpleFlatTableProducer SimpleLocalTrackFlatTablePr #include "DataFormats/Math/interface/Point3D.h" typedef EventSingletonSimpleFlatTableProducer SimpleXYZPointFlatTableProducer; +#include "DataFormats/OnlineMetaData/interface/OnlineLuminosityRecord.h" +typedef EventSingletonSimpleFlatTableProducer SimpleOnlineLuminosityFlatTableProducer; + #include "DataFormats/BeamSpot/interface/BeamSpot.h" typedef EventSingletonSimpleFlatTableProducer SimpleBeamspotFlatTableProducer; @@ -62,6 +65,7 @@ DEFINE_FWK_MODULE(SimpleHTXSFlatTableProducer); DEFINE_FWK_MODULE(SimpleProtonTrackFlatTableProducer); DEFINE_FWK_MODULE(SimpleLocalTrackFlatTableProducer); DEFINE_FWK_MODULE(SimpleXYZPointFlatTableProducer); +DEFINE_FWK_MODULE(SimpleOnlineLuminosityFlatTableProducer); DEFINE_FWK_MODULE(SimpleBeamspotFlatTableProducer); DEFINE_FWK_MODULE(SimpleTriggerL1EGFlatTableProducer); DEFINE_FWK_MODULE(SimpleTriggerL1JetFlatTableProducer); From 2bacd2fdd9a3de9a076e187f03f6cea0d459297e Mon Sep 17 00:00:00 2001 From: Carlo Battilana Date: Tue, 14 Nov 2023 15:20:54 +0100 Subject: [PATCH 2/3] Add muonDPG custom NANO --- .../PyReleaseValidation/python/relval_nano.py | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/Configuration/PyReleaseValidation/python/relval_nano.py b/Configuration/PyReleaseValidation/python/relval_nano.py index 6c6f13544dee6..ca6f69d7dea85 100644 --- a/Configuration/PyReleaseValidation/python/relval_nano.py +++ b/Configuration/PyReleaseValidation/python/relval_nano.py @@ -139,6 +139,12 @@ def subnext(self): steps['MuonEG2023MINIAOD13.0'] = { 'INPUT':InputInfo(location='STD',ls=run3_lumis, dataSet='/MuonEG/Run2023C-PromptReco-v4/MINIAOD')} +steps['ZMuSkim2023DRAWRECO13.0'] = { 'INPUT':InputInfo(location='STD',ls={ 370775: [[1, 168]]}, + dataSet='/Muon0/Run2023D-ZMu-PromptReco-v2/RAW-RECO')} + +steps['ZeroBias2023DRAW13.0']={'INPUT':InputInfo(location='STD', ls={369978: [[1, 800]]}, + dataSet='/ZeroBias/Run2023D-v1/RAW')} + steps['NANO_data13.0']=merge([{'--era':'Run3', '--conditions':'auto:run3_data'}, _NANO_data]) @@ -146,6 +152,20 @@ def subnext(self): steps['NANO_data13.0_prompt']=merge([{'--customise' : 'PhysicsTools/NanoAOD/nano_cff.nanoL1TrigObjCustomize', '-n' : '1000'}, steps['NANO_data13.0']]) +steps['muDPGANO_data13.0']=merge([{'-s' : 'RAW2DIGI,NANO:DPGAnalysis/MuonTools/muNtupleProducer_cff.muNtupleProducer', + '--conditions':'auto:run3_data', + '-n' : '100', + '--era' : 'Run3', + '--datatier':'NANOAOD', + '--eventcontent':'NANOAOD'}]) + +steps['muDPGANOBkg_data13.0']=merge([{'-s' : 'RAW2DIGI,NANO:DPGAnalysis/MuonTools/muNtupleProducerBkg_cff.muNtupleProducerBkg', + '--conditions':'auto:run3_data', + '-n' : '100', + '--era' : 'Run3', + '--datatier':'NANOAOD', + '--eventcontent':'NANOAOD'}]) + ###current release cycle workflows : 13.2 steps['TTBarMINIAOD13.2'] = {'INPUT':InputInfo(location='STD', ## dataset below to be replaced with a 13.2 relval sample when available @@ -208,6 +228,8 @@ def subnext(self): _wfn.subnext() workflows[_wfn()] = ['NANOdata130Xrun3', ['MuonEG2023MINIAOD13.0', 'NANO_data13.0', 'HRV_NANO_data']] workflows[_wfn()] = ['NANOdata130Xrun3', ['MuonEG2023MINIAOD13.0', 'NANO_data13.0_prompt', 'HRV_NANO_data']] +workflows[_wfn()] = ['muDPGNANO130Xrun3', ['ZMuSkim2023DRAWRECO13.0', 'muDPGANO_data13.0']] +workflows[_wfn()] = ['muDPGNANOBkg130Xrun3', ['ZeroBias2023DRAW13.0', 'muDPGANOBkg_data13.0']] _wfn.next() ################ From 469b43389402828846225fa4b28f009d6673fd2a Mon Sep 17 00:00:00 2001 From: Carlo Battilana Date: Fri, 17 Nov 2023 12:56:39 +0100 Subject: [PATCH 3/3] Migrate muDPG NANO workflows to autoNano.py --- Configuration/PyReleaseValidation/python/relval_nano.py | 8 ++++---- DPGAnalysis/MuonTools/python/muNtupleProducerBkg_cff.py | 4 ++-- DPGAnalysis/MuonTools/python/muNtupleProducer_cff.py | 4 ++-- PhysicsTools/NanoAOD/python/autoNANO.py | 5 +++++ PhysicsTools/NanoAOD/python/nano_cff.py | 5 +++++ 5 files changed, 18 insertions(+), 8 deletions(-) diff --git a/Configuration/PyReleaseValidation/python/relval_nano.py b/Configuration/PyReleaseValidation/python/relval_nano.py index ca6f69d7dea85..ef88f824e14fc 100644 --- a/Configuration/PyReleaseValidation/python/relval_nano.py +++ b/Configuration/PyReleaseValidation/python/relval_nano.py @@ -152,14 +152,14 @@ def subnext(self): steps['NANO_data13.0_prompt']=merge([{'--customise' : 'PhysicsTools/NanoAOD/nano_cff.nanoL1TrigObjCustomize', '-n' : '1000'}, steps['NANO_data13.0']]) -steps['muDPGANO_data13.0']=merge([{'-s' : 'RAW2DIGI,NANO:DPGAnalysis/MuonTools/muNtupleProducer_cff.muNtupleProducer', +steps['muDPGNANO_data13.0']=merge([{'-s' : 'RAW2DIGI,NANO:@MUDPG', '--conditions':'auto:run3_data', '-n' : '100', '--era' : 'Run3', '--datatier':'NANOAOD', '--eventcontent':'NANOAOD'}]) -steps['muDPGANOBkg_data13.0']=merge([{'-s' : 'RAW2DIGI,NANO:DPGAnalysis/MuonTools/muNtupleProducerBkg_cff.muNtupleProducerBkg', +steps['muDPGNANOBkg_data13.0']=merge([{'-s' : 'RAW2DIGI,NANO:@MUDPGBKG', '--conditions':'auto:run3_data', '-n' : '100', '--era' : 'Run3', @@ -228,8 +228,8 @@ def subnext(self): _wfn.subnext() workflows[_wfn()] = ['NANOdata130Xrun3', ['MuonEG2023MINIAOD13.0', 'NANO_data13.0', 'HRV_NANO_data']] workflows[_wfn()] = ['NANOdata130Xrun3', ['MuonEG2023MINIAOD13.0', 'NANO_data13.0_prompt', 'HRV_NANO_data']] -workflows[_wfn()] = ['muDPGNANO130Xrun3', ['ZMuSkim2023DRAWRECO13.0', 'muDPGANO_data13.0']] -workflows[_wfn()] = ['muDPGNANOBkg130Xrun3', ['ZeroBias2023DRAW13.0', 'muDPGANOBkg_data13.0']] +workflows[_wfn()] = ['muDPGNANO130Xrun3', ['ZMuSkim2023DRAWRECO13.0', 'muDPGNANO_data13.0']] +workflows[_wfn()] = ['muDPGNANOBkg130Xrun3', ['ZeroBias2023DRAW13.0', 'muDPGNANOBkg_data13.0']] _wfn.next() ################ diff --git a/DPGAnalysis/MuonTools/python/muNtupleProducerBkg_cff.py b/DPGAnalysis/MuonTools/python/muNtupleProducerBkg_cff.py index 350d5647451ff..0051bdf1e234d 100644 --- a/DPGAnalysis/MuonTools/python/muNtupleProducerBkg_cff.py +++ b/DPGAnalysis/MuonTools/python/muNtupleProducerBkg_cff.py @@ -5,11 +5,11 @@ from DPGAnalysis.MuonTools.nano_mu_global_cff import * from DPGAnalysis.MuonTools.nano_mu_digi_cff import * -muNtupleProducerBkg = cms.Sequence(lhcInfoTableProducer +muDPGNanoProducerBkg = cms.Sequence(lhcInfoTableProducer + lumiTableProducer + muDigiProducersBkg) -def nanoAOD_customizeCommon(process) : +def muDPGNanoBkgCustomize(process) : if hasattr(process, "NANOAODoutput"): process.NANOAODoutput.outputCommands.append("keep nanoaodFlatTable_*Table*_*_*") diff --git a/DPGAnalysis/MuonTools/python/muNtupleProducer_cff.py b/DPGAnalysis/MuonTools/python/muNtupleProducer_cff.py index f071f35ba8612..001671e872ca3 100644 --- a/DPGAnalysis/MuonTools/python/muNtupleProducer_cff.py +++ b/DPGAnalysis/MuonTools/python/muNtupleProducer_cff.py @@ -9,7 +9,7 @@ from DPGAnalysis.MuonTools.nano_mu_l1t_cff import * from DPGAnalysis.MuonTools.nano_mu_l1t_cff import * -muNtupleProducer = cms.Sequence(lhcInfoTableProducer +muDPGNanoProducer = cms.Sequence(lhcInfoTableProducer + lumiTableProducer + muDigiProducers + muLocalRecoProducers @@ -17,7 +17,7 @@ + muL1TriggerProducers ) -def nanoAOD_customizeCommon(process) : +def muDPGNanoCustomize(process) : if hasattr(process, "dtrpcPointFlatTableProducer") and \ hasattr(process, "cscrpcPointFlatTableProducer") and \ diff --git a/PhysicsTools/NanoAOD/python/autoNANO.py b/PhysicsTools/NanoAOD/python/autoNANO.py index af925733f975d..bb0ce6b721e2b 100644 --- a/PhysicsTools/NanoAOD/python/autoNANO.py +++ b/PhysicsTools/NanoAOD/python/autoNANO.py @@ -28,6 +28,11 @@ def expandNanoMapping(seqList, mapping, key): # L1 flavours: add tables through customize, supposed to be combined with PHYS 'L1' : {'customize': 'nanoL1TrigObjCustomize'}, 'L1FULL' : {'customize': 'nanoL1TrigObjCustomizeFull'}, + # MUDPG flavours: use their own sequence + 'MUDPG' : {'sequence': 'muDPGNanoProducer', + 'customize': 'muDPGNanoCustomize'}, + 'MUDPGBKG' : {'sequence': 'muDPGNanoProducerBkg', + 'customize': 'muDPGNanoBkgCustomize'}, # PromptReco config: PHYS+L1 'Prompt' : {'sequence': '@PHYS', 'customize': '@PHYS+@L1'} diff --git a/PhysicsTools/NanoAOD/python/nano_cff.py b/PhysicsTools/NanoAOD/python/nano_cff.py index cec1cd27dac30..4c142ddc9f2bf 100644 --- a/PhysicsTools/NanoAOD/python/nano_cff.py +++ b/PhysicsTools/NanoAOD/python/nano_cff.py @@ -283,3 +283,8 @@ def nanoL1TrigObjCustomize(process): def nanoL1TrigObjCustomizeFull(process): process.nanoTableTaskCommon.add(process.l1TablesTask) return process + +### muon DPG NANO flavour sequences and customize functions +from DPGAnalysis.MuonTools.muNtupleProducer_cff import * +from DPGAnalysis.MuonTools.muNtupleProducerBkg_cff import * +