Skip to content
Snippets Groups Projects
Commit 15af983d authored by Tomasz Bold's avatar Tomasz Bold Committed by Adam Edward Barton
Browse files

More complete trigger output in the ESD

parent cde688c3
No related branches found
No related tags found
No related merge requests found
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
from TrigT2CaloEgamma.TrigT2CaloEgammaConfig import * from TrigT2CaloEgamma.TrigT2CaloEgammaConfig import *
from TrigEDMConfig.TriggerEDMRun3 import recordable
def CaloLUMIBCIDToolCfg( flags, name='CaloLumiBCIDToolDefault' ): def CaloLUMIBCIDToolCfg( flags, name='CaloLumiBCIDToolDefault' ):
acc = ComponentAccumulator() acc = ComponentAccumulator()
...@@ -123,7 +123,7 @@ def l2CaloAlgCfg( flags, roisKey="EMCaloRoIs" ): ...@@ -123,7 +123,7 @@ def l2CaloAlgCfg( flags, roisKey="EMCaloRoIs" ):
from TrigT2CaloEgamma.TrigT2CaloEgammaConf import T2CaloEgammaFastAlgo from TrigT2CaloEgamma.TrigT2CaloEgammaConf import T2CaloEgammaFastAlgo
fastCalo = T2CaloEgammaFastAlgo( 'FastEMCaloAlgo' ) fastCalo = T2CaloEgammaFastAlgo( 'FastEMCaloAlgo' )
fastCalo.OutputLevel = DEBUG fastCalo.OutputLevel = DEBUG
fastCalo.ClustersName = 'L2CaloEMClusters' fastCalo.ClustersName = recordable('L2CaloEMClusters')
fastCalo.RoIs = roisKey fastCalo.RoIs = roisKey
fastCalo.EtaWidth = 0.2 fastCalo.EtaWidth = 0.2
fastCalo.PhiWidth = 0.2 fastCalo.PhiWidth = 0.2
......
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
from AthenaCommon.Constants import DEBUG,VERBOSE from AthenaCommon.Constants import DEBUG,VERBOSE
from TrigEDMConfig.TriggerEDMRun3 import recordable
def l2PhotonAlgCfg( flags ): def l2PhotonAlgCfg( flags ):
acc = ComponentAccumulator() acc = ComponentAccumulator()
...@@ -11,7 +12,7 @@ def l2PhotonAlgCfg( flags ): ...@@ -11,7 +12,7 @@ def l2PhotonAlgCfg( flags ):
photonFex= L2PhotonFex_1() photonFex= L2PhotonFex_1()
photonFex.TrigEMClusterName = "L2CaloEMClusters" photonFex.TrigEMClusterName = "L2CaloEMClusters"
photonFex.PhotonsName = "L2Photons" photonFex.PhotonsName = recordable("L2Photons")
photonFex.RoIs = "L2PhotonRecoRoIs" photonFex.RoIs = "L2PhotonRecoRoIs"
photonFex.OutputLevel=DEBUG photonFex.OutputLevel=DEBUG
......
...@@ -39,17 +39,27 @@ TriggerHLTList = [ ...@@ -39,17 +39,27 @@ TriggerHLTList = [
('xAOD::TrigCompositeContainer#L1Seeds', 'BS ESD AODFULL AODSLIM', 'Steer'), ('xAOD::TrigCompositeContainer#L1Seeds', 'BS ESD AODFULL AODSLIM', 'Steer'),
('xAOD::TrigCompositeContainer#L1EM', 'BS ESD AODFULL AODSLIM', 'Steer'), ('xAOD::TrigCompositeContainer#L1EM', 'BS ESD AODFULL AODSLIM', 'Steer'),
('xAOD::TrigCompositeContainer#L1MU', 'BS ESD AODFULL AODSLIM', 'Steer'), ('xAOD::TrigCompositeContainer#L1MU', 'BS ESD AODFULL AODSLIM', 'Steer'),
('xAOD::TrigCompositeContainer#L1MET', 'BS ESD AODFULL AODSLIM', 'Steer'), ('xAOD::TrigCompositeContainer#L1MET', 'BS ESD AODFULL AODSLIM', 'Steer'),
('xAOD::TrigCompositeContainer#L1J', '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 = {}
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): ...@@ -106,6 +106,7 @@ def triggerSummaryCfg(flags, hypos):
__log.info("Final decision of chain " + c + " will be red from " + cont ) __log.info("Final decision of chain " + c + " will be red from " + cont )
decisionSummaryAlg.FinalDecisionKeys = list(set(allChains.values())) decisionSummaryAlg.FinalDecisionKeys = list(set(allChains.values()))
decisionSummaryAlg.FinalStepDecisions = allChains decisionSummaryAlg.FinalStepDecisions = allChains
decisionSummaryAlg.DecisionsSummaryKey ="HLTSummary"
return acc, decisionSummaryAlg return acc, decisionSummaryAlg
...@@ -118,6 +119,7 @@ def triggerMonitoringCfg(flags, hypos, l1Decoder): ...@@ -118,6 +119,7 @@ def triggerMonitoringCfg(flags, hypos, l1Decoder):
from TrigSteerMonitor.TrigSteerMonitorConf import TrigSignatureMoniMT, DecisionCollectorTool from TrigSteerMonitor.TrigSteerMonitorConf import TrigSignatureMoniMT, DecisionCollectorTool
mon = TrigSignatureMoniMT() mon = TrigSignatureMoniMT()
mon.L1Decisions="HLTChains" mon.L1Decisions="HLTChains"
mon.FinalDecisionKey="HLTSummary"
if len(hypos) == 0: if len(hypos) == 0:
__log.warning("Menu is not configured") __log.warning("Menu is not configured")
return acc, mon return acc, mon
...@@ -144,34 +146,57 @@ def triggerMonitoringCfg(flags, hypos, l1Decoder): ...@@ -144,34 +146,57 @@ def triggerMonitoringCfg(flags, hypos, l1Decoder):
def triggerOutputStreamCfg( flags, decObj, outputType ): def triggerOutputStreamCfg( flags, decObj, outputType ):
""" """
Configure output stream according to the menu setup (decision objects) Configure output stream according to the menu setup (decision objects)
and TrigEDMCOnfig (this is still on TODO) and TrigEDMCOnfig
""" """
from OutputStreamAthenaPool.OutputStreamConfig import OutputStreamCfg from OutputStreamAthenaPool.OutputStreamConfig import OutputStreamCfg
itemsToRecord = [] itemsToRecord = []
# decision objects and their Aux stores # 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 # 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 # summary objects
__log.debug( outputType + " trigger content "+str( itemsToRecord ) ) __log.debug( outputType + " trigger content "+str( itemsToRecord ) )
acc = OutputStreamCfg( flags, outputType, ItemList=itemsToRecord ) acc = OutputStreamCfg( flags, outputType, ItemList=itemsToRecord )
streamAlg = acc.getEventAlgo("OutputStream"+outputType) streamAlg = acc.getEventAlgo("OutputStream"+outputType)
streamAlg.ExtraInputs = [("xAOD::TrigCompositeContainer", "HLTFinalDecisions")] streamAlg.ExtraInputs = [("xAOD::TrigCompositeContainer", "HLTSummary")]
return acc return acc
def triggerAddMissingEDMCfg( flags, decObj ): def triggerAddMissingEDMCfg( flags, decObj ):
from DecisionHandling.DecisionHandlingConf import TriggerSummaryAlg from DecisionHandling.DecisionHandlingConf import TriggerSummaryAlg
EDMFillerAlg = TriggerSummaryAlg( "EDMFillerAlg" ) 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 from TrigOutputHandling.TrigOutputHandlingConf import HLTEDMCreator
DecisionObjectsFiller = HLTEDMCreator("DecisionObjectsFiller") DecisionObjectsFiller = HLTEDMCreator("DecisionObjectsFiller")
DecisionObjectsFiller.TrigCompositeContainer = list(decObj) 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 return EDMFillerAlg
......
...@@ -18,7 +18,7 @@ def generateChains( flags, chainDict ): ...@@ -18,7 +18,7 @@ def generateChains( flags, chainDict ):
l2CaloHypo = RecoFragmentsPool.retrieve(l2CaloHypoCfg, l2CaloHypo = RecoFragmentsPool.retrieve(l2CaloHypoCfg,
flags, flags,
name = 'L2ElectronCaloHypo', name = 'L2ElectronCaloHypo',
CaloClusters ='L2CaloEMClusters') CaloClusters = 'L2CaloEMClusters' )
l2CaloReco = RecoFragmentsPool.retrieve(l2CaloRecoCfg, flags) l2CaloReco = RecoFragmentsPool.retrieve(l2CaloRecoCfg, flags)
acc.merge(l2CaloReco) 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