ATLAS Offline Software
MultifoldGNNTool.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 MULTIFOLD_GNN_TOOL_H
6 #define MULTIFOLD_GNN_TOOL_H
7 
8 // Tool includes
9 #include "AsgTools/AsgTool.h"
13 
15 
16 // EDM includes
17 #include "xAODJet/JetFwd.h"
18 
19 #include <memory>
20 #include <string>
21 #include <map>
22 
23 // needed for map<string,<map<string,float>>
24 #include "Gaudi/Parsers/Factory.h"
25 
26 
27 namespace FlavorTagInference {
28 
29  class MultifoldGNN;
30 
31  //
32  // Tool to to flavor tag jet/btagging object
33  // using GNN based taggers
35  virtual public IJetTagConditionalDecorator
36  {
37 
41  public:
42  MultifoldGNNTool(const std::string& name);
44 
45  StatusCode initialize() override;
46 
47  virtual void decorate(const xAOD::IParticle& i_jet) const override;
48  virtual void decorateWithDefaults(const xAOD::IParticle& i_jet) const override;
49 
50  virtual std::set<std::string> getDecoratorKeys() const override;
51  virtual std::set<std::string> getAuxInputKeys() const override;
52  virtual std::set<std::string> getConstituentAuxInputKeys() const override;
53 
54  private:
55 
56  using MMD = std::map<std::string, std::map<std::string, float>>;
57 
59  this, "nnSharingService", "", "NN sharing service"};
60  std::vector<std::string> m_nn_files;
61  std::string m_fold_hash_name;
63  std::shared_ptr<const MultifoldGNN> m_gnn;
64  Gaudi::Property<MMD> m_defaults {
65  this, "perFoldDefaultOutputValues", {}, "per-fold defaults"};
66  };
67 }
68 #endif
IJetTagConditionalDecorator
Definition: IJetTagConditionalDecorator.h:27
asg::AsgTool
Base class for the dual-use tool implementation classes.
Definition: AsgTool.h:47
FlavorTagInference::MultifoldGNNTool::getDecoratorKeys
virtual std::set< std::string > getDecoratorKeys() const override
Definition: MultifoldGNNTool.cxx:58
FlavorTagInference
This file contains "getter" functions used for accessing tagger inputs from the EDM.
Definition: PhysicsAnalysis/JetTagging/FlavorTagInference/FlavorTagInference/ConstituentsLoader.h:27
FlavorTagInference::MultifoldGNNTool::m_props
FlavorTagInference::GNNToolProperties m_props
Definition: MultifoldGNNTool.h:62
FlavorTagInference::MultifoldGNNTool::decorate
virtual void decorate(const xAOD::IParticle &i_jet) const override
Method to decorate a jet.
Definition: MultifoldGNNTool.cxx:50
IJetTagConditionalDecorator.h
FlavorTagInference::MultifoldGNNTool::MMD
std::map< std::string, std::map< std::string, float > > MMD
Definition: MultifoldGNNTool.h:56
xAOD::IParticle
Class providing the definition of the 4-vector interface.
Definition: Event/xAOD/xAODBase/xAODBase/IParticle.h:41
FlavorTagInference::MultifoldGNNTool::getConstituentAuxInputKeys
virtual std::set< std::string > getConstituentAuxInputKeys() const override
Definition: MultifoldGNNTool.cxx:64
FlavorTagInference::MultifoldGNNTool::m_fold_hash_name
std::string m_fold_hash_name
Definition: MultifoldGNNTool.h:61
FlavorTagInference::MultifoldGNNTool::m_nnsvc
ServiceHandle< FlavorTagInference::INNSharingSvc > m_nnsvc
Definition: MultifoldGNNTool.h:58
FlavorTagInference::MultifoldGNNTool
Definition: MultifoldGNNTool.h:36
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:240
ServiceHandle.h
FlavorTagInference::MultifoldGNNTool::getAuxInputKeys
virtual std::set< std::string > getAuxInputKeys() const override
Definition: MultifoldGNNTool.cxx:61
JetFwd.h
INNSharingSvc.h
FlavorTagInference::MultifoldGNNTool::m_nn_files
std::vector< std::string > m_nn_files
Definition: MultifoldGNNTool.h:60
FlavorTagInference::MultifoldGNNTool::m_defaults
Gaudi::Property< MMD > m_defaults
Definition: MultifoldGNNTool.h:64
GNNToolifiers.h
FlavorTagInference::MultifoldGNNTool::m_gnn
std::shared_ptr< const MultifoldGNN > m_gnn
Definition: MultifoldGNNTool.h:63
ASG_TOOL_CLASS
#define ASG_TOOL_CLASS(CLASSNAME, INT1)
Definition: AsgToolMacros.h:68
FlavorTagInference::GNNToolProperties
Definition: GNNToolifiers.h:22
FlavorTagInference::MultifoldGNNTool::decorateWithDefaults
virtual void decorateWithDefaults(const xAOD::IParticle &i_jet) const override
Method to decorate a jet with defaults.
Definition: MultifoldGNNTool.cxx:53
AsgTool.h
FlavorTagInference::MultifoldGNNTool::initialize
StatusCode initialize() override
Dummy implementation of the initialisation function.
Definition: MultifoldGNNTool.cxx:24
ServiceHandle< FlavorTagInference::INNSharingSvc >