Skip to content

Commit

Permalink
Merge pull request #24184 from makortel/premixingDropRaw
Browse files Browse the repository at this point in the history
Change premixing library format from RAW to DIGI
  • Loading branch information
cmsbuild authored Sep 25, 2018
2 parents af31d55 + dfce32d commit 84f0523
Show file tree
Hide file tree
Showing 12 changed files with 85 additions and 186 deletions.
66 changes: 5 additions & 61 deletions Configuration/EventContent/python/EventContent_cff.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
# slimmed-down version of RAWSIM for small transient disk size during MC production, contains Gen+Rawdata
#
# PREMIX
# extension of GENRAW with special Digi collection(s) for pre-mixing minbias events for pileup simulation
# contains special Digi collection(s) for pre-mixing minbias events for pileup simulation
# Raw2Digi step is done on this file.
#
# PREMIXRAW
Expand Down Expand Up @@ -527,70 +527,14 @@
GENRAWEventContent.outputCommands.extend(DigiToRawFEVT.outputCommands)
GENRAWEventContent.outputCommands.extend(CommonEventContent.outputCommands)

PREMIXEventContent.outputCommands.extend(RAWEventContent.outputCommands)
PREMIXEventContent.outputCommands.extend(GeneratorInterfaceRECO.outputCommands)
PREMIXEventContent.outputCommands.extend(SimG4CoreRECO.outputCommands)
PREMIXEventContent.outputCommands.extend(SimTrackerRAW.outputCommands)
PREMIXEventContent.outputCommands.extend(SimGeneralRAW.outputCommands)
PREMIXEventContent.outputCommands.extend(RecoGenMETFEVT.outputCommands)
PREMIXEventContent.outputCommands.extend(RecoGenJetsFEVT.outputCommands)
PREMIXEventContent.outputCommands.extend(MEtoEDMConverterFEVT.outputCommands)
PREMIXEventContent.outputCommands.extend(IOMCRAW.outputCommands)
PREMIXEventContent.outputCommands.extend(DigiToRawFEVT.outputCommands)
PREMIXEventContent.outputCommands.extend(CommonEventContent.outputCommands)
PREMIXEventContent.outputCommands.append('keep RPCDetIdRPCDigiMuonDigiCollection_simMuonRPCDigis_*_*')
PREMIXEventContent.outputCommands.append('keep *_mix_MergedTrackTruth_*')
PREMIXEventContent.outputCommands.append('keep StripDigiSimLinkedmDetSetVector_simSiStripDigis_*_*')
PREMIXEventContent.outputCommands.append('keep PixelDigiSimLinkedmDetSetVector_simSiPixelDigis_*_*')
PREMIXEventContent.outputCommands.append('keep StripDigiSimLinkedmDetSetVector_simMuonCSCDigis_*_*')
PREMIXEventContent.outputCommands.append('keep RPCDigiSimLinkedmDetSetVector_*_*_*')
PREMIXEventContent.outputCommands.append('keep DTLayerIdDTDigiSimLinkMuonDigiCollection_*_*_*')
PREMIXEventContent.outputCommands.extend(SimTrackerPREMIX.outputCommands)
PREMIXEventContent.outputCommands.extend(SimCalorimetryPREMIX.outputCommands)
PREMIXEventContent.outputCommands.extend(SimMuonPREMIX.outputCommands)
PREMIXEventContent.outputCommands.extend(SimGeneralPREMIX.outputCommands)
fastSim.toModify(PREMIXEventContent, outputCommands = PREMIXEventContent.outputCommands+fastSimEC.extraPremixContent)
# Phase2 essentially extends the content to DIGI
# We could split this by subdetector-eras, but let's start with simple
from Configuration.Eras.Modifier_phase2_common_cff import phase2_common
phase2_common.toModify(PREMIXEventContent, outputCommands = PREMIXEventContent.outputCommands+[
# Tracker
'keep Phase2TrackerDigiedmDetSetVector_mix_*_*',
'keep *_*_Phase2OTDigiSimLink_*',
'keep *_simSiPixelDigis_*_*', # covers digis and digiSimLinks
# MTD
# ???
# ECAL
'keep *_simEcalDigis_ebDigis_*',
'keep ESDigiCollection_simEcalUnsuppressedDigis_*_*',
# HCAL
'keep *_simHcalDigis_*_*',
'keep ZDCDataFramesSorted_simHcalUnsuppressedDigis_*_*',
# HGCAL
'keep *_simHGCalUnsuppressedDigis_EE_*',
'keep *_simHGCalUnsuppressedDigis_HEfront_*',
'keep *_simHGCalUnsuppressedDigis_HEback_*',
# DT
'keep *_simMuonDTDigis_*_*',
# CSC
'keep *_simMuonCSCDigis_*_*',
'keep *_simMuonCscTriggerPrimitiveDigis_*_*',
# RPC
'keep *_simMuonRPCDigis_*_*',
# GEM
'keep *_simMuonGEMDigis_*_*',
'keep *_*_GEMDigiSimLink_*',
'keep *_*_GEMStripDigiSimLink_*',
# ME0
'keep *_simMuonME0Digis_*_*',
'keep *_mix_g4SimHitsMuonME0Hits_*',
'keep *_*_ME0DigiSimLink_*',
'keep *_*_ME0StripDigiSimLink_*',
# CaloParticles
'keep *_mix_MergedCaloTruth_*',
])


