|
ATLAS Offline Software
|
Go to the documentation of this file.
43 std::string weightfile(
"");
48 if (weightfile.empty()) {
50 return StatusCode::FAILURE;
65 if (!weightfile.empty()) {
66 m_net = std::make_unique<TauGNN>(weightfile,
config);
69 return StatusCode::FAILURE;
73 return StatusCode::SUCCESS;
84 out_ptau(tau) = -1111.0f;
85 out_pjet(tau) = -1111.0f;
89 return StatusCode::SUCCESS;
94 std::vector<const xAOD::TauTrack *> tracks;
97 std::vector<xAOD::CaloVertexedTopoCluster>
clusters;
103 std::vector<const xAOD::TauTrack *> trackVec(tracks.begin(), tracks.begin()+numTracksMax);
106 auto [out_f, out_vc, out_vf] =
m_net->compute(tau, trackVec,
clusters);
111 for(
unsigned int i=0;
i<tracks.size();
i++){
112 if(
i<out_vc.at(
"track_class").size()){out_trkclass(*tracks.at(
i))=out_vc.at(
"track_class").at(
i);}
113 else{out_trkclass(*tracks.at(
i))=
'9';}
118 return StatusCode::SUCCESS;
127 std::vector<const xAOD::TauTrack*> tracks = tau.
allTracks();
135 while(
it != tracks.end()) {
137 it = tracks.erase(
it);
147 return lhs->
pt() > rhs->pt();
149 std::sort(tracks.begin(), tracks.end(), cmp_pt);
150 out = std::move(tracks);
152 return StatusCode::SUCCESS;
160 TLorentzVector clusterP4 = vertexedCluster.p4();
163 clusters.push_back(vertexedCluster);
169 return lhs.
p4().Et() > rhs.p4().Et();
178 return StatusCode::SUCCESS;
JetConstituentVector::iterator iterator
virtual FourMom_t p4() const final
The full 4-momentum of the particle.
std::unique_ptr< TauGNN > m_net
std::string m_input_layer_scalar
bool m_doTrackClassification
Helper class to provide type-safe access to aux data.
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
StatusCode get_tracks(const xAOD::TauJet &tau, std::vector< const xAOD::TauTrack * > &out) const
const TauGNN * get_gnn() const
std::string m_input_layer_tracks
std::string m_input_layer_clusters
std::string m_outnode_tau
std::string m_output_ptau
virtual StatusCode initialize() override
Tool initializer.
virtual double pt() const
The transverse momentum ( ) of the particle.
Helper class to provide type-safe access to aux data.
std::string m_output_pjet
::StatusCode StatusCode
StatusCode definition for legacy code.
Class describing a tau jet.
virtual double pt() const
The transverse momentum ( ) of the particle.
Wrapper around ONNXUtil to compute the output score of a model.
std::vector< xAOD::CaloVertexedTopoCluster > vertexedClusters() const
std::string m_output_varname
bool m_doVertexCorrection
std::string m_outnode_jet
std::vector< std::string > config
virtual ~TauGNNEvaluator()
Evaluate cluster kinematics with a different vertex / signal state.
TauGNNEvaluator(const std::string &name="TauGNNEvaluator")
StatusCode get_clusters(const xAOD::TauJet &tau, std::vector< xAOD::CaloVertexedTopoCluster > &out) const
std::vector< const TauTrack * > allTracks() const
Get the v<const pointer> to all tracks associated with this tau, regardless of classification.
virtual StatusCode execute(xAOD::TauJet &tau) const override
Execute - called for each tau candidate.