ATLAS Offline Software
JSSWTopTaggerANN.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef JSSWTOPTAGGERANN_H_
6 #define JSSWTOPTAGGERANN_H_
7 
9 
10 #include "lwtnn/LightweightGraph.hh"
11 #include "lwtnn/parse_json.hh"
12 #include "lwtnn/Exceptions.hh"
13 #include "lwtnn/lightweight_nn_streamers.hh"
14 
16  public JSSTaggerBase {
18 
19  public:
20 
22  JSSWTopTaggerANN(const std::string& name);
23 
25  virtual StatusCode initialize() override;
26 
28  virtual StatusCode tag(const xAOD::Jet& jet) const override;
29  virtual StatusCode decorate( const xAOD::JetContainer& jets ) const override;
30 
31  private:
32 
34  std::unique_ptr<lwt::LightweightGraph> m_lwnn;
35  std::map<std::string, std::map<std::string,double>> m_ANN_inputValues; // variables for ANN
36 
38  std::vector<std::string> m_out_names;
39 
41  double getScore(const xAOD::Jet& jet) const;
42 
44  std::map<std::string, std::map<std::string,double>> getJetProperties(const xAOD::Jet& jet) const;
45 
46  };
47 
48 #endif
JSSWTopTaggerANN::JSSWTopTaggerANN
JSSWTopTaggerANN(const std::string &name)
Constructor.
Definition: JSSWTopTaggerANN.cxx:10
JSSWTopTaggerANN::m_ANN_inputValues
std::map< std::string, std::map< std::string, double > > m_ANN_inputValues
Definition: JSSWTopTaggerANN.h:35
JSSWTopTaggerANN::m_lwnn
std::unique_ptr< lwt::LightweightGraph > m_lwnn
ANN tools.
Definition: JSSWTopTaggerANN.h:34
JSSWTopTaggerANN::decorate
virtual StatusCode decorate(const xAOD::JetContainer &jets) const override
Decorate jet collection with tagging info.
Definition: JSSWTopTaggerANN.cxx:219
JSSWTopTaggerANN
Definition: JSSWTopTaggerANN.h:16
JSSWTopTaggerANN::getScore
double getScore(const xAOD::Jet &jet) const
Retrieve score for a given ANN type (top/W)
Definition: JSSWTopTaggerANN.cxx:490
JSSWTopTaggerANN::getJetProperties
std::map< std::string, std::map< std::string, double > > getJetProperties(const xAOD::Jet &jet) const
Update the jet substructure variables for each jet to use in ANN.
Definition: JSSWTopTaggerANN.cxx:524
jet
Definition: JetCalibTools_PlotJESFactors.cxx:23
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ASG_TOOL_CLASS0
#define ASG_TOOL_CLASS0(CLASSNAME)
Definition: AsgToolMacros.h:62
DataVector
Derived DataVector<T>.
Definition: DataVector.h:581
JSSTaggerBase
Definition: JSSTaggerBase.h:39
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:192
JSSWTopTaggerANN::initialize
virtual StatusCode initialize() override
Run once at the start of the job to setup everything.
Definition: JSSWTopTaggerANN.cxx:18
JSSWTopTaggerANN::m_out_names
std::vector< std::string > m_out_names
Internal stuff to keep track of the output node for the NN.
Definition: JSSWTopTaggerANN.h:38
xAOD::Jet_v1
Class describing a jet.
Definition: Jet_v1.h:57
JSSWTopTaggerANN::tag
virtual StatusCode tag(const xAOD::Jet &jet) const override
Decorate single jet with tagging info.
Definition: JSSWTopTaggerANN.cxx:409
defineDB.jets
list jets
Definition: JetTagCalibration/share/defineDB.py:24
JSSTaggerBase.h