Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[14_0_X] Rename MUODPG nano flatTable producers #45334

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions DPGAnalysis/MuonTools/python/muNtupleProducerBkg_cff.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,13 @@
from DPGAnalysis.MuonTools.nano_mu_global_cff import *
from DPGAnalysis.MuonTools.nano_mu_digi_cff import *

muDPGNanoProducerBkg = cms.Sequence(lhcInfoTableProducer
+ lumiTableProducer
+ muDigiProducersBkg)
muDPGNanoProducerBkg = cms.Sequence(globalTables
+ muDigiTablesBkg)

def muDPGNanoBkgCustomize(process) :

for output in ["NANOEDMAODoutput", "NANOAODoutput", "NANOEDMAODSIMoutput", "NANOAODSIMoutput"]:
if hasattr(process, output):
getattr(process,output).outputCommands.append("keep nanoaodFlatTable_*Table*_*_*")
getattr(process,output).outputCommands.append("drop edmTriggerResults_*_*_*")
if hasattr(process, output) and "keep edmTriggerResults_*_*_*" in getattr(process,output).outputCommands:
getattr(process,output).outputCommands.remove("keep edmTriggerResults_*_*_*")

return process
23 changes: 10 additions & 13 deletions DPGAnalysis/MuonTools/python/muNtupleProducer_cff.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,36 +7,33 @@
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 *

