ATLAS Offline Software
Loading...
Searching...
No Matches
Electron/PrecisionCaloMenuSequences.py
Go to the documentation of this file.
2# Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3#
4
5# menu components
6from TriggerMenuMT.HLT.Config.MenuComponents import MenuSequence, SelectionCA, InViewRecoCA
7from TriggerMenuMT.HLT.Egamma.TrigEgammaKeys import getTrigEgammaKeys
8from AthenaConfiguration.ComponentFactory import CompFactory
9from AthenaConfiguration.AccumulatorCache import AccumulatorCache
10
11def tag(ion):
12 return 'precision' + ('HI' if ion is True else '') + 'CaloElectron'
13
14@AccumulatorCache
15def precisionCaloSequenceGenCfg(flags, ion=False, is_probe_leg=False, variant=''):
16 """ Creates PrecisionCalo sequence """
17 TrigEgammaKeys = getTrigEgammaKeys(flags, variant, ion=ion)
18 hiInfo = 'HI' if ion else ''
19 # EV creator
20 InViewRoIs="PrecisionCaloRoIs"+ variant
21 roiTool = CompFactory.ViewCreatorPreviousROITool()
22 # Note: This step processes Decision Objects which have followed either Electron reco, Photon reco, or both.
23 # For Decision Object which have followed both, there is an ambiguity about which ROI should be used in this
24 # merged step. In such cases we break the ambiguity by specifying that the Electron ROI is to be used.
25 roiTool.RoISGKey = "HLT_Roi_FastElectron"
26
27 recoAcc = InViewRecoCA(tag(ion)+variant,InViewRoIs=InViewRoIs, RoITool = roiTool, RequireParentView = True, isProbe=is_probe_leg)
28 # reco sequence
29 from TriggerMenuMT.HLT.Electron.PrecisionCaloRecoSequences import precisionCaloRecoSequence
30 recoAcc.mergeReco(precisionCaloRecoSequence(flags, InViewRoIs,'ePrecisionCaloRecoSequence'+hiInfo+variant, ion=ion, variant=variant))
31
32 selAcc = SelectionCA('ePrecisionCaloMenuSequence'+hiInfo+variant, isProbe=is_probe_leg)
33 pedestalCA = None
34 if ion is True:
35 # add UE subtraction for heavy ion e/gamma triggers
36 # NOTE: UE subtraction requires an average pedestal to be calculated
37 # using the full event (FS info), and has to be done outside of the
38 # event views in this sequence. the egammaFSHIEventShapeMakerCfg is thus placed
39 # in the upSequenceCA before the recoCA.
40 from TriggerMenuMT.HLT.HeavyIon.HeavyIonMenuSequences import egammaFSHIEventShapeMakerCfg
41 pedestalCA = egammaFSHIEventShapeMakerCfg(flags)
42
43 from TrigGenericAlgs.TrigGenericAlgsConfig import ROBPrefetchingAlgCfg_Calo
44 robPrefetchAlg = ROBPrefetchingAlgCfg_Calo( flags, nameSuffix=InViewRoIs+hiInfo+'_probe'+variant if is_probe_leg else InViewRoIs+hiInfo+variant)
45
46 selAcc.mergeReco(recoAcc, robPrefetchCA=robPrefetchAlg, upSequenceCA=pedestalCA)
47
48 hypoAlg = CompFactory.TrigEgammaPrecisionCaloHypoAlg('Electron' + tag(ion) + 'Hypo' + variant)
49
50 hypoAlg.CaloClusters = TrigEgammaKeys.precisionElectronCaloClusterContainer
51
52 selAcc.addHypoAlgo(hypoAlg)
53
54 from TrigEgammaHypo.TrigEgammaPrecisionCaloHypoTool import TrigEgammaPrecisionCaloHypoToolFromDict
55
56 return MenuSequence(flags, selAcc, HypoToolGen=TrigEgammaPrecisionCaloHypoToolFromDict)
57
58
59def precisionCalo_LRTSequenceGenCfg(flags, ion=False, is_probe_leg=False):
60 return precisionCaloSequenceGenCfg(flags, ion=ion, is_probe_leg=is_probe_leg, variant='_LRT')
precisionCaloSequenceGenCfg(flags, ion=False, is_probe_leg=False, variant='')
precisionCalo_LRTSequenceGenCfg(flags, ion=False, is_probe_leg=False)