from Configuration.Eras.Modifier_hcalSkipPacker_cff import hcalSkipPacker
hcalSkipPacker.toModify(PREMIXEventContent.outputCommands,
func=lambda outputCommands: outputCommands.append('keep *_simHcalDigis_*_*')
)

PREMIXRAWEventContent.outputCommands.extend(RAWSIMEventContent.outputCommands)
PREMIXRAWEventContent.outputCommands.append('keep CrossingFramePlaybackInfoNew_*_*_*')
Expand Down
18 changes: 9 additions & 9 deletions Configuration/PyReleaseValidation/python/relval_steps.py
Original file line number Diff line number Diff line change
Expand Up @@ -1013,9 +1013,9 @@ def genS(fragment,howMuch):
{"cfg":"SingleNuE10_cfi",
"--fast":"",
"--conditions":"auto:run2_mc",
"-s":"GEN,SIM,RECOBEFMIX,DIGI,L1,DIGI2RAW",
"-s":"GEN,SIM,RECOBEFMIX,DIGI",
"--eventcontent":"PREMIX",
"--datatier":"GEN-SIM-DIGI-RAW",
"--datatier":"PREMIX",
"--procModifiers":"premix_stage1",
"--era":"Run2_2016",
},
Expand All @@ -1027,7 +1027,7 @@ def genS(fragment,howMuch):
{"-s" : "GEN,SIM,RECOBEFMIX,DIGI:pdigi_valid,DATAMIX,L1,DIGI2RAW,L1Reco,RECO,VALIDATION",
"--datamix" : "PreMix",
"--procModifiers": "premix_stage2",
"--pileup_input" : "dbs:/RelValFS_PREMIXUP15_PU25/%s/GEN-SIM-DIGI-RAW"%(baseDataSetRelease[8],),
"--pileup_input" : "dbs:/RelValFS_PREMIXUP15_PU25/%s/PREMIX"%(baseDataSetRelease[8],),
},
Kby(100,500),step1FastUpg2015Defaults])

Expand Down Expand Up @@ -1373,10 +1373,10 @@ def lhegensim2017(fragment,howMuch):
# PRE-MIXING : https://twiki.cern.ch/twiki/bin/view/CMSPublic/SWGuideSimulation#Pre_Mixing_Instructions
premixUp2015Defaults = {
'--evt_type' : 'SingleNuE10_cfi',
'-s' : 'GEN,SIM,DIGI:pdigi_valid,L1,DIGI2RAW',
'-s' : 'GEN,SIM,DIGI:pdigi_valid',
'-n' : '10',
'--conditions' : 'auto:run2_mc', # 25ns GT; dedicated dict for 50ns
'--datatier' : 'GEN-SIM-DIGI-RAW',
'--datatier' : 'PREMIX',
'--eventcontent': 'PREMIX',
'--procModifiers':'premix_stage1',
'--era' : 'Run2_2016' # temporary replacement for premix; to be brought back to customisePostLS1 *EDIT - This comment possibly no longer relevant with switch to eras
Expand All @@ -1401,7 +1401,7 @@ def lhegensim2017(fragment,howMuch):
digiPremixUp2015Defaults25ns = {
'--conditions' : 'auto:run2_mc',
'-s' : 'DIGI:pdigi_valid,DATAMIX,L1,DIGI2RAW,HLT:@relval2016',
'--pileup_input' : 'das:/RelValPREMIXUP15_PU25/%s/GEN-SIM-DIGI-RAW'%baseDataSetRelease[5],
'--pileup_input' : 'das:/RelValPREMIXUP15_PU25/%s/PREMIX'%baseDataSetRelease[5],
'--eventcontent' : 'FEVTDEBUGHLT',
'--datatier' : 'GEN-SIM-DIGI-RAW-HLTDEBUG',
'--datamix' : 'PreMix',
Expand All @@ -1422,14 +1422,14 @@ def lhegensim2017(fragment,howMuch):
digiPremixUp2015Defaults25ns])
digiPremixUp2015Defaults50ns=merge([{'-s':'DIGI:pdigi_valid,DATAMIX,L1,DIGI2RAW,HLT:@relval50ns'},
{'--conditions':'auto:run2_mc_50ns'},
{'--pileup_input' : 'das:/RelValPREMIXUP15_PU50/%s/GEN-SIM-DIGI-RAW'%baseDataSetRelease[6]},
{'--pileup_input' : 'das:/RelValPREMIXUP15_PU50/%s/PREMIX'%baseDataSetRelease[6]},
{'--era' : 'Run2_50ns'},
digiPremixUp2015Defaults25ns])

