Skip to content
Snippets Groups Projects
Commit 27fec438 authored by Walter Lampl's avatar Walter Lampl
Browse files

Merge branch 'refactor_from_nightly_master_2021-08-05T2101' into 'master'

Refactored -generatePhoton.py-

See merge request atlas/athena!45665
parents 84c56588 c4047135
No related branches found
No related tags found
No related merge requests found
...@@ -7,13 +7,14 @@ from TriggerMenuMT.HLTMenuConfig.Menu.DictFromChainName import getChainMultFromD ...@@ -7,13 +7,14 @@ from TriggerMenuMT.HLTMenuConfig.Menu.DictFromChainName import getChainMultFromD
from TrigEDMConfig.TriggerEDMRun3 import recordable from TrigEDMConfig.TriggerEDMRun3 import recordable
from TrigEgammaHypo.TrigEgammaFastCaloHypoTool import TrigEgammaFastCaloHypoToolFromDict from TrigEgammaHypo.TrigEgammaFastCaloHypoTool import TrigEgammaFastCaloHypoToolFromDict
from TrigEgammaHypo.TrigEgammaFastPhotonHypoTool import TrigEgammaFastPhotonHypoToolFromDict from TrigEgammaHypo.TrigEgammaFastPhotonHypoTool import TrigEgammaFastPhotonHypoToolFromDict
from AthenaConfiguration.AccumulatorCache import AccumulatorCache
import pprint import pprint
from AthenaCommon.Logging import logging from AthenaCommon.Logging import logging
log = logging.getLogger(__name__) log = logging.getLogger(__name__)
# TODO reuse electron calo setup (these two could share all algorithms) @AccumulatorCache
def _fastCalo(flags, chainDict): def _fastCaloSeq(flags):
selAcc=SelectionCA('FastCaloPhoton') selAcc=SelectionCA('FastCaloPhoton')
selAcc.mergeReco(l2CaloRecoCfg(flags)) selAcc.mergeReco(l2CaloRecoCfg(flags))
...@@ -30,10 +31,17 @@ def _fastCalo(flags, chainDict): ...@@ -30,10 +31,17 @@ def _fastCalo(flags, chainDict):
fastCaloSequence = MenuSequenceCA(selAcc, fastCaloSequence = MenuSequenceCA(selAcc,
HypoToolGen=TrigEgammaFastCaloHypoToolFromDict) HypoToolGen=TrigEgammaFastCaloHypoToolFromDict)
return ChainStep(name=selAcc.name, Sequences=[fastCaloSequence], chainDicts=[chainDict], multiplicity=getChainMultFromDict(chainDict)) return (selAcc , fastCaloSequence)
# TODO reuse electron calo setup (these two could share all algorithms)
def _fastCalo(flags, chainDict):
selAcc , fastCaloSequence = _fastCaloSeq(flags)
return ChainStep(name=selAcc.name, Sequences=[fastCaloSequence], chainDicts=[chainDict], multiplicity=getChainMultFromDict(chainDict))
def _fastPhoton(flags, chainDict): @AccumulatorCache
def _fastPhotonSeq(flags):
selAcc=SelectionCA('FastPhoton') selAcc=SelectionCA('FastPhoton')
selAcc.mergeReco(l2PhotonRecoCfg(flags)) selAcc.mergeReco(l2PhotonRecoCfg(flags))
...@@ -45,6 +53,12 @@ def _fastPhoton(flags, chainDict): ...@@ -45,6 +53,12 @@ def _fastPhoton(flags, chainDict):
l2PhotonSequence = MenuSequenceCA(selAcc, l2PhotonSequence = MenuSequenceCA(selAcc,
HypoToolGen = TrigEgammaFastPhotonHypoToolFromDict) HypoToolGen = TrigEgammaFastPhotonHypoToolFromDict)
return (selAcc , l2PhotonSequence)
def _fastPhoton(flags, chainDict):
selAcc , l2PhotonSequence = _fastPhotonSeq(flags)
return ChainStep(selAcc.name, Sequences=[l2PhotonSequence], chainDicts=[chainDict], multiplicity=getChainMultFromDict(chainDict) ) return ChainStep(selAcc.name, Sequences=[l2PhotonSequence], chainDicts=[chainDict], multiplicity=getChainMultFromDict(chainDict) )
......
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