ATLAS Offline Software
Electron/PrecisionCaloRecoSequences.py
Go to the documentation of this file.
1 #
2 # Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3 #
4 
5 from AthenaCommon.Logging import logging
6 from TriggerMenuMT.HLT.Egamma.TrigEgammaKeys import getTrigEgammaKeys
7 from TriggerMenuMT.HLT.Egamma.TrigEgammaFactoriesCfg import TrigEgammaRecCfg, TrigEgammaSuperClusterBuilderCfg
8 from AthenaConfiguration.ComponentFactory import CompFactory
9 from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
10 
11 
12 log = logging.getLogger(__name__)
13 
14 def 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 
26  precisionCaloElectronVDV = CompFactory.AthViews.ViewDataVerifier(name)
27  precisionCaloElectronVDV.DataObjects = dataObjects
28  acc.addEventAlgo(precisionCaloElectronVDV)
29  return acc
30 
31 def precisionCaloRecoSequence(flags, RoIs, name = None, ion=False, variant=''):
32  acc = ComponentAccumulator()
33 
34  TrigEgammaKeys = getTrigEgammaKeys(flags, variant, ion = ion)
35 
36  log.debug('flags = %s',flags)
37  log.debug('RoIs = %s',RoIs)
38 
39  acc.merge(precisionCaloElectronVDVCfg(flags, name+'VDV'+variant,RoIs,ion,variant=variant))
40 
41  from TrigCaloRec.TrigCaloRecConfig import egammaTopoClusteringCfg, egammaTopoClusteringCfg_LRT, hltCaloTopoClusteringHICfg
42 
43  if ion:
44  topoCluster = hltCaloTopoClusteringHICfg(flags,
45  CellsName = "CaloCells",
46  roisKey=RoIs)
47  else:
48  if variant:
49  topoCluster = egammaTopoClusteringCfg_LRT(flags, RoIs)
50 
51  else:
52  topoCluster = egammaTopoClusteringCfg(flags, RoIs)
53 
54  acc.merge(topoCluster)
55  tag = 'HI' if ion is True else ''
56 
57  copier = CompFactory.egammaTopoClusterCopier('eTrigEgammaTopoClusterCopier'+ tag + RoIs,
58  InputTopoCollection=TrigEgammaKeys.precisionTopoClusterContainer,
59  OutputTopoCollection= TrigEgammaKeys.precisionCaloTopoCollection)
60  acc.addEventAlgo(copier)
61 
62  trigEgammaRec = TrigEgammaRecCfg(flags, name = 'eTrigEgammaRec'+tag + RoIs +variant)
63 
64  acc.merge(trigEgammaRec)
65 
66  trigEgammaSuperClusterBuilder = TrigEgammaSuperClusterBuilderCfg(flags,
67  'eTrigEgammaSuperClusterBuilder' + tag + RoIs,
68  'electron',
69  TrigEgammaKeys.precisionElectronCaloClusterContainer,
70  TrigEgammaKeys.precisionEgammaSuperClusterRecCollection)
71  acc.merge(trigEgammaSuperClusterBuilder)
72 
73  return acc
74 
python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
python.HLT.Egamma.TrigEgammaFactoriesCfg.TrigEgammaSuperClusterBuilderCfg
def TrigEgammaSuperClusterBuilderCfg(flags, name, calibrationType, superClusterCollectionName, superegammaRecCollectionName)
Definition: TrigEgammaFactoriesCfg.py:21
python.HLT.Electron.PrecisionCaloRecoSequences.precisionCaloRecoSequence
def precisionCaloRecoSequence(flags, RoIs, name=None, ion=False, variant='')
Definition: Electron/PrecisionCaloRecoSequences.py:31
python.HLT.Electron.PrecisionCaloRecoSequences.precisionCaloElectronVDVCfg
def precisionCaloElectronVDVCfg(flags, name, InViewRoIs, ion=False, variant='')
Definition: Electron/PrecisionCaloRecoSequences.py:14
python.HLT.Egamma.TrigEgammaFactoriesCfg.TrigEgammaRecCfg
def TrigEgammaRecCfg(flags, name="trigEgammaRec")
Definition: TrigEgammaFactoriesCfg.py:7
TrigCaloRecConfig.egammaTopoClusteringCfg
def egammaTopoClusteringCfg(flags, RoIs)
EgammaSpecific TopoClustering####################################.
Definition: TrigCaloRecConfig.py:423
TrigCaloRecConfig.egammaTopoClusteringCfg_LRT
def egammaTopoClusteringCfg_LRT(flags, RoIs)
Definition: TrigCaloRecConfig.py:429
TrigCaloRecConfig.hltCaloTopoClusteringHICfg
def hltCaloTopoClusteringHICfg(flags, CellsName=None, roisKey="UNSPECIFIED", doLC=False, algSuffix='HIRoI', ion=True)
Definition: TrigCaloRecConfig.py:453
python.HLT.Egamma.TrigEgammaKeys.getTrigEgammaKeys
def getTrigEgammaKeys(AthConfigFlags flags, name='', ion=False)
Definition: TrigEgammaKeys.py:138