ATLAS Offline Software
Loading...
Searching...
No Matches
TauJetRNNEvaluator.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef TAURECTOOLS_TAUJETRNNEVALUATOR_H
6#define TAURECTOOLS_TAUJETRNNEVALUATOR_H
7
10
11#include "xAODTau/TauJet.h"
13
14#include <memory>
15
16class TauJetRNN;
17
29public:
31
32 TauJetRNNEvaluator(const std::string &name = "TauJetRNNEvaluator");
33 virtual ~TauJetRNNEvaluator();
34
35 virtual StatusCode initialize() override;
36 virtual StatusCode execute(xAOD::TauJet &tau) const override;
37
38 // Selects tracks to be used as input to the network
39 StatusCode get_tracks(const xAOD::TauJet &tau,
40 std::vector<const xAOD::TauTrack *> &out) const;
41
42 // Selects clusters to be used as input to the network
43 StatusCode get_clusters(const xAOD::TauJet &tau,
44 std::vector<xAOD::CaloVertexedTopoCluster> &out) const;
45
46private:
47
48 // properties
49 Gaudi::Property<std::string> m_weightfile_0p{this, "NetworkFile0P", ""};
50 Gaudi::Property<std::string> m_weightfile_1p{this, "NetworkFile1P", ""};
51 Gaudi::Property<std::string> m_weightfile_2p{this, "NetworkFile2P", ""};
52 Gaudi::Property<std::string> m_weightfile_3p{this, "NetworkFile3P", ""};
53 Gaudi::Property<std::string> m_output_varname{this, "OutputVarname", "RNNJetScore"};
54 Gaudi::Property<std::size_t> m_max_tracks{this, "MaxTracks", 10};
55 Gaudi::Property<std::size_t> m_max_clusters{this, "MaxClusters", 6};
56 Gaudi::Property<float> m_max_cluster_dr{this, "MaxClusterDR", 1.0f};
57 Gaudi::Property<bool> m_doVertexCorrection{this, "VertexCorrection", true};
58 Gaudi::Property<bool> m_doTrackClassification{this, "TrackClassification", true};
59 Gaudi::Property<bool> m_useTRT{this, "useTRT", true};
60 Gaudi::Property<std::string> m_input_layer_scalar{this, "InputLayerScalar", "scalar"};
61 Gaudi::Property<std::string> m_input_layer_tracks{this, "InputLayerTracks", "tracks"};
62 Gaudi::Property<std::string> m_input_layer_clusters{this, "InputLayerClusters", "clusters"};
63 Gaudi::Property<std::string> m_output_layer{this, "OutputLayer", "rnnid_output"};
64 Gaudi::Property<std::string> m_output_node{this, "OutputNode", "sig_prob"};
65 Gaudi::Property<bool> m_applyLooseTrackSel{this, "ApplyLooseTrackSel", false};
66
67 // Wrappers for lwtnn
68 std::unique_ptr<TauJetRNN> m_net_0p;
69 std::unique_ptr<TauJetRNN> m_net_1p;
70 std::unique_ptr<TauJetRNN> m_net_2p;
71 std::unique_ptr<TauJetRNN> m_net_3p;
72};
73
74#endif // TAURECTOOLS_TAUJETRNNEVALUATOR_H
#define ASG_TOOL_CLASS2(CLASSNAME, INT1, INT2)
Evaluate cluster kinematics with a different vertex / signal state.
The base class for all tau tools.
Gaudi::Property< std::string > m_weightfile_2p
virtual StatusCode initialize() override
Tool initializer.
Gaudi::Property< std::string > m_input_layer_clusters
virtual StatusCode execute(xAOD::TauJet &tau) const override
Execute - called for each tau candidate.
Gaudi::Property< std::string > m_input_layer_tracks
Gaudi::Property< float > m_max_cluster_dr
std::unique_ptr< TauJetRNN > m_net_0p
Gaudi::Property< bool > m_doTrackClassification
Gaudi::Property< std::string > m_weightfile_1p
Gaudi::Property< std::size_t > m_max_clusters
Gaudi::Property< bool > m_useTRT
TauJetRNNEvaluator(const std::string &name="TauJetRNNEvaluator")
StatusCode get_tracks(const xAOD::TauJet &tau, std::vector< const xAOD::TauTrack * > &out) const
std::unique_ptr< TauJetRNN > m_net_2p
Gaudi::Property< std::string > m_output_node
std::unique_ptr< TauJetRNN > m_net_3p
Gaudi::Property< std::string > m_weightfile_0p
StatusCode get_clusters(const xAOD::TauJet &tau, std::vector< xAOD::CaloVertexedTopoCluster > &out) const
Gaudi::Property< std::string > m_weightfile_3p
Gaudi::Property< std::string > m_output_layer
Gaudi::Property< std::string > m_input_layer_scalar
std::unique_ptr< TauJetRNN > m_net_1p
Gaudi::Property< bool > m_doVertexCorrection
Gaudi::Property< std::string > m_output_varname
Gaudi::Property< bool > m_applyLooseTrackSel
Gaudi::Property< std::size_t > m_max_tracks
Wrapper around lwtnn to compute the output score of a neural network.
Definition TauJetRNN.h:34
TauRecToolBase(const std::string &name)
TauJet_v3 TauJet
Definition of the current "tau version".