ATLAS Offline Software
Loading...
Searching...
No Matches
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
4from TriggerMenuMT.HLT.Config.MenuComponents import MenuSequence, SelectionCA, InViewRecoCA
5from TriggerMenuMT.HLT.Egamma.TrigEgammaKeys import getTrigEgammaKeys
6from AthenaConfiguration.ComponentFactory import CompFactory
7from AthenaConfiguration.AccumulatorCache import AccumulatorCache
8# logger
9from AthenaCommon.Logging import logging
10log = logging.getLogger(__name__)
11
12def tag(ion):
13 return 'precision' + ('HI' if ion is True else '') + 'PhotonCaloIso'
14
15@AccumulatorCache
16def 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)
precisionPhotonCaloIsoSequenceGenCfg(flags, name, ion=False, is_probe_leg=False)