ATLAS Offline Software
Loading...
Searching...
No Matches
FastElectronMenuSequences.py
Go to the documentation of this file.
2# Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3#
4
5from TriggerMenuMT.HLT.Egamma.TrigEgammaKeys import getTrigEgammaKeys
6
7# menu components
8from TriggerMenuMT.HLT.Config.MenuComponents import MenuSequence, SelectionCA, InViewRecoCA
9from AthenaConfiguration.ComponentFactory import CompFactory
10from AthenaConfiguration.AccumulatorCache import AccumulatorCache
11
12@AccumulatorCache
13def fastElectronSequenceGenCfg(flags, name='FastElectron', variant='', is_probe_leg = False):
14 """ second step: tracking....."""
15
16 InViewRoIs = "EMFastElectronRoIs"+variant
17
18 roiTool = CompFactory.ViewCreatorPreviousROITool()
19 reco = InViewRecoCA("EMElectron"+variant, RoITool = roiTool, InViewRoIs = InViewRoIs, RequireParentView = True, isProbe=is_probe_leg)
20
21 # Configure the reconstruction algorithm sequence
22 from TriggerMenuMT.HLT.Electron.FastElectronRecoSequences import fastElectronRecoSequence
23
24 from TrigGenericAlgs.TrigGenericAlgsConfig import ROBPrefetchingAlgCfg_Si
25
26 robPrefetchAlg = ROBPrefetchingAlgCfg_Si(flags, nameSuffix='IM_'+reco.name)
27
28 reco.mergeReco(fastElectronRecoSequence(flags, name, InViewRoIs, variant))
29
30 theFastElectronHypo = CompFactory.TrigEgammaFastElectronHypoAlg("TrigEgammaFastElectronHypoAlg"+variant)
31 TrigEgammaKeys = getTrigEgammaKeys(flags, variant)
32 theFastElectronHypo.Electrons = TrigEgammaKeys.fastElectronContainer
33 theFastElectronHypo.RunInView = True
34 from TrigEgammaHypo.TrigEgammaFastElectronHypoTool import TrigEgammaFastElectronHypoToolFromDict
35
36 selAcc = SelectionCA('FastElectronMenuSequence'+variant,isProbe=is_probe_leg)
37 selAcc.mergeReco(reco, robPrefetchCA=robPrefetchAlg)
38 selAcc.addHypoAlgo(theFastElectronHypo)
39
40 return MenuSequence(flags,selAcc,HypoToolGen=TrigEgammaFastElectronHypoToolFromDict)
41
42
43def fastElectron_LRTSequenceGenCfg(flags, name='FastElectron', is_probe_leg=False):
44 # This is to call fastElectronMenuSequence for the _LRT variant
45 return fastElectronSequenceGenCfg(flags, name, is_probe_leg=is_probe_leg, variant='_LRT')
fastElectron_LRTSequenceGenCfg(flags, name='FastElectron', is_probe_leg=False)
fastElectronSequenceGenCfg(flags, name='FastElectron', variant='', is_probe_leg=False)