ATLAS Offline Software
Loading...
Searching...
No Matches
TauGNNEvaluator.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef TAURECTOOLS_TAUGNNEVALUATOR_H
6#define TAURECTOOLS_TAUGNNEVALUATOR_H
7
10
11#include "xAODTau/TauJet.h"
14
18
19#include <memory>
20
31public:
33
34 TauGNNEvaluator(const std::string &name = "TauGNNEvaluator");
35 virtual ~TauGNNEvaluator();
36
37 virtual StatusCode initialize() override;
38 virtual StatusCode execute(xAOD::TauJet &tau) const override;
39
43 PTau = 1
44 };
45
46private:
47
48 Gaudi::Property<std::string> m_tauContainerName{this, "TauContainerName", "", "Name of TauJetContainer, must be set when using "};
49 SG::WriteDecorHandleKey<xAOD::TauJetContainer> m_scoreHandleKey{this, "ScoreHandleKey", "", "Output Score"};
50 SG::WriteDecorHandleKey<xAOD::TauJetContainer> m_pTauHandleKey{this, "PTauHandleKey", "", "Output pTau"};
51 SG::WriteDecorHandleKey<xAOD::TauJetContainer> m_pJetHandleKey{this, "PJetHandleKey", "", "Output pJet"};
52
53 SG::ReadDecorHandleKey<xAOD::TauJetContainer> m_hitsHandleKey{this, "HitsHandleKey", "", "Hits decoration key"};
54 std::string m_hits_decor_name;
55
56 // properties
57 Gaudi::Property<std::string> m_weightfile_inclusive{this, "NetworkFileInclusive", ""};
58 Gaudi::Property<std::string> m_weightfile_0p{this, "NetworkFile0P", ""};
59 Gaudi::Property<std::string> m_weightfile_1p{this, "NetworkFile1P", ""};
60 Gaudi::Property<std::string> m_weightfile_2p{this, "NetworkFile2P", ""};
61 Gaudi::Property<std::string> m_weightfile_3p{this, "NetworkFile3P", ""};
62 Gaudi::Property<std::string> m_input_layer_scalar{this, "InputLayerScalar","tau_vars"};
63 Gaudi::Property<std::string> m_input_layer_tracks{this, "InputLayerTracks","track_vars"};
64 Gaudi::Property<std::string> m_input_layer_clusters{this, "InputLayerClusters","cluster_vars"};
65 Gaudi::Property<std::string> m_input_layer_hits{this, "InputLayerHits","hit_vars"};
66 Gaudi::Property<std::string> m_output_varname{this, "OutputVarname", "GNTauScore"};
67 Gaudi::Property<std::string> m_output_ptau{this, "OutputPTau", "GNTauProbTau"};
68 Gaudi::Property<std::string> m_output_pjet{this, "OutputPJet", "GNTauProbJet"};
69 Gaudi::Property<int> m_output_discriminant{this, "OutputDiscriminant", Discriminant::NegLogPJet,
70 "Discriminant used to calculate the output score: -1 -> None, 0 -> -log(PJet), 1 -> PTau"};
71 Gaudi::Property<int> m_max_tracks{this, "MaxTracks", 30};
72 Gaudi::Property<int> m_max_clusters{this, "MaxClusters", 20};
73 Gaudi::Property<float> m_max_cluster_dr{this, "MaxClusterDR", 1.0f};
74 Gaudi::Property<int> m_max_hits{this, "MaxHits", 0};
75 Gaudi::Property<bool> m_doVertexCorrection{this, "VertexCorrection", true};
76 Gaudi::Property<bool> m_doTrackClassification{this, "TrackClassification", true};
77 Gaudi::Property<bool> m_useTRT{this, "useTRT", true};
78 Gaudi::Property<float> m_minTauPt{this, "MinTauPt", 0.};
79 Gaudi::Property<bool> m_applyLooseTrackSel{this, "ApplyLooseTrackSel", false};
80 Gaudi::Property<bool> m_applyTightTrackSel{this, "ApplyTightTrackSel", false};
81 Gaudi::Property<std::string> m_outnode_tau{this, "NodeNameTau", "GN2TauNoAux_pb"};
82 Gaudi::Property<std::string> m_outnode_jet{this, "NodeNameJet", "GN2TauNoAux_pu"};
83 Gaudi::Property<float> m_min_prong_track_pt{this, "MinProngTrackPt", 0.};
84
85 // Wrappers for lwtnn
86 std::unique_ptr<TauGNN> m_net_inclusive;
87 std::unique_ptr<TauGNN> m_net_0p;
88 std::unique_ptr<TauGNN> m_net_1p;
89 std::unique_ptr<TauGNN> m_net_2p;
90 std::unique_ptr<TauGNN> m_net_3p;
91
92 std::unique_ptr<TauGNN> load_network(const std::string& network_file) const;
93};
94
95#endif // TAURECTOOLS_TAUGNNEVALUATOR_H
#define ASG_TOOL_CLASS2(CLASSNAME, INT1, INT2)
Property holding a SG store/key/clid/attr name from which a ReadDecorHandle is made.
Evaluate cluster kinematics with a different vertex / signal state.
The base class for all tau tools.
Property holding a SG store/key/clid/attr name from which a ReadDecorHandle is made.
Property holding a SG store/key/clid/attr name from which a WriteDecorHandle is made.
Gaudi::Property< std::string > m_weightfile_inclusive
TauGNNEvaluator(const std::string &name="TauGNNEvaluator")
Gaudi::Property< int > m_max_tracks
Gaudi::Property< std::string > m_input_layer_hits
std::unique_ptr< TauGNN > m_net_1p
Gaudi::Property< std::string > m_input_layer_scalar
std::string m_hits_decor_name
SG::WriteDecorHandleKey< xAOD::TauJetContainer > m_scoreHandleKey
virtual ~TauGNNEvaluator()
Gaudi::Property< float > m_max_cluster_dr
std::unique_ptr< TauGNN > m_net_3p
Gaudi::Property< float > m_minTauPt
std::unique_ptr< TauGNN > load_network(const std::string &network_file) const
Gaudi::Property< int > m_output_discriminant
Gaudi::Property< std::string > m_input_layer_clusters
Gaudi::Property< int > m_max_clusters
Gaudi::Property< float > m_min_prong_track_pt
Gaudi::Property< std::string > m_outnode_tau
std::unique_ptr< TauGNN > m_net_0p
Gaudi::Property< std::string > m_tauContainerName
Gaudi::Property< bool > m_doVertexCorrection
Gaudi::Property< int > m_max_hits
Gaudi::Property< bool > m_applyTightTrackSel
Gaudi::Property< std::string > m_output_varname
Gaudi::Property< std::string > m_output_pjet
Gaudi::Property< bool > m_useTRT
std::unique_ptr< TauGNN > m_net_inclusive
std::unique_ptr< TauGNN > m_net_2p
SG::WriteDecorHandleKey< xAOD::TauJetContainer > m_pJetHandleKey
Gaudi::Property< bool > m_doTrackClassification
SG::WriteDecorHandleKey< xAOD::TauJetContainer > m_pTauHandleKey
Gaudi::Property< std::string > m_outnode_jet
Gaudi::Property< std::string > m_output_ptau
Gaudi::Property< std::string > m_weightfile_1p
Gaudi::Property< std::string > m_weightfile_3p
SG::ReadDecorHandleKey< xAOD::TauJetContainer > m_hitsHandleKey
virtual StatusCode execute(xAOD::TauJet &tau) const override
Execute - called for each tau candidate.
Gaudi::Property< bool > m_applyLooseTrackSel
virtual StatusCode initialize() override
Tool initializer.
Gaudi::Property< std::string > m_weightfile_2p
Gaudi::Property< std::string > m_input_layer_tracks
Gaudi::Property< std::string > m_weightfile_0p
TauRecToolBase(const std::string &name)
TauJet_v3 TauJet
Definition of the current "tau version".