muDPGNanoProducer = cms.Sequence(lhcInfoTableProducer
+ lumiTableProducer
+ muDigiProducers
+ muLocalRecoProducers
+ muRecoProducers
+ muL1TriggerProducers
muDPGNanoProducer = cms.Sequence(globalTables
+ muDigiTables
+ muLocalRecoTables
+ muRecoTables
+ muL1TriggerTables
)

def muDPGNanoCustomize(process) :

if hasattr(process, "dtrpcPointFlatTableProducer") and \
hasattr(process, "cscrpcPointFlatTableProducer") and \
if hasattr(process, "dtrpcPointFlatTable") and \
hasattr(process, "cscrpcPointFlatTable") 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"):
if hasattr(process, "muGEMMuonExtTable") or hasattr(process, "muCSCTnPFlatTable"):
process.load("TrackingTools/TransientTrack/TransientTrackBuilder_cfi")
process.load("TrackPropagation.SteppingHelixPropagator.SteppingHelixPropagatorAny_cfi")
process.load("TrackPropagation.SteppingHelixPropagator.SteppingHelixPropagatorAlong_cfi")
process.load("TrackPropagation.SteppingHelixPropagator.SteppingHelixPropagatorOpposite_cfi")

for output in ["NANOEDMAODoutput", "NANOAODoutput", "NANOEDMAODSIMoutput", "NANOAODSIMoutput"]:
if hasattr(process, output):
getattr(process,output).outputCommands.append("keep nanoaodFlatTable_*Table*_*_*")
getattr(process,output).outputCommands.append("drop edmTriggerResults_*_*_*")
if hasattr(process, output) and "keep edmTriggerResults_*_*_*" in getattr(process,output).outputCommands:
getattr(process,output).outputCommands.remove("keep edmTriggerResults_*_*_*")

return process
130 changes: 69 additions & 61 deletions DPGAnalysis/MuonTools/python/nano_mu_digi_cff.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,18 @@

from DPGAnalysis.MuonTools.dtDigiFlatTableProducer_cfi import dtDigiFlatTableProducer

dtDigiFlatTableProducer.name = "dtDigi"
dtDigiFlatTableProducer.src = "muonDTDigis"
dtDigiFlatTableProducer.doc = "DT digi information"
dtDigiFlatTable = dtDigiFlatTableProducer.clone(
name = "dtDigi",
src = "muonDTDigis",
doc = "DT digi information",

dtDigiFlatTableProducer.variables = cms.PSet(
variables = cms.PSet(
time = Var("time()", float, doc = "digi time"),
wire = Var("wire()", "int16", doc="wire - [1:X] range"
"<br />(X varies for different chambers SLs and layers)")
)
),

dtDigiFlatTableProducer.detIdVariables = cms.PSet(
detIdVariables = cms.PSet(
wheel = DetIdVar("wheel()", "int16", doc = "wheel - [-2:2] range"),
sector = DetIdVar("sector()", "int16", doc = "sector - [1:14] range"
"<br />sector 13 used for the second MB4 of sector 4"
Expand All @@ -25,21 +26,22 @@
"<br />SL 1 and 3 are phi SLs"
"<br />SL 2 is theta SL"),
layer = DetIdVar("layer()", "int16", doc = "layer - [1:4] range")
)
)


from DPGAnalysis.MuonTools.rpcDigiFlatTableProducer_cfi import rpcDigiFlatTableProducer

rpcDigiFlatTableProducer.name = "rpcDigi"
rpcDigiFlatTableProducer.src = "muonRPCDigis"
rpcDigiFlatTableProducer.doc = "RPC digi information"
rpcDigiFlatTable = rpcDigiFlatTableProducer.clone(
name = "rpcDigi",
src = "muonRPCDigis",
doc = "RPC digi information",

rpcDigiFlatTableProducer.variables = cms.PSet(
variables = cms.PSet(
strip = Var("strip()", "uint8", doc = "index of the readout strip associated to the digi"),
bx = Var("bx()", int, doc="bunch crossing associated to the digi")
)
),

rpcDigiFlatTableProducer.detIdVariables = cms.PSet(
detIdVariables = cms.PSet(
region = DetIdVar("region()", "int16", doc = "0: barrel, +/-1: endcap"),
ring = DetIdVar("ring()", "int16", doc = "ring id:"
"<br />wheel number in barrel - [-2:+2] range"
Expand All @@ -54,20 +56,22 @@
roll = DetIdVar("roll()", "int16", doc = "roll id (also known as eta partition):"
"<br />each chamber is divided along the strip direction"),
rawId = DetIdVar("rawId()", "uint", doc = "unique detector unit ID")
)
)

from DPGAnalysis.MuonTools.gemDigiFlatTableProducer_cfi import gemDigiFlatTableProducer

gemDigiFlatTableProducer.name = "gemDigi"
gemDigiFlatTableProducer.src = "muonGEMDigis"
gemDigiFlatTableProducer.doc = "GEM digi information"
gemDigiFlatTable = gemDigiFlatTableProducer.clone(
name = "gemDigi",
src = "muonGEMDigis",
doc = "GEM digi information",

gemDigiFlatTableProducer.variables = cms.PSet(
variables = cms.PSet(
strip = Var("strip()", "int16", doc = "index of the readout strip associated to the digi"),
bx = Var("bx()", "int16", doc="bunch crossing associated to the digi")
)
),

gemDigiFlatTableProducer.detIdVariables = cms.PSet(
detIdVariables = cms.PSet(
station = DetIdVar("station()", "int16", doc = "GEM station <br />(always 1 for GE1/1)"),
region = DetIdVar("region()", "int16", doc = "GE11 region where the digi is detected"
"<br />(int, positive endcap: +1, negative endcap: -1)"),
Expand All @@ -77,84 +81,88 @@
"<br />(chambers numbered from 0 to 35)"),
layer = DetIdVar("layer()", "int16", doc = "GE11 layer where the hit is reconstructed"
"<br />(layer1: 1, layer2: 2)")
)
)



from DPGAnalysis.MuonTools.gemohStatusFlatTableProducer_cfi import gemohStatusFlatTableProducer

gemohStatusFlatTableProducer.name = "gemOHStatus"
gemohStatusFlatTableProducer.src = "muonGEMDigis:OHStatus:"
gemohStatusFlatTableProducer.doc = "GEM OH status information"


gemohStatusFlatTableProducer.variables = cms.PSet(
chamberType = Var("chamberType()", "int", doc = "two digits number that specifies the module within a chamber<br /> 11,12 for GE1/1 chambers layer 1,2<br /> 21,22,23,24 for GE2/1 chambers module 1,2,3,4"),
vfatMask = Var("vfatMask()", "uint", doc = "24 bit word that specifies the VFAT Mask<br /> nth bit == 0 means that the VFAT_n was masked from the DAQ in the event"),
zsMask = Var("zsMask()", "uint", doc = "24 bit word that specifies the Zero Suppression<br /> nth bit == 1 means that the VFAT_n was zero suppressed"),
missingVFATs = Var("missingVFATs()", "uint", doc = "24 bit word that specifies the missing VFAT mask<br /> nth bit == 1 means that the VFAT_n was expected in the payload but not found"),
errors = Var("errors()", "uint16", doc = "code for GEM OH errors<br /> non-zero values indicate errors"),
warnings = Var("warnings()", "uint16", doc = "code for GEM OH warnings<br /> non-zero values indicate warnings")
)

gemohStatusFlatTableProducer.detIdVariables = cms.PSet(
gemohStatusFlatTable = gemohStatusFlatTableProducer.clone(
name = "gemOHStatus",
src = "muonGEMDigis:OHStatus:",
doc = "GEM OH status information",

variables = cms.PSet(
chamberType = Var("chamberType()", "int", doc = "two digits number that specifies the module within a chamber<br /> 11,12 for GE1/1 chambers layer 1,2<br /> 21,22,23,24 for GE2/1 chambers module 1,2,3,4"),
vfatMask = Var("vfatMask()", "uint", doc = "24 bit word that specifies the VFAT Mask<br /> nth bit == 0 means that the VFAT_n was masked from the DAQ in the event"),
zsMask = Var("zsMask()", "uint", doc = "24 bit word that specifies the Zero Suppression<br /> nth bit == 1 means that the VFAT_n was zero suppressed"),
missingVFATs = Var("missingVFATs()", "uint", doc = "24 bit word that specifies the missing VFAT mask<br /> nth bit == 1 means that the VFAT_n was expected in the payload but not found"),
errors = Var("errors()", "uint16", doc = "code for GEM OH errors<br /> non-zero values indicate errors"),
warnings = Var("warnings()", "uint16", doc = "code for GEM OH warnings<br /> non-zero values indicate warnings")
),

detIdVariables = cms.PSet(
station = DetIdVar("station()", "int16", doc = "GEM station <br />always 1 for GE1/1)"),
region = DetIdVar("region()", "int16", doc = "region with which the GEMOHStatus is associated"
"<br />int, positive endcap: +1, negative endcap: -1"),
chamber = DetIdVar("chamber()", "int16", doc = "chamber with which the GEMOHStatus is associated"),
layer = DetIdVar("layer()", "int16", doc = "layer with which the GEMOHStatus is associated<br /> either 1 or 2 for GE1/1 and GE2/1")
)
)


from DPGAnalysis.MuonTools.cscWireDigiFlatTableProducer_cfi import cscWireDigiFlatTableProducer

cscWireDigiFlatTableProducer.name = "cscWireDigi"
cscWireDigiFlatTableProducer.src = "muonCSCDigis:MuonCSCWireDigi"
cscWireDigiFlatTableProducer.doc = "CSC wire digi information"
cscWireDigiFlatTable = cscWireDigiFlatTableProducer.clone(
name = "cscWireDigi",
src = "muonCSCDigis:MuonCSCWireDigi",
doc = "CSC wire digi information",

cscWireDigiFlatTableProducer.variables = cms.PSet(
variables = cms.PSet(
timeBin = Var("getTimeBin()", "int16", doc = ""),
wireGroup = Var("getWireGroup()", "int16", doc=""),
wireGroupBX = Var("getWireGroupBX()", "int16", doc="")
)
),

cscWireDigiFlatTableProducer.detIdVariables = cms.PSet(
detIdVariables = cms.PSet(
endcap = DetIdVar("endcap()", "int16", doc = ""),
station = DetIdVar("station()", "int16", doc = ""),
ring = DetIdVar("ring()", "int16", doc = ""),
chamber = DetIdVar("chamber()", "int16", doc = ""),
layer = DetIdVar("layer()", "int16", doc = "")
)
)

from DPGAnalysis.MuonTools.cscAlctDigiFlatTableProducer_cfi import cscAlctDigiFlatTableProducer

cscAlctDigiFlatTableProducer.name = "cscALCTDigi"
cscAlctDigiFlatTableProducer.src = "muonCSCDigis:MuonCSCALCTDigi:"
cscAlctDigiFlatTableProducer.doc = "CSC ALCT digi information"
cscAlctDigiFlatTable = cscAlctDigiFlatTableProducer.clone(
name = "cscALCTDigi",
src = "muonCSCDigis:MuonCSCALCTDigi:",
doc = "CSC ALCT digi information",

cscAlctDigiFlatTableProducer.variables = cms.PSet(
variables = cms.PSet(
keyWireGroup = Var("getKeyWG()", "int16", doc = ""),
bx = Var("getBX()", "int16", doc="")
)
),

cscAlctDigiFlatTableProducer.detIdVariables = cms.PSet(
detIdVariables = cms.PSet(
endcap = DetIdVar("endcap()", "int16", doc = ""),
station = DetIdVar("station()", "int16", doc = ""),
ring = DetIdVar("ring()", "int16", doc = ""),
chamber = DetIdVar("chamber()", "int16", doc = ""),
layer = DetIdVar("layer()", "int16", doc = "")
)
)

muDigiProducers = cms.Sequence(dtDigiFlatTableProducer
+ rpcDigiFlatTableProducer
+ gemDigiFlatTableProducer
+ gemohStatusFlatTableProducer
)

muDigiProducersBkg = cms.Sequence(dtDigiFlatTableProducer
+ rpcDigiFlatTableProducer
+ cscAlctDigiFlatTableProducer
+ cscWireDigiFlatTableProducer
+ gemDigiFlatTableProducer
+ gemohStatusFlatTableProducer
)
muDigiTables = cms.Sequence(dtDigiFlatTable
+ rpcDigiFlatTable
+ gemDigiFlatTable
+ gemohStatusFlatTable
)

muDigiTablesBkg = cms.Sequence(dtDigiFlatTable
+ rpcDigiFlatTable
+ cscAlctDigiFlatTable
+ cscWireDigiFlatTable
+ gemDigiFlatTable
+ gemohStatusFlatTable
)
5 changes: 3 additions & 2 deletions DPGAnalysis/MuonTools/python/nano_mu_global_cff.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import FWCore.ParameterSet.Config as cms

from PhysicsTools.NanoAOD.common_cff import *
from PhysicsTools.NanoAOD.nano_cff import lhcInfoTable

lumiTableProducer = cms.EDProducer("SimpleOnlineLuminosityFlatTableProducer",
lumiTable = cms.EDProducer("SimpleOnlineLuminosityFlatTableProducer",
src = cms.InputTag("onlineMetaDataDigis"),
name = cms.string("lumi"),
doc = cms.string("Online luminosity information"),
Expand All @@ -12,4 +13,4 @@
)
)

lhcInfoTableProducer = cms.EDProducer("LHCInfoProducer")
globalTables = cms.Sequence(lumiTable + lhcInfoTable)
22 changes: 11 additions & 11 deletions DPGAnalysis/MuonTools/python/nano_mu_l1t_cff.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@

from DPGAnalysis.MuonTools.muDTTPGPhiFlatTableProducer_cfi import muDTTPGPhiFlatTableProducer

muBmtfInFlatTableProducer = muDTTPGPhiFlatTableProducer.clone()
muTwinMuxInFlatTableProducer = muDTTPGPhiFlatTableProducer.clone(tag = 'TM_IN', name = 'ltTwinMuxIn', src = cms.InputTag('twinMuxStage2Digis','PhIn'))
muTwinMuxOutFlatTableProducer = muDTTPGPhiFlatTableProducer.clone(tag = 'TM_OUT', name = 'ltTwinMuxOut', src = cms.InputTag('twinMuxStage2Digis','PhOut'))
muBmtfInFlatTable = muDTTPGPhiFlatTableProducer.clone()
muTwinMuxInFlatTable = muDTTPGPhiFlatTableProducer.clone(tag = 'TM_IN', name = 'ltTwinMuxIn', src = cms.InputTag('twinMuxStage2Digis','PhIn'))
muTwinMuxOutFlatTable = muDTTPGPhiFlatTableProducer.clone(tag = 'TM_OUT', name = 'ltTwinMuxOut', src = cms.InputTag('twinMuxStage2Digis','PhOut'))

from DPGAnalysis.MuonTools.muDTTPGThetaFlatTableProducer_cfi import muDTTPGThetaFlatTableProducer

muBmtfInThFlatTableProducer = muDTTPGThetaFlatTableProducer.clone()
muTwinMuxInThFlatTableProducer = muDTTPGThetaFlatTableProducer.clone(tag = 'TM_IN', name = 'ltTwinMuxInTh', src = cms.InputTag('twinMuxStage2Digis','ThIn'))
muBmtfInThFlatTable = muDTTPGThetaFlatTableProducer.clone()
muTwinMuxInThFlatTable = muDTTPGThetaFlatTableProducer.clone(tag = 'TM_IN', name = 'ltTwinMuxInTh', src = cms.InputTag('twinMuxStage2Digis','ThIn'))

muL1TriggerProducers = cms.Sequence(muTwinMuxInFlatTableProducer
+ muTwinMuxOutFlatTableProducer
+ muBmtfInFlatTableProducer
+ muTwinMuxInThFlatTableProducer
+ muBmtfInThFlatTableProducer
)
muL1TriggerTables = cms.Sequence(muTwinMuxInFlatTable
+ muTwinMuxOutFlatTable
+ muBmtfInFlatTable
+ muTwinMuxInThFlatTable
+ muBmtfInThFlatTable
)
Loading