ATLAS Offline Software
Loading...
Searching...
No Matches
TrackFindingGNNAlg.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef ACTSTRACKRECONSTRUCTION_TRACKFINDINGGNNALG_H
6#define ACTSTRACKRECONSTRUCTION_TRACKFINDINGGNNALG_H
7
8// Ensure that the ATLAS eigen plugin is loaded first
10
11// Base Class
13
14// Gaudi includes
15#include "GaudiKernel/ToolHandle.h"
16
17// Tools
23
24// ACTS
25#include "Acts/EventData/ProxyAccessor.hpp"
26#include "Acts/EventData/TrackContainer.hpp"
27#include "Acts/EventData/VectorTrackContainer.hpp"
28
29// ActsTrk
38
39// Athena
40#include "AthenaKernel/Chrono.h"
42#include "GaudiKernel/EventContext.h"
46
47// STL
48#include <memory>
49#include <optional>
50#include <semaphore>
51#include <string>
52
53// Handle Keys
60
61namespace ActsPlugins {
62class GnnPipeline;
63}
64
65namespace ActsTrk {
67public:
68 TrackFindingGNNAlg(const std::string &name, ISvcLocator *pSvcLocator);
70
71 virtual StatusCode initialize() override;
72 virtual StatusCode execute(const EventContext &ctx) const override;
73
74private:
75 // Tool Handles
76 ToolHandle<GenericMonitoringTool> m_monTool{this, "MonTool", "",
77 "Monitoring tool"};
78 ToolHandle<ActsTrk::IExtrapolationTool> m_extrapolationTool{
79 this, "ExtrapolationTool", ""};
80 PublicToolHandle<ITrackingGeometryTool> m_trackingGeometryTool{
81 this, "TrackingGeometryTool", ""};
82 ToolHandle<ActsTrk::ITrackParamsEstimationTool> m_paramEstimationTool{
83 this, "TrackParamsEstimationTool", "", "Track Param Estimation from Seeds"};
84 ToolHandle<ActsTrk::IFitterTool> m_fitterTool{
85 this, "FitterTool", "", "Track fitting tool"};
86
88
92
93 // Input: Spacepoint containers
95 m_xaodPixelSpacePointContainerKey{this, "xAODInputPixelSpacePoints",
96 "ITkPixelSpacePoints"};
99 this, "xAODInputSpacePointsContainerKey", "ITkStripSpacePoints"};
102 this, "xAODInputSpacePointsOverlapContainerKey",
103 "ITkStripOverlapSpacePoints"};
104
106 this, "ACTSTracksLocation", "",
107 "Output track collection (ActsTrk variant)"};
108
109 // Configuration
110 Gaudi::Property<unsigned int> m_maxPropagationStep{
111 this, "maxPropagationStep", 1000,
112 "Maximum number of steps for one propagate call"};
113
114 Gaudi::Property<std::string> m_moduleMapPath{this, "moduleMapPath", "",
115 "Path to the module map files"};
116
117 Gaudi::Property<std::string> m_gnnPath{this, "gnnPath", "",
118 "Path to the gnn file"};
119
120 Gaudi::Property<bool> m_usePhiOverlapSps{
121 this, "usePhiOverlapSps", false, "Wether to use phi overlap spacepoints"};
122
123 Gaudi::Property<unsigned int> m_maxGpuInstances{
124 this, "maxGpuInstances", 1,
125 "Number of events that can be on GPU in parallel"};
126
127 Gaudi::Property<unsigned int> m_numTrtContexts{
128 this, "numTrtContexts", 1, "Number of TensorRT contexts to allocate"};
129
130 Gaudi::Property<double> m_varianceInflation{
131 this, "varianceInflation", 1.0,
132 "Factor that is multiplied to all initial variances"};
133
134 Gaudi::Property<bool> m_tightSeeds{
135 this, "tightSeeds", false,
136 "Use tight seeds instead of spread seeds for param estimation"};
137
138 Gaudi::Property<double> m_edgeCut{this, "edgeCut", 0.5,
139 "Edge cut to apply after the GNN"};
140
141 Gaudi::Property<unsigned int> m_minCandidateMeasurements{
142 this, "minCandidateMeasurements", 7,
143 "Minimum number of spacepoints to cut for in the GNN candidates"};
144
145 Gaudi::Property<double> m_minDeltaR{
146 this, "minDeltaR", 10.0,
147 "Minimum difference in R to build the initial parameters"};
148
149 Gaudi::Property<bool> m_relaxCentralHoleSel{
150 this, "relaxCentralHoleSel", false, "Relax holes from 2 to 4 in central region"};
151
152 Gaudi::Property<bool> m_relaxMeasurementSel{
153 this, "relaxMeasurementSel", true, "Apply 7,7,7 measurement sel"};
154
155 Gaudi::Property<bool> m_offlineZ0Sel{
156 this, "offlineZ0Sel", false, "Apply offline z0 selection"};
157
158 Gaudi::Property<int> m_cudaDeviceIndex{this, "cudaDeviceIndex", 0,
159 "CUDA device index for GNN inference"};
160
161 std::unique_ptr<ActsPlugins::GnnPipeline> m_gnnPipeline;
162
163 const SCT_ID *m_stripIdHelper = nullptr;
164
165 Acts::TrackSelector::EtaBinnedConfig m_trackSelectorConfig;
166
168 const Acts::Logger &logger() const { return *m_logger; }
169
171 std::unique_ptr<const Acts::Logger> m_logger;
172
173 mutable std::optional<std::counting_semaphore<>> m_gpuInstanceCount
175};
176
177} // namespace ActsTrk
178
179#endif
Exception-safe IChronoSvc caller.
This is an Identifier helper class for the SCT subdetector.
Property holding a SG store/key/clid from which a WriteHandle is made.
Gaudi::Property< std::string > m_moduleMapPath
Gaudi::Property< std::string > m_gnnPath
Gaudi::Property< bool > m_relaxCentralHoleSel
std::unique_ptr< const Acts::Logger > m_logger
logging instance
ToolHandle< ActsTrk::IFitterTool > m_fitterTool
Acts::TrackSelector::EtaBinnedConfig m_trackSelectorConfig
Gaudi::Property< unsigned int > m_numTrtContexts
ToolHandle< ActsTrk::ITrackParamsEstimationTool > m_paramEstimationTool
std::optional< std::counting_semaphore<> > m_gpuInstanceCount ATLAS_THREAD_SAFE
Gaudi::Property< double > m_edgeCut
virtual StatusCode initialize() override
Gaudi::Property< bool > m_relaxMeasurementSel
std::unique_ptr< ActsPlugins::GnnPipeline > m_gnnPipeline
SG::ReadHandleKey< xAOD::SpacePointContainer > m_xaodStripSpacePointOverlapContainerKey
SG::WriteHandleKey< ActsTrk::TrackContainer > m_trackContainerKey
Gaudi::Property< bool > m_offlineZ0Sel
virtual StatusCode execute(const EventContext &ctx) const override
detail::OnTrackCalibrator< ActsTrk::MutableTrackStateBackend > m_uncalibMeasCalibrator
PublicToolHandle< ITrackingGeometryTool > m_trackingGeometryTool
SG::ReadHandleKey< xAOD::SpacePointContainer > m_xaodPixelSpacePointContainerKey
const Acts::Logger & logger() const
Private access to the logger.
Gaudi::Property< double > m_varianceInflation
Gaudi::Property< unsigned int > m_minCandidateMeasurements
TrackFindingGNNAlg(const std::string &name, ISvcLocator *pSvcLocator)
Gaudi::Property< bool > m_tightSeeds
ToolHandle< ActsTrk::IExtrapolationTool > m_extrapolationTool
Gaudi::Property< unsigned int > m_maxGpuInstances
Gaudi::Property< double > m_minDeltaR
ServiceHandle< IChronoStatSvc > m_chronoSvc
Gaudi::Property< bool > m_usePhiOverlapSps
SG::ReadHandleKey< xAOD::SpacePointContainer > m_xaodStripSpacePointContainerKey
detail::xAODUncalibMeasSurfAcc m_uncalibMeasSurfAccessor
ToolHandle< GenericMonitoringTool > m_monTool
Gaudi::Property< unsigned int > m_maxPropagationStep
Gaudi::Property< int > m_cudaDeviceIndex
Inner detector / ITk calibrator implementation used in the KalmanFilterTool.
Helper class to access the Acts::surface associated with an Uncalibrated xAOD measurement.
An algorithm that can be simultaneously executed in multiple threads.
This is an Identifier helper class for the SCT subdetector.
Definition SCT_ID.h:68
Property holding a SG store/key/clid from which a ReadHandle is made.
Property holding a SG store/key/clid from which a WriteHandle is made.
The AlignStoreProviderAlg loads the rigid alignment corrections and pipes them through the readout ge...