ATLAS Offline Software
ITkFastTrackFinderStandaloneConfig.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.ComponentAccumulator import ComponentAccumulator
4 from AthenaConfiguration.ComponentFactory import CompFactory
5 from AthenaConfiguration.AthConfigFlags import AthConfigFlags
6 
7 from TrigFastTrackFinder.TrigFastTrackFinderConfig import ITkTrigL2LayerNumberToolCfg
8 
9 def ITkTrigTrackSeedingToolStandaloneCfg(flags: AthConfigFlags, **kwargs) -> ComponentAccumulator:
10 
11  acc = ComponentAccumulator()
12 
13  if "layerNumberTool" not in kwargs:
14  ntargs = {"UseNewLayerScheme" : True}
15  kwargs.setdefault("layerNumberTool",acc.popToolsAndMerge(ITkTrigL2LayerNumberToolCfg(flags,**ntargs)))
16 
17  kwargs.setdefault("DoPhiFiltering", False) #no phi-filtering for full-scan tracking
18  kwargs.setdefault("UseBeamTilt", False)
19  kwargs.setdefault("PixelSP_ContainerName", "ITkPixelSpacePoints")
20  kwargs.setdefault("SCT_SP_ContainerName", "ITkStripSpacePoints")
21 
22  isLRT=flags.Tracking.ActiveConfig.extension == "LargeD0"
23 
24  kwargs.setdefault("UsePixelSpacePoints", (not isLRT))
25  kwargs.setdefault("UseSctSpacePoints", isLRT)
26  kwargs.setdefault("pTmin", flags.Tracking.ActiveConfig.minPT[0])
27  kwargs.setdefault("MaxGraphEdges", 1500000)
28  kwargs.setdefault("ConnectionFileName", "binTables_ITK_RUN4_LRT.txt" if isLRT else "binTables_ITK_RUN4.txt")
29 
30  from RegionSelector.RegSelToolConfig import (regSelTool_ITkStrip_Cfg, regSelTool_ITkPixel_Cfg)
31 
32  kwargs.setdefault("RegSelTool_Pixel", acc.popToolsAndMerge( regSelTool_ITkPixel_Cfg( flags) ))
33 
34  kwargs.setdefault("RegSelTool_SCT", acc.popToolsAndMerge( regSelTool_ITkStrip_Cfg( flags) ))
35 
36  acc.setPrivateTools(CompFactory.TrigInDetTrackSeedingTool(**kwargs))
37 
38  return acc
39 
40 def ITkFastTrackFinderStandaloneCfg(flags, SiSPSeededTrackCollectionKey = None):
41  acc = ComponentAccumulator()
42 
43  from TrkConfig.TrkTrackSummaryToolConfig import ITkTrackSummaryToolCfg
44 
45  from InDetConfig.SiTrackMakerConfig import ITkSiTrackMaker_xkCfg
46  ITkSiTrackMakerTool = acc.popToolsAndMerge(ITkSiTrackMaker_xkCfg(flags))
47 
48  ITkSiTrackMakerTool.CombinatorialTrackFinder.writeHolesFromPattern = False
49 
50  if flags.Tracking.ActiveConfig.useTrigTrackFollowing:
51  acc.addPublicTool( CompFactory.TrigInDetTrackFollowingTool( name = "TrigTrackFollowingTool_FTF", LayerNumberTool = acc.popToolsAndMerge(ITkTrigL2LayerNumberToolCfg(flags))))
52 
53  ITkSiTrackMakerTool.useTrigTrackFollowingTool = True
54  ITkSiTrackMakerTool.TrigTrackFollowingTool = acc.getPublicTool("TrigTrackFollowingTool_FTF")
55 
56  if flags.Tracking.ActiveConfig.useTrigRoadPredictor:
57  acc.addPublicTool( CompFactory.TrigInDetRoadPredictorTool( name = "TrigRoadPredictorTool_FTF", LayerNumberTool = acc.popToolsAndMerge(ITkTrigL2LayerNumberToolCfg(flags))))
58 
59  ITkSiTrackMakerTool.useTrigInDetRoadPredictorTool = True
60  ITkSiTrackMakerTool.TrigInDetRoadPredictorTool = acc.getPublicTool("TrigRoadPredictorTool_FTF")
61 
62  ITkSiTrackMakerTool.trackletPoints = flags.Trigger.InDetTracking.trackletPoints
63 
64  acc.addPublicTool(ITkSiTrackMakerTool)
65 
66  acc.addPublicTool( CompFactory.TrigInDetTrackFitter( "TrigInDetTrackFitter" ) )
67 
68  if flags.Trigger.InDetTracking.doGPU:
69  inDetAccelSvc = CompFactory.TrigInDetAccelerationSvc("TrigInDetAccelerationSvc")
70  inDetAccelSvc.useITkGeometry = True # Allows to read and export the ITk geometry
71  inDetAccelSvc.MiddleSpacePointLayers = [81000, 82000,
72  90011, 90012, 90013, 90014, 91002, 91003, 91004, 91005,
73  92000, 92001, 92002, 92003, 92004, 92005, 92006, 92007, 92008, 92009, 92010,
74  92011, 92012, 92013, 92014, 92015, 92016, 92017, 92018, 92019, 92020, 92021, 92022,
75  70011, 70012, 70013, 70014, 71002, 71003, 71004, 71005,
76  72000, 72001, 72002, 72003, 72004, 72005, 72006, 72007, 72008, 72009, 72010,
77  72011, 72012, 72013, 72014, 72015, 72016, 72017, 72018, 72019, 72020, 72021, 72022
78  ]
79  acc.addService(inDetAccelSvc)
80 
81  isLRT=flags.Tracking.ActiveConfig.extension == "LargeD0"
82 
83  from TrigFastTrackFinder.TrigFastTrackFinderConfig import TrigFastTrackFinderMonitoringArg
84  from TriggerJobOpts.TriggerHistSvcConfig import TriggerHistSvcConfig
85 
86  acc.merge(TriggerHistSvcConfig(flags))
87 
88  monTool = TrigFastTrackFinderMonitoringArg(flags, name = "FullScanLRT" if isLRT else "FullScan", doResMon=False)
89 
90  ftf = CompFactory.TrigFastTrackFinder( name = "TrigFastTrackFinder"+flags.Tracking.ActiveConfig.extension,
91  LayerNumberTool = acc.popToolsAndMerge(ITkTrigL2LayerNumberToolCfg(flags)),
92  TrigAccelerationTool = CompFactory.TrigITkAccelerationTool(name = "TrigITkAccelerationTool_FTF") if flags.Trigger.InDetTracking.doGPU else None,
93  TrigAccelerationSvc = acc.getService("TrigInDetAccelerationSvc") if flags.Trigger.InDetTracking.doGPU else None,
94  SpacePointProviderTool = None,
95  TrackSummaryTool = acc.popToolsAndMerge(ITkTrackSummaryToolCfg(flags)),
96  TrackSeedingTool = acc.popToolsAndMerge(ITkTrigTrackSeedingToolStandaloneCfg(flags)),
97  initialTrackMaker = ITkSiTrackMakerTool,
98  trigInDetTrackFitter = CompFactory.TrigInDetTrackFitter( "TrigInDetTrackFitter" ),
99  trigZFinder = CompFactory.TrigZFinder(),
100  doZFinder = False,
101  SeedRadBinWidth = 10,
102  TrackInitialD0Max = 300. if isLRT else 20.0,
103  TracksName = SiSPSeededTrackCollectionKey,
104  TrackZ0Max = 500. if isLRT else 300.,
105  Triplet_D0Max = 300. if isLRT else 4,
106  Triplet_MaxBufferLength = 3 if isLRT else 1,
107  Triplet_MinPtFrac = 0.8,
108  UseTrigSeedML = 1,
109  doResMon = False,
110  doSeedRedundancyCheck = True,
111  pTmin = flags.Tracking.ActiveConfig.minPT[0],
112  useNewLayerNumberScheme = True,
113  MinHits = 3,
114  ITkMode = True, # Allows ftf to use the new track seeding for ITk
115  useGPU = flags.Trigger.InDetTracking.doGPU,
116  StandaloneMode = True, # Allows ftf to be run as an offline algorithm with reco_tf
117  UseTracklets = flags.Tracking.ActiveConfig.useTracklets,
118  doTrackRefit = False,
119  FreeClustersCut = 1,
120  MonTool = monTool,
121  DoubletDR_Max = 150.0,
122  LRT_Mode = isLRT,
123  doDisappearingTrk = False,
124  dodEdxTrk = False,
125  ConnectionFileName = "binTables_ITK_RUN4_LRT.txt" if isLRT else "binTables_ITK_RUN4.txt")
126 
127  acc.addEventAlgo( ftf, primary=True )
128 
129  return acc
130 
131 
python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
TrigFastTrackFinderConfig.TrigFastTrackFinderMonitoringArg
def TrigFastTrackFinderMonitoringArg(flags, name, doResMon)
Definition: TrigFastTrackFinderConfig.py:12
ITkFastTrackFinderStandaloneConfig.ITkFastTrackFinderStandaloneCfg
def ITkFastTrackFinderStandaloneCfg(flags, SiSPSeededTrackCollectionKey=None)
Definition: ITkFastTrackFinderStandaloneConfig.py:40
RegSelToolConfig.regSelTool_ITkPixel_Cfg
def regSelTool_ITkPixel_Cfg(flags)
Definition: RegSelToolConfig.py:120
TrigFastTrackFinderConfig.ITkTrigL2LayerNumberToolCfg
ComponentAccumulator ITkTrigL2LayerNumberToolCfg(AthConfigFlags flags, **kwargs)
Definition: TrigFastTrackFinderConfig.py:259
RegSelToolConfig.regSelTool_ITkStrip_Cfg
def regSelTool_ITkStrip_Cfg(flags)
Definition: RegSelToolConfig.py:126
python.TriggerHistSvcConfig.TriggerHistSvcConfig
def TriggerHistSvcConfig(flags)
Definition: TriggerHistSvcConfig.py:17
python.TrkTrackSummaryToolConfig.ITkTrackSummaryToolCfg
def ITkTrackSummaryToolCfg(flags, name='ITkTrackSummaryTool', **kwargs)
Definition: TrkTrackSummaryToolConfig.py:94
ITkFastTrackFinderStandaloneConfig.ITkTrigTrackSeedingToolStandaloneCfg
ComponentAccumulator ITkTrigTrackSeedingToolStandaloneCfg(AthConfigFlags flags, **kwargs)
Definition: ITkFastTrackFinderStandaloneConfig.py:9
python.SiTrackMakerConfig.ITkSiTrackMaker_xkCfg
def ITkSiTrackMaker_xkCfg(flags, name="ITkSiTrackMaker", **kwargs)
Definition: SiTrackMakerConfig.py:163