ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Tracking
Acts
ActsGnn
src
GnnPipelineTool.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 ACTSGNN_GNNPIPELINETOOL_H
6
#define ACTSGNN_GNNPIPELINETOOL_H
7
8
#include <cstdint>
9
#include <memory>
10
#include <optional>
11
#include <semaphore>
12
#include <string>
13
#include <vector>
14
15
#include "
ActsToolInterfaces/IGnnPipelineTool.h
"
16
#include "
ActsInterop/Logger.h
"
17
#include "
AthenaBaseComps/AthAlgTool.h
"
18
#include "
CxxUtils/checker_macros.h
"
19
#include "GaudiKernel/IChronoStatSvc.h"
20
#include "GaudiKernel/ServiceHandle.h"
21
22
class
PixelID
;
23
class
SCT_ID
;
24
25
#ifdef ACTS_GNN_WITH_MODULEMAP
26
namespace
ActsPlugins {
27
class
GnnPipeline;
28
}
// namespace ActsPlugins
29
#endif
30
31
32
namespace
ActsTrk
{
33
34
class
GnnPipelineTool
:
public
extends<AthAlgTool, IGnnPipelineTool> {
35
public
:
36
GnnPipelineTool
(
const
std::string&
type
,
const
std::string& name,
37
const
IInterface* parent);
38
virtual
~GnnPipelineTool
();
39
40
StatusCode
initialize
()
override
;
41
42
StatusCode
buildSeed
(
43
const
std::vector<const xAOD::SpacePointContainer*>&
44
spacePointCollections,
45
ActsTrk::SeedContainer
& seeds)
const override
;
46
47
private
:
48
Gaudi::Property<std::string>
m_moduleMapPath
{
this
,
"moduleMapPath"
,
""
,
49
"Path to the module map files"
};
50
Gaudi::Property<std::string>
m_gnnPath
{
this
,
"gnnPath"
,
""
,
51
"Path to the gnn file"
};
52
Gaudi::Property<bool>
m_usePhiOverlapSps
{
53
this
,
"usePhiOverlapSps"
,
false
,
54
"Whether to use phi overlap spacepoints"
};
55
Gaudi::Property<unsigned int>
m_maxGpuInstances
{
56
this
,
"maxGpuInstances"
, 1,
57
"Number of events that can be on GPU in parallel"
};
58
Gaudi::Property<unsigned int>
m_numTrtContexts
{
59
this
,
"numTrtContexts"
, 1,
"Number of TensorRT contexts to allocate"
};
60
Gaudi::Property<double>
m_edgeCut
{
this
,
"edgeCut"
, 0.5,
61
"Edge cut to apply after the GNN"
};
62
Gaudi::Property<unsigned int>
m_minCandidateMeasurements
{
63
this
,
"minCandidateMeasurements"
, 7,
64
"Minimum number of spacepoints to cut for in the GNN candidates"
};
65
Gaudi::Property<int>
m_cudaDeviceIndex
{
this
,
"cudaDeviceIndex"
, 0,
66
"CUDA device index for GNN inference"
};
67
Gaudi::Property<unsigned int>
m_numFeatures
{
68
this
,
"numFeatures"
, 12,
69
"Number of input features per spacepoint: 12 (spacepoint and both strip "
70
"clusters) or 4 (spacepoint only, pixel-only models)"
};
71
72
const
Acts::Logger&
logger
()
const
{
return
*
m_logger
; }
73
std::unique_ptr<const Acts::Logger>
m_logger
;
74
75
ServiceHandle<IChronoStatSvc>
m_chronoSvc
{
"ChronoStatSvc"
, name()};
76
77
const
PixelID
*
m_pixelIdHelper
{
nullptr
};
78
const
SCT_ID
*
m_stripIdHelper
{
nullptr
};
79
80
StatusCode
buildFeatures
(
81
const
std::vector<const xAOD::SpacePointContainer*>&
82
spacePointCollections,
83
std::vector<float>& features, std::vector<std::uint64_t>& moduleIds,
84
std::vector<int>& ids,
85
std::vector<const xAOD::SpacePoint*>& allSPPtrs,
86
std::size_t nFeatures = 12)
const
;
87
88
#ifdef ACTS_GNN_WITH_MODULEMAP
89
std::unique_ptr<ActsPlugins::GnnPipeline> m_gnnPipeline;
90
#endif
91
mutable
std::optional<std::counting_semaphore<>> m_gpuInstanceCount
92
ATLAS_THREAD_SAFE
{};
93
};
94
95
}
// namespace ActsTrk
96
97
#endif
AthAlgTool.h
IGnnPipelineTool.h
Logger.h
checker_macros.h
Define macros for attributes used to control the static checker.
ActsTrk::GnnPipelineTool::m_gnnPath
Gaudi::Property< std::string > m_gnnPath
Definition
GnnPipelineTool.h:50
ActsTrk::GnnPipelineTool::buildSeed
StatusCode buildSeed(const std::vector< const xAOD::SpacePointContainer * > &spacePointCollections, ActsTrk::SeedContainer &seeds) const override
Definition
GnnPipelineTool.cxx:187
ActsTrk::GnnPipelineTool::m_numFeatures
Gaudi::Property< unsigned int > m_numFeatures
Definition
GnnPipelineTool.h:67
ActsTrk::GnnPipelineTool::m_stripIdHelper
const SCT_ID * m_stripIdHelper
Definition
GnnPipelineTool.h:78
ActsTrk::GnnPipelineTool::~GnnPipelineTool
virtual ~GnnPipelineTool()
ActsTrk::GnnPipelineTool::m_usePhiOverlapSps
Gaudi::Property< bool > m_usePhiOverlapSps
Definition
GnnPipelineTool.h:52
ActsTrk::GnnPipelineTool::ATLAS_THREAD_SAFE
std::optional< std::counting_semaphore<> > m_gpuInstanceCount ATLAS_THREAD_SAFE
Definition
GnnPipelineTool.h:92
ActsTrk::GnnPipelineTool::initialize
StatusCode initialize() override
Definition
GnnPipelineTool.cxx:181
ActsTrk::GnnPipelineTool::m_moduleMapPath
Gaudi::Property< std::string > m_moduleMapPath
Definition
GnnPipelineTool.h:48
ActsTrk::GnnPipelineTool::m_maxGpuInstances
Gaudi::Property< unsigned int > m_maxGpuInstances
Definition
GnnPipelineTool.h:55
ActsTrk::GnnPipelineTool::m_minCandidateMeasurements
Gaudi::Property< unsigned int > m_minCandidateMeasurements
Definition
GnnPipelineTool.h:62
ActsTrk::GnnPipelineTool::m_chronoSvc
ServiceHandle< IChronoStatSvc > m_chronoSvc
Definition
GnnPipelineTool.h:75
ActsTrk::GnnPipelineTool::m_logger
std::unique_ptr< const Acts::Logger > m_logger
Definition
GnnPipelineTool.h:73
ActsTrk::GnnPipelineTool::GnnPipelineTool
GnnPipelineTool(const std::string &type, const std::string &name, const IInterface *parent)
Definition
GnnPipelineTool.cxx:27
ActsTrk::GnnPipelineTool::m_numTrtContexts
Gaudi::Property< unsigned int > m_numTrtContexts
Definition
GnnPipelineTool.h:58
ActsTrk::GnnPipelineTool::logger
const Acts::Logger & logger() const
Definition
GnnPipelineTool.h:72
ActsTrk::GnnPipelineTool::m_cudaDeviceIndex
Gaudi::Property< int > m_cudaDeviceIndex
Definition
GnnPipelineTool.h:65
ActsTrk::GnnPipelineTool::m_edgeCut
Gaudi::Property< double > m_edgeCut
Definition
GnnPipelineTool.h:60
ActsTrk::GnnPipelineTool::m_pixelIdHelper
const PixelID * m_pixelIdHelper
Definition
GnnPipelineTool.h:77
ActsTrk::GnnPipelineTool::buildFeatures
StatusCode buildFeatures(const std::vector< const xAOD::SpacePointContainer * > &spacePointCollections, std::vector< float > &features, std::vector< std::uint64_t > &moduleIds, std::vector< int > &ids, std::vector< const xAOD::SpacePoint * > &allSPPtrs, std::size_t nFeatures=12) const
Definition
GnnFeatures.h:48
PixelID
This is an Identifier helper class for the Pixel subdetector.
Definition
PixelID.h:69
SCT_ID
This is an Identifier helper class for the SCT subdetector.
Definition
SCT_ID.h:68
ServiceHandle
Definition
ClusterMakerTool.h:36
ActsTrk
The AlignStoreProviderAlg loads the rigid alignment corrections and pipes them through the readout ge...
Definition
MdtCalibInput.h:31
ActsTrk::SeedContainer
Definition
SeedContainer.h:67
type
Generated on
for ATLAS Offline Software by
1.17.0