ATLAS Offline Software
TrackToCaloConfig.py
Go to the documentation of this file.
1 # Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
2 
3 __doc__ = "Tool configuration for the track to calo tools."
4 
5 # ---------------------------------------
6 from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
7 from AthenaConfiguration.ComponentFactory import CompFactory
8 
9 
11  name='ParticleCaloExtensionTool',
12  **kwargs):
13  ''' PFO/Muon/Tau common configuration of the tool.
14  Useful when targeting intersection through
15  the full calorimeter and provide intersections
16  with arbitrary layers. Results are typically "cached"
17  and re-used'''
18  acc = ComponentAccumulator()
19 
20  if "Extrapolator" not in kwargs:
21  from TrkConfig.AtlasExtrapolatorConfig import AtlasExtrapolatorCfg
22  kwargs["Extrapolator"] = acc.popToolsAndMerge(
23  AtlasExtrapolatorCfg(flags))
24 
25  acc.setPrivateTools(
26  CompFactory.Trk.ParticleCaloExtensionTool(name, **kwargs))
27  return acc
28 
29 
31  name='EMParticleCaloExtensionTool',
32  **kwargs):
33  ''' e/gamma configuration of the tool.
34  Useful when targeting a specific layers in
35  "direct" extrapolation mode. It needs the
36  CaloSurfaceBuilder.
37  '''
38  acc = ComponentAccumulator()
39  kwargs.setdefault("StartFromPerigee", True)
40 
41  if "CaloSurfaceBuilder" not in kwargs:
42  from CaloTrackingGeometry.CaloTrackingGeometryConfig import (
43  CaloSurfaceBuilderMiddleCfg)
44  kwargs["CaloSurfaceBuilder"] = acc.popToolsAndMerge(
46 
47  if "Extrapolator" not in kwargs:
48  from TrkConfig.AtlasExtrapolatorConfig import egammaCaloExtrapolatorCfg
49  kwargs["Extrapolator"] = acc.popToolsAndMerge(
51 
52  acc.setPrivateTools(acc.popToolsAndMerge(
53  ParticleCaloExtensionToolCfg(flags, **kwargs)))
54  return acc
55 
56 
58  name='HLTPF_ParticleCaloExtension',
59  **kwargs):
60  acc = ComponentAccumulator()
61 
62  if "Extrapolator" not in kwargs:
63  from TrkConfig.AtlasExtrapolatorConfig import TrigPFlowExtrapolatorCfg
64  kwargs["Extrapolator"] = acc.popToolsAndMerge(
66 
67  acc.setPrivateTools(
68  CompFactory.Trk.ParticleCaloExtensionTool(name, **kwargs))
69  return acc
70 
71 
73  name='ParticleCaloCellAssociationTool',
74  **kwargs):
75  acc = ComponentAccumulator()
76 
77  if "ParticleCaloExtensionTool" not in kwargs:
78  kwargs["ParticleCaloExtensionTool"] = acc.popToolsAndMerge(
80 
81  # should this be a more global flag?
82  kwargs.setdefault("CaloCellContainer", flags.Egamma.Keys.Input.CaloCells)
83 
84  acc.setPrivateTools(
85  CompFactory.Rec.ParticleCaloCellAssociationTool(name, **kwargs))
86  return acc
87 
88 
90  name='HLTPF_ParticleCaloCellAssociationTool',
91  **kwargs):
92  acc = ComponentAccumulator()
93 
94  if "ParticleCaloExtensionTool" not in kwargs:
95  kwargs["ParticleCaloExtensionTool"] = acc.popToolsAndMerge(
97 
98  kwargs.setdefault("CaloCellContainer", "")
99 
100  acc.setPrivateTools(
101  CompFactory.Rec.ParticleCaloCellAssociationTool(name, **kwargs))
102  return acc
TrackToCaloConfig.HLTPF_ParticleCaloCellAssociationToolCfg
def HLTPF_ParticleCaloCellAssociationToolCfg(flags, name='HLTPF_ParticleCaloCellAssociationTool', **kwargs)
Definition: TrackToCaloConfig.py:89
python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
python.AtlasExtrapolatorConfig.egammaCaloExtrapolatorCfg
def egammaCaloExtrapolatorCfg(flags, name='egammaCaloExtrapolator')
Definition: AtlasExtrapolatorConfig.py:194
python.AtlasExtrapolatorConfig.AtlasExtrapolatorCfg
def AtlasExtrapolatorCfg(flags, name='AtlasExtrapolator')
Definition: AtlasExtrapolatorConfig.py:63
TrackToCaloConfig.ParticleCaloCellAssociationToolCfg
def ParticleCaloCellAssociationToolCfg(flags, name='ParticleCaloCellAssociationTool', **kwargs)
Definition: TrackToCaloConfig.py:72
TrackToCaloConfig.HLTPF_ParticleCaloExtensionToolCfg
def HLTPF_ParticleCaloExtensionToolCfg(flags, name='HLTPF_ParticleCaloExtension', **kwargs)
Definition: TrackToCaloConfig.py:57
python.AtlasExtrapolatorConfig.TrigPFlowExtrapolatorCfg
def TrigPFlowExtrapolatorCfg(flags, name='HLT_PFlowExtrapolator')
Definition: AtlasExtrapolatorConfig.py:154
CaloTrackingGeometryConfig.CaloSurfaceBuilderMiddleCfg
def CaloSurfaceBuilderMiddleCfg(flags, name="CaloSurfaceBuilderMiddle", **kwargs)
Definition: Calorimeter/CaloTrackingGeometry/python/CaloTrackingGeometryConfig.py:19
TrackToCaloConfig.EMParticleCaloExtensionToolCfg
def EMParticleCaloExtensionToolCfg(flags, name='EMParticleCaloExtensionTool', **kwargs)
Definition: TrackToCaloConfig.py:30
TrackToCaloConfig.ParticleCaloExtensionToolCfg
def ParticleCaloExtensionToolCfg(flags, name='ParticleCaloExtensionTool', **kwargs)
Definition: TrackToCaloConfig.py:10