ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
InnerDetector
InDetRecTools
InDetPVNNSelection
InDetPVNNSelection
PVNN.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3
4
This class is used in conjunction with SaltModel to run inference on a transformer model.
5
Whereas SaltModel handles the interfacing with the ONNX runtime, this class handles
6
the interfacing with the ATLAS EDM. It is responsible for collecting all the inputs
7
needed for inference, running inference (via SaltModel), and decorating the results
8
back to ATLAS EDM.
9
*/
10
11
#ifndef PVNN_H
12
#define PVNN_H
13
14
// Tool includes
15
#include "
InDetPVNNSelection/DataPrepUtilities.h
"
16
#include "
InDetPVNNSelection/IParticlesLoader.h
"
17
#include "
FlavorTagInference/SaltModel.h
"
18
19
// EDM includes
20
#include "
xAODTracking/VertexFwd.h
"
21
22
#include <cstddef>
23
#include <memory>
24
#include <string>
25
#include <map>
26
27
40
namespace
InDetPVNNSelection
{
41
42
// Tool to classify hard scatter vertex using PVNN based taggers
43
class
PVNN
44
{
45
public
:
46
PVNN
(
const
std::string& nnFile);
47
PVNN
(
PVNN
&&) =
delete
;
48
PVNN
(
const
PVNN
&) =
delete
;
49
virtual
~PVNN
();
50
51
virtual
float
decorate
(
const
xAOD::Vertex
& vertex)
const
;
52
53
private
:
54
// type definitions for ONNX output decorators
55
using
TPC
=
xAOD::TrackParticleContainer
;
56
using
TrackLinks
= std::vector<ElementLink<TPC>>;
57
58
template
<
typename
T>
59
using
Dec
=
SG::Decorator<T>
;
60
61
template
<
typename
T>
62
using
Decs
= std::vector<std::pair<std::string, Dec<T>>>;
63
64
struct
Decorators
{
65
Decs<float>
vertexFloat
;
66
};
67
68
/* create all decorators */
69
std::set<std::string>
createDecorators
(
const
FlavorTagInference::OutputConfig
& outConfig);
70
71
std::shared_ptr<const FlavorTagInference::SaltModel>
m_saltModel
;
72
std::string
m_modelPath
;
73
std::string
m_input_node_name
;
74
std::vector<internal::VarFromVertex>
m_varsFromVertex
;
75
std::vector<std::shared_ptr<IConstituentsLoader>>
m_constituentsLoaders
;
76
Decorators
m_decorators
;
77
float
m_defaultValue
{};
78
};
79
}
// end namespace InDetPVNNSelection
80
#endif
// PVNN_H
SaltModel.h
IParticlesLoader.h
DataPrepUtilities.h
VertexFwd.h
InDetPVNNSelection::PVNN::m_decorators
Decorators m_decorators
Definition
PVNN.h:76
InDetPVNNSelection::PVNN::m_saltModel
std::shared_ptr< const FlavorTagInference::SaltModel > m_saltModel
Definition
PVNN.h:71
InDetPVNNSelection::PVNN::PVNN
PVNN(PVNN &&)=delete
InDetPVNNSelection::PVNN::decorate
virtual float decorate(const xAOD::Vertex &vertex) const
Definition
PVNN.cxx:106
InDetPVNNSelection::PVNN::m_modelPath
std::string m_modelPath
Definition
PVNN.h:72
InDetPVNNSelection::PVNN::~PVNN
virtual ~PVNN()
InDetPVNNSelection::PVNN::Decs
std::vector< std::pair< std::string, Dec< T > > > Decs
Definition
PVNN.h:62
InDetPVNNSelection::PVNN::m_constituentsLoaders
std::vector< std::shared_ptr< IConstituentsLoader > > m_constituentsLoaders
Definition
PVNN.h:75
InDetPVNNSelection::PVNN::m_input_node_name
std::string m_input_node_name
Definition
PVNN.h:73
InDetPVNNSelection::PVNN::TPC
xAOD::TrackParticleContainer TPC
Definition
PVNN.h:55
InDetPVNNSelection::PVNN::PVNN
PVNN(const PVNN &)=delete
InDetPVNNSelection::PVNN::m_defaultValue
float m_defaultValue
Definition
PVNN.h:77
InDetPVNNSelection::PVNN::Dec
SG::Decorator< T > Dec
Definition
PVNN.h:59
InDetPVNNSelection::PVNN::PVNN
PVNN(const std::string &nnFile)
Definition
PVNN.cxx:28
InDetPVNNSelection::PVNN::TrackLinks
std::vector< ElementLink< TPC > > TrackLinks
Definition
PVNN.h:56
InDetPVNNSelection::PVNN::m_varsFromVertex
std::vector< internal::VarFromVertex > m_varsFromVertex
Definition
PVNN.h:74
InDetPVNNSelection::PVNN::createDecorators
std::set< std::string > createDecorators(const FlavorTagInference::OutputConfig &outConfig)
FlavorTagInference::OutputConfig
std::vector< SaltModelOutput > OutputConfig
Definition
ISaltModel.h:38
InDetPVNNSelection
Definition
InnerDetector/InDetRecTools/InDetPVNNSelection/InDetPVNNSelection/ConstituentsLoader.h:22
SG::Decorator
SG::Decorator< T, ALLOC > Decorator
Helper class to provide type-safe access to aux data, specialized for JaggedVecElt.
Definition
AuxElement.h:576
xAOD::Vertex
Vertex_v1 Vertex
Define the latest version of the vertex class.
Definition
Event/xAOD/xAODTracking/xAODTracking/Vertex.h:16
xAOD::TrackParticleContainer
TrackParticleContainer_v1 TrackParticleContainer
Definition of the current "TrackParticle container version".
Definition
Event/xAOD/xAODTracking/xAODTracking/TrackParticleContainer.h:14
InDetPVNNSelection::PVNN::Decorators
Definition
PVNN.h:64
InDetPVNNSelection::PVNN::Decorators::vertexFloat
Decs< float > vertexFloat
Definition
PVNN.h:65
Generated on
for ATLAS Offline Software by
1.17.0