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
15// Tools
21
22// ACTS
23#include "Acts/EventData/ProxyAccessor.hpp"
24#include "Acts/EventData/TrackContainer.hpp"
25#include "Acts/EventData/VectorTrackContainer.hpp"
26
27// ActsTrk
37
38// Athena
39#include "AthenaKernel/Chrono.h"
41#include "GaudiKernel/EventContext.h"
45
46// STL
47#include <memory>
48#include <optional>
49#include <semaphore>
50#include <string>
51
52// Handle Keys
59
60namespace ActsPlugins {
61class GnnPipeline;
62}
63
64namespace ActsTrk {
66public:
67 TrackFindingGNNAlg(const std::string &name, ISvcLocator *pSvcLocator);
69
70 virtual StatusCode initialize() override;
71 virtual StatusCode execute(const EventContext &ctx) const override;
72
73private:
74 // Tool Handles
75 ToolHandle<GenericMonitoringTool> m_monTool{this, "MonTool", "",
76 "Monitoring tool"};
77 ServiceHandle<ActsTrk::ITrackingGeometrySvc> m_trackingGeometrySvc{this, "TrackingGeometrySvc", "ActsTrackingGeometrySvc"};
78 ToolHandle<ITrackParamsEstimationTool> m_paramEstimationTool{
79 this, "TrackParamsEstimationTool", "", "Track Param Estimation from Seeds"};
80 ToolHandle<IFitterTool> m_fitterTool{
81 this, "FitterTool", "", "Track fitting tool"};
82
86
90
91 // Input: Spacepoint containers
93 m_xaodPixelSpacePointContainerKey{this, "xAODInputPixelSpacePoints",
94 "ITkPixelSpacePoints"};
97 this, "xAODInputSpacePointsContainerKey", "ITkStripSpacePoints"};
100 this, "xAODInputSpacePointsOverlapContainerKey",
101 "ITkStripOverlapSpacePoints"};
102
104 this, "ACTSTracksLocation", "",
105 "Output track collection (ActsTrk variant)"};
106
107 // Configuration
108 Gaudi::Property<unsigned int> m_maxPropagationStep{
109 this, "maxPropagationStep", 1000,
110 "Maximum number of steps for one propagate call"};
111
112 Gaudi::Property<std::string> m_moduleMapPath{this, "moduleMapPath", "",
113 "Path to the module map files"};
114
115 Gaudi::Property<std::string> m_gnnPath{this, "gnnPath", "",
116 "Path to the gnn file"};
117
118 Gaudi::Property<bool> m_usePhiOverlapSps{
119 this, "usePhiOverlapSps", false, "Wether to use phi overlap spacepoints"};
120
121 Gaudi::Property<unsigned int> m_maxGpuInstances{
122 this, "maxGpuInstances", 1,
123 "Number of events that can be on GPU in parallel"};
124
125 Gaudi::Property<unsigned int> m_numTrtContexts{
126 this, "numTrtContexts", 1, "Number of TensorRT contexts to allocate"};
127
128 Gaudi::Property<double> m_varianceInflation{
129 this, "varianceInflation", 1.0,
130 "Factor that is multiplied to all initial variances"};
131
132 Gaudi::Property<bool> m_tightSeeds{
133 this, "tightSeeds", false,
134 "Use tight seeds instead of spread seeds for param estimation"};
135
136 Gaudi::Property<double> m_edgeCut{this, "edgeCut", 0.5,
137 "Edge cut to apply after the GNN"};
138
139 Gaudi::Property<unsigned int> m_minCandidateMeasurements{
140 this, "minCandidateMeasurements", 7,
141 "Minimum number of spacepoints to cut for in the GNN candidates"};
142
143 Gaudi::Property<double> m_minDeltaR{
144 this, "minDeltaR", 10.0,
145 "Minimum difference in R to build the initial parameters"};
146
147 Gaudi::Property<bool> m_relaxCentralHoleSel{
148 this, "relaxCentralHoleSel", false, "Relax holes from 2 to 4 in central region"};
149
150 Gaudi::Property<bool> m_relaxMeasurementSel{
151 this, "relaxMeasurementSel", true, "Apply 7,7,7 measurement sel"};
152
153 Gaudi::Property<bool> m_offlineZ0Sel{
154 this, "offlineZ0Sel", false, "Apply offline z0 selection"};
155
156 Gaudi::Property<int> m_cudaDeviceIndex{this, "cudaDeviceIndex", 0,
157 "CUDA device index for GNN inference"};
158
159 std::unique_ptr<ActsPlugins::GnnPipeline> m_gnnPipeline;
160
161 const SCT_ID *m_stripIdHelper = nullptr;
162
163 Acts::TrackSelector::EtaBinnedConfig m_trackSelectorConfig;
164
166 const Acts::Logger &logger() const { return *m_logger; }
167
169 std::unique_ptr<const Acts::Logger> m_logger;
170
171 mutable std::optional<std::counting_semaphore<>> m_gpuInstanceCount
173};
174
175} // namespace ActsTrk
176
177#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.
Utility class to handle the three contexts neeeded in an ACTS reconstruction job 1) GeometryContext -...
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
detail::OnTrackCalibrator< MutableTrackStateBackend > m_uncalibMeasCalibrator
Acts::TrackSelector::EtaBinnedConfig m_trackSelectorConfig
Gaudi::Property< unsigned int > m_numTrtContexts
std::optional< std::counting_semaphore<> > m_gpuInstanceCount ATLAS_THREAD_SAFE
ToolHandle< ITrackParamsEstimationTool > m_paramEstimationTool
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
Gaudi::Property< bool > m_offlineZ0Sel
virtual StatusCode execute(const EventContext &ctx) const override
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
ServiceHandle< ActsTrk::ITrackingGeometrySvc > m_trackingGeometrySvc
SG::WriteHandleKey< TrackContainer > m_trackContainerKey
Gaudi::Property< unsigned int > m_maxGpuInstances
Gaudi::Property< double > m_minDeltaR
ContextUtility m_ctxProvider
Utility to fetch the geometry, magnetic field and calibration context in the event.
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
ToolHandle< IFitterTool > m_fitterTool
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...