ATLAS Offline Software
Loading...
Searching...
No Matches
SegmentEdgeClassifierTool.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3*/
4#ifndef MUONINFERENCE_SEGMENTEDGECLASSIFIERTOOL_H
5#define MUONINFERENCE_SEGMENTEDGECLASSIFIERTOOL_H
6
9#include "MuonMLEvent.h"
10#include "Gaudi/Property.h"
11
12#include <cstdint>
13#include <string>
14#include <vector>
15
16namespace MuonML {
17
26 int chamberIndex{0};
27 int layers{0};
28 int sector{0};
29 int nSegments{0};
30 };
31
60 virtual public ISegmentEdgeClassifierTool {
61 public:
62 using BucketInferenceToolBase::BucketInferenceToolBase;
63
65 StatusCode initialize() override;
66
69 StatusCode runGraphInference(const EventContext& ctx,
70 GraphRawData& graphData) const override;
71
74 StatusCode buildGraph(const EventContext& ctx,
75 const xAOD::MuonSegmentContainer& segments,
76 SegmentEdgeGraph& graph) const override;
77
80 StatusCode classifyEdges(const EventContext& ctx,
81 const SegmentEdgeGraph& graph,
82 std::vector<SegmentEdgeScore>& scores) const override;
83
84 private:
85 Gaudi::Property<float> m_maxDeltaThetaDeg{this, "MaxDeltaThetaDeg", 35.f};
86 Gaudi::Property<int> m_maxDeltaSector{this, "MaxDeltaSector", 1};
87 Gaudi::Property<int> m_sectorModulo{this, "SectorModulo", 16};
88 Gaudi::Property<std::string> m_inputNodeName{this, "InputNodeName", "x"};
89 Gaudi::Property<std::string> m_inputEdgeIndexName{this, "InputEdgeIndexName", "edge_index"};
90 Gaudi::Property<std::string> m_inputEdgeAttrName{this, "InputEdgeAttrName", "edge_attr"};
91 Gaudi::Property<std::string> m_outputName{this, "OutputName", "logits"};
92 float m_cosMin{0.f};
93
95 std::vector<std::string> m_nodeFeatureNames{};
96 std::vector<SegmentNodeFeatureId> m_nodeFeatureIds{};
97 };
98}
99#endif
Generic feature definitions and utilities shared across ML inference tools.
Interface for segment-edge GNN classification.
Runs a segment-level GNN on reconstructed muon segments to classify segment-pair edges as "good" or "...
Gaudi::Property< std::string > m_outputName
Gaudi::Property< std::string > m_inputEdgeAttrName
StatusCode runGraphInference(const EventContext &ctx, GraphRawData &graphData) const override
Not supported by this tool; returns FAILURE.
StatusCode classifyEdges(const EventContext &ctx, const SegmentEdgeGraph &graph, std::vector< SegmentEdgeScore > &scores) const override
Run ONNX inference on graph and populate scores with logit and probability for each edge; called afte...
StatusCode buildGraph(const EventContext &ctx, const xAOD::MuonSegmentContainer &segments, SegmentEdgeGraph &graph) const override
Build a GNN graph from segments, computing node and edge features and storing the graph structure in ...
std::vector< std::string > m_nodeFeatureNames
Node feature order expected by the model metadata (resolved at initialize).
Gaudi::Property< std::string > m_inputEdgeIndexName
Gaudi::Property< std::string > m_inputNodeName
std::vector< SegmentNodeFeatureId > m_nodeFeatureIds
StatusCode initialize() override
Retrieve the ONNX model and resolve node feature ordering from metadata.
MuonSegmentContainer_v1 MuonSegmentContainer
Definition of the current "MuonSegment container version".
Segment features derived from or stored in bucket metadata.
int chamberIndex
Muon chamber index of the segment.
int sector
Sector number (typically 0–15).
int layers
Total number of active layers in the segment.
int nSegments
Count of segments in the same chamber/sector/eta group.
Helper struct to ship the Graph from the space point buckets to ONNX.
Definition GraphData.h:25