ATLAS Offline Software
PrecisionPhotonCaloIsoRecoSequences.py
Go to the documentation of this file.
1 # Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
2 
3 from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
4 from AthenaConfiguration.ComponentFactory import CompFactory
5 from TriggerMenuMT.HLT.Egamma.TrigEgammaKeys import getTrigEgammaKeys
6 #logging
7 from AthenaCommon.Logging import logging
8 log = logging.getLogger(__name__)
9 
10 def precisionPhotonCaloIsoVDVCfg(flags, name, InViewRoIs, ion=False):
11  acc = ComponentAccumulator()
12  TrigEgammaKeys = getTrigEgammaKeys(flags, ion=ion)
13  caloClusters = TrigEgammaKeys.precisionPhotonCaloClusterContainer
14  dataObjects = [( 'xAOD::CaloClusterContainer' , 'StoreGateSvc+%s' % caloClusters ),
15  ( 'xAOD::CaloClusterContainer' , 'StoreGateSvc+%s' % TrigEgammaKeys.precisionTopoClusterContainer), # this is for the calo isolation tool
16  ( 'xAOD::PhotonContainer' , 'StoreGateSvc+%s' % TrigEgammaKeys.precisionPhotonContainer), # This is the Photon input container with non-isolated photons
17  ( 'CaloCellContainer' , 'StoreGateSvc+CaloCells' ),
18  ( 'CaloCellContainer' , 'StoreGateSvc+CaloCellsFS' ),
19  ( 'xAOD::EventInfo' , 'StoreGateSvc+EventInfo' ),
20  ( 'xAOD::EventShape' , 'StoreGateSvc+TrigIsoEventShape' ),
21  ( 'xAOD::IParticleContainer' , 'StoreGateSvc+HLT_TopoCaloClustersFS'),
22  ( 'PseudoJetContainer' , 'StoreGateSvc+PseudoJetTrigEMTopo' )]
23  if ion:
24  dataObjects += [( 'CaloCellContainer' , 'StoreGateSvc+CorrectedRoICaloCells' )]
25 
26  precisionPhotonCaloIsoVDV = CompFactory.AthViews.ViewDataVerifier(name)
27  precisionPhotonCaloIsoVDV.DataObjects = dataObjects
28  acc.addEventAlgo(precisionPhotonCaloIsoVDV)
29  return acc
30 
31 def precisionPhotonCaloIsoRecoSequence(flags, RoIs, name = None, ion=False):
32  """ With this function we will setup the sequence of Calo isolation to be executed after PrecisionPhoton in TrigEgamma
33 
34  """
36 
37  log.debug('precisionPhotonCaloIsoRecoSequence(RoIs = %s)',RoIs)
38 
39  log.debug('retrieve(precisionPhotonCaloIsoRecoSequence,None,RoIs = %s)',RoIs)
40 
41  acc.merge(precisionPhotonCaloIsoVDVCfg(flags, name+'VDV',RoIs,ion))
42 
43  # Add CaloIsolationTool
44  from TriggerMenuMT.HLT.Egamma.TrigEgammaFactoriesCfg import TrigPhotonIsoBuilderCfg
45  TrigPhotonIsoBuilder = TrigPhotonIsoBuilderCfg(flags,
46  ion =ion)
47 
48  acc.merge(TrigPhotonIsoBuilder)
49 
50  #online monitoring for xAODEgammaBuilder
51  from TriggerMenuMT.HLT.Photon.TrigPhotonFactoriesCfg import PrecisionPhotonCaloIsoMonitorCfg
52  PrecisionPhotonCaloIsoRecoMonAlgo = PrecisionPhotonCaloIsoMonitorCfg(flags)
53  acc.merge(PrecisionPhotonCaloIsoRecoMonAlgo)
54 
55  return acc
56 
57 
58 
59 
60 
python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
python.HLT.Egamma.TrigEgammaFactoriesCfg.TrigPhotonIsoBuilderCfg
def TrigPhotonIsoBuilderCfg(flags, ion=False)
Definition: TrigEgammaFactoriesCfg.py:109
PrecisionPhotonCaloIsoRecoSequences.precisionPhotonCaloIsoRecoSequence
def precisionPhotonCaloIsoRecoSequence(flags, RoIs, name=None, ion=False)
Definition: PrecisionPhotonCaloIsoRecoSequences.py:31
TrigPhotonFactoriesCfg.PrecisionPhotonCaloIsoMonitorCfg
def PrecisionPhotonCaloIsoMonitorCfg(flags, name='PrecisionPhotonCaloIsoEgammaBuilderMon', ion=False)
Definition: TrigPhotonFactoriesCfg.py:12
PrecisionPhotonCaloIsoRecoSequences.precisionPhotonCaloIsoVDVCfg
def precisionPhotonCaloIsoVDVCfg(flags, name, InViewRoIs, ion=False)
Definition: PrecisionPhotonCaloIsoRecoSequences.py:10
python.HLT.Egamma.TrigEgammaKeys.getTrigEgammaKeys
def getTrigEgammaKeys(AthConfigFlags flags, name='', ion=False)
Definition: TrigEgammaKeys.py:138