ATLAS Offline Software
Loading...
Searching...
No Matches
ActsTruthConfig Namespace Reference

Functions

ComponentAccumulator MapToInDetSimDataWrapSvcCfg (flags, *, str collectionName)
ComponentAccumulator ActsPixelClusterToTruthAssociationAlgCfg (flags, str name='ActsPixelClusterToTruthAssociationAlg', **dict kwargs)
ComponentAccumulator ActsStripClusterToTruthAssociationAlgCfg (flags, str name='ActsStripClusterToTruthAssociationAlg', **dict kwargs)
ComponentAccumulator ActsHgtdClusterToTruthAssociationAlgCfg (flags, str name='ActsHgtdClusterToTruthAssociationAlg', **dict kwargs)
ComponentAccumulator ActsInDetPixelClusterToTruthAssociationAlgCfg (flags, str name='ActsInDetPixelClusterToTruthAssociationAlg', **dict kwargs)
ComponentAccumulator ActsInDetStripClusterToTruthAssociationAlgCfg (flags, str name='ActsInDetStripClusterToTruthAssociationAlg', **dict kwargs)
 _truthAssociationKeysCfg (flags, bool doInner=True, bool doMuon=False)
 Assemble the list of truth association keys for the TruthHitCount and the Track -> truth association algorithm.
ComponentAccumulator ActsTrackToTruthAssociationAlgCfg (flags, str name='ActsTracksToTruthAssociationAlg', bool doInner=True, bool doMuon=False, **dict kwargs)
ComponentAccumulator ActsInDetTrackToTruthAssociationAlgCfg (flags, str name='ActsInDetTracksToTruthAssociationAlg', **dict kwargs)
ComponentAccumulator ActsTruthParticleHitCountAlgCfg (flags, str name='ActsTruthParticleHitCountAlg', bool doInner=True, bool doMuon=False, **dict kwargs)
ComponentAccumulator ActsInDetTruthParticleHitCountAlgCfg (flags, str name='ActsInDetTruthParticleHitCountAlg', **dict kwargs)
ComponentAccumulator ActsTruthAssociationAlgCfg (flags, **dict kwargs)
 setDefaultTruthMatchingArgs (kwargs)
ComponentAccumulator ActsTrackParticleTruthDecorationAlgCfg (flags, str name='ActsTrackParticleTruthDecorationAlg', **dict kwargs)
ComponentAccumulator ActsTrackFindingValidationAlgCfg (flags, str name='ActsTracksValidationAlg', **dict kwargs)
ComponentAccumulator ActsTruthTrackBuilderToolCfg (flags, str name="TruthTrackBuilderTool", **dict kwargs)
ComponentAccumulator ActsGbtsTrainingAlgCfg (flags, str name="ActsGbtsTrainingAlg", **dict kwargs)

Function Documentation

◆ _truthAssociationKeysCfg()

_truthAssociationKeysCfg ( flags,
bool doInner = True,
bool doMuon = False )
protected

Assemble the list of truth association keys for the TruthHitCount and the Track -> truth association algorithm.

Definition at line 101 of file ActsTruthConfig.py.

101def _truthAssociationKeysCfg(flags, doInner:bool =True, doMuon: bool = False):
102 assocKeys = []
103 if doInner and flags.Detector.EnablePixel:
104 assocKeys += ['PixelClustersToTruthParticles']
105 if doInner and flags.Detector.EnableSCT:
106 assocKeys += [ 'SCT_ClustersToTruthParticles']
107 if doInner and flags.Detector.EnableITkPixel:
108 assocKeys += ['ITkPixelClustersToTruthParticles']
109 if doInner and flags.Detector.EnableITkStrip:
110 assocKeys += ['ITkStripClustersToTruthParticles']
111 if doInner and flags.Reco.EnableHGTDExtension and flags.Acts.useHGTDClusterInTrackFinding:
112 assocKeys +=['HgtdClustersToTruthParticles']
113 if doMuon and flags.Muon.usePhaseIIGeoSetup:
114 from MuonConfig.MuonDataPrepConfig import PrimaryMeasContNamesCfg
115 assocKeys+=[f"{cont}_TruthAssocMap" for cont in PrimaryMeasContNamesCfg(flags)]
116 return assocKeys
117
118

