Skip to content
Snippets Groups Projects
Commit 9d6a0547 authored by Adam Edward Barton's avatar Adam Edward Barton
Browse files

Merge branch 'add-summary-and-edm-to-output' into 'master'

More complete trigger output in the ESD

See merge request atlas/athena!16645

Former-commit-id: 7d1819ce
parents e566de94 f52ad2eb
No related branches found
No related tags found
No related merge requests found
......@@ -4,7 +4,7 @@
from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
from TrigT2CaloEgamma.TrigT2CaloEgammaConfig import *
from TrigEDMConfig.TriggerEDMRun3 import recordable
def CaloLUMIBCIDToolCfg( flags, name='CaloLumiBCIDToolDefault' ):
acc = ComponentAccumulator()
......@@ -123,7 +123,7 @@ def l2CaloAlgCfg( flags, roisKey="EMCaloRoIs" ):
from TrigT2CaloEgamma.TrigT2CaloEgammaConf import T2CaloEgammaFastAlgo
fastCalo = T2CaloEgammaFastAlgo( 'FastEMCaloAlgo' )
fastCalo.OutputLevel = DEBUG
fastCalo.ClustersName = 'L2CaloEMClusters'
fastCalo.ClustersName = recordable('L2CaloEMClusters')
fastCalo.RoIs = roisKey
fastCalo.EtaWidth = 0.2
fastCalo.PhiWidth = 0.2
......
......@@ -4,6 +4,7 @@
from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
from AthenaCommon.Constants import DEBUG,VERBOSE
from TrigEDMConfig.TriggerEDMRun3 import recordable
def l2PhotonAlgCfg( flags ):
acc = ComponentAccumulator()
......@@ -11,7 +12,7 @@ def l2PhotonAlgCfg( flags ):
photonFex= L2PhotonFex_1()
photonFex.TrigEMClusterName = "L2CaloEMClusters"
photonFex.PhotonsName = "L2Photons"
photonFex.PhotonsName = recordable("L2Photons")
photonFex.RoIs = "L2PhotonRecoRoIs"
photonFex.OutputLevel=DEBUG
......
......@@ -39,17 +39,27 @@ TriggerHLTList = [
('xAOD::TrigCompositeContainer#L1Seeds', 'BS ESD AODFULL AODSLIM', 'Steer'),
('xAOD::TrigCompositeContainer#L1EM', 'BS ESD AODFULL AODSLIM', 'Steer'),
('xAOD::TrigCompositeContainer#L1MU', 'BS ESD AODFULL AODSLIM', 'Steer'),
('xAOD::TrigCompositeContainer#L1MET', 'BS ESD AODFULL AODSLIM', 'Steer'),
('xAOD::TrigCompositeContainer#L1J', 'BS ESD AODFULL AODSLIM', 'Steer'),
('xAOD::TrigCompositeContainer#L1Seeds', 'BS ESD AODFULL AODSLIM', 'Steer'),
('xAOD::TrigCompositeContainer#L1EM', 'BS ESD AODFULL AODSLIM', 'Steer'),
('xAOD::TrigCompositeContainer#L1MU', 'BS ESD AODFULL AODSLIM', 'Steer'),
('xAOD::TrigCompositeContainer#L1MET', 'BS ESD AODFULL AODSLIM', 'Steer'),
('xAOD::TrigCompositeContainer#L1J', 'BS ESD AODFULL AODSLIM', 'Steer'),
('xAOD::TrigEMClusterContainer#L2CaloEMClusters', 'BS ESD AODFULL', 'Egamma', 'inViews:FastCaloEMRecoViews'), # last arg specifies in which view container the fragments are
('xAOD::TrigEMClusterAuxContainer#L2CaloEMClustersAux.', 'BS ESD AODFULL', 'Egamma'),
('xAOD::TrigPhotonContainer#L2Photons', 'BS ESD AODFULL', 'Egamma', 'inViews:L2PhotonRecoViews'),
('xAOD::TrigPhotonAuxContainer#L2PhotonsAux.', 'BS ESD AODFULL', 'Egamma'),
('EventInfo#ByteStreamEventInfo', 'ESD', 'Misc'),
('ROIB::RoIBResult#*', 'ESD', 'Misc'),
]
EDMDetails = {}
EDMDetails[ "TrigRoiDescriptor" ] = {'persistent':"TrigRoiDescriptorCollection_p3", 'typealias':'Roi', 'collection':'TrigRoiDescriptorCollection' }
EDMDetails[ "TrigRoiDescriptorCollection" ] = {'persistent':"TrigRoiDescriptorCollection_p3", 'typealias':'Roi', 'collection':'TrigRoiDescriptorCollection' }
......
......@@ -106,6 +106,7 @@ def triggerSummaryCfg(flags, hypos):
__log.info("Final decision of chain " + c + " will be red from " + cont )
decisionSummaryAlg.FinalDecisionKeys = list(set(allChains.values()))
decisionSummaryAlg.FinalStepDecisions = allChains
decisionSummaryAlg.DecisionsSummaryKey ="HLTSummary"
return acc, decisionSummaryAlg
......@@ -118,6 +119,7 @@ def triggerMonitoringCfg(flags, hypos, l1Decoder):
from TrigSteerMonitor.TrigSteerMonitorConf import TrigSignatureMoniMT, DecisionCollectorTool
mon = TrigSignatureMoniMT()
mon.L1Decisions="HLTChains"
mon.FinalDecisionKey="HLTSummary"
if len(hypos) == 0:
__log.warning("Menu is not configured")
return acc, mon
......@@ -144,34 +146,57 @@ def triggerMonitoringCfg(flags, hypos, l1Decoder):
def triggerOutputStreamCfg( flags, decObj, outputType ):
"""
Configure output stream according to the menu setup (decision objects)
and TrigEDMCOnfig (this is still on TODO)
and TrigEDMCOnfig
"""
from OutputStreamAthenaPool.OutputStreamConfig import OutputStreamCfg
itemsToRecord = []
# decision objects and their Aux stores
[ itemsToRecord.extend( [ "xAOD::TrigCompositeContainer#%s"%d, "xAOD::TrigCompositeAuxContainer#%sAux."%d] ) for d in decObj ]
def __TCKeys( name ):
return [ "xAOD::TrigCompositeContainer#%s" % name, "xAOD::TrigCompositeAuxContainer#%sAux." % name]
[ itemsToRecord.extend( __TCKeys(d) ) for d in decObj ]
# the rest of triger EDM
itemsToRecord.extend( __TCKeys( "HLTSummary" ) )
from TrigEDMConfig.TriggerEDMRun3 import TriggerHLTList
EDMCollectionsToRecord=filter( lambda x: outputType in x[1] and "TrigCompositeContainer" not in x[0], TriggerHLTList )
itemsToRecord.extend( [ el[0] for el in EDMCollectionsToRecord ] )
# summary objects
__log.debug( outputType + " trigger content "+str( itemsToRecord ) )
acc = OutputStreamCfg( flags, outputType, ItemList=itemsToRecord )
streamAlg = acc.getEventAlgo("OutputStream"+outputType)
streamAlg.ExtraInputs = [("xAOD::TrigCompositeContainer", "HLTFinalDecisions")]
streamAlg.ExtraInputs = [("xAOD::TrigCompositeContainer", "HLTSummary")]
return acc
def triggerAddMissingEDMCfg( flags, decObj ):
from DecisionHandling.DecisionHandlingConf import TriggerSummaryAlg
EDMFillerAlg = TriggerSummaryAlg( "EDMFillerAlg" )
EDMFillerAlg.InputDecision = "HLTChains"
EDMFillerAlg.InputDecision = "HLTChains"
EDMFillerAlg.HLTSummary = "HLTSummaryOutput" # we do not care about this object, configure in order not to clash
from TrigOutputHandling.TrigOutputHandlingConf import HLTEDMCreator
DecisionObjectsFiller = HLTEDMCreator("DecisionObjectsFiller")
DecisionObjectsFiller.TrigCompositeContainer = list(decObj)
EDMFillerAlg.OutputTools += [ DecisionObjectsFiller ]
# TODO add configuration for the rest of the EDM
from TrigEDMConfig.TriggerEDMRun3 import TriggerHLTList
collectionsThatNeedMerging = filter( lambda x: len(x) >= 4 and x[3].startswith("inViews:"), TriggerHLTList )
for c in collectionsThatNeedMerging:
tool = HLTEDMCreator(c[0].split("#")[1]+"merger")
ctype, cname = c[0].split("#")
ctype = ctype.split(":")[-1]
viewsColl = c[3].split(":")[-1]
setattr(tool, ctype+"Views", [ viewsColl ] )
setattr(tool, ctype+"InViews", [ cname ] )
setattr(tool, ctype, [ cname ] )
EDMFillerAlg.OutputTools += [ tool ]
#egammaViewsMerger.TrigEMClusterContainerViews = [ "EMCaloViews" ]
#egammaViewsMerger.TrigEMClusterContainerInViews = [ clustersKey ]
#egammaViewsMerger.TrigEMClusterContainer = [ clustersKey ]
EDMFillerAlg.OutputTools += [ DecisionObjectsFiller ]
return EDMFillerAlg
......
......@@ -18,7 +18,7 @@ def generateChains( flags, chainDict ):
l2CaloHypo = RecoFragmentsPool.retrieve(l2CaloHypoCfg,
flags,
name = 'L2ElectronCaloHypo',
CaloClusters ='L2CaloEMClusters')
CaloClusters = 'L2CaloEMClusters' )
l2CaloReco = RecoFragmentsPool.retrieve(l2CaloRecoCfg, flags)
acc.merge(l2CaloReco)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment