ATLAS Offline Software
Loading...
Searching...
No Matches
ActsInspectTruthContentConfig.py
Go to the documentation of this file.
1# Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
2
3from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
4from AthenaConfiguration.ComponentFactory import CompFactory
5
6
7def isdet(flags,
8 *,
9 pixel: list = None,
10 strip: list = None,
11 hgtd: list = None) -> list:
12 keys = []
13 if flags.Detector.EnableITkPixel and pixel is not None:
14 keys += pixel
15 if flags.Detector.EnableITkStrip and strip is not None:
16 keys += strip
17 if flags.Detector.EnableHGTD and flags.Acts.useHGTDClusterInTrackFinding and hgtd is not None:
18 keys += hgtd
19 return keys
20
21
23 name: str = "ActsInspectTruthContentAlg",
24 **kwargs) -> ComponentAccumulator:
25 acc = ComponentAccumulator()
26 if flags.Acts.useHGTDClusterInTrackFinding and flags.Detector.EnableHGTD:
27 kwargs.setdefault('Clusters', isdet(flags,
28 pixel=['ITkPixelClusters'],
29 strip=['ITkStripClusters'],
30 hgtd=['HGTD_Clusters']))
31
32 kwargs.setdefault('TruthAssociationMaps', isdet(flags,
33 pixel=['ITkPixelClustersToTruthParticles'],
34 strip=['ITkStripClustersToTruthParticles'],
35 hgtd=['HgtdClustersToTruthParticles']))
36 else:
37 kwargs.setdefault('Clusters', isdet(flags,
38 pixel=['ITkPixelClusters'],
39 strip=['ITkStripClusters']))
40
41 kwargs.setdefault('TruthAssociationMaps', isdet(flags,
42 pixel=['ITkPixelClustersToTruthParticles'],
43 strip=['ITkStripClustersToTruthParticles']))
44
45 from InDetConfig.ITkActsHelpers import isFastPrimaryPass
46 if isFastPrimaryPass(flags):
47 kwargs.setdefault('Seeds', ['ActsPixelSeeds'])
48 kwargs.setdefault('Tracks', ['ActsTracks'] if not flags.Acts.doAmbiguityResolution else ['ActsResolvedTracks'])
49 else:
50 kwargs.setdefault('Seeds', ['ActsLegacyPixelSeeds', 'ActsLegacyStripSeeds'])
51 kwargs.setdefault('Tracks', ['ActsLegacyTracks'] if not flags.Acts.doAmbiguityResolution else ['ActsLegacyResolvedTracks'])
52
53 acc.addEventAlgo(CompFactory.ActsTrk.ActsInspectTruthContentAlg(name, **kwargs))
54 return acc
55
ComponentAccumulator ActsInspectTruthContentAlgCfg(flags, str name="ActsInspectTruthContentAlg", **kwargs)
list isdet(flags, *, list pixel=None, list strip=None, list hgtd=None)