ATLAS Offline Software
Functions
ActsTrackFittingConfig Namespace Reference

Functions

ComponentAccumulator ActsFitterCfg (flags, str name="ActsFitterTool", **kwargs)
 
ComponentAccumulator ActsReFitterAlgCfg (flags, str name="ActsReFitterAlg", **kwargs)
 
ComponentAccumulator forceITkActsReFitterAlgCfg (flags)
 
ComponentAccumulator writeAdditionalTracks (flags, str trackName='ResolvedTracks', str newTrackName='ReFitted_Tracks')
 

Function Documentation

◆ ActsFitterCfg()

ComponentAccumulator ActsTrackFittingConfig.ActsFitterCfg (   flags,
str   name = "ActsFitterTool",
**  kwargs 
)

Definition at line 8 of file ActsTrackFittingConfig.py.

8 def ActsFitterCfg(flags,
9  name: str = "ActsFitterTool",
10  **kwargs) -> ComponentAccumulator:
11  acc = ComponentAccumulator()
12 
13  if flags.Acts.fitFromPRD:
14  #RotCreatorTool and BroadRotCreatorTool for calibration purposes
15  if 'RotCreatorTool' not in kwargs:
16  from TrkConfig.TrkRIO_OnTrackCreatorConfig import ITkRotCreatorCfg
17  kwargs.setdefault('RotCreatorTool', acc.popToolsAndMerge(ITkRotCreatorCfg(flags)))
18 
19  if 'BroadRotCreatorTool' not in kwargs:
20  from TrkConfig.TrkRIO_OnTrackCreatorConfig import ITkBroadRotCreatorCfg
21  kwargs.setdefault('BroadRotCreatorTool', acc.popToolsAndMerge(ITkBroadRotCreatorCfg(flags)))
22 
23  # Make sure this is set correctly!
24  # /eos/project-a/acts/public/MaterialMaps/ATLAS/material-maps-Pixel-SCT.json
25 
26  if "TrackingGeometryTool" not in kwargs:
27  from ActsConfig.ActsGeometryConfig import ActsTrackingGeometryToolCfg
28  kwargs.setdefault("TrackingGeometryTool", acc.popToolsAndMerge(ActsTrackingGeometryToolCfg(flags)))
29 
30  if "ExtrapolationTool" not in kwargs:
31  from ActsConfig.ActsGeometryConfig import ActsExtrapolationToolCfg
32  kwargs.setdefault("ExtrapolationTool", acc.popToolsAndMerge(ActsExtrapolationToolCfg(flags, MaxSteps=10000)))
33 
34  if flags.Acts.trackFitterType is TrackFitterType.KalmanFitter:
35  kwargs.setdefault("ReverseFilteringPt", 1.0 * UnitConstants.GeV)
36 
37  if 'ATLASConverterTool' not in kwargs:
38  from ActsConfig.ActsEventCnvConfig import ActsToTrkConverterToolCfg
39  kwargs.setdefault('ATLASConverterTool', acc.popToolsAndMerge(ActsToTrkConverterToolCfg(flags)))
40 
41  if "SummaryTool" not in kwargs:
42  from TrkConfig.TrkTrackSummaryToolConfig import InDetTrackSummaryToolCfg
43  kwargs.setdefault('SummaryTool', acc.getPrimaryAndMerge(InDetTrackSummaryToolCfg(flags)))
44 
45  if 'BoundaryCheckTool' not in kwargs:
46  if flags.Detector.GeometryITk:
47  from InDetConfig.InDetBoundaryCheckToolConfig import ITkBoundaryCheckToolCfg
48  kwargs.setdefault("BoundaryCheckTool", acc.popToolsAndMerge(ITkBoundaryCheckToolCfg(flags)))
49  else:
50  from InDetConfig.InDetBoundaryCheckToolConfig import InDetBoundaryCheckToolCfg
51  kwargs.setdefault("BoundaryCheckTool",acc.popToolsAndMerge(InDetBoundaryCheckToolCfg(flags)))
52 
53  if flags.Acts.trackFitterType is TrackFitterType.KalmanFitter: # This flag is by default set to KalmanFitter
54  acc.setPrivateTools(CompFactory.ActsTrk.KalmanFitterTool(name, **kwargs))
55  elif flags.Acts.trackFitterType is TrackFitterType.GaussianSumFitter:
56  name = name.replace("KalmanFitter", "GaussianSumFitter")
57  acc.setPrivateTools(CompFactory.ActsTrk.GaussianSumFitterTool(name, **kwargs))
58  elif flags.Acts.trackFitterType is TrackFitterType.GlobalChiSquareFitter:
59  name = name.replace("KalmanFitter", "GlobalChiSquareFitter")
60  acc.setPrivateTools(CompFactory.ActsTrk.GlobalChiSquareFitterTool(name, **kwargs))
61 
62  return acc
63 
64 
65 

◆ ActsReFitterAlgCfg()

ComponentAccumulator ActsTrackFittingConfig.ActsReFitterAlgCfg (   flags,
str   name = "ActsReFitterAlg",
**  kwargs 
)

Definition at line 66 of file ActsTrackFittingConfig.py.

66 def ActsReFitterAlgCfg(flags,
67  name : str = "ActsReFitterAlg",
68  **kwargs) -> ComponentAccumulator:
69  acc = ComponentAccumulator()
70  kwargs.setdefault("ActsFitter", acc.popToolsAndMerge(ActsFitterCfg(flags)))
71  kwargs.setdefault("TrackName", "ResolvedTracks")
72  kwargs.setdefault("NewTrackName", "Refitted_Tracks")
73  kwargs.setdefault("DoReFitFromPRD", flags.Acts.fitFromPRD)
74  acc.addEventAlgo(CompFactory.ActsTrk.ReFitterAlg(name, **kwargs))
75 
76  if flags.Acts.writeTrackCollection:
77  acc.merge(writeAdditionalTracks(flags))
78 
79  return acc
80 

◆ forceITkActsReFitterAlgCfg()

ComponentAccumulator ActsTrackFittingConfig.forceITkActsReFitterAlgCfg (   flags)

Definition at line 81 of file ActsTrackFittingConfig.py.

81 def forceITkActsReFitterAlgCfg(flags) -> ComponentAccumulator:
82  #Use this flag in the --postInclude of ActsKfRefiting.sh to fit from the PRD (uncalibrated); Else to fit from the ROT (calibrated), use `(...).ActsReFitterAlgCfg` flag directly
83  flags = flags.cloneAndReplace("Tracking.ActiveConfig",
84  flags.Tracking.ITkPrimaryPassConfig.value)
85  return ActsReFitterAlgCfg(flags)
86 
87 

◆ writeAdditionalTracks()

ComponentAccumulator ActsTrackFittingConfig.writeAdditionalTracks (   flags,
str   trackName = 'ResolvedTracks',
str   newTrackName = 'ReFitted_Tracks' 
)

Definition at line 88 of file ActsTrackFittingConfig.py.

88 def writeAdditionalTracks(flags,
89  trackName: str = 'ResolvedTracks',
90  newTrackName: str ='ReFitted_Tracks') -> ComponentAccumulator:
91  acc = ComponentAccumulator()
92 
93  from xAODTrackingCnv.xAODTrackingCnvConfig import ITkTrackParticleCnvAlgCfg
94 
95  if flags.Tracking.doTruth:
96  from InDetConfig.ITkTrackTruthConfig import ITkTrackTruthCfg
97  acc.merge(ITkTrackTruthCfg(flags,
98  Tracks = trackName,
99  DetailedTruth = f"{trackName}DetailedTruth",
100  TracksTruth = f"{trackName}TruthCollection"))
101  acc.merge(ITkTrackTruthCfg(flags,
102  Tracks = newTrackName,
103  DetailedTruth = f"{newTrackName}DetailedTruth",
104  TracksTruth = f"{newTrackName}TruthCollection"))
105 
106  acc.merge(ITkTrackParticleCnvAlgCfg(flags,
107  name = f"{trackName}TrackParticleCnvAlg",
108  TrackContainerName = trackName,
109  xAODTrackParticlesFromTracksContainerName = f"{trackName}TrackParticles",
110  TrackTruthContainerName = f"{trackName}TruthCollection"))
111  acc.merge(ITkTrackParticleCnvAlgCfg(flags,
112  name = f"{newTrackName}TrackParticleCnvAlg",
113  TrackContainerName = newTrackName,
114  xAODTrackParticlesFromTracksContainerName = f"{newTrackName}TrackParticles",
115  TrackTruthContainerName = f"{newTrackName}TruthCollection"))
116 
117  from OutputStreamAthenaPool.OutputStreamConfig import addToESD, addToAOD
118  itemList = [f"xAOD::TrackParticleContainer#{trackName}TrackParticles",
119  f"xAOD::TrackParticleAuxContainer#{trackName}TrackParticlesAux.",
120  f"xAOD::TrackParticleContainer#{newTrackName}TrackParticles",
121  f"xAOD::TrackParticleAuxContainer#{newTrackName}TrackParticlesAux."]
122 
123  acc.merge(addToESD(flags, itemList))
124  acc.merge(addToAOD(flags, itemList))
125  return acc
126 
ActsTrackFittingConfig.forceITkActsReFitterAlgCfg
ComponentAccumulator forceITkActsReFitterAlgCfg(flags)
Definition: ActsTrackFittingConfig.py:81
python.TrkRIO_OnTrackCreatorConfig.ITkRotCreatorCfg
def ITkRotCreatorCfg(flags, name='ITkRotCreator', **kwargs)
Definition: TrkRIO_OnTrackCreatorConfig.py:134
python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
python.ITkTrackTruthConfig.ITkTrackTruthCfg
def ITkTrackTruthCfg(flags, Tracks="CombinedITkTracks", DetailedTruth="CombinedITkTracksDetailedTrackTruth", TracksTruth="CombinedITkTracksTrackTruthCollection")
Definition: ITkTrackTruthConfig.py:10
ActsEventCnvConfig.ActsToTrkConverterToolCfg
ComponentAccumulator ActsToTrkConverterToolCfg(flags, str name="ActsToTrkConverterTool", **kwargs)
Definition: ActsEventCnvConfig.py:6
python.InDetBoundaryCheckToolConfig.ITkBoundaryCheckToolCfg
def ITkBoundaryCheckToolCfg(flags, name='ITkBoundaryCheckTool', **kwargs)
Definition: InDetBoundaryCheckToolConfig.py:102
ActsTrackFittingConfig.ActsReFitterAlgCfg
ComponentAccumulator ActsReFitterAlgCfg(flags, str name="ActsReFitterAlg", **kwargs)
Definition: ActsTrackFittingConfig.py:66
xAODTrackingCnvConfig.ITkTrackParticleCnvAlgCfg
def ITkTrackParticleCnvAlgCfg(flags, name="ITkTrackParticleCnvAlg", ClusterSplitProbabilityName="", AssociationMapName="", bool isActsAmbi=False, **kwargs)
Definition: xAODTrackingCnvConfig.py:287
python.TrkTrackSummaryToolConfig.InDetTrackSummaryToolCfg
def InDetTrackSummaryToolCfg(flags, name='InDetTrackSummaryTool', **kwargs)
Definition: TrkTrackSummaryToolConfig.py:22
ActsGeometryConfig.ActsExtrapolationToolCfg
ComponentAccumulator ActsExtrapolationToolCfg(flags, str name="ActsExtrapolationTool", **kwargs)
Definition: ActsGeometryConfig.py:109
ActsGeometryConfig.ActsTrackingGeometryToolCfg
ComponentAccumulator ActsTrackingGeometryToolCfg(flags, str name="ActsTrackingGeometryTool")
Definition: ActsGeometryConfig.py:100
python.InDetBoundaryCheckToolConfig.InDetBoundaryCheckToolCfg
def InDetBoundaryCheckToolCfg(flags, name='InDetBoundarySearchTool', **kwargs)
Definition: InDetBoundaryCheckToolConfig.py:7
python.OutputStreamConfig.addToESD
def addToESD(flags, itemOrList, **kwargs)
Definition: OutputStreamConfig.py:127
ActsTrackFittingConfig.writeAdditionalTracks
ComponentAccumulator writeAdditionalTracks(flags, str trackName='ResolvedTracks', str newTrackName='ReFitted_Tracks')
Definition: ActsTrackFittingConfig.py:88
python.OutputStreamConfig.addToAOD
def addToAOD(flags, itemOrList, **kwargs)
Definition: OutputStreamConfig.py:142
ActsTrackFittingConfig.ActsFitterCfg
ComponentAccumulator ActsFitterCfg(flags, str name="ActsFitterTool", **kwargs)
Definition: ActsTrackFittingConfig.py:8
python.TrkRIO_OnTrackCreatorConfig.ITkBroadRotCreatorCfg
def ITkBroadRotCreatorCfg(flags, name='ITkBroadRotCreator', **kwargs)
Definition: TrkRIO_OnTrackCreatorConfig.py:156