ATLAS Offline Software
InnerTrackerTrigSequence.py
Go to the documentation of this file.
1 # Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
2 
3 from AthenaConfiguration.AthConfigFlags import AthConfigFlags
4 from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
5 from 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 
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 
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 
grepfile.info
info
Definition: grepfile.py:38
python.InnerTrackerTrigSequence.InnerTrackerTrigSequence.signature
signature
Definition: InnerTrackerTrigSequence.py:11
python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
TrigFastTrackFinderConfig.TrigFastTrackFinderCfg
ComponentAccumulator TrigFastTrackFinderCfg(AthConfigFlags flags, str name, str RoIs, str inputTracksName=None)
Definition: TrigFastTrackFinderConfig.py:354
python.InnerTrackerTrigSequence.InnerTrackerTrigSequence
Definition: InnerTrackerTrigSequence.py:7
python.InnerTrackerTrigSequence.InnerTrackerTrigSequence.log
log
Definition: InnerTrackerTrigSequence.py:17
python.InnerTrackerTrigSequence.InnerTrackerTrigSequence.flags
flags
Definition: InnerTrackerTrigSequence.py:10
python.InnerTrackerTrigSequence.InnerTrackerTrigSequence.ambiPrefix
ambiPrefix
Definition: InnerTrackerTrigSequence.py:16
python.InnerTrackerTrigSequence.InnerTrackerTrigSequence.sequence
ComponentAccumulator sequence(self, str recoType)
Definition: InnerTrackerTrigSequence.py:19
python.InnerTrackerTrigSequence.InnerTrackerTrigSequence.lastTrkCollection
lastTrkCollection
Definition: InnerTrackerTrigSequence.py:14
python.InnerTrackerTrigSequence.InnerTrackerTrigSequence.__init__
def __init__(self, AthConfigFlags flags, str signature, str rois, str inView)
Definition: InnerTrackerTrigSequence.py:8
python.InnerTrackerTrigSequence.InnerTrackerTrigSequence.rois
rois
Definition: InnerTrackerTrigSequence.py:12
python.InnerTrackerTrigSequence.InnerTrackerTrigSequence.fastTrackFinderBase
ComponentAccumulator fastTrackFinderBase(self, AthConfigFlags extraFlags=None, str inputTracksName=None)
Definition: InnerTrackerTrigSequence.py:54
python.InnerTrackerTrigSequence.InnerTrackerTrigSequence.sequenceAfterPattern
ComponentAccumulator sequenceAfterPattern(self, str recoType="PrecisionTracking", str rois="")
Definition: InnerTrackerTrigSequence.py:85
python.InnerTrackerTrigSequence.InnerTrackerTrigSequence.inView
inView
Definition: InnerTrackerTrigSequence.py:15
python.InnerTrackerTrigSequence.InnerTrackerTrigSequence.lastRois
lastRois
Definition: InnerTrackerTrigSequence.py:13
pickleTool.object
object
Definition: pickleTool.py:30