ATLAS Offline Software
Loading...
Searching...
No Matches
PrecisionElectronMenuSequences.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.AccumulatorCache import AccumulatorCache
10from AthenaConfiguration.ComponentFactory import CompFactory
11
12def tag(ion):
13 return 'precision' + ('HI' if ion is True else '') + 'Electron'
14
15@AccumulatorCache
16def precisionElectronSequenceGenCfg(flags, ion=False, variant='',is_probe_leg = False):
17 """ seventh step: precision electron....."""
18
19 inViewRoIs = "precisionElectron"
20 probeInfo = '_probe' if is_probe_leg else ''
21 roiTool = CompFactory.ViewCreatorPreviousROITool()
22 reco = InViewRecoCA(tag(ion)+variant, RoITool = roiTool, InViewRoIs = inViewRoIs, RequireParentView = True, isProbe=is_probe_leg)
23
24 # Configure the reconstruction algorithm sequence
25 from TriggerMenuMT.HLT.Electron.PrecisionElectronRecoSequences import precisionElectronRecoSequence
26 reco.mergeReco(precisionElectronRecoSequence(flags, inViewRoIs, ion, doGSF=False, doLRT = 'LRT' in variant))
27 TrigEgammaKeys = getTrigEgammaKeys(flags, variant, ion=ion)
28 selAcc = SelectionCA('PrecisionElectronMenuSequence'+variant,isProbe=is_probe_leg)
29
30 from TrigEgammaHypo.TrigEgammaPrecisionElectronHypoTool import TrigEgammaPrecisionElectronHypoToolFromDict, TrigEgammaPrecisionElectronHypoAlgCfg
31
32 selAcc.mergeReco(reco)
33 selAcc.mergeHypo(TrigEgammaPrecisionElectronHypoAlgCfg(flags, "TrigEgamma"+tag(ion)+"HypoAlg_noGSF"+variant+probeInfo, TrigEgammaKeys.precisionElectronContainer ))
34 return MenuSequence(flags,selAcc,HypoToolGen=TrigEgammaPrecisionElectronHypoToolFromDict)
35
36def precisionElectron_LRTSequenceGenCfg(flags, is_probe_leg=False):
37 # This is to call precisionElectronMenuSequence for the _LRT variant
38 return precisionElectronSequenceGenCfg(flags, ion=False, variant='_LRT',is_probe_leg=is_probe_leg)
precisionElectronSequenceGenCfg(flags, ion=False, variant='', is_probe_leg=False)