digiPremixUp2017Defaults25ns = {
'--conditions' : 'auto:phase1_2017_realistic',
'-s' : 'DIGI:pdigi_valid,DATAMIX,L1,DIGI2RAW,HLT:@relval2017',
'--pileup_input' : 'das:/RelValPREMIXUP17_PU25/%s/GEN-SIM-DIGI-RAW'%baseDataSetRelease[14],
'--pileup_input' : 'das:/RelValPREMIXUP17_PU25/%s/PREMIX'%baseDataSetRelease[14],
'--eventcontent' : 'FEVTDEBUGHLT',
'--datatier' : 'GEN-SIM-DIGI-RAW-HLTDEBUG',
'--datamix' : 'PreMix',
Expand All @@ -1443,7 +1443,7 @@ def lhegensim2017(fragment,howMuch):
digiPremixUp2018Defaults25ns = {
'--conditions' : 'auto:phase1_2018_realistic',
'-s' : 'DIGI:pdigi_valid,DATAMIX,L1,DIGI2RAW,HLT:@relval2018',
'--pileup_input' : 'das:/RelValPREMIXUP18_PU25/%s/GEN-SIM-DIGI-RAW'%baseDataSetRelease[15],
'--pileup_input' : 'das:/RelValPREMIXUP18_PU25/%s/PREMIX'%baseDataSetRelease[15],
'--eventcontent' : 'FEVTDEBUGHLT',
'--datatier' : 'GEN-SIM-DIGI-RAW-HLTDEBUG',
'--datamix' : 'PreMix',
Expand Down
5 changes: 0 additions & 5 deletions Configuration/StandardSequences/python/DigiToRaw_cff.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,14 @@
from EventFilter.RawDataCollector.rawDataCollector_cfi import *
from L1Trigger.Configuration.L1TDigiToRaw_cff import *

from Configuration.ProcessModifiers.premix_stage1_cff import premix_stage1

#DigiToRaw = cms.Sequence(L1TDigiToRaw*siPixelRawData*SiStripDigiToRaw*ecalPacker*esDigiToRaw*hcalRawData*cscpacker*dtpacker*rpcpacker*rawDataCollector)
DigiToRaw = cms.Sequence(L1TDigiToRaw*siPixelRawData*SiStripDigiToRaw*ecalPacker*esDigiToRaw*hcalRawData*cscpacker*dtpacker*rpcpacker*castorRawData*rawDataCollector)
# no L1 DigiToRaw in first PreMixing step
premix_stage1.toReplaceWith(DigiToRaw, DigiToRaw.copyAndExclude([L1TDigiToRaw]))

ecalPacker.Label = 'simEcalDigis'
ecalPacker.InstanceEB = 'ebDigis'
ecalPacker.InstanceEE = 'eeDigis'
ecalPacker.labelEBSRFlags = "simEcalDigis:ebSrFlags"
ecalPacker.labelEESRFlags = "simEcalDigis:eeSrFlags"
premix_stage1.toModify(hcalRawDatauHTR, premix = True)

from Configuration.Eras.Modifier_run3_common_cff import run3_common
run3_common.toReplaceWith(DigiToRaw, DigiToRaw.copyAndExclude([castorRawData]))
Expand Down
5 changes: 0 additions & 5 deletions EventFilter/ESDigiToRaw/python/esDigiToRaw_cfi.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,3 @@
Label = cms.string('simEcalPreshowerDigis'),
LookupTable = cms.untracked.FileInPath('EventFilter/ESDigiToRaw/data/ES_lookup_table.dat')
)

# bypass zero suppression
from Configuration.ProcessModifiers.premix_stage1_cff import premix_stage1
premix_stage1.toModify(esDigiToRaw, Label = 'mix')

3 changes: 0 additions & 3 deletions EventFilter/SiStripRawToDigi/python/SiStripDigiToRaw_cfi.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,3 @@
CopyBufferHeader = cms.bool(False),
RawDataTag = cms.InputTag('rawDataCollector')
)

from Configuration.ProcessModifiers.premix_stage1_cff import premix_stage1
premix_stage1.toModify(SiStripDigiToRaw, FedReadoutMode = 'PREMIX_RAW', PacketCode="")
4 changes: 0 additions & 4 deletions L1Trigger/Configuration/python/L1TDigiToRaw_cff.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,6 @@
stage2L1Trigger.toModify( rawDataCollector.RawCollectionList, func = lambda list: list.append(cms.InputTag("gmtStage2Raw")) )
stage2L1Trigger.toModify( rawDataCollector.RawCollectionList, func = lambda list: list.append(cms.InputTag("gtStage2Raw")) )

# no L1 DigiToRaw in first PreMixing step
from Configuration.ProcessModifiers.premix_stage1_cff import premix_stage1
premix_stage1.toModify(rawDataCollector, RawCollectionList = _RawCollectionListOrig)

#
# Legacy Trigger:
#
Expand Down
9 changes: 0 additions & 9 deletions L1Trigger/Configuration/python/SimL1Emulator_cff.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,3 @@
from Configuration.Eras.Modifier_phase2_hgcal_cff import phase2_hgcal
from Configuration.Eras.Modifier_phase2_hgcalV9_cff import phase2_hgcalV9
(phase2_hgcal & ~phase2_hgcalV9).toReplaceWith( SimL1Emulator , _phase2_siml1emulator )

# If PreMixing, don't run these modules during first step
# TODO: Do we actually need anything from here run in stage1?
from Configuration.ProcessModifiers.premix_stage1_cff import premix_stage1
premix_stage1.toReplaceWith(SimL1Emulator, SimL1Emulator.copyAndExclude([
SimL1TCalorimeter,
SimL1TechnicalTriggers,
SimL1TGlobal
]))
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,14 @@
SimCalorimetryAOD = cms.PSet(
outputCommands = cms.untracked.vstring()
)
SimCalorimetryPREMIX = cms.PSet(
outputCommands = cms.untracked.vstring(
'keep EBDigiCollection_simEcalDigis_*_*',
'keep EEDigiCollection_simEcalDigis_*_*',
'keep ESDigiCollection_simEcalUnsuppressedDigis_*_*',
'keep *_simHcalDigis_*_*',
)
)

#
# Add extra event content if running in Run 2
Expand All @@ -49,3 +57,7 @@
from Configuration.Eras.Modifier_phase2_common_cff import phase2_common
phase2_common.toModify( SimCalorimetryFEVTDEBUG.outputCommands, func=lambda outputCommands: outputCommands.append('keep *_simEcalUnsuppressedDigis_*_*') )
phase2_common.toModify( SimCalorimetryRAW.outputCommands, func=lambda outputCommands: outputCommands.append('keep *_simEcalUnsuppressedDigis_*_*') )
phase2_common.toModify( SimCalorimetryPREMIX.outputCommands, func=lambda outputCommands: outputCommands.append('drop ESDigiCollection_simEcalUnsuppressedDigis_*_*') )

from Configuration.Eras.Modifier_phase2_hgcal_cff import phase2_hgcal
phase2_hgcal.toModify( SimCalorimetryPREMIX.outputCommands, func=lambda outputCommands: outputCommands.append('drop EEDigiCollection_simEcalDigis_*_*') )
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,12 @@
'keep int_*_bunchSpacing_*',
'keep *_genPUProtons_*_*')
)
# Event content for premixing library
SimGeneralPREMIX = cms.PSet(
outputCommands = cms.untracked.vstring()
)

# mods for HGCAL
# mods for HGCAL; should these be moved under SimCalorimetry?
_phase2_hgc_extraCommands = cms.PSet( # using PSet in order to customize with Modifier
v = cms.vstring('keep *_simHGCalUnsuppressedDigis_EE_*', 'keep *_simHGCalUnsuppressedDigis_HEfront_*', 'keep *_simHGCalUnsuppressedDigis_HEback_*', 'keep *_mix_MergedCaloTruth_*'),
)
Expand All @@ -42,6 +46,7 @@
phase2_hgcal.toModify( SimGeneralRAW, outputCommands = SimGeneralRAW.outputCommands + _phase2_hgc_extraCommands.v )
phase2_hgcal.toModify( SimGeneralFEVTDEBUG, outputCommands = SimGeneralFEVTDEBUG.outputCommands + _phase2_hgc_extraCommands.v )
phase2_hgcal.toModify( SimGeneralRECO, outputCommands = SimGeneralRECO.outputCommands + _phase2_hgc_extraCommands.v )
phase2_hgcal.toModify( SimGeneralPREMIX, outputCommands = SimGeneralPREMIX.outputCommands + _phase2_hgc_extraCommands.v )

_phase2_timing_extraCommands = [ 'keep *_mix_FTLBarrel_*','keep *_mix_FTLEndcap_*','keep *_mix_InitialVertices_*' ]
from Configuration.Eras.Modifier_phase2_timing_cff import phase2_timing
Expand Down
Loading

0 comments on commit 84f0523

Please sign in to comment.