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

Add HLT-Scouting collections to MINIAOD event content (follow-up of #42863) [13_3_X] #43331

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
3 changes: 2 additions & 1 deletion Configuration/EventContent/python/EventContent_cff.py
Original file line number Diff line number Diff line change
Expand Up @@ -880,6 +880,7 @@ def SwapKeepAndDrop(l):
compressionLevel=cms.untracked.int32(4)
)
MINIAODEventContent.outputCommands.extend(MicroEventContent.outputCommands)
MINIAODEventContent.outputCommands.extend(HLTriggerMINIAOD.outputCommands)

MINIAODSIMEventContent= cms.PSet(
outputCommands = cms.untracked.vstring('drop *'),
Expand All @@ -888,7 +889,7 @@ def SwapKeepAndDrop(l):
compressionLevel=cms.untracked.int32(4)
)
MINIAODSIMEventContent.outputCommands.extend(MicroEventContentMC.outputCommands)
MINIAODSIMEventContent.outputCommands.extend(HLTScouting.outputCommands)
MINIAODSIMEventContent.outputCommands.extend(HLTriggerMINIAOD.outputCommands)

MINIGENEventContent= cms.PSet(
outputCommands = cms.untracked.vstring('drop *'),
Expand Down
33 changes: 23 additions & 10 deletions HLTrigger/Configuration/python/HLTrigger_EventContent_cff.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
import FWCore.ParameterSet.Config as cms

# EventContent for HLT related products.
# EventContent for HLT-related products.

# This file exports the following EventContent blocks:
# HLTriggerRAW HLTriggerRECO HLTriggerAOD (without DEBUG products)
# HLTDebugRAW HLTDebugFEVT (with DEBUG products)
# HLTScouting (with Scouting products)
# HLTrigger(RAW|RECO|AOD|MINIAOD) [without DEBUG products]
# HLTDebug(RAW|FEVT) [with DEBUG products]
# HLTScouting [only Scouting products]
#
# as these are used in Configuration/EventContent
#
HLTriggerRAW = cms.PSet(

HLTriggerRAW = cms.PSet(
outputCommands = cms.vstring( *(
'drop *_hlt*_*_*',
'keep FEDRawDataCollection_rawDataCollector_*_*',
Expand Down Expand Up @@ -43,7 +44,7 @@
) )
)

HLTriggerAOD = cms.PSet(
HLTriggerAOD = cms.PSet(
outputCommands = cms.vstring( *(
'drop *_hlt*_*_*',
'keep GlobalObjectMapRecord_hltGtStage2ObjectMap_*_*',
Expand All @@ -59,7 +60,20 @@
) )
)

HLTDebugRAW = cms.PSet(
HLTriggerMINIAOD = cms.PSet(
outputCommands = cms.vstring( *(
'drop *_hlt*_*_*',
'keep *_hltFEDSelectorL1_*_*',
'keep *_hltScoutingEgammaPacker_*_*',
'keep *_hltScoutingMuonPacker_*_*',
'keep *_hltScoutingPFPacker_*_*',
'keep *_hltScoutingPrimaryVertexPacker_*_*',
'keep *_hltScoutingTrackPacker_*_*',
'keep edmTriggerResults_*_*_*'
) )
)

HLTDebugRAW = cms.PSet(
outputCommands = cms.vstring( *(
'drop *_hlt*_*_*',
'keep *_hltAK4CaloJetsCorrectedIDPassed_*_*',
Expand Down Expand Up @@ -224,7 +238,7 @@
) )
)

HLTDebugFEVT = cms.PSet(
HLTDebugFEVT = cms.PSet(
outputCommands = cms.vstring( *(
'drop *_hlt*_*_*',
'keep *_hltAK4CaloJetsCorrectedIDPassed_*_*',
Expand Down Expand Up @@ -389,7 +403,7 @@
) )
)

HLTScouting = cms.PSet(
HLTScouting = cms.PSet(
outputCommands = cms.vstring( *(
'keep *_hltFEDSelectorL1_*_*',
'keep *_hltScoutingEgammaPacker_*_*',
Expand All @@ -400,4 +414,3 @@
'keep edmTriggerResults_*_*_*'
) )
)

47 changes: 30 additions & 17 deletions HLTrigger/Configuration/test/getEventContent.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,8 @@ def printHLTriggerEventContentCff(process):
# the Scouting streams have the Scouting outputs
hltOutputScouting_cff.block_hltOutputScoutingPF.outputCommands,
)
hltScoutingOutputContent = buildPSetNoDrop(hltScoutingOutputBlocks)
hltScoutingOutputContent = buildPSet(hltScoutingOutputBlocks)
hltScoutingOutputContentNoDrop = buildPSetNoDrop(hltScoutingOutputBlocks)

# hltDefaultOutput
if not hasattr(hltOutputA_cff,'block_hltOutputA'):
Expand All @@ -214,61 +215,73 @@ def printHLTriggerEventContentCff(process):
outputCommands = cms.vstring()
)
HLTriggerRAW.outputCommands.extend(hltDefaultOutputWithFEDsContent.outputCommands)
HLTriggerRAW.outputCommands.extend(hltScoutingOutputContent.outputCommands)
HLTriggerRAW.outputCommands.extend(hltScoutingOutputContentNoDrop.outputCommands)

# RECO event content
HLTriggerRECO = cms.PSet(
outputCommands = cms.vstring()
)
HLTriggerRECO.outputCommands.extend(hltDefaultOutputContent.outputCommands)
HLTriggerRECO.outputCommands.extend(hltScoutingOutputContent.outputCommands)
HLTriggerRECO.outputCommands.extend(hltScoutingOutputContentNoDrop.outputCommands)

# AOD event content
HLTriggerAOD = cms.PSet(
outputCommands = cms.vstring()
)
HLTriggerAOD.outputCommands.extend(hltDefaultOutputContent.outputCommands)
HLTriggerAOD.outputCommands.extend(hltScoutingOutputContent.outputCommands)
HLTriggerAOD.outputCommands.extend(hltScoutingOutputContentNoDrop.outputCommands)
dropL1GlobalTriggerObjectMapRecord(HLTriggerAOD)

# MINIAOD event content
HLTriggerMINIAOD = cms.PSet(
outputCommands = cms.vstring()
)
HLTriggerMINIAOD.outputCommands.extend(hltScoutingOutputContent.outputCommands)

# HLTDEBUG RAW event content
HLTDebugRAW = cms.PSet(
outputCommands = cms.vstring()
)
HLTDebugRAW.outputCommands.extend(hltDebugWithAlCaOutputContent.outputCommands)
HLTDebugRAW.outputCommands.extend(hltScoutingOutputContent.outputCommands)
HLTDebugRAW.outputCommands.extend(hltScoutingOutputContentNoDrop.outputCommands)

# HLTDEBUG FEVT event content
HLTDebugFEVT = cms.PSet(
outputCommands = cms.vstring()
)
HLTDebugFEVT.outputCommands.extend(hltDebugWithAlCaOutputContent.outputCommands)
HLTDebugFEVT.outputCommands.extend(hltScoutingOutputContent.outputCommands)
HLTDebugFEVT.outputCommands.extend(hltScoutingOutputContentNoDrop.outputCommands)

# Scouting event content
HLTScouting = cms.PSet(
outputCommands = cms.vstring()
)
HLTScouting.outputCommands.extend(hltScoutingOutputContent.outputCommands)
HLTScouting.outputCommands.extend(hltScoutingOutputContentNoDrop.outputCommands)

# print the expanded event content configurations to stdout
print('''import FWCore.ParameterSet.Config as cms

# EventContent for HLT related products.
# EventContent for HLT-related products.

# This file exports the following EventContent blocks:
# HLTriggerRAW HLTriggerRECO HLTriggerAOD (without DEBUG products)
# HLTDebugRAW HLTDebugFEVT (with DEBUG products)
# HLTScouting (with Scouting products)
# HLTrigger(RAW|RECO|AOD|MINIAOD) [without DEBUG products]
# HLTDebug(RAW|FEVT) [with DEBUG products]
# HLTScouting [only Scouting products]
#
# as these are used in Configuration/EventContent
#''')
print('HLTriggerRAW = cms.PSet(\n outputCommands = cms.vstring( *(\n%s\n ) )\n)\n' % ',\n'.join( ' \'%s\'' % keep for keep in HLTriggerRAW.outputCommands))
print('HLTriggerRECO = cms.PSet(\n outputCommands = cms.vstring( *(\n%s\n ) )\n)\n' % ',\n'.join( ' \'%s\'' % keep for keep in HLTriggerRECO.outputCommands))
print('HLTriggerAOD = cms.PSet(\n outputCommands = cms.vstring( *(\n%s\n ) )\n)\n' % ',\n'.join( ' \'%s\'' % keep for keep in HLTriggerAOD.outputCommands))
print('HLTDebugRAW = cms.PSet(\n outputCommands = cms.vstring( *(\n%s\n ) )\n)\n' % ',\n'.join( ' \'%s\'' % keep for keep in HLTDebugRAW.outputCommands))
print('HLTDebugFEVT = cms.PSet(\n outputCommands = cms.vstring( *(\n%s\n ) )\n)\n' % ',\n'.join( ' \'%s\'' % keep for keep in HLTDebugFEVT.outputCommands))
print('HLTScouting = cms.PSet(\n outputCommands = cms.vstring( *(\n%s\n ) )\n)\n' % ',\n'.join( ' \'%s\'' % keep for keep in HLTScouting.outputCommands))

def psetString(name, outputCommands):
str_products = ',\n'.join(f' \'{str_cmd}\'' for str_cmd in outputCommands)
return f'\n{name} = cms.PSet(\n outputCommands = cms.vstring( *(\n{str_products}\n ) )\n)'

print(psetString('HLTriggerRAW', HLTriggerRAW.outputCommands))
print(psetString('HLTriggerRECO', HLTriggerRECO.outputCommands))
print(psetString('HLTriggerAOD', HLTriggerAOD.outputCommands))
print(psetString('HLTriggerMINIAOD', HLTriggerMINIAOD.outputCommands))
print(psetString('HLTDebugRAW', HLTDebugRAW.outputCommands))
print(psetString('HLTDebugFEVT', HLTDebugFEVT.outputCommands))
print(psetString('HLTScouting', HLTScouting.outputCommands))

###
### main
Expand Down