ATLAS Offline Software
PrecisionElectronMenuSequences.py
Go to the documentation of this file.
1 #
2 # Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 #
4 
5 from TriggerMenuMT.HLT.Egamma.TrigEgammaKeys import getTrigEgammaKeys
6 
7 # menu components
8 from TriggerMenuMT.HLT.Config.MenuComponents import MenuSequenceCA, SelectionCA, InViewRecoCA
9 from AthenaConfiguration.AccumulatorCache import AccumulatorCache
10 from AthenaConfiguration.ComponentFactory import CompFactory
11 
12 def tag(ion):
13  return 'precision' + ('HI' if ion is True else '') + 'Electron'
14 
15 @AccumulatorCache
16 def 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 MenuSequenceCA(flags,selAcc,HypoToolGen=TrigEgammaPrecisionElectronHypoToolFromDict, isProbe=is_probe_leg)
35 
36 def 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)
python.HLT.Electron.PrecisionElectronRecoSequences.precisionElectronRecoSequence
def precisionElectronRecoSequence(flags, RoIs, ion=False, doGSF=True, doLRT=False)
Definition: PrecisionElectronRecoSequences.py:12
python.HLT.Electron.PrecisionElectronMenuSequences.precisionElectronSequenceGenCfg
def precisionElectronSequenceGenCfg(flags, ion=False, variant='', is_probe_leg=False)
Definition: PrecisionElectronMenuSequences.py:16
python.HLT.Electron.PrecisionElectronMenuSequences.tag
def tag(ion)
Definition: PrecisionElectronMenuSequences.py:12
python.TrigEgammaPrecisionElectronHypoTool.TrigEgammaPrecisionElectronHypoAlgCfg
def TrigEgammaPrecisionElectronHypoAlgCfg(flags, name, inputElectronCollection)
Definition: TrigEgammaPrecisionElectronHypoTool.py:50
python.HLT.Electron.PrecisionElectronMenuSequences.precisionElectron_LRTSequenceGenCfg
def precisionElectron_LRTSequenceGenCfg(flags, is_probe_leg=False)
Definition: PrecisionElectronMenuSequences.py:36
python.HLT.Egamma.TrigEgammaKeys.getTrigEgammaKeys
def getTrigEgammaKeys(AthConfigFlags flags, name='', ion=False)
Definition: TrigEgammaKeys.py:138