ATLAS Offline Software
FastPhotonMenuSequences.py
Go to the documentation of this file.
1 # Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
2 
3 from TriggerMenuMT.HLT.Egamma.TrigEgammaKeys import getTrigEgammaKeys
4 from TriggerMenuMT.HLT.Config.MenuComponents import MenuSequenceCA, SelectionCA, InViewRecoCA
5 from AthenaConfiguration.ComponentFactory import CompFactory
6 from AthenaConfiguration.AccumulatorCache import AccumulatorCache
7 
8 
9 @AccumulatorCache
10 def fastPhotonSequenceGenCfg(flags,is_probe_leg=False):
11  """Creates secpond step photon sequence"""
12 
13  TrigEgammaKeys = getTrigEgammaKeys(flags)
14 
15  InViewRoIs = "EMIDRoIs"
16  # Spawn View on SuperRoI encompassing all clusters found within the L1 RoI
17  roiTool = CompFactory.ViewCreatorCentredOnClusterROITool()
18  roiTool.AllowMultipleClusters = False # If True: SuperROI mode. If False: highest eT cluster in the L1 ROI
19  roiTool.RoisWriteHandleKey = TrigEgammaKeys.fastPhotonRoIContainer
20  # not running the tracking here, so do not need to set this size
21  # from the ID Trigger configuration, however, if we want overlap
22  # of the Rois then we would need to use the electron instance size
23  # for consistency
24  roiTool.RoIEtaWidth = 0.05
25  roiTool.RoIPhiWidth = 0.10
26  reco = InViewRecoCA("EMPhoton",InViewRoIs=InViewRoIs, RoITool = roiTool, RequireParentView = True, isProbe=is_probe_leg)
27 
28 
29  from TriggerMenuMT.HLT.Photon.FastPhotonRecoSequences import fastPhotonRecoSequence
30  reco.mergeReco(fastPhotonRecoSequence(flags, InViewRoIs, "FastPhotonRecoSequence"))
31 
32  thePhotonHypo = CompFactory.TrigEgammaFastPhotonHypoAlg()
33  thePhotonHypo.Photons = TrigEgammaKeys.fastPhotonContainer
34  thePhotonHypo.RunInView=True
35 
36  from TrigEgammaHypo.TrigEgammaFastPhotonHypoTool import TrigEgammaFastPhotonHypoToolFromDict
37 
38  selAcc = SelectionCA('FastPhotonMenuSequence',isProbe=is_probe_leg)
39  selAcc.mergeReco(reco)
40  selAcc.addHypoAlgo(thePhotonHypo)
41 
42  return MenuSequenceCA(flags,selAcc,HypoToolGen=TrigEgammaFastPhotonHypoToolFromDict,isProbe=is_probe_leg)
FastPhotonRecoSequences.fastPhotonRecoSequence
def fastPhotonRecoSequence(flags, RoIs, name=None)
Definition: FastPhotonRecoSequences.py:23
python.HLT.Egamma.TrigEgammaKeys.getTrigEgammaKeys
def getTrigEgammaKeys(AthConfigFlags flags, name='', ion=False)
Definition: TrigEgammaKeys.py:138
FastPhotonMenuSequences.fastPhotonSequenceGenCfg
def fastPhotonSequenceGenCfg(flags, is_probe_leg=False)
Definition: FastPhotonMenuSequences.py:10