ATLAS Offline Software
PrecisionPhotonCaloIsoMenuSequences.py
Go to the documentation of this file.
1 # Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
2 
3 # menu components
4 from TriggerMenuMT.HLT.Config.MenuComponents import MenuSequence, SelectionCA, InViewRecoCA
5 from TriggerMenuMT.HLT.Egamma.TrigEgammaKeys import getTrigEgammaKeys
6 from AthenaConfiguration.ComponentFactory import CompFactory
7 from AthenaConfiguration.AccumulatorCache import AccumulatorCache
8 # logger
9 from AthenaCommon.Logging import logging
10 log = logging.getLogger(__name__)
11 
12 def tag(ion):
13  return 'precision' + ('HI' if ion is True else '') + 'PhotonCaloIso'
14 
15 @AccumulatorCache
16 def precisionPhotonCaloIsoSequenceGenCfg(flags, name, ion=False, is_probe_leg=False):
17  """Creates secpond step photon sequence"""
18 
19  InViewRoIs = "PrecisionPhotonCaloIsoRoIs"
20  hiInfo = 'HI' if ion is True else ''
21  TrigEgammaKeys = getTrigEgammaKeys(flags, ion=ion)
22 
23  roiTool = CompFactory.ViewCreatorPreviousROITool()
24  recoAcc = InViewRecoCA(tag(ion),InViewRoIs=InViewRoIs, RoITool = roiTool, RequireParentView = True, isProbe=is_probe_leg)
25 
26  from TriggerMenuMT.HLT.Photon.PrecisionPhotonCaloIsoRecoSequences import precisionPhotonCaloIsoRecoSequence
27  recoAcc.mergeReco(precisionPhotonCaloIsoRecoSequence(flags, InViewRoIs,'PrecisionPhotonCaloIsoRecoSequence'+hiInfo, ion))
28 
29  selAcc = SelectionCA('PrecisionPhotonCaloIsoMenuSequences'+hiInfo, isProbe=is_probe_leg)
30 
31  from TriggerMenuMT.HLT.Egamma.TrigEgammaFactoriesCfg import TrigEgammaFSEventDensitySequenceCfg
32  selAcc.mergeReco(recoAcc, upSequenceCA= TrigEgammaFSEventDensitySequenceCfg(flags))
33  from TrigEgammaHypo.TrigEgammaPrecisionPhotonCaloIsoHypoTool import createTrigEgammaPrecisionPhotonCaloIsoHypoAlg, TrigEgammaPrecisionPhotonCaloIsoHypoToolFromDict
34  sequenceOut = TrigEgammaKeys.precisionPhotonIsoContainer
35  selAcc.addHypoAlgo(createTrigEgammaPrecisionPhotonCaloIsoHypoAlg(name+tag(ion) +"Hypo", sequenceOut, TrigEgammaKeys.precisionPhotonContainer))
36  return MenuSequence(flags,selAcc,HypoToolGen=TrigEgammaPrecisionPhotonCaloIsoHypoToolFromDict)
PrecisionPhotonCaloIsoRecoSequences.precisionPhotonCaloIsoRecoSequence
def precisionPhotonCaloIsoRecoSequence(flags, RoIs, name=None, ion=False)
Definition: PrecisionPhotonCaloIsoRecoSequences.py:31
PrecisionPhotonCaloIsoMenuSequences.precisionPhotonCaloIsoSequenceGenCfg
def precisionPhotonCaloIsoSequenceGenCfg(flags, name, ion=False, is_probe_leg=False)
Definition: PrecisionPhotonCaloIsoMenuSequences.py:16
python.HLT.Egamma.TrigEgammaFactoriesCfg.TrigEgammaFSEventDensitySequenceCfg
def TrigEgammaFSEventDensitySequenceCfg(flags, name='TrigEgammaFSEventDensitySequence')
Definition: TrigEgammaFactoriesCfg.py:168
python.TrigEgammaPrecisionPhotonCaloIsoHypoTool.createTrigEgammaPrecisionPhotonCaloIsoHypoAlg
def createTrigEgammaPrecisionPhotonCaloIsoHypoAlg(name, sequenceOut, sequenceIn)
Definition: TrigEgammaPrecisionPhotonCaloIsoHypoTool.py:9
PrecisionPhotonCaloIsoMenuSequences.tag
def tag(ion)
Definition: PrecisionPhotonCaloIsoMenuSequences.py:12
python.HLT.Egamma.TrigEgammaKeys.getTrigEgammaKeys
def getTrigEgammaKeys(AthConfigFlags flags, name='', ion=False)
Definition: TrigEgammaKeys.py:138