ATLAS Offline Software
Loading...
Searching...
No Matches
InnerTrackerTrigSequence.py
Go to the documentation of this file.
1# Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
2
3from AthenaConfiguration.AthConfigFlags import AthConfigFlags
4from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
5from AthenaCommon.Logging import logging
6
8 def __init__(self, flags : AthConfigFlags, signature : str, rois : str, inView : str):
9
10 self.flags = flags
11 self.signature = signature
12 self.rois = rois
13 self.lastRois = rois
14 self.lastTrkCollection = self.flags.Tracking.ActiveConfig.trkTracks_FTF
15 self.inView = inView
16 self.ambiPrefix = "TrigAmbi"
17 self.log = logging.getLogger("InnerTrackerTrigSequence")
18
19 def sequence(self, recoType : str) -> ComponentAccumulator:
20
21 ca = ComponentAccumulator()
22
23 if self.inView:
24 ca.merge(self.viewDataVerifier(self.inView))
25
26 if recoType == "dataPreparation":
27 ca.merge(self.dataPreparation())
28 return ca
29
30 if recoType =="spacePointFormation":
31 ca.merge(self.dataPreparation())
32 ca.merge(self.spacePointFormation())
33 return ca
34
35 if recoType =="FastTrackFinder":
36 ca.merge(self.dataPreparation())
37 ca.merge(self.spacePointFormation())
38 ca.merge(self.fastTrackFinder())
39 return ca
40
41 if recoType =="Offline":
42 ca.merge(self.dataPreparation())
43 ca.merge(self.spacePointFormation())
44 ca.merge(self.offlinePattern())
45 ca.merge(self.sequenceAfterPattern())
46
47 if recoType =="OfflineNoDataPrep":
48 ca.merge(self.viewDataVerifierAfterDataPrep())
49 ca.merge(self.offlinePattern())
50 ca.merge(self.sequenceAfterPattern())
51
52 return ca
53
55 extraFlags : AthConfigFlags = None,
56 inputTracksName : str = None) -> ComponentAccumulator:
57 """
58 return ComponentAccumulator of the FTF instance
59 if another instance of flags is passed in this is for a second instance of FTF
60 if inputTracksName is specified it is also a second instance but is invoked as first? what about the previous steps? TODO
61 """
62
63 acc = ComponentAccumulator()
64
65 ftfargs = {}
66 flags = self.flags
67
68 signature = flags.Tracking.ActiveConfig.input_name
69
70 if extraFlags:
71 flags = extraFlags
72 ftfargs["inputTracksName"] = self.flags.Tracking.ActiveConfig.trkTracks_FTF
73 #TODO move from .name to .input_name for consistency after migration to private tools
74 signature = flags.Tracking.ActiveConfig.name
75 elif inputTracksName:
76 ftfargs["inputTracksName"] = inputTracksName
77
78 from TrigFastTrackFinder.TrigFastTrackFinderConfig import TrigFastTrackFinderCfg
79 acc.merge(TrigFastTrackFinderCfg(flags, "TrigFastTrackFinder_" + signature,
80 self.rois, **ftfargs))
81 return acc
82
83
84
85 def sequenceAfterPattern(self, recoType : str = "PrecisionTracking", rois : str = "") -> ComponentAccumulator:
86
87 ca = ComponentAccumulator()
88
89 if rois:
90 self.lastRois = rois
91 if self.lastRois != self.rois:
92 self.log.info(f"Sequence after patternReco for signature: {self.signature} RoIs: {self.rois} inview: {self.inView} with new RoIs {self.lastRois} - they must be a subvolume.")
93
94 ca.merge(self.ambiguitySolver())
95 if self.flags.Tracking.ActiveConfig.doTRT:
96 ca.merge(self.trtExtensions())
97 ca.merge(self.xAODParticleCreation())
98
99 return ca
100
ComponentAccumulator sequenceAfterPattern(self, str recoType="PrecisionTracking", str rois="")
__init__(self, AthConfigFlags flags, str signature, str rois, str inView)
ComponentAccumulator fastTrackFinderBase(self, AthConfigFlags extraFlags=None, str inputTracksName=None)