ATLAS Offline Software
Loading...
Searching...
No Matches
DVInferenceAlg.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_DVINFERENCEALG_H
5#define MUONINFERENCE_DVINFERENCEALG_H
6
7#include <string>
8
10#include "GaudiKernel/ToolHandle.h"
13
15
16#include "DVInferenceToolBase.h"
17
18namespace MuonML {
19
26public:
27 using AthReentrantAlgorithm::AthReentrantAlgorithm;
28
29 StatusCode initialize() override;
30 StatusCode execute(const EventContext& ctx) const override;
31
32private:
33 ToolHandle<MuonML::DVInferenceToolBase> m_inferenceTool{
34 this, "InferenceTool", "MuonML::DVInferenceToolBase/DisplacedVertexInferenceTool"};
35
37 this, "EventInfoKey", "EventInfo", "Optional validation EventInfo object to decorate with DV inference output"};
38
39 Gaudi::Property<bool> m_decorateEventInfo{
40 this, "DecorateEventInfo", false, "Opt-in: Decorate EventInfo with DV classifier outputs"};
41
43 this, "ScoreDecoration", "EventInfo.dv_score", "Optional: Event-level DV signal probability"};
45 this, "RawOutputDecoration", "EventInfo.dv_rawOutput", "Optional: Raw event-level DV ONNX output"};
47 this, "PassDecoration", "EventInfo.dv_pass", "Optional: Whether DV score passes ScoreThreshold"};
49 this, "NNodesDecoration", "EventInfo.dv_nNodes", "Optional: Number of nodes in the DV event graph"};
51 this, "NEdgesDecoration", "EventInfo.dv_nEdges", "Optional: Number of directed edges in the DV event graph"};
52
53 Gaudi::Property<float> m_scoreThreshold{
54 this, "ScoreThreshold", 0.5f, "DV event score threshold used for the pass decision"};
55 Gaudi::Property<std::string> m_thresholdMode{
56 this, "ThresholdMode", "score", "Quantity compared to ScoreThreshold."};
57 Gaudi::Property<bool> m_printEveryEvent{
58 this, "PrintEveryEvent", false, "Print the DV inference result for every event at INFO level"};
59 bool m_useRawThreshold{false};
60 std::string m_thresholdModeName{"score"};
61};
62
63} // namespace MuonML
64
65#endif
Property holding a SG store/key/clid from which a ReadHandle is made.
Property holding a SG store/key/clid/attr name from which a WriteDecorHandle is made.
An algorithm that can be simultaneously executed in multiple threads.
Run the DV event classifier and publish one score per event.
Gaudi::Property< std::string > m_thresholdMode
SG::WriteDecorHandleKey< xAOD::EventInfo > m_nNodesDecorKey
Gaudi::Property< bool > m_decorateEventInfo
SG::ReadHandleKey< xAOD::EventInfo > m_eventInfoKey
SG::WriteDecorHandleKey< xAOD::EventInfo > m_scoreDecorKey
SG::WriteDecorHandleKey< xAOD::EventInfo > m_passDecorKey
ToolHandle< MuonML::DVInferenceToolBase > m_inferenceTool
Gaudi::Property< bool > m_printEveryEvent
std::string m_thresholdModeName
StatusCode initialize() override
SG::WriteDecorHandleKey< xAOD::EventInfo > m_rawDecorKey
SG::WriteDecorHandleKey< xAOD::EventInfo > m_nEdgesDecorKey
StatusCode execute(const EventContext &ctx) const override
Gaudi::Property< float > m_scoreThreshold
Property holding a SG store/key/clid from which a ReadHandle is made.
Property holding a SG store/key/clid/attr name from which a WriteDecorHandle is made.