File ExaTrkXTrackFindingTorch.hpp

namespace Acts

Note

This file is foreseen for the Geometry module to replace Extent

class ExaTrkXTrackFindingTorch : public Acts::ExaTrkXTrackFindingBase
#include <Acts/Plugins/ExaTrkX/ExaTrkXTrackFindingTorch.hpp>

Class implementing the Exa.TrkX track finding algorithm based on libtorch.

Uses Boost.Graph for as graph library

Public Functions

ExaTrkXTrackFindingTorch(const Config &config)

Constructor of the track finding module.

Parameters

config – is the config struct to configure the module

~ExaTrkXTrackFindingTorch()

Destructor.

inline const Config &config() const

Access the config struct.

virtual std::optional<ExaTrkXTime> getTracks(std::vector<float> &inputValues, std::vector<int> &spacepointIDs, std::vector<std::vector<int>> &trackCandidates, const Logger &logger = getDummyLogger(), bool recordTiming = false) const override

Run the inference.

Note

The input values are not const, because the ONNX API takes only non-const pointers.

Parameters
  • inputValues – Spacepoint data as a flattened NxD array, where D is the dimensionality of a spacepoint (usually 3, but additional information like cell information can be provided).

  • spacepointIDs – The corresponding spacepoint IDs

  • trackCandidates – This vector is filled with the tracks as vectors of spacepoint IDs

  • logger – If provided, logging is enabled

  • recordTiming – If enabled, returns a ExaTrkXTime object with measured timings

Private Members

Config m_cfg
std::unique_ptr<torch::jit::Module> m_embeddingModel
std::unique_ptr<torch::jit::Module> m_filterModel
std::unique_ptr<torch::jit::Module> m_gnnModel
struct Config
#include <Acts/Plugins/ExaTrkX/ExaTrkXTrackFindingTorch.hpp>

Configuration struct for the track finding.

Public Members

float edgeCut = 0.5
int embeddingDim = 8
float filterCut = 0.21
int knnVal = 500
std::string modelDir
int n_chunks = 5
float rVal = 1.6
int64_t spacepointFeatures = 3
namespace jit