◆ ActsGbtsTrainingAlgCfg()

ComponentAccumulator ActsGbtsTrainingAlgCfg ( flags,
str name = "ActsGbtsTrainingAlg",
**dict kwargs )

Definition at line 282 of file ActsTruthConfig.py.

284 **kwargs: dict) -> ComponentAccumulator:
285 acc = ComponentAccumulator()
286
287 if "TruthTrackBuilderTool" not in kwargs:
288 kwargs.setdefault(
289 "TruthTrackBuilderTool",
290 acc.popToolsAndMerge(
291 ActsTruthTrackBuilderToolCfg(flags)
292 )
293 )
294
295 kwargs.setdefault("geometryFile", find_datafile("gbts_layer_geometry.txt"))
296 kwargs.setdefault("outputConnectionTable", flags.Acts.Gbts.Training.outputConnectionTable)
297 kwargs.setdefault("doSymmetrization", flags.Acts.Gbts.Training.doSymmetrization)
298 kwargs.setdefault("useOldFormatting", flags.Acts.Gbts.Training.useOldFormatting)
299 kwargs.setdefault("probThreshold", flags.Acts.Gbts.Training.probThreshold)
300
301 acc.addEventAlgo(
302 CompFactory.ActsTrk.GbtsTrainingAlg(name=name, **kwargs)
303 )
304
305 return acc

◆ ActsHgtdClusterToTruthAssociationAlgCfg()

ComponentAccumulator ActsHgtdClusterToTruthAssociationAlgCfg ( flags,
str name = 'ActsHgtdClusterToTruthAssociationAlg',
**dict kwargs )

Definition at line 51 of file ActsTruthConfig.py.

53 **kwargs: dict) -> ComponentAccumulator:
54 acc = ComponentAccumulator()
55 acc.merge( MapToInDetSimDataWrapSvcCfg(flags, collectionName='HGTD_SDO_Map') )
56
57 kwargs.setdefault('InputTruthParticleLinks', 'xAODTruthLinks')
58 kwargs.setdefault('SimData', 'HGTD_SDO_Map')
59 kwargs.setdefault('DepositedEnergyMin', 600) # @TODO revise ? From PRD_MultiTruthBuilder.h; should be 1/10 of threshold
60 kwargs.setdefault('Measurements', 'HGTD_Clusters')
61 kwargs.setdefault('AssociationMapOut', 'HgtdClustersToTruthParticles')
62
63 acc.addEventAlgo( CompFactory.ActsTrk.HgtdClusterToTruthAssociationAlg(name=name, **kwargs) )
64 return acc
65

◆ ActsInDetPixelClusterToTruthAssociationAlgCfg()

ComponentAccumulator ActsInDetPixelClusterToTruthAssociationAlgCfg ( flags,
str name = 'ActsInDetPixelClusterToTruthAssociationAlg',
**dict kwargs )

Definition at line 66 of file ActsTruthConfig.py.

68 **kwargs: dict) -> ComponentAccumulator:
69 # Inner Detector configurations
70 acc = ComponentAccumulator()
71 acc.merge( MapToInDetSimDataWrapSvcCfg(flags, collectionName='PixelSDO_Map') )
72
73 kwargs.setdefault('InputTruthParticleLinks', 'xAODTruthLinks')
74 kwargs.setdefault('SimData', 'PixelSDO_Map')
75 kwargs.setdefault('DepositedEnergyMin', 300) # @TODO revise ? From PRD_MultiTruthBuilder.h; should be 1/10 of threshold
76 kwargs.setdefault('Measurements', 'PixelClusters')
77 kwargs.setdefault('AssociationMapOut', 'PixelClustersToTruthParticles')
78
79 acc.addEventAlgo( CompFactory.ActsTrk.PixelClusterToTruthAssociationAlg(name=name, **kwargs) )
80 return acc
81

◆ ActsInDetStripClusterToTruthAssociationAlgCfg()

ComponentAccumulator ActsInDetStripClusterToTruthAssociationAlgCfg ( flags,
str name = 'ActsInDetStripClusterToTruthAssociationAlg',
**dict kwargs )

Definition at line 82 of file ActsTruthConfig.py.

84 **kwargs: dict) -> ComponentAccumulator:
85 # Inner Detector configurations
86 acc = ComponentAccumulator()
87 acc.merge( MapToInDetSimDataWrapSvcCfg(flags, collectionName='SCT_SDO_Map') )
88
89 kwargs.setdefault('InputTruthParticleLinks', 'xAODTruthLinks')
90 kwargs.setdefault('SimData', 'SCT_SDO_Map')
91 kwargs.setdefault('DepositedEnergyMin', 600) # @TODO revise ? From PRD_MultiTruthBuilder.h; should be 1/10 of threshold
92 kwargs.setdefault('Measurements', 'SCT_Clusters')
93 kwargs.setdefault('AssociationMapOut', 'SCT_ClustersToTruthParticles')
94
95 acc.addEventAlgo( CompFactory.ActsTrk.StripClusterToTruthAssociationAlg(name=name, **kwargs) )
96 return acc
97
98

◆ ActsInDetTrackToTruthAssociationAlgCfg()

ComponentAccumulator ActsInDetTrackToTruthAssociationAlgCfg ( flags,
str name = 'ActsInDetTracksToTruthAssociationAlg',
**dict kwargs )

Definition at line 136 of file ActsTruthConfig.py.

138 **kwargs: dict) -> ComponentAccumulator:
139 return ActsTrackToTruthAssociationAlgCfg(flags, name=name, **kwargs)
140

◆ ActsInDetTruthParticleHitCountAlgCfg()

ComponentAccumulator ActsInDetTruthParticleHitCountAlgCfg ( flags,
str name = 'ActsInDetTruthParticleHitCountAlg',
**dict kwargs )

Definition at line 160 of file ActsTruthConfig.py.

162 **kwargs: dict) -> ComponentAccumulator:
163 return ActsTruthParticleHitCountAlgCfg(flags, name=name, **kwargs)
164

◆ ActsPixelClusterToTruthAssociationAlgCfg()

ComponentAccumulator ActsPixelClusterToTruthAssociationAlgCfg ( flags,
str name = 'ActsPixelClusterToTruthAssociationAlg',
**dict kwargs )

Definition at line 21 of file ActsTruthConfig.py.

23 **kwargs: dict) -> ComponentAccumulator:
24 acc = ComponentAccumulator()
25 acc.merge( MapToInDetSimDataWrapSvcCfg(flags, collectionName='ITkPixelSDO_Map') )
26
27 kwargs.setdefault('InputTruthParticleLinks', 'xAODTruthLinks')
28 kwargs.setdefault('SimData', 'ITkPixelSDO_Map')
29 kwargs.setdefault('DepositedEnergyMin', 300) # @TODO revise ? From PRD_MultiTruthBuilder.h; should be 1/10 of threshold
30 kwargs.setdefault('Measurements', 'ITkPixelClusters')
31 kwargs.setdefault('AssociationMapOut', 'ITkPixelClustersToTruthParticles')
32
33 acc.addEventAlgo( CompFactory.ActsTrk.PixelClusterToTruthAssociationAlg(name=name, **kwargs) )
34 return acc
35

◆ ActsStripClusterToTruthAssociationAlgCfg()

ComponentAccumulator ActsStripClusterToTruthAssociationAlgCfg ( flags,
str name = 'ActsStripClusterToTruthAssociationAlg',
**dict kwargs )

Definition at line 36 of file ActsTruthConfig.py.

38 **kwargs: dict) -> ComponentAccumulator:
39 acc = ComponentAccumulator()
40 acc.merge( MapToInDetSimDataWrapSvcCfg(flags, collectionName='ITkStripSDO_Map') )
41
42 kwargs.setdefault('InputTruthParticleLinks', 'xAODTruthLinks')
43 kwargs.setdefault('SimData', 'ITkStripSDO_Map')
44 kwargs.setdefault('DepositedEnergyMin', 600) # @TODO revise ? From PRD_MultiTruthBuilder.h; should be 1/10 of threshold
45 kwargs.setdefault('Measurements', 'ITkStripClusters')
46 kwargs.setdefault('AssociationMapOut', 'ITkStripClustersToTruthParticles')
47
48 acc.addEventAlgo( CompFactory.ActsTrk.StripClusterToTruthAssociationAlg(name=name, **kwargs) )
49 return acc
50

◆ ActsTrackFindingValidationAlgCfg()

ComponentAccumulator ActsTrackFindingValidationAlgCfg ( flags,
str name = 'ActsTracksValidationAlg',
**dict kwargs )

Definition at line 245 of file ActsTruthConfig.py.

247 **kwargs: dict) -> ComponentAccumulator:
248 acc = ComponentAccumulator()
249 kwargs.setdefault('TruthParticleHitCounts','TruthParticleHitCounts')
250 kwargs.setdefault('TrackToTruthAssociationMap','ActsTracksToTruthParticles')
251 setDefaultTruthMatchingArgs(kwargs)
252 kwargs.setdefault('TruthLinkedFakeRate', flags.Acts.truthLinkedFakeRate)
253 kwargs.setdefault('ComputeTrackRecoEfficiency',True)
254
255 if 'TruthSelectionTool' not in kwargs:
256 from InDetPhysValMonitoring.InDetPhysValMonitoringConfig import InDetRttTruthSelectionToolCfg
257 kwargs.setdefault("TruthSelectionTool", acc.popToolsAndMerge(
258 InDetRttTruthSelectionToolCfg(flags)))
259
260 acc.addEventAlgo( CompFactory.ActsTrk.TrackFindingValidationAlg(name=name, **kwargs) )
261 return acc
262

◆ ActsTrackParticleTruthDecorationAlgCfg()

ComponentAccumulator ActsTrackParticleTruthDecorationAlgCfg ( flags,
str name = 'ActsTrackParticleTruthDecorationAlg',
**dict kwargs )

Definition at line 214 of file ActsTruthConfig.py.

216 **kwargs: dict) -> ComponentAccumulator:
217 acc = ComponentAccumulator()
218 kwargs.setdefault('TrackToTruthAssociationMaps','ActsCombinedTracksToTruthParticleAssociation')
219 kwargs.setdefault('TrackParticleContainerName','ActsCombinedTracksParticlesAlt')
220 kwargs.setdefault('TruthParticleHitCounts','TruthParticleHitCounts')
221 # weights used for computing the matching probability and identifying the best match
222 setDefaultTruthMatchingArgs(kwargs)
223 kwargs.setdefault('TruthLinkedFakeRate', flags.Acts.truthLinkedFakeRate)
224 kwargs.setdefault('ComputeTrackRecoEfficiency',False)
225
226 if 'TruthSelectionTool' not in kwargs:
227 # should be as tight or looser as the TruthSelectionTool when analysing the truth matches
228 from InDetPhysValMonitoring.InDetPhysValMonitoringConfig import InDetRttTruthSelectionToolCfg
229 kwargs.setdefault("TruthSelectionTool", acc.popToolsAndMerge(
230 InDetRttTruthSelectionToolCfg(flags,
231 name='RelaxedInDetRttTruthSelectionTool',
232 requireOnlyPrimary=False,
233 minPt=500.,
234 maxEta=4.5
235 )))
236
237 if 'MCTruthClassifier' not in kwargs:
238 from MCTruthClassifier.MCTruthClassifierConfig import MCTruthClassifierCfg
239 kwargs.setdefault("MCTruthClassifier", acc.popToolsAndMerge(
240 MCTruthClassifierCfg(flags)))
241
242 acc.addEventAlgo( CompFactory.ActsTrk.TrackParticleTruthDecorationAlg(name=name, **kwargs) )
243 return acc
244

◆ ActsTrackToTruthAssociationAlgCfg()

ComponentAccumulator ActsTrackToTruthAssociationAlgCfg ( flags,
str name = 'ActsTracksToTruthAssociationAlg',
bool doInner = True,
bool doMuon = False,
**dict kwargs )

Definition at line 119 of file ActsTruthConfig.py.

122 **kwargs: dict) -> ComponentAccumulator:
123 acc = ComponentAccumulator()
124 if doInner and flags.Detector.GeometryITk:
125 acc.merge( MapToInDetSimDataWrapSvcCfg(flags, collectionName='ITkStripSDO_Map') )
126 elif doInner and flags.Detector.GeometryID:
127 acc.merge( MapToInDetSimDataWrapSvcCfg(flags, collectionName='SCT_SDO_Map') )
128
129 kwargs.setdefault('ACTSTracksLocation','ActsTracks')
130 kwargs.setdefault("MeasurementAssocKeys", _truthAssociationKeysCfg(flags, doInner = doInner, doMuon = doMuon))
131 kwargs.setdefault('AssociationMapOut','ActsTracksToTruthParticles')
132 kwargs.setdefault('MaxEnergyLoss',1e3*UnitConstants.TeV)
133 acc.addEventAlgo( CompFactory.ActsTrk.TrackToTruthAssociationAlg(name=name, **kwargs) )
134 return acc
135

◆ ActsTruthAssociationAlgCfg()

ComponentAccumulator ActsTruthAssociationAlgCfg ( flags,
**dict kwargs )

Definition at line 165 of file ActsTruthConfig.py.

166 **kwargs: dict) -> ComponentAccumulator:
167 acc = ComponentAccumulator()
168
169 if flags.Detector.EnablePixel:
170 acc.merge(ActsInDetPixelClusterToTruthAssociationAlgCfg(flags, **extractChildKwargs(prefix="PixelClusterToTruthAssociationAlg.", **kwargs) ))
171
172 if flags.Detector.EnableSCT:
173 acc.merge(ActsInDetStripClusterToTruthAssociationAlgCfg(flags, **extractChildKwargs(prefix="StripClusterToTruthAssociationAlg.", **kwargs) ))
174
175 if flags.Detector.EnableITkPixel:
176 acc.merge(ActsPixelClusterToTruthAssociationAlgCfg(flags, **extractChildKwargs(prefix="PixelClusterToTruthAssociationAlg.", **kwargs) ))
177
178 if flags.Detector.EnableITkStrip:
179 acc.merge(ActsStripClusterToTruthAssociationAlgCfg(flags, **extractChildKwargs(prefix="StripClusterToTruthAssociationAlg.", **kwargs) ))
180
181 if flags.Reco.EnableHGTDExtension and flags.Acts.useHGTDClusterInTrackFinding:
182 acc.merge(ActsHgtdClusterToTruthAssociationAlgCfg(flags, **extractChildKwargs(prefix="HgtdClusterToTruthAssociationAlg.", **kwargs) ))
183 return acc
184

◆ ActsTruthParticleHitCountAlgCfg()

ComponentAccumulator ActsTruthParticleHitCountAlgCfg ( flags,
str name = 'ActsTruthParticleHitCountAlg',
bool doInner = True,
bool doMuon = False,
**dict kwargs )

Definition at line 141 of file ActsTruthConfig.py.

144 **kwargs: dict) -> ComponentAccumulator:
145 acc = ComponentAccumulator()
146 if doInner and flags.Detector.GeometryITk:
147 acc.merge( MapToInDetSimDataWrapSvcCfg(flags, collectionName='ITkStripSDO_Map') )
148 elif doInner and flags.Detector.GeometryID:
149 acc.merge( MapToInDetSimDataWrapSvcCfg(flags, collectionName='SCT_SDO_Map') )
150
151 kwargs.setdefault("MeasurementAssocKeys", _truthAssociationKeysCfg(flags, doInner = doInner, doMuon = doMuon))
152 kwargs.setdefault('TruthParticleHitCountsOut','TruthParticleHitCounts')
153 kwargs.setdefault('MaxEnergyLoss',1e3*UnitConstants.TeV) # @TODO introduce flag and synchronise with TrackToTruthAssociationAlg
154 kwargs.setdefault('NHitsMin',4)
155
156
157 acc.addEventAlgo( CompFactory.ActsTrk.TruthParticleHitCountAlg(name=name, **kwargs) )
158 return acc
159

◆ ActsTruthTrackBuilderToolCfg()

ComponentAccumulator ActsTruthTrackBuilderToolCfg ( flags,
str name = "TruthTrackBuilderTool",
**dict kwargs )

Definition at line 263 of file ActsTruthConfig.py.

266 **kwargs: dict) -> ComponentAccumulator:
267
268 acc = ComponentAccumulator()
269
270 kwargs.setdefault("usePixelClusters", flags.Acts.Gbts.Training.usePixelClusters)
271 kwargs.setdefault("useStripClusters", flags.Acts.Gbts.Training.useStripClusters)
272
273 acc.setPrivateTools(
274 CompFactory.ActsTrk.TruthTrackBuilderTool(
275 name=name,
276 **kwargs
277 )
278 )
279
280 return acc
281

◆ MapToInDetSimDataWrapSvcCfg()

ComponentAccumulator MapToInDetSimDataWrapSvcCfg ( flags,
* ,
str collectionName )

Definition at line 9 of file ActsTruthConfig.py.

11 collectionName: str) -> ComponentAccumulator:
12 acc = ComponentAccumulator()
13
14 AddressRemappingSvc = CompFactory.AddressRemappingSvc(
15 TypeKeyOverwriteMaps = [f"InDetSimDataCollection#{collectionName}->InDetSimDataCollectionWrap#{collectionName}"]
16 )
17 acc.addService(AddressRemappingSvc)
18 return acc
19
20

◆ setDefaultTruthMatchingArgs()

setDefaultTruthMatchingArgs ( kwargs)

Definition at line 185 of file ActsTruthConfig.py.

185def setDefaultTruthMatchingArgs(kwargs) :
186 from ROOT.xAOD import UncalibMeasType
187 matchWeights = [0. for d in range(UncalibMeasType.nTypes)]
188 countWeights = [0. for d in range(UncalibMeasType.nTypes)]
189 matchWeights[UncalibMeasType.PixelClusterType] = 10.
190 matchWeights[UncalibMeasType.StripClusterType] = 5.
191
192 #TODO: Re-evaluate the weights!
193 matchWeights[UncalibMeasType.MdtDriftCircleType] = 1.
194 matchWeights[UncalibMeasType.MMClusterType] = 1.
195 matchWeights[UncalibMeasType.sTgcStripType] = 1.
196 matchWeights[UncalibMeasType.RpcStripType] = 1.
197 matchWeights[UncalibMeasType.TgcStripType] = 1.
198
199 countWeights[UncalibMeasType.PixelClusterType] = 1.
200 countWeights[UncalibMeasType.StripClusterType] = 1.
201 countWeights[UncalibMeasType.MdtDriftCircleType] = 1.
202 countWeights[UncalibMeasType.RpcStripType] = 0.5
203 countWeights[UncalibMeasType.TgcStripType] = 0.5
204 countWeights[UncalibMeasType.MMClusterType] = 0.25
205 countWeights[UncalibMeasType.sTgcStripType] = 0.25
206
207 kwargs.setdefault('MatchWeights',matchWeights)
208 kwargs.setdefault('CountWeights', countWeights)
209 kwargs.setdefault('StatisticPtBins',[1e3,2.5e3,5e3,10e3,100e3])
210 kwargs.setdefault('ShowDetailedTables',False)
211 kwargs.setdefault('PdgIdCategorisation',False)
212 kwargs.setdefault('StatisticEtaBins',[eta/10. for eta in range(5, 40, 5)])
213