ATLAS Offline Software
Loading...
Searching...
No Matches
python.InDetClustersDecorationConfig Namespace Reference

Functions

 AODTSOSKernelCfg (flags, name="AODTSOSKernel", listOfExtensions=[])
 MSOSAndClustersCfg (flags)
 fromRunArgs (flags, cfg)

Detailed Description

Intended use:
Reco_tf.py --postInclude 'all:InDetConfig.InDetClustersDecorationConfig.fromRunArgs'

This schedules:
  - PixelPrepDataToxAOD
  - SCT_PrepDataToxAOD
  - TrackStateOnSurfaceDecorator

This creates the Pixel & SCT MSOSs containers and the links from the track --> MSOSs --> clusters.
  The decoration runs for InDetTrackParticles and InDetDisappearingTrackParticles.
  Also, the Pixel & SCT cluster & MSOS containers are added to the AOD output stream.

This is an alternative to the standard approach of using --preExec "flags.Tracking.writeExtendedSi_PRDInfo=True"...
  which has bugs that were fixed by !72727, affecting releases 24.0.62+.

After the bug fix, the resulting AODs are identical between the two methods, except:
  The --postInclude method only decorates the aforementioned track containers.
  The --preExec method additionally decorates GSF, forward, and LargeD0 tracks.

To save clusters in older 24.0 releases, or in 22.0 and 23.0, this --postInclude method can be used instead.

Function Documentation

◆ AODTSOSKernelCfg()

AODTSOSKernelCfg ( flags,
name = "AODTSOSKernel",
listOfExtensions = [] )

Definition at line 29 of file InDetClustersDecorationConfig.py.

29def AODTSOSKernelCfg(flags, name="AODTSOSKernel", listOfExtensions=[]):
30 acc = ComponentAccumulator()
31
32 from DerivationFrameworkInDet.InDetToolsConfig import TrackStateOnSurfaceDecoratorCfg
33
34 listOfAugmTools = []
35 for extension in listOfExtensions:
36 PixelMsosName = f"{extension}PixelMSOSs"
37 SctMsosName = f"{extension}SCT_MSOSs"
38
39 TrackStateOnSurfaceDecorator = acc.getPrimaryAndMerge(
40 TrackStateOnSurfaceDecoratorCfg(
41 flags,
42 name=f"{extension}TrackStateOnSurfaceDecorator",
43 ContainerName=f"InDet{extension}TrackParticles",
44 PixelMsosName=PixelMsosName,
45 SctMsosName=SctMsosName,
46 TrtMsosName=f"{extension}TRT_MSOSs", # TRT not used, but harmless
47 StorePixel=True, # explicitly override the flag
48 StoreSCT=True # explicitly override the flag
49 )
50 )
51 TrackStateOnSurfaceDecorator.DecorationPrefix = "Reco_"
52 listOfAugmTools.append(TrackStateOnSurfaceDecorator)
53
54 acc.addEventAlgo(CompFactory.DerivationFramework.CommonAugmentation(
55 name, AugmentationTools=listOfAugmTools))
56 return acc
57
58

◆ fromRunArgs()

fromRunArgs ( flags,
cfg )

Definition at line 98 of file InDetClustersDecorationConfig.py.

98def fromRunArgs(flags, cfg):
99
100 # Note there is bug in 24.0 versions before 24.0.62.
101 # - The bug prevented saving a separate MSOS container for disappearing tracks.
102 # Fixed by MR !72727 (which also created a cluster thinning alg).
103 # - Also changed the prefix of the msosLink to "Reco_"
104 # - Also standardized the cluster and MSOS container names.
105 # For this reason, not relying on the following to get this right:
106 # - writeExtendedSi_PRDInfo
107 # - TrackRecoConfig
108 # - InDetTrackOutputConfig
109
110 acc = MSOSAndClustersCfg(flags)
111 cfg.merge(acc)
112
113 # Explicitly add MSOS containers to the existing AOD stream
114 from OutputStreamAthenaPool.OutputStreamConfig import addToAOD
115 cfg.merge(addToAOD(flags, [
116 "xAOD::TrackMeasurementValidationContainer#PixelClusters",
117 "xAOD::TrackMeasurementValidationAuxContainer#PixelClustersAux.",
118 "xAOD::TrackMeasurementValidationContainer#SCT_Clusters",
119 "xAOD::TrackMeasurementValidationAuxContainer#SCT_ClustersAux.",
120 "xAOD::TrackStateValidationContainer#PixelMSOSs",
121 "xAOD::TrackStateValidationAuxContainer#PixelMSOSsAux.",
122 "xAOD::TrackStateValidationContainer#SCT_MSOSs",
123 "xAOD::TrackStateValidationAuxContainer#SCT_MSOSsAux.",
124 "xAOD::TrackStateValidationContainer#DisappearingPixelMSOSs",
125 "xAOD::TrackStateValidationAuxContainer#DisappearingPixelMSOSsAux.",
126 "xAOD::TrackStateValidationContainer#DisappearingSCT_MSOSs",
127 "xAOD::TrackStateValidationAuxContainer#DisappearingSCT_MSOSsAux."
128 ]))
129
130 return cfg

◆ MSOSAndClustersCfg()

MSOSAndClustersCfg ( flags)

Definition at line 59 of file InDetClustersDecorationConfig.py.

59def MSOSAndClustersCfg(flags):
60 acc = ComponentAccumulator()
61
62 from PixelConditionsTools.PixelConditionsSummaryConfig import PixelConditionsSummaryCfg
63 from SiLorentzAngleTool.PixelLorentzAngleConfig import PixelLorentzAngleToolCfg
64 from InDetConfig.TrackRecoConfig import ClusterSplitProbabilityContainerName
65
66 # Pixel clusters
67 pixel_kwargs = {}
68 pixel_kwargs.setdefault("ClusterSplitProbabilityName", ClusterSplitProbabilityContainerName(flags))
69 pixel_kwargs.setdefault("PixelConditionsSummaryTool", acc.popToolsAndMerge(PixelConditionsSummaryCfg(flags)))
70 pixel_kwargs.setdefault("LorentzAngleTool", acc.popToolsAndMerge(PixelLorentzAngleToolCfg(flags)))
71 pixel_kwargs.setdefault("UseTruthInfo", flags.Input.isMC)
72 pixel_kwargs.setdefault("WriteRDOinformation", True)
73 pixel_kwargs.setdefault("WriteNNinformation", True)
74 pixel_kwargs.setdefault("WriteExtendedPRDinformation", True)
75
76 acc.addEventAlgo(
77 CompFactory.PixelPrepDataToxAOD(
78 name="xAOD_PixelPrepDataToxAOD", **pixel_kwargs
79 )
80 )
81
82 # SCT clusters
83 sct_kwargs = {}
84 sct_kwargs.setdefault("UseTruthInfo", flags.Input.isMC)
85 sct_kwargs.setdefault("WriteRDOinformation", True)
86
87 acc.addEventAlgo(
88 CompFactory.SCT_PrepDataToxAOD(
89 name="xAOD_SCT_PrepDataToxAOD", **sct_kwargs
90 )
91 )
92
93 # Use this version to set container names properly
94 acc.merge(AODTSOSKernelCfg(flags, listOfExtensions=["", "Disappearing"]))
95
96 return acc
97