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