ATLAS Offline Software
Loading...
Searching...
No Matches
Electron/PrecisionCaloRecoSequences.py
Go to the documentation of this file.
2# Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3#
4
5from AthenaCommon.Logging import logging
6from TriggerMenuMT.HLT.Egamma.TrigEgammaKeys import getTrigEgammaKeys
7from TriggerMenuMT.HLT.Egamma.TrigEgammaFactoriesCfg import TrigEgammaRecCfg, TrigEgammaSuperClusterBuilderCfg
8from AthenaConfiguration.ComponentFactory import CompFactory
9from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
10
11
12log = logging.getLogger(__name__)
13
14def precisionCaloElectronVDVCfg(flags, name, InViewRoIs, ion=False, variant=''):
15 acc = ComponentAccumulator()
16 TrigEgammaKeys = getTrigEgammaKeys(flags, variant, ion=ion)
17
18 dataObjects= [( 'TrigRoiDescriptorCollection' , 'StoreGateSvc+%s'%InViewRoIs ),
19 ( 'CaloBCIDAverage' , 'StoreGateSvc+CaloBCIDAverage' ),
20 ( 'SG::AuxElement' , 'StoreGateSvc+EventInfo.averageInteractionsPerCrossing' )]
21 if ion:
22 dataObjects += [( 'xAOD::HIEventShapeContainer' , 'StoreGateSvc+' + TrigEgammaKeys.egEventShape ),
23 ( 'CaloBCIDAverage' , 'StoreGateSvc+CaloBCIDAverage' ),
24 ( 'SG::AuxElement' , 'StoreGateSvc+EventInfo.averageInteractionsPerCrossing' )]
25 if ( not flags.Input.isMC ):
26 dataObjects += [('LArDeadOTXFromSC' , 'StoreGateSvc+DeadOTXFromSC' )]
27
28 precisionCaloElectronVDV = CompFactory.AthViews.ViewDataVerifier(name)
29 precisionCaloElectronVDV.DataObjects = dataObjects
30 acc.addEventAlgo(precisionCaloElectronVDV)
31 return acc
32
33def precisionCaloRecoSequence(flags, RoIs, name = None, ion=False, variant=''):
34 acc = ComponentAccumulator()
35
36 TrigEgammaKeys = getTrigEgammaKeys(flags, variant, ion = ion)
37
38 log.debug('flags = %s',flags)
39 log.debug('RoIs = %s',RoIs)
40
41 acc.merge(precisionCaloElectronVDVCfg(flags, name+'VDV'+variant,RoIs,ion,variant=variant))
42
43 from TrigCaloRec.TrigCaloRecConfig import egammaTopoClusteringCfg, egammaTopoClusteringCfg_LRT, hltCaloTopoClusteringHICfg
44
45 if ion:
46 topoCluster = hltCaloTopoClusteringHICfg(flags,
47 CellsName = "CaloCells",
48 roisKey=RoIs)
49 else:
50 if variant:
51 topoCluster = egammaTopoClusteringCfg_LRT(flags, RoIs)
52
53 else:
54 topoCluster = egammaTopoClusteringCfg(flags, RoIs)
55
56 acc.merge(topoCluster)
57 tag = 'HI' if ion is True else ''
58
59 copier = CompFactory.egammaTopoClusterCopier('eTrigEgammaTopoClusterCopier'+ tag + RoIs,
60 InputTopoCollection=TrigEgammaKeys.precisionTopoClusterContainer,
61 OutputTopoCollection= TrigEgammaKeys.precisionCaloTopoCollection)
62 acc.addEventAlgo(copier)
63
64 trigEgammaRec = TrigEgammaRecCfg(flags, name = 'eTrigEgammaRec'+tag + RoIs +variant)
65
66 acc.merge(trigEgammaRec)
67
68 trigEgammaSuperClusterBuilder = TrigEgammaSuperClusterBuilderCfg(flags,
69 'eTrigEgammaSuperClusterBuilder' + tag + RoIs,
70 'electron',
71 TrigEgammaKeys.precisionElectronCaloClusterContainer,
72 TrigEgammaKeys.precisionEgammaSuperClusterRecCollection)
73 acc.merge(trigEgammaSuperClusterBuilder)
74
75 return acc
76
precisionCaloRecoSequence(flags, RoIs, name=None, ion=False, variant='')
precisionCaloElectronVDVCfg(flags, name, InViewRoIs, ion=False, variant='')