Loading [MathJax]/extensions/tex2jax.js
ATLAS Offline Software
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
InDetRetrieversConfig.py
Go to the documentation of this file.
1 # Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
2 from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
3 from AthenaConfiguration.ComponentFactory import CompFactory
4 from AthenaConfiguration.Enums import Format
5 
6 
7 def PixelClusterRetrieverCfg(flags, name="PixelClusterRetriever", **kwargs):
8  result = ComponentAccumulator()
9  if not flags.Input.isMC:
10  kwargs.setdefault("PixelTruthMap", "")
11  the_tool = CompFactory.JiveXML.PixelClusterRetriever(name, **kwargs)
12  result.addPublicTool(the_tool, primary=True)
13  return result
14 
15 
16 def SiClusterRetrieverCfg(flags, name="SiClusterRetriever", **kwargs):
17  result = ComponentAccumulator()
18  if not flags.Input.isMC:
19  kwargs.setdefault("SCT_TruthMap", "")
20  the_tool = CompFactory.JiveXML.SiClusterRetriever(name, **kwargs)
21  result.addPublicTool(the_tool, primary=True)
22  return result
23 
24 
25 def SiSpacePointRetrieverCfg(flags, name="SiSpacePointRetriever", **kwargs):
26  result = ComponentAccumulator()
27  if not flags.Input.isMC:
28  kwargs.setdefault("PRD_TruthPixel", "")
29  kwargs.setdefault("PRD_TruthSCT", "")
30  the_tool = CompFactory.JiveXML.SiSpacePointRetriever(name, **kwargs)
31  result.addPublicTool(the_tool, primary=True)
32  return result
33 
34 
35 def TRTRetrieverCfg(flags, name="TRTRetriever", **kwargs):
36  result = ComponentAccumulator()
37  if not flags.Input.isMC:
38  kwargs.setdefault("TRTTruthMap", "")
39  the_tool = CompFactory.JiveXML.TRTRetriever(name, **kwargs)
40  result.addPublicTool(the_tool, primary=True)
41  return result
42 
43 
44 def TrackRetrieverCfg(flags, name="TrackRetriever", **kwargs):
45  # Based on TrkJiveXML_DataTypes
46  result = ComponentAccumulator()
47 
48  from MuonConfig.MuonRecToolsConfig import MuonTrackSummaryHelperToolCfg
49  muonSummaryHelperTool=result.popToolsAndMerge(MuonTrackSummaryHelperToolCfg(flags))
50 
51  from TrkConfig.TrkTrackSummaryToolConfig import InDetTrackSummaryToolCfg
52  InDetTrackSummaryTool=result.popToolsAndMerge(InDetTrackSummaryToolCfg(flags,MuonSummaryHelperTool=muonSummaryHelperTool))
53  kwargs.setdefault("TrackSummaryTool", InDetTrackSummaryTool)
54 
55  from TrkConfig.TrkResidualPullCalculatorConfig import (ResidualPullCalculatorCfg)
56  ResidualPullCalculator=result.addPublicTool(result.popToolsAndMerge(ResidualPullCalculatorCfg(flags)))
57  kwargs.setdefault("ResidualPullCalculator", ResidualPullCalculator)
58 
59  kwargs.setdefault("PriorityTrackCollection", "Tracks")
60  kwargs.setdefault(
61  "OtherTrackCollections",
62  [
63  "CombinedMuonTracks",
64  "MuonSpectrometerTracks",
65  "ConvertedStacoTracks",
66  "ConvertedMuIdCBTracks",
67  "CombinedInDetTracks",
68  "GSFTracks",
69  ],
70  )
71 
75  kwargs.setdefault("DoWriteResiduals", False)
76  the_tool = CompFactory.JiveXML.TrackRetriever(name, **kwargs)
77  result.addPublicTool(the_tool, primary=True)
78  return result
79 
80 
81 def VertexRetrieverCfg(flags, **kwargs):
82  result = ComponentAccumulator()
83  the_tool = CompFactory.JiveXML.VertexRetriever(name="VertexRetriever", **kwargs)
84  result.addPublicTool(the_tool, primary=True)
85  return result
86 
87 
88 def SegmentRetrieverCfg(flags, **kwargs):
89  result = ComponentAccumulator()
90  the_tool = CompFactory.JiveXML.SegmentRetriever(name="SegmentRetriever", **kwargs)
91  result.addPublicTool(the_tool, primary=True)
92  return result
93 
94 
95 def BeamSpotRetrieverCfg(flags, **kwargs):
96  result = ComponentAccumulator()
97  the_tool = CompFactory.JiveXML.BeamSpotRetriever(name="BeamSpotRetriever", **kwargs)
98  result.addPublicTool(the_tool, primary=True)
99  return result
100 
101 
102 def PixelRDORetrieverCfg(flags, **kwargs):
103  result = ComponentAccumulator()
104  the_tool = CompFactory.JiveXML.PixelRDORetriever(name="PixelRDORetriever", **kwargs)
105  result.addPublicTool(the_tool, primary=True)
106  return result
107 
108 
109 def SCTRDORetrieverCfg(flags, **kwargs):
110  result = ComponentAccumulator()
111  the_tool = CompFactory.JiveXML.SCTRDORetriever(name="SCTRDORetriever", **kwargs)
112  result.addPublicTool(the_tool, primary=True)
113  return result
114 
115 
117  result = ComponentAccumulator()
118  tools = []
119  # Do we need to add equivalent of InDetFlags.doSlimming=False (in JiveXML_RecEx_config.py)? If so, why?
120  # Following is based on InDetJiveXML_DataTypes.py and TrkJiveXML_DataTypes.py
121 
122  haveRDO = (
123  flags.Input.Format is Format.BS or "StreamRDO" in flags.Input.ProcessingTags
124  )
125 
126  if flags.Detector.EnablePixel and flags.Detector.GeometryPixel:
127  tools += [result.getPrimaryAndMerge(PixelClusterRetrieverCfg(flags))]
128  if haveRDO:
129  tools += [result.getPrimaryAndMerge(PixelRDORetrieverCfg(flags))]
130 
131  if flags.Detector.EnableID and flags.Detector.GeometryID and flags.Detector.EnablePixel and flags.Detector.GeometryPixel and flags.Detector.EnableSCT and flags.Detector.GeometrySCT:
132  tools += [result.getPrimaryAndMerge(SiClusterRetrieverCfg(flags))]
133  tools += [result.getPrimaryAndMerge(SiSpacePointRetrieverCfg(flags))]
134  tools += [result.getPrimaryAndMerge(SegmentRetrieverCfg(flags))]
135  tools += [result.getPrimaryAndMerge(VertexRetrieverCfg(flags))]
136  tools += [result.getPrimaryAndMerge(TrackRetrieverCfg(flags))]
137 
138  if flags.Detector.EnableTRT and flags.Detector.GeometryTRT:
139  tools += [result.getPrimaryAndMerge(TRTRetrieverCfg(flags))]
140 
141  if haveRDO and flags.Detector.EnableSCT and flags.Detector.GeometrySCT:
142  tools += [result.getPrimaryAndMerge(SCTRDORetrieverCfg(flags))]
143 
144  if not flags.OnlineEventDisplays.OfflineTest:
145  tools += [result.getPrimaryAndMerge(BeamSpotRetrieverCfg(flags))]
146 
147  return result, tools
InDetRetrieversConfig.SCTRDORetrieverCfg
def SCTRDORetrieverCfg(flags, **kwargs)
Definition: InDetRetrieversConfig.py:109
InDetRetrieversConfig.InDetRetrieversCfg
def InDetRetrieversCfg(flags)
Definition: InDetRetrieversConfig.py:116
python.MuonRecToolsConfig.MuonTrackSummaryHelperToolCfg
def MuonTrackSummaryHelperToolCfg(flags, name="MuonTrackSummaryHelperTool", **kwargs)
Definition: MuonRecToolsConfig.py:123
python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
InDetRetrieversConfig.BeamSpotRetrieverCfg
def BeamSpotRetrieverCfg(flags, **kwargs)
Definition: InDetRetrieversConfig.py:95
InDetRetrieversConfig.PixelRDORetrieverCfg
def PixelRDORetrieverCfg(flags, **kwargs)
Definition: InDetRetrieversConfig.py:102
InDetRetrieversConfig.TrackRetrieverCfg
def TrackRetrieverCfg(flags, name="TrackRetriever", **kwargs)
Definition: InDetRetrieversConfig.py:44
python.TrkTrackSummaryToolConfig.InDetTrackSummaryToolCfg
def InDetTrackSummaryToolCfg(flags, name='InDetTrackSummaryTool', **kwargs)
Definition: TrkTrackSummaryToolConfig.py:22
InDetRetrieversConfig.TRTRetrieverCfg
def TRTRetrieverCfg(flags, name="TRTRetriever", **kwargs)
Definition: InDetRetrieversConfig.py:35
InDetRetrieversConfig.PixelClusterRetrieverCfg
def PixelClusterRetrieverCfg(flags, name="PixelClusterRetriever", **kwargs)
Definition: InDetRetrieversConfig.py:7
InDetRetrieversConfig.SiSpacePointRetrieverCfg
def SiSpacePointRetrieverCfg(flags, name="SiSpacePointRetriever", **kwargs)
Definition: InDetRetrieversConfig.py:25
InDetRetrieversConfig.SegmentRetrieverCfg
def SegmentRetrieverCfg(flags, **kwargs)
Definition: InDetRetrieversConfig.py:88
InDetRetrieversConfig.SiClusterRetrieverCfg
def SiClusterRetrieverCfg(flags, name="SiClusterRetriever", **kwargs)
Definition: InDetRetrieversConfig.py:16
python.TrkResidualPullCalculatorConfig.ResidualPullCalculatorCfg
def ResidualPullCalculatorCfg(flags, name='ResidualPullCalculator', **kwargs)
Definition: TrkResidualPullCalculatorConfig.py:6
InDetRetrieversConfig.VertexRetrieverCfg
def VertexRetrieverCfg(flags, **kwargs)
Definition: InDetRetrieversConfig